Expo run:ios generating error PhaseScriptExecution - reactjs

I have an expo managed app and I want to use a notification library called OneSignal which has an expo plugin. This plugin adds native code not supported by Expo Go, so I'm forced to enter bare workflow and build native iOS and Android folders.
I'm building the iOS package by running expo run:ios. And build fails due to something with PhaseScriptExecution. This is my log:
2022-06-09 15:10:39.377 xcodebuild[35947:834210] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-09 15:10:39.377 xcodebuild[35947:834210] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ app.config\ for\ prebuilt\ Constants.manifest /Users/celsomattos/Library/Developer/Xcode/DerivedData/teste-gcaxmzswwhjxgrfhkfyporjorevj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/EXConstants.build/Script-46EB2E0000D7B0.sh (in target 'EXConstants' from project 'Pods')
(1 failure)
Expo version incompatible?

Related

React Native build vs expo ejected build

Can anyone answer my question!
1: I have an expo-ejected project. I have installed some react-native libraries in it .when I try to create a build using the expo server then it is building fine but when I try to build it Xcode it shows an error?
2: Does expo generated build includes react-native libraries . As it does not show errors when building using the expo server .but shows an error when trying to create a build locally i.e(Xcode or Android Studio)
Trying to create build but error

React native error cannot find symbol import com.facebook.react.uimanager.UIBlock, any ideas?

Am getting below build error when I hit run-android
cannot find symbol
import com.facebook.react.uimanager.UIBlock
It came after this warning.
Configure project :react-native-gesture-handler
WARNING: Configuration 'provided' is obsolete and has been replaced with 'compileOnly'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Any ideas?

React native run stays in IDLE state

This is my first time setting up react native on Ubuntu 18.04 LTS. I have done the setup and I was trying to run the app on the device using the react-native run-android command.
Here is the output what I get in terminal,
ron#lenovo:~/react/app$ react-native run-android
Scanning folders for symlinks in /home/ron/react/app/node_modules (9ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/ron/Android/Sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
File /home/ron/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 26.0.3 in /home/ron/Android/Sdk/licenses
License for package Android SDK Build-Tools 26.0.3 accepted.
Preparing "Install Android SDK Build-Tools 26.0.3 (revision: 26.0.3)".
<=============> 100% CONFIGURING
> IDLE
It stays in this IDLE position forever. What is the fix or this issue?
The solution is to install Android SDK rev. 26.0.3. Your can install it from Android Studio's SDK Manager menu in File > Settings. Hope this helps.
I got the same error today. The solution is to create a file named local.properties and write in it this line:
sdk.dir=[the position of android sdk]
example:
sdk.dir=N\:\\Users\\andy\\AppData\\Local\\Android\\Sdk
you can get the sdk android via android studio: Android Studio - How to Change Android SDK Path
hope this will help you and other people out there who just begin learning react native.

error after build in react native for ios

Command for build .ipa (.app) file:
react-native run-ios --configuration=release
And I want to build app for ios, but cant uploaded to diawi, console error:
** BUILD SUCCEEDED **
Installing build/Build/Products/release-iphonesimulator/app.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.
Launching org.reactjs.native.example.app
org.reactjs.native.example.app: 11067
Error in Diawi (the .app file itself exists):
An error occurred: 4001009: Invalid .ipa file: missing embedded
mobileprovision
What I should do? Worked on simulator. Maybe somehow on another can build?
You need to check main three steps from xCode:
Set proper Bundle Indentifier
Select Team from which you created your certificate and provisional profile
Set your Signing Developer.

angularjs cordova application using cordova plugin

I am trying to work with angularjs and cordova application and I need to use cordova plugin such as map and geolocation. I saw ngCordova but that does not offer map plugin. For testing purpose i tried to add geolocation plugin but it is not building ios app at all
clang: error: no such file or directory: '/Users/asifalamgir/Documents/hungryHaven/hungryHavenApp/platforms/ios/hungryHaven/Plugins/org.apache.cordova.geolocation/CDVLocation.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
** BUILD FAILED **
The following build commands failed:
CompileC build/hungryHaven.build/Debug-iphonesimulator/hungryHaven.build/Objects-normal/i386/CDVLocation.o hungryHaven/Plugins/org.apache.cordova.geolocation/CDVLocation.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: /Users/asifalamgir/Documents/hungryHaven/hungryHavenApp/platforms/ios/cordova/build: Command failed with exit code 65
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
Thank you
Possible reasons can be:
There has been an error installing the plugin. You can try reinstalling it:
cordova plugin rm org.apache.cordova.geolocation
cordova plugin add org.apache.cordova.geolocation
Also (not most probably but could be) try with preparing the app again:
cordova prepare ios
Or even sometimes you can try removing the whole ios app and adding it again:
cordova platform rm ios
cordova platform add ios
The way I was able to resolve it was :
Deleting the platforms ios folder/directory.
Adding the geolocation plugin (cordova plugin add org.apache.cordova.geolocation)
Adding back ios platform (ionic platform add ios).

Resources