将ScrollView内的内容用TouchableOpacity进行包裹,并设置onPress={() => {}}属性
使用codepush进行热更后,src目录下的音频文件在安卓系统中无法引用。需要将文件放到原生系统中。热更的bundle文件无法打包音频文件。
//屏幕高度(状态栏+安全区+下方虚拟按键操作区)
Dimensions.get('screen').height
//窗口高度(状态栏+安全区)
Dimensions.get('window').height
通过Dimensions.get()获取到的宽、高并不是横屏后的宽高。使用横屏下宽>高的普遍规则进行页面适配。
修改node_modules中react-native/Libraries/Image/RCTUIImageViewAnimates.m文件
if (_currentFrame) { //275行
layer.contentsScale = self.animatedImageScale;
layer.contents = (__bridge id)_currentFrame.CGImage;
} else { //加上这个 不然ios14以上的系统看不见图片
[super displayLayer:layer];
}
1、watchman watch-del-all
2、rm -rf node_modules && npm install
3、rm -rf /tmp/metro-bundler-cache-* (npm start --reset-cache/react-native start --reset-cache)
4、rm -rf /tmp/haste-map-react-native-packager-*
console.log(this.props.navigation.state.params.data)
1、添加行(https://www.ipaddress.com可查询域名的ip地址。eg: GitHub.com)
sudo vim /etc/hosts
添加行:
199.232.68.133 raw.githubusercontent.com
140.82.113.3 github.com
2、清空git代理
git config --global --unset http.proxygit config --global --unset https.proxy
git config --global --list
3、设置环境变量
env GIT_SSL_NO_VERIFY=true
1、浏览器输入 https://raw.githubusercontent.com/Homebrew/install/master/install看是否能够访问
2、按照提示,执行
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
3、尝试
pod install
npm清缓存+node版本升级
sudo npm cache clean -fsudo
npm install -g nsudo n stable
$ export COCOAPODS_DISABLE_DETERMINISTIC_UUIDS=YES
或者Podfile中添加
install! 'cocoapods', :deterministic_uuids => false
或者删除Podfile.lock 重新 pod install
$ cd ~/.cocoapods/repos $ pod repo remove master
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.gitmaster
修改Podfile文件
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
npm install --production --unsafe-perm=true --allow-root
pod 'RNSentry', :path => '../node_modules/@sentry/react-native'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'SensorsAnalyticsSDK', :subspecs => ['DISABLE_UIWEBVIEW','ENABLE_REACT_NATIVE_APPCLICK']
pod 'boost-for-react-native', :git => 'https://gitee.com/damon-s/boost-for-react-native.git’
"apple-authentication": "file:./plugins/apple-authentication"
"@react-native-community/async-storage": "github:react-native-community/async-storage"
"react-native-star-rating-view": "git+https://github.com/ksti/react-native-star-rating-view.git#purejs"
(参考)
1、curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh>> brew_install
2、/bin/bash brew_install
3、brew_install文件修改:BREW_REPO="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"CORE_TAP_REPO="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
4、/bin/bash -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
//给Xcode命令行工具指定路径
$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
//查看sdk路径
$ xcrun --sdk iphoneos --show-sdk-path
//查看所有可用sdk
$ xcodebuild -showsdks
sudo xattr -r -d com.apple.quarantine /Applications/Navicat\ Premium.app
a. /etc/profile
b. /etc/paths
c. ~/.bash_profile
d. ~/.bash_login
e. ~/.profile
f. ~/.bashrc
/Users/tao/Library/Developer/Xcode/DerivedData/rocketcat-fvrjzdyhzrtjeggqrdafxjapdqza/Build/Intermediates.noindex/ArchiveIntermediates/rocketcat/BuildProductsPath
1、https://itunes.apple.com/cn/app/id14940xxx?mt=8
2、itms-apps://itunes.apple.com/cn/app/apple-books/id149407xxx
https://developer.apple.com/design/human-interface-guidelines/
cd /Users/tao/Library/Android/sdk/emulator
./emulator @Nexus_6P_API_27
open -a Simulator
npx jetify
1、adb reverse tcp:8081 tcp:8081
2、Android允许我们通过ADB,把Android上的某个端口映射到电脑(adb forward),或者把电脑的某个端口映射到Android系统(adb reverse)
3、假设电脑上开启的服务,监听的端口为8081。Android手机通过USB连接电脑后,执行 adb reverse tcp:8081 tcp:8081,然后在手机中访问127.0.0.1:8081,就可以访问到电脑上启动的服务了。
1、执行adb shell 进入命令环境
2、执行adb pull /data/user/0/com.rocketcatwords/files/audio.wav
1、打一个安卓apk
2、放进360加固保加固,得到加固后的apk
3、将apk放入android目录下,修改apk名称与config.py中的配置保持一致
4、运行python ApkResigner.py
5、渠道包便生成到了channels目录下sdkBuildToolPath = "/Users/tao/Library/Android/sdk/build-tools/26.0.2"
/Applications/VLC.app/Contents/MacOS/VLC --demux=rawaud --rawaud-channels 1 --rawaud-samplerate 16000 record_01.pcm
[\u4e00-\u9fa5]+
sudo lsof -i:9090
sudo kill -9 xxxx(进程ID)
1、切换git仓库源:git remote set-url origin xxx.git
2、git commit 后git push/git pull 冲突:git stash && git rebase
3、git rebase后无法提交更新:git push --force-with-lease origin dev
4、tag相关:
git tag 查看所有tag
git tag -a v1.0.0 -m '描述'
git push origin v1.0.0 推送指定tag
git push origin --tags 推送本地所有tag
git push origin --delete tag v1.2.0 删除指定tag
5、不提示输入账户和密码:git config --system --unset credential.helper