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.

App wont install on IOS

See original GitHub issue

Description

Im getting a bug in react native when I try to run on a IOS device. The problem appears when I use the command : npx react-native run-ios --device using Visual Studio Code.

The error I am getting is :

success: Successfully built the app

error: “Couldn’t find “PLATFORM_NAME” variable in xcodebuild output. Please report this”

It works when I build from IOS, but not from Visual Studio Code.

I have googled and tried to find a solution, but I can’t find anything.

the workaround i’ve found so far is:

  1. run from xcode
  2. run the command “npx react-native run-ios --device” after xcode build

Version

0.66.1

Output of react-native info

System: OS: macOS 11.3.1 CPU: (12) x64 Intel® Core™ i7-9750H CPU @ 2.60GHz Memory: 316.93 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.2.0 - /usr/local/bin/node Yarn: Not Found npm: 7.13.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 29, 30 Build Tools: 29.0.2, 30.0.3 System Images: android-29 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.2 AI-202.7660.26.42.7486908 Xcode: 13.0/13A233 - /usr/bin/xcodebuild Languages: Java: 1.8.0_292 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: ^0.66.1 => 0.66.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  1. Open project in Visual Stuido Code
  2. Run the command : “npx react-native run-ios --device”

Snack, code example, screenshot, or link to a repository

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

3reactions
absingh927commented, Jan 7, 2022

Also ran into the same issue with MacBook Pro M1, tried the workaround (run in Xcode and then npx react-native run-ios) and it worked fine after that.

0reactions
jasonrwagnercommented, Jun 9, 2022

Here’s another workaround that works for our team. If you have an Intel MBP uncheck the For install builds only. M1 check the checkbox.

Screen Shot 2022-06-09 at 9 43 45 AM

Read more comments on GitHub >

github_iconTop Results From Across the Web

If you can't download or update apps on your iPhone or iPad
If you can't download or update apps on your iPhone or iPad · Manually update the app. Learn how to manually update an...
Read more >
Can't Download Apps in iPhone? Ways to Fix It
13 Methods to fix 'can't download apps in iPhone.' · 1. Check your Wi-Fi connection · 2. Check storage space in your iPhone...
Read more >
iPhone Won't Download Apps? 11 Ways to Fix It - Lifewire
Download apps using Wi-Fi on your iPhone. · Restart the App Store app. · Pause and restart the app download. · Restart the...
Read more >
How To Fix an iPhone That Won't Download Apps - Alphr
1. Open the “Settings” app. 2. Tap on (your name), then choose the “iTunes & App Store”/ "Media and Purchase". 3. Choose “Password...
Read more >
iOS 16 Can't Install New Apps - AppleToolBox
iOS 16 Can't Install New Apps · Restart the App Store · Restart Your Phone · Download an App You Already Own ·...
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