React native on XCode build successful but stuck at '100% on simulator - ios

I tried to build my expo project on XCode so I ejected that and open in XCode using xed ios. but when I tried to build it and run it show's me that build was successful but on simulator it stuck at '100%' and wont run. also on XCode I receive this:
"expo-updates must be configured with a valid update URL or scope key."
how can I solve this issue?

It is an expo issue, the solution found is:
Sign in to your expo account in expo-cli and it will configure expo-updates properly when you eject. You can fix this on an already ejected project after signing in by running expo eject --no-install.
Or
Check JWrubel comments for the same issue below.
I was able to get around this issue without doing expo login by editing ios/<AppName>/Supporting/Expo.plist and adding a key for EXUpdatesURL like so:
<key>EXUpdatesURL</key>
<string>https://example.com</string>
This causes the update check to fail, but the build to succeed. I tried setting EXUpdatesEnabled to false and EXUpdatesCheckOnLaunch to NEVER, but I didn't find those had any impact on the process.

Related

Xcode debug build vs release build

I am currently building a react native app using expo.
However, I needed to use cocoapods, which is why I am now using Xcode.
Since I have switched to Xcode, there has been a difference between my local debugging builds (that I run to a USB connected iPhone) vs the builds that get pushed to TestFlight.
After doing some digging I have found that it may be due to the debug vs release schemes in Xcode.
From what I've see it seems that the difference should really just be in performance, file sizes, and some other aspects, but not what the app actually does and displays like in my case.
To test, I made a change on my app's homepage to simply have the text, UPDATED.
As expected, when ran with the debug scheme, the UPDATED text shows up, but when ran with the release scheme, it does not.
How do I get these to sync up and have the release build recognize the changes I make as I am certain I do not want to push a debug build to the app store?
Things I have tried:
Removing/cleaning Build folder and rebuilding
Updating Xcode
Running on another device
Building/running with expo (this did something, but it just causes the app to crash, assuming it is because of the cocoapods)
Versions:
react-native: 0.61.5
Xcode: 11.4.1
macOS: 10.15.3
Thank you
I have fixed the issue.
I found that by running expo publish in the terminal and then building with the release archive scheme in Xcode, it notices the changes.
Now why that is required (maybe it isn't), I am unsure of.
If anyone has an any additional insight, it would be greatly appreciated.
EDIT: So it looks like when I run expo publish it updates the app.bundle and app.manifest. This must be what the release scheme looks at when building.

Installing on Iphone gets stuck after setting up firebase_messaging

Following the Readme of the https://github.com/flutter/plugins/tree/master/packages/firebase_messaging I set up the IOS and Android firebase. On Android it works but when I try to install the app by running "flutter run" on IOS, it gets stuck at installing it and I can't open it.
After I took the screenshot a new line appeared under "Installing and launching", "Configuring firebase for this app..." (or something like this).
I tried deleting the pods and set up again.
I tried deleting the app so it can be installed again.
I that at some point during the "Installing and launching..." the app tries to open but closes back immediately. Is it a crash? How do I get some sort of info regarding this? Thank you!
check these two things:
For iOS, the firebase_messaging functionality only works on real devices, it doesn't work on the simulator. (it does work in Android emulator)
Run open -a xcode ios/ and try to build the app there (⌘R), there will be more details on possible errors, specially regarding filling in the Signing section. Even if it's not signing, you will find out what it is, and after fixing it, the flutter cli will resume running without issues.

React-Native app can build for debugging but not for archiving

I'm trying to archive my iOS app which works fine when I build for debugging via xcode but when I try to archive the app I get the following errors which I'm not sure what's causing it
I think the real reason for failure would be a little above in the listing, which cannot be seen here.
I had similar kind of issue when updated react native to version 0.54.2 the iOS archive stopped working.
My error message was something like:
A problem occurred while trying to fetch the minifier. Path: "metro-minify-uglify" Cannot find module 'uglify-es'
And the problem was that my react native project only had uglify-js in node-modules (I quess that the new react native needed the uglify-es). So I installed that with:
npm install uglify-es --save
And after that I did (not sure if these are needed) xCode->clean project, shutdown xCode, delete Library->Developer->Xcode->DerivedData, restart Xcode and archive started working again.

xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH - Since updating Xcode

Updated Xcode this morning and now ionic project wont deploy to a device.
ionic run ios --device
Returns:
** BUILD SUCCEEDED **
xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
Error: Error code 72 for command: xcrun with args: -sdk,iphoneos,PackageApplication,-v
No idea what to do to fix, Googling returns lots of options but none correct.
Cordova is trying to use "PackageApplication" tool. But it was removed since Xcode 8.3. Either downgrade Xcode or wait for Cordova to have a fix for that.
Linked in the Jenkins issue that matson kepson mentioned here there was a guy who attempted a PR to fix the issue. There was some unfinished change requests in his PR and I also found a few null ptrs in his changes. I forked his pr and fixed these things here and there is now a snapshot linked here that you can download and become unblocked until such a change is merged into the full build.
Hi its official Bug from jenkins
here you have a fresh status
https://issues.jenkins-ci.org/browse/JENKINS-43163
Little bit clearer to look at this:
http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/
I've just come across this and my solution was to remove the iOS platform from the project:
ionic platform rm ios
Then add it back in again
ionic platform add ios
I needed to run an initial build for it to fail with no signing set, so opening up the project in Xcode to just fix that. After that, building via the ionic cli worked as expected. I am guessing that re-adding the platform pulled in a new version of cordova-ios.
Update: I had only started on this project and created the base project from the blank template. I have Xcode 8.3.1 installed and using Ionic 3 (still with the --v2 switch with ionic cli).
I used shenzhen this automatic procedure encountered a similar problem, and finally in accordance with the github Pull Request to solve my problem, hope for your reference!
https://github.com/nomad/shenzhen/pull/347
I found a workaround to solve this using command line, with device connected on your mac:
ionic build ios --device
ios-deploy --noninteractive --debug --bundle build/device/YOURAPP.app
After this, stop debug using Ctrl C, and your app will be working on your device.
Hope work for you guys.
The is caused by the deprecated PackageApplication. If you're using the remotebuild tool to run from Windows, it will be solved when the remotebuild bug has been fixed: https://github.com/Microsoft/remotebuild/issues/26
Another solution is to downgrade XCode.
Here if the explanation on how to uninstall current XCode.
And here you can download XCode 8.2.
An option is open a .xcodeproj file located at platforms/ios and run the project directly from Xcode.

Phonegap local builds fail with media plugin

create new project
build for iOS: SUCCESS
add media plugin
build for iOS: FAIL
The following build commands failed:
CompileC build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/i386/CDVSound.o HelloWorld/Plugins/org.apache.cordova.media/CDVSound.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
[error] /Projects/Code/hello/platforms/ios/cordova/build: Command failed with exit code 65
Here's the list of commands
phonegap create hello
cd hello
phonegap build ios # WORKS
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git
phonegap build ios # FAILS
Same scenario happens with cordova, and if I use sudo.
I fixed the problem by completely deleting the iOS folder under platforms, then re-running phonegap build ios.
This is something I ran into a while back. If you’re not an iOS developer, but get tasked with building iOS apps, you may run into this. This particular exit code is fun because xcodebuild doesn’t tell you what the problem is.
Aside from building your app using the Xcode IDE, you also have the command line utility xcodebuild available to you. Assuming the code itself compiles just fine, this tool will tell you, for example, if you’re missing a provisioning profile or something.
In my case, it turned out xcodebuild didn’t have access to the certificate I was using.
So… here’s some things to check for:
Make sure you’ve installed an up to date certificate in your Keychain
Remove expired certificates
Grant access to xcode to use your certificate (or allow all programs to use the certificate)
Make sure you’ve installed an up to date provisioning profile
Remove expired
provisioning profiles
Another option ....
use https://build.phonegap.com which will build the app for you and generate your .ipa and .apk files. It is free for 1 project (just delete your project and then re-upload if you have multiple ones). Just make an account, upload your certs and then you upload your www folder.
Thumbs up if you this was helpful to you!
I got the solution on PhoneGap Google group
And the solution is to add the File plugin also. Strange that these dependencies are not mentioned but it worked. I guess we'll need to randomly try the combinations of plugins until something works.
The bug is logged here: https://issues.apache.org/jira/browse/CB-6225
And it looks like you have to add File plugin first, then Media, the order is important.
try add sudo when add cordova plugin into your project.
sudo cordova plugin add https://github.com/apache/cordova-plugin-media
I was getting an exit code 65 after adding the dialogs plugin. Tried some of the top answers here, but in the end James's advice worked: deleted the ios platform, reinstalled the platform, and then it built.

Resources