我的团队正在使用React Native构建我们的第一个iOS应用程序。但是仅在我的Mac上,运行react-native run-ios
后构建会失败,这种情况发生在我们添加了react-native-fbsdk
进行Facebook身份验证之后。
我们所有人都在运行node -v 7.0和最新版本的Xcode。我甚至尝试过删除本地repo并将其克隆回来。作为一次实验,我的团队的另一名成员删除了他的本地repo,将其克隆回来,并成功地让一切正常。我们坐在一起,做了完全相同的步骤,但对他有效而对我无效。
以下是我在终端中收到的错误消息:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/philmok/js_projects/pLot/ios/build/Build/Intermediates/RCTFBSDK.build/Debug-iphonesimulator/RCTFBSDK.build/Objects-normal/x86_64/RCTFBSDKGraphRequestManager.o RCTFBSDK/core/RCTFBSDKGraphRequestManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/pLot.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/pLot.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
根据这个问题上的答案,我尝试运行react-native upgrade
。这将允许构建完成,但会导致Facebook身份验证无法工作。