Unable to build app when connected to physical device - ios

After building my app to a physical device and archiving my build I get an error message and my app won't build to a physical device. I receive the following error message:
XXX.app/Frameworks/GTMSessionFetcher.framework with Identity Apple Development: XXX
XXX.app/Frameworks/GTMSessionFetcher.framework'
XXX.app/Frameworks/GTMSessionFetcher.framework: errSecInternalComponent
Command PhaseScriptExecution failed with a nonzero exit code
I have tried cleaning build folder, downloaded certificates again but to no success.
Does anyone know something that can help?

Please provide further information. Are you using cocoapod or carthage or dependencies ?
If you build the project and get the framework yourself without make it a "fat" framework, It only works on the stimulator or physical device only.

Related

Flutter unable to build IOS archive

i am trying to build a IOS IPA for generic device, followed all the instructions, added signing certificates, team etc. but i am unable to build the product. any one please help me to resolve this issue.
here is my signing config. checked to automatically managed. added device in developer site.
sent 435785657 bytes received 92 bytes 58104766.53 bytes/sec
total size is 435732165 speedup is 1.00
Warning: unable to build chain to self-signed root for signer "Apple Development: ********"
/Users/Saif/Library/Developer/Xcode/DerivedData/Runner-bemaxobcrmqabgcgltuauohrwrje/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/myapp.app/Frameworks/App.framework/App: errSecInternalComponent
Command PhaseScriptExecution failed with a nonzero exit code
i am just stuck on this error for about 3 days. tried each and every solution available on stackoverflow and apple developer stack.
Flutter : 2.0.1
Xcode : 11.2.1
There's nothing any issue i think, the reason behind this i have an old version of xcode, i just update the xcode for newest version and than its all fine.
Run flutter build ipa
Once build is done. Open Runner.xcarchive
Open Runner.xcarchive with Xcode
It'll take you to the Distribute App page so you can upload the app
As per the docs:
https://docs.flutter.dev/deployment/ios#create-a-build-archive-with-xcode

Not able to deploy flutter application to iOS Appstore

While Building the app for iOS Distribution in flutter I faced the below issue with the build, I tried many things available on google related to this issue but no resolution yet.
How am I supposed to deploy flutter application to iOS Appstore?
Warning: unable to build chain to self-signed root for signer "iPhone Distribution: Mark Davids (*********)"
/Users/mark/Downloads/chat_app-master 2/build/ios/Release-iphoneos/Runner.app/Frameworks/App.framework/App: errSecInternalComponent
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Encountered error while building for device.
This is a vague error, however my guess is its 1 of two things.
There is Flutter detritus that is blocking your build, which you can fix by running the flutter clean command
Your certificate is invalid. When dealing with this in the past I have found the easiest way to fix it is to open XCode, set the signing to none, purge your certificates and keys from your system, and then re-add them to the keychain.

Failed to verify bitcode in TNSWidgets.framework/TNSWidgets

I am working with Nativescript iOS app, when trying to create an Enterprise Archive using XCode. App builds fine but fails with the following error when Enterprise distribution is selected. Please help me to resolve this.
Failed to verify bitcode in TNSWidgets.framework/TNSWidgets:
error: Bundle only contains bitcode-marker /var/folders/5d/kv3n6r795l156_mwk8lzpfv00000gn/T/IDEDistributionOptionThinning.Sgt/Payload/hektor.app/Frameworks/TNSWidgets.framework/TNSWidgets (arm64)
Thanks in advance
I have resolved issue using this command. Go to your project directory and run this command in terminal
tns build ios --release --forDevice
Then you could get your ipa file from this location
../your_project_directory/platforms/ios/build/Release-iphoneos/yourappname.ipa

Build failed with error Error code 72 for command: xcrun

I am porting an phone app project into VS2017 and get the below error when I try to build for a Remote Device. This code has built correctly on VS2015 and runs fine in an Android simulator. Just get this error on and IOS remote device, which I need to run to create an .ipa file. I see a bunch of posts on an error 65, but none on error 72 that I can find. Can you help me on how to fix this? Thanks.
"
Severity Code
Description Project
File Line
Suppression State
Error Remote build error from the build server http://10.13.4.29:3000/cordova - Build failed with error Error code 72 for command: xcrun with args: -sdk,iphoneos,PackageApplication,-v,/Users/administrator/.taco_home/remote-builds/taco-remote/builds/8936/cordovaApp/platforms/ios/build/device/OnticMobile.app,-o,/Users/administrator/.taco_home/remote-builds/taco-remote/builds/8936/cordovaApp/platforms/ios/build/device
I fixed this by going back to XCode version 8.2.1
This happens if you use ionic build ios --device … it’s the device flag that needs the packageApplication, but which is not available in 8.3
I got around the problem without downgrading XCode, as follows:
Load your project into XCode 8.3 by clicking your .xcodeproj file (in
platforms/ios/build) and choose Product > Archive.
Select the archive in the next screen and click ‘Export’ button. Choose ‘Save for Ad Hoc
Deployment’ and you’ll get an .IPA file, just as if you had used ionic build ios --device.

Do I need iPhone Developer license to run cordova/phonegap in ios simulator?

I don't have an iPhone developer license.
It was working fine when I execute "cordova run ios"
Then I created a new project using "cordova create test_app"
When I run "cordova run ios", it throws this error.
Then the project that used to work is also failing with the same error?
Check dependencies
Code Sign error: No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching “iPhone Developer” were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: /Users/Anthony/dev/test_app/platforms/ios/cordova/run: Command failed with exit code 65
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/src/superspawn.js:126:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
Be sure to have no device connected to the Mac else phonegap will try to build and deploy your app on it. I had the issue with my iPhone plugged in.
Also in Xcode be sure that you build the debug release with command line tools (in the info tab of project properties)
I would suggest you to go over the solution in this thread - which tells you how to disabling Code Signing. Anyway, no harm in checking this -
Verify that the Code Signing section's Code Signing Identity within the project settings is set to None -
Search for Code Signing in Target of your app, and check if Don't Code Sign is chosen.
Ey
One thing is to play with XCode and Cordova to make a new project and learn how phonegap or another wrapper works and a different thing is to publish an application. Following the apple specifications, you can always create a new application and test it in the simulator. The benefits of becoming an apple developer are you can try your applications in a physical device but it doesnt mean you cant create an application and try it in the simulator.
If you have tried to run the application in a real device, XCode will complain about the required credentials because you are not an apple developer and you dont have your certificate installed in the keychain so the application cant be signed for deployment on a real device.
If you want to test the application in a device "Yes" you need to become an apple developer and pay the fee, if not, dont worry you can run as many applications as you want in the simulator.
Check the settings of your project as well to see if there is something wrong.

Resources