react-native info not detecting Xcode 9 - xcode

On my mac, to be able to develop react-native apps, I installed react-native-cli and create-react-native-app using npm.
When I run:
react-native info
I see the following output:
Environment:
OS: macOS Sierra 10.12.6
Node: 6.11.4
Yarn: Not Found
npm: 3.10.10
Watchman: 4.9.0
Xcode: Not Found
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: ^0.48.4 => 0.48.4
As you can see, Xcode is shown as "Not Found". I am running Xcode 9 on my system.
What should I be checking for / installing on my OS for react-native to work with Xcode 9?

I installed Expo XDE and tried to create and run a project from there. I saw this error in the XDE. Helped me solve the problem.
Simulator not installed. Please visit
https://developer.apple.com/xcode/download/ to download Xcode and
the iOS simulator. If you already have the latest version of Xcode
installed, you may have to run the command
sudo xcode-select -s /Applications/Xcode.app.

Related

Flutter build iOS error CocoaPods not installed. Skipping pod install

Iam using Mac and upgraded to Android studio "Bumblebee", only in Mac when I try to do: Build -> Flutter -> Build iOS it shows this warning:
Warning: CocoaPods not installed. Skipping pod install. CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. CocoaPods not installed or not in valid state. Process finished with exit code 1
But I did already this
gem install cocoapods Successfully installed cocoapods-1.11.2 Parsing documentation for cocoapods-1.11.2 Done installing documentation for cocoapods after 1 seconds 1 gem installed
When I do sudo gem install cocoapods I got:
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.
I did Invalidate Caches and pod install also, but it still shows same warning.
Flutter doctor
[✓] Flutter (Channel stable, 2.8.1, on macOS 11.0.1 20B29 darwin-x64, locale en-GB)
• Flutter version 2.8.1 at /Users/test/Downloads/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (6 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/test/Library/Android/sdk
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[!] Xcode - develop for iOS and macOS (Xcode 12.5.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.0.0.
Download the latest version or update via the Mac App Store.
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2021.1)
• Android Studio at /Users/test/Desktop/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
How to fix it?
Regards
close android studio
open terminal -> run open /Applications/Android\ Studio.app
try again ...
problem comes with new android studio version bumblebee
android studio started from macs dock is not able to reach the environment variables when its started from mac os dock
UPDATE:
run chmod +x /Applications/Android\ Studio.app/Contents/bin/printenv
now it works from dock
Just run this at terminal: run chmod +x /Applications/Android\ Studio.app/Contents/bin/printenv
The issue appears to be Cocopods not being installed with Big Sur or above. I found upgrading Ruby to a newer version and then installing Cocopods helped my coworker. Please follow the steps in the solution for installing Cocopods: Unable to install cocoa pods
It's now fixed with the latest patch on BumbleBee. Check this blog post.

Xcode XCBuild support error for ionic build

I have a ionic project that I am trying to build on iOS.
When running ionic build ios, it gives this error:
FIXME: Implement XCBuild support for macros in overriding parameters
with condition sets:
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
Error: Error code 1 for command: xcodebuild with args:
-xcconfig,/Users/Person/ProjectA/platforms/ios/cordova/build-debug.xcconfig,-project,ProjectA.xcodeproj,ARCHS=i386,-target,ProjectA,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/Person/ProjectA/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/Person/ProjectA/platforms/ios/build/sharedpch
I have tried:
Remove platform and add platform
Change CODE_SIGN_IDENTITY[sdk=iphoneos*] from iPhone Distributor to iPhone Developer in build-release.xcconfig
Re-did signing from xcode to try both automatic and manual signing
but all were not successful.
I am running:
Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.9.4
ios-sim version: 5.0.8
Node Version: v4.4.7
Xcode version: Xcode 11.1 Build version 11A1027
It is an old ionic version but able to run on my old macbook air (OS: High Sierra). I am now using a new macbook air (OS: Mojave) and trying to setup the environment.
Any suggestions?
I was getting this error after re-adding the iOS platform to my project with cordova#8.1.2/cordova-ios#4.5.4, even with a build.json file included in my project. I manually upgraded to cordova-ios#5.1.1 (by specifying the version in the cordova platforms add ios#5 command) and the error went away.

I cant get my ionic app to open in iOS emulator

My new ionic app won't run in the iOS emulator.
Its a fresh install of ionic and Xcode, these are my steps:
npm install -g ionic
ionic start myApp tabs
ionic cordova platform add ios
ionic cordova build ios
ionic cordova emulate ios
Then I get the following error:
No target specified for emulator. Deploying to undefined simulator
/localhost/myApp/platforms/ios/build/emulator/MyApp.app/Info.plist
file not found.
According to this thread (Fresh Ionic Fails to Emulate iOS 12 - Info.plist file not found) it should work with the following command:
ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"
But then I get the following error:
No target specified for emulator. Deploying to undefined simulator
Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
And then according to this thread (Issues starting iOS simulator from CLI) it should work by updating ios-sim like this:
cd platforms/ios/cordova && npm install ios-sim#latest
But I still get the following error:
No target specified for emulator. Deploying to undefined simulator
Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
Ionic:
ionic (Ionic CLI) : 4.10.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.0.1
#angular-devkit/build-angular : 0.12.4
#angular-devkit/schematics : 7.2.4
#angular/cli : 7.2.4
#ionic/angular-toolkit : 1.4.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : ios 4.5.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 4 other plugins)
System:
ios-deploy : 1.9.4
ios-sim : 7.0.0
NodeJS : v10.15.1 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
The problem lie with ios-sim package which couldn't detect running simulators.
Updating to 8.0.1 with the following steps resolved the issue for me.
force update ios-sim to a working version
IMPORTANT needs to be done from inside the platforms/ios/cordova directory.
cd platforms/ios/cordova && npm install ios-sim#8.0.1
check if devices are now listed, takes a few seconds
ionic cordova emulate --list
installs appscript if not installed already
ionic cordova build ios
try to deploy to simulator
ionic cordova emulate --release --prod --livereload ios -- --buildFlag="-UseModernBuildSystem=0"
This will find any running simulator and deploy the app
Try just building the project and then running it from Xcode instead first.
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
Then open the platforms/ios folder in Xcode and you'll be able to run it from there plus see any errors there may be with the project. When you eventually decide to push the app to the store you'll need to do this anyway.
EDIT
Then try targeting a specific emulator:
ionic cordova emulate ios --list get list of available targets to copy into the next command.
ionic cordova emulate --livereload ios -- --buildFlag="-UseModernBuildSystem=0" --target="iPhone-X, 12.1" example targeting iPhone XR.
The issue is related to a breaking changes on Xcode 10 not already reflected on ios-sim. You can check on ion-sim repo issue "List empty of devices simulator with Xcode 10".
The issue have already been fixed but is waiting for a new release submission.
You can continue running your App on emulator directly from Xcode.

homebrew does not work with Xcode 8.3.3

I'm getting:
Error: Your Xcode (8.3.3) is too outdated.
Please update to Xcode 9.0 (or delete it).
Xcode can be updated from the App Store.
If I'm running high-sierra is it not possible to install packages using brew with Xcode 8.3.3?

AppGyver launching iOS simulator gives error XCode is not installed

I am using AppGyver, Steroids Installation has been done and I have successfully created the demo project. I am trying to configure the iOS Simulator for Appgyver so that i can launch my app on simulator using steroids command line and debug the app but when i want to simulate it on ios simulator it gives XCode is not installed. But I have XCode installed and Command Line tools too.
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables​ - PRINT
pkgutil --pkgs='com.apple.pkg.Xcode.*'​ - NO OUTPUT
When I use xcode-select --install It gives "xcode-select: error: command line tools are already installed"
When I use open /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app - Simulator Launch
​
OS Version : Mac OS X Yosemite 10.10
​XCode : 6.1
iOS Simulator : Version 8.1 (550.3)
Node : v0.10.24
NPM : 1.3.21
​​
Please help me to resolve this issue. Any help will be much appreciated.

Resources