local-cli/runIOS/runIOS.js uses incorrect values when building / installing iOS App #7806
Labels
Platform: iOS
iOS applications.
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
Environment
Issue
local-cli/runIOS/runIOS.js will error out with the following messages if the final build location of the app is not
build/Build/Products/Debug-iphonesimulator/${inferredSchemeName}.app
.Installing the new app version on the running simulator fails
Line 96 (
child_process.spawnSync('xcrun', ['simctl', 'install', 'booted', appPath], {stdio: 'inherit'});
) results in the following:Installing build/Build/Products/Debug-iphonesimulator/[IMPLICIT_SCHEME_NAME].app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
Printing the CFBundleIndentifier fails because the path to the Plist is incorrect
Line 105 (
child_process.spawnSync('xcrun', ['simctl', 'launch', 'booted', bundleID], {stdio: 'inherit'});
) results in the following: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
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/[IMPLICIT_SCHEME_NAME].app/Info.plist
Repro
react-native init MyApp
react-native run-ios
Root Causes & Possible Solutions
Modifying [APPLICATION_TARGET] -> Build Settings -> Packaging -> Product Name so it does not match inferredSchemeName
Get value of EXECUTABLE_NAME from
xcodebuild
with identical settings and-showBuildSettings
flag and use that instead of implicitSchemeName in the appPath.xcodebuild
builds in Release by default for Xcode projectsPass in
-configuration Debug
toxcodebuild
when buildingRelated Issues
Perhaps this is what's causing #7786 and #7308?
The text was updated successfully, but these errors were encountered: