React-Native iOS App Build Failure - Print: Entry, ":CFBundleIdentifier", Does Not Exist - react-native

I am running a react-native app on my local Mac OS X El Capitan machine. I have installed the required dependencies, but the app is still not launching in iOS simulator.
Here is the output:
** BUILD FAILED **
The following build commands failed:
Ld build/Build/Products/Debug-iphonesimulator/F8v2.app/F8v2 normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/F8v2.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/-/f8app/node_modules/react-native/node_modules/promise/lib/done.js:10
throw err;
^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/F8v2.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:464:13)
at Object.execFileSync (child_process.js:484:13)
at _runIOS (/Users/-/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:82:32)
at /Users/-/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:24:5
at tryCallTwo (/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (/Users/-/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:23:10)
at Object.run (/Users/-/f8app/node_modules/react-native/local-cli/cliEntry.js:96:13)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)

Run react-native upgrade and overwrite all iOS files. That did it for me.

The issue for me was a space in build/info.plist's directory path.
Removing a space in a parent folder's name solved it.

Related

How can I find out which package is missing for conan?

I am trying to install an environment using conan. I receive the message
opengl/system: Already installed!
ERROR: opengl/system: Error in package_info() method, line 60
pkg_config.fill_cpp_info(self.cpp_info, is_system=self.settings.os != "FreeBSD")
ConanException: pkg-config command ['pkg-config', '--print-provides', 'gl', '--print-errors'] failed with error: Command 'pkg-config --print-provides gl --print-errors' returned non-zero exit status 127.
/bin/sh: 1: pkg-config: not found
This says me a lot of information, except that which package is not yet installed.
How can I find out that?

Xcode build error: PhaseScriptExecution Strip\ Frameworks /appName.build/Debug-iphonesimulator/PROD.build/Script-8CBD27422B744FC9C0407AA3.sh

I am really struggling to understand the internals of Xcode, the latest error I am getting is this one:
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Strip\ Frameworks /Users/danale/Library/Developer/Xcode/DerivedData/build/Build/Intermediates.noindex/NFIBEngage.build/Debug-iphonesimulator/PROD.build/Script-8CBD27422B744FC9C0407AA3.sh
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/NFIBEngage.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/NFIBEngage.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
How do I go about resolving this? None of what I have seen thus far has worked. The application itself loads just fine inside of simulator, but I keep getting build failures.
I was getting this error when I had React Native 0.53.3 and React 16.2 and I continue to get this error when I upgraded to React Native 0.59.9 and React 16.8.
The PhaseScriptExecution Strip\ Frameworks /appName.build/Debug-iphonesimulator/PROD.build/Script-8CBD27422B744FC9C0407AA3.sh Xcode build error was related to some configuration inside of ios/Pods/Pods.xcodeproj/project.pbxproj where the configuration in those files look something like this:
9B41C3B09EAC07B2B007DE0F /* Strip Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Strip Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/InstabugCore.framework/strip-frameworks.sh\"\n";
};
Once I completely removed references to 8CBD27422B744FC9C0407AA3 the error went away.

Not able to run project

I have selected Location in Xcode preference also but getting the same error:
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Error: Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
at checkExecSyncError (child_process.js:601:13)
at Object.execFileSync (child_process.js:621:13)
at Object.runIOS [as func] (/Users/ranjith/Documents/Project/Login_React/node_modules/react-native/local-cli/runIOS/runIOS.js:76:17)
at Promise.resolve.then (/Users/ranjith/Documents/Project/Login_React/node_modules/react-native/local-cli/cliEntry.js:117:22)
at <anonymous>
Check Xcode Command Line Tools are configured Correctly go following path
Open Xcode > Preferences > Locations
Then Set the Command Line Tools
In my case, an Xcode update caused iPhoneOS-12.2.sdk to be no longer available; instead, the path contained iPhoneOS-12.4.sdk. But react-native run-ios complained of not being able to find 12.2.
Restarting the computer fixed the issue.
Do you have XCode and Command Line Tools installed?

Xcode 10 fatal error: lipo: can't open input file

I'm building a static library in objective-c, in Xcode 9 I could build without problem but I'm blocked in Xcode 10.
Initially I had these two problems that I resolved with the answers below
Xcode 10 Error: Multiple commands produce
Xcode 10: unable to attach DB error
Now I have this lipo error, and I already tried the solution of adding arm64 to the valid architecture and build only valid architecture
build settings pictures
** BUILD SUCCEEDED **
fatal error: lipo: can't open input file: /Users/Alex/Library/Developer/Xcode/DerivedData/myNewLibrary-gvpwgkkoffdnkybybgkafnqwepcx/Build/Products/Debug-iphoneos/arm64/myNewLibrary/myNewLibrary (No such file or directory)
Command PhaseScriptExecution failed with a nonzero exit code
Anyone have idea how to resolve ? thanks

Install Qutip on Mac os x 10.10 via MacPorts

I am not sure whether i can ask this question here.
I tried to install QuTips on my mac osx 10.10. Am following these two documentation for installation Qutip and MacPorts. Now am struggle to install gcc49.
When i execute this command sudo port install py34-scipy I got the following error
Admins-iMac-2:base admin$ sudo port install py27-scipy
---> Computing dependencies for py27-scipy
The following dependencies will be installed:
gcc49
py27-numpy
swig
swig-python
Continue? [Y/n]: y
---> Building gcc49
Error: Failed to build gcc49: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py27-scipy failed
Admins-iMac-2:base admin$ sudo port install py34-numpy
---> Computing dependencies for py34-numpy
The following dependencies will be installed: gcc49
Continue? [Y/n]: y
---> Building gcc49
Error: Failed to build gcc49: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py34-numpy failed
Admins-iMac-2:base admin$ vi /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/main.log
Admins-iMac-2:base admin$
I go and look for main.log file. At the end of this file i got below errors
:info:build gcc/vtable-verify.o differs
:info:build make[2]: *** [compare] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/work/build'
:info:build make[1]: *** [stage3-bubble] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/work/build'
:info:build make: *** [bootstrap] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/work/build'
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/work/build" && /usr/bin/make -j4 -w bootstrap
:info:build Exit code: 2
:error:build Failed to build gcc49: command execution failed
:debug:build Error code: CHILDSTATUS 2595 2
:debug:build Backtrace: command execution failed
:debug:build while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build invoked from within
:debug:build "command_exec build"
:debug:build (procedure "portbuild::build_main" line 8)
:debug:build invoked from within
:debug:build "$procedure $targetname"
:debug:build Registry error: gcc49 not registered as installed & active.
:debug:build invoked from within
:debug:build "registry_active $subport"
:debug:build invoked from within
:debug:build "$workername eval registry_active \$subport"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/main.log for details.
Am not familiar with this. I cannot complete installation without this gcc49. Alternatively i install gcc48, but dosen't work for me. Every time it automatically tried ti install gcc49.
Anybody have any suggestion, it will be really appreciated.
I can answer my question
run sudo port clean gcc49, then try again