Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CFBundleIdentifier", Does Not Exist

I'm getting following error in react native application for iOS.

Installing build/Build/Products/Debug-iphonesimulator/Este.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/Este.app/Info.plist
    Print: Entry, ":CFBundleIdentifier", Does Not Exist

But I see Info.plist has CFBundleIdentifier as below.

<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>

I also tried changing the above to

<key>CFBundleIdentifier</key>
 <string>com.myApp</string>

but same error. Please help.

I also see the following error displayed before the above error

node_modules/react-native-fbsdk/ios/RCTFBSDK/share/RCTFBSDKShareDialog.h:21:9: fatal error: 
      'FBSDKShareKit/FBSDKShareKit.h' file not found
#import <FBSDKShareKit/FBSDKShareKit.h>
like image 368
user43286 Avatar asked Oct 19 '22 02:10

user43286


2 Answers

After losing my time with this error, I found the solution, the problem is in pods, it may be that when updating some library, pods are not synchronized.

My solution: Go to /ios folder ----> and run the command: ·

pod install && pod update

  • after go back to the project folder ----> and run the command: ·

rm -rf node_modules && npm install

Clean ios build folder: ·

rm -rf ios/build

After that, just run as usual: ·

react-native run-ios

like image 103
Emmanuel Guther Avatar answered Oct 30 '22 04:10

Emmanuel Guther


you can try changing it to $(PRODUCT_BUNDLE_IDENTIFIER)

like image 20
WuTaoTao Avatar answered Oct 30 '22 03:10

WuTaoTao