-
Notifications
You must be signed in to change notification settings - Fork 76
Build fails with vanilla project #60
Comments
Seems to be a react-native issue facebook/react-native#7308 |
What's interesting is that my vanilla React Native app works until I follow the process to install react-native-lock. |
It has hardly anything to do with the library since the failure is from react-native cli and how it handles the build. In that issue they say that it fails because something is running in the port the packager should run, but it raises a different error. |
What is the last known working version of React Native with react-native-lock? I can try that. |
@sbefort it should work with the latest version, did you try the suggested fix from facebook/react-native#7308 ? |
Last night I saw that issue. I killed anything running on port 8081 and still had the same build error. So then I ran react-native upgrade overwriting all conflicts. Then my build succeeded, but your sample app failed when calling lock.show on line 91. The error was, "cannot read property init of undefined." So I assumed that react-native upgrade screwed up my react-native-lock installation, so I started over this morning. I do not know if that is a correct assumption or not. If I run react-native upgrade, is it safe to overwrite all conflicts? Thanks. |
I have determined that the suggested solution of running react-native upgrade in that issue is definitely problematic. It wants to overwrite "$(SRCROOT)/../node_modules/react-native-lock/ios/A0RNLock/**" among other things related to the react-native-lock install. |
Checking it, It is since the latest react-native version has a lot of breaking changes. The safe way should be reinstalling react-native-lock after an upgrade like this. |
I got it working now. The issue is with how to deal with the CocoaPods warning mentioned in the Docs:
Before changing this value to $(inherited) in a vanilla React Native project, there may be two values here: If both of those values are removed and replaced with After that, my build was successful and Lock works fine. |
@sbefort thanks, I forgot to update the README when RN 0.26 came out. I'll probably rework that section |
after updating react-native (react-native upgrade), rnpm ulink react-native-lock and rnpm link react-native-lock it worked for me |
The correct handling for upgrading react-native is to run If you have other changes like extras dependencies in the Podfile, I'd recommend not overwriting your I'll close this and add a |
Steps to recreate problem:
react-native-cli: 0.2.0
react-native: 0.27.1
CocoaPods 1.0.1
npm 3.9.2
Xcode 7.3.1
The build error mentions my Info.plist file. Under Bundle identifier in that file, I have $(PRODUCT_BUNDLE_IDENTIFIER)
** BUILD FAILED **
The following commands produced analyzer issues:
Analyze Modules/RCTUIManager.m
(1 command with analyzer issues)
The following build commands failed:
Ld build/Build/Products/Debug-iphonesimulator/upool.app/upool normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/upool.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
/Users/nomad/Mobile/upool/node_modules/promise/lib/done.js:10
throw err;
^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/upool.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
The text was updated successfully, but these errors were encountered: