question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build fails to install when using the iOS 14 SDK

See original GitHub issue

Environment

$ y react-native info
info Fetching system and libraries information...
System:
    OS: macOS 10.16
    CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
    Memory: 428.42 MB / 16.00 GB
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 14.4.0 - /private/var/folders/5w/5dc75xj91xx_mvq7prvkplx80000gn/T/xfs-f9519a63/node
    Yarn: 2.0.0-rc.33 - /private/var/folders/5w/5dc75xj91xx_mvq7prvkplx80000gn/T/xfs-f9519a63/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/lib/ruby/gems/2.7.0/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.0, DriverKit 20.0, macOS 10.16, tvOS 14.0, watchOS 7.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 12.0/12A6159 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
    Python: 3.7.7 - /usr/local/opt/python/libexec/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0
    react-native: ^0.62.2 => 0.62.2
  npmGlobalPackages:
    *react-native*: Not Found

Description

When one uses the iOS 14 SDK to build the app for a simulator, e.g. yarn react-native run-ios, the build fails. As far as I can tell, the cli-platform-ios package fails to successfully capture the stdout from xcodebuild in this section: https://github.com/react-native-community/cli/blob/f76add94dcfb647dd55b59a5fad9a4d5363962fa/packages/platform-ios/src/commands/runIOS/index.ts#L312-L357. This causes getProductName https://github.com/react-native-community/cli/blob/f76add94dcfb647dd55b59a5fad9a4d5363962fa/packages/platform-ios/src/commands/runIOS/index.ts#L282-L287 to not get the correct app name, which causes the “wrong” .app to be installed, so the entire thing fails. I have the app name set to something other than the scheme name, so that’s why this is an issue. To be sure, I’ve checked that the app builds successfully when using the release SDK and toolchain, so I know that the iOS 14 SDK is the cause of this.

Reproducible Demo

Any project whose App Name (in Xcode) is different than the scheme name.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:21 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
thymikeecommented, Sep 18, 2020

Please check how to update the @react-native-community/cli to the latest version 😃

4reactions
zachariahtimothycommented, Sep 17, 2020

For anyone else stumbling here in panic mode; I solved this by pinning the ios platform tool version based on the above mentioned PR (RN 0.62.2).

"resolutions": {
    "@react-native-community/cli-platform-ios": "4.13.0"
  },

Just be sure you clean all node modules, derived data, etc then rerun npm/yarn install.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS14.0 Unable to install app | Apple Developer Forums
When I download the app from iOS 14.0 device it is throwing 'Unable to install Myapp, Please try again later' error. Whereas, the...
Read more >
How to fix the error "The developer of this app needs to update ...
As a security measure, iOS refuses to launch an application with a missing or invalid signature. The signature generated by a build with...
Read more >
Setup for Developing With the Cast Application Framework ...
Setup steps · Open your Podfile and remove the google-cast-sdk if present: pod 'google-cast-sdk' · Add the Protobuf library if not present: pod...
Read more >
iOS 14 apps failed on over the air installation - Stack Overflow
I am getting the error 'unable to install app' while installing the app on iOS 14. For other iOS versions 10, 11, 12...
Read more >
Xcode 12 Build Issues (iOS 14 Simulators, Archive) | Medium
Some of the Errors are as below: No such modules (import installed pods); Cocoapods post-build step with the script they install issue ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found