1:Print: Entry, ":CFBundleIdentifier", Does Not Exist
方法1,初始化的,指定項目版本(不推薦)
react-native init MyAppName --version 0.44.3
方法2,更新RN 0.45以上版本所需的第三方編譯boost庫。boost鏈接地址
2:IOS編譯時報錯:'RCTAnimation/RCTValueAnimatedNode.h' file not found, 'fishhook/fishhook.h' file not found
方法1:每次重新生成node_modules文件夾,都需要修改一次(不推薦)
#import <RCTAnimation/RCTValueAnimatedNode.h>
把修改為
#import "RCTValueAnimatedNode.h"
方法2:執(zhí)行 npm run postinstall 修復(fù)。
3:使用react-native時按cmd+r不能刷新模擬器
把模擬器的鍵盤嘗試呼起就行。如下圖所示
20170111141824843.png

20170111141824843.png
4:使用react-native時按cmd+d 沒有顯示debug的調(diào)試按鈕
ios在podfile文件中,加入 'DevSupport'。如圖所示
屏幕快照 2017-12-12 下午5.31.29.png

屏幕快照 2017-12-12 下午5.31.29.png
5:react-native link 的 Error: Cannot read property 'match' of undefined"
ios在podfile文件中,加入 ' # Add new pods below this line
屏幕快照 2017-12-12 下午5.31.29.png

屏幕快照 2017-12-12 下午5.31.29.png
'。如圖所示!
6:老項目加入RN,解決首次加載會出現(xiàn)白屏的優(yōu)化。 在程序啟動的時候執(zhí)行 RNRootViewController.preLoad()
class RNRootViewController: MLViewController, UIGestureRecognizerDelegate {
static var bridge: RCTBridge?
private var rootView: RCTRootView!
static func preLoad() {
let jsCodeLocation = URL(string: "http://localhost:8081/index.bundle?platform=ios")
RNRootViewController.bridge = RCTBridge(bundleURL: jsCodeLocation,
moduleProvider: nil,
launchOptions: nil)
_ = RNRootViewController(moduleName: "customerService", params: nil)
}