Cannot deploy to device using Ionic cli (but succeed with Xcode) - ios

I followed all the steps mentioned in the Ionic deployment documentation and successfully deployed my Ionic app to my iPhone using Xcode's "play" button, using the free "Personal team" provisioning profile. However, I cannot deploy from the command line; running ionic cordova run iOS --device fails and outputs:
=== BUILD TARGET MyApp OF PROJECT MyApp WITH CONFIGURATION Debug ===
Check dependencies
No profiles for 'eu.empain.apps' were found: Xcode couldn't find a provisioning profile matching
'eu.empain.apps'.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
In Xcode, the team is set correctly in "Build settings > Signing", and the provisioning profile exists in ~/Library/MobileDevice/Provisioning\ Profiles/.
Not being able to launch through the command line prevents me from using live reload and console logs with -c and -l options. Hence, I cannot debug errors that occur on app launch.
I'm using:
Cordova 7.0.1
OS X 10.12.5
Xcode 8.3.3
Ionic 3.4.0
I found a possible duplicate, but the solution does not apply to me since all my versions are equal or greater to those mentioned in that thread.

Related

Failing to install my flutter app to my iPad

I fail to install my flutter app to my iPad and I wonder what could cause this.
I am using automatically signing and is kind of lost what is actually needed to get this to work.
I.e. I can't see that I have added my iPhone device anywhere, where I also should add my iPad.
Installing to my iPhone works
Launching lib/main.dart on Gunnars iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: HZ4ZKW97SC
Running pod install... 9,5s
Running Xcode build...
Xcode build done. 32,1s
Installing and launching... 24,2s
Debug service listening on ws://localhost:1024/ws
Syncing files to device Gunnars iPhone...
Installing to my iPad fails
Launching lib/main.dart on Gunnars iPad in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: HZ4ZKW97SC
Running Xcode build...
Xcode build done. 29,6s
Installing and launching...
Installing and launching... 17,7s
════════════════════════════════════════════════════════════════════════════════
No Provisioning Profile was found for your project's Bundle Identifier or your
device. You can create a new Provisioning Profile for your project in Xcode for
your team by:
1- Open the Flutter project's Xcode target with
open ios/Runner.xcworkspace
2- Select the 'Runner' project in the navigator then the 'Runner' target
in the project settings
3- Make sure a 'Development Team' is selected.
- For Xcode 10, look under General > Signing > Team.
- For Xcode 11 and newer, look under Signing & Capabilities > Team.
You may need to:
- Log in with your Apple ID in Xcode first
- Ensure you have a valid unique Bundle ID
- Register your device with your Apple Developer Account
- Let Xcode automatically provision a profile for your app
4- Build or run your project again
It's also possible that a previously installed app with the same Bundle
Identifier was signed with a different certificate.
For more information, please visit:
https://flutter.dev/setup/#deploy-to-ios-devices
Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
2020-07-04 10:38:32.180 ios-deploy[93017:5221164] [ !! ] Error 0xe8008015: A valid provisioning profile for this executable was not found. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Could not run build/ios/iphoneos/Runner.app on 00008027-001D098C0A87002E.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Error launching application on Gunnars iPad.
Managed to install to iPad from xcode
I followed th advice to try to run from with in xcode and then I managed to install the app to my iPad.
But when efter that trying from flutter/intellij I get the following ...
Launching lib/main.dart on Gunnars iPad in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: HZ4ZKW97SC
Running pod install... 9,0s
Running Xcode build...
Xcode build done. 142,2s
Installing and launching...
Installing and launching... 16,3s
═══════════════════════════════════════════════════════════════════════════════════
Error launching app. Try launching from within Xcode via:
open ios/Runner.xcworkspace
Your Xcode version may be too old for your iOS version.
═══════════════════════════════════════════════════════════════════════════════════
2020-07-04 12:20:06.647 ios-deploy[68752:5425107] [ !! ] Error 0xe8000022: The service is invalid. AMDeviceSecureStartService(device, CFSTR("com.apple.debugserver"), NULL, &con)
Could not run build/ios/iphoneos/Runner.app on 00008027-001D098C0A87002E.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Error launching application on Gunnars iPad.

There are no accounts registered with Xcode reported during archive even though there is

Hi I am trying to build an iOS app with Cordova.
The project successfully builds but when I try to release in order to upload to TestFlight with:
sudo cordova build ios --release --device --automaticProvisioning --packageType="app-store"
Then I get the error
error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target '' from project '')
error: No profiles for 'com.' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.'. (in target '' from project '')
But I do have an account and the appropriate certificates and profiles.
Xcode account
Debug profile
Build settings - Signing
Release Profile
I added cocoa pods that were missing. I don't know how the build was successful from Cordova cli???
Second one of my plugins in particular admit-plus was not in the latest version in the config.xml
Fixing those two and everything worked!!!!!
This is the proper "work around" to push to test flight.
1- cordova prepare ios
2- open xcode project, uncheck automatic signing (both dev & release)
3- check back automatic signing
4- select your team
5- cordova build ios
6- build your app from xcode and test on device/simulator
7- from xcode: product -> archive
8- upload your build to appstoreconnect via xcode
9- go to appstoreconnect, then from there put it in test flight

Ionic V1 Xcode IOS run error Blank page at launch / Cordova, Ionic run ios : Build Failed

I have a problem for my IOS running Ionic V1 project.
I use last version of Xcode : V8.3.3
My Ionic CLI is V2.0.0
My Ionic Project is V1.0
My Device Iphone 6 IOS 10.3.2
My app is running fine on browser, and is running fine on emulator ios. Also my app is running fine on android device. Problem comes when I run on IOS device.
Through Xcode, I had many erros with provisionning profiles but now I don't have anymore and I use the Iphone Developer for signing certificate. I have no warning. But when I lanch "Run" command on device through Xcode, the app installs without any warnings and launch a blank screen with no error or output on the output console log of xcode.
So Xcode running devices gives me a blank app screen with no error.
Through "Ionic Run IOS" or "Ionic Run Ios --device" or "Ionic run ios -l -s --device" I have an error 65 Xcode : build failed with this error :
Check dependencies
signing for "MyApp" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'IOS 10.3'.
I have been looking on the web for days without any issue.
Please would someone help me to make this app working as I can publish it then with no blank screen..
Regards

How to build and deploy an ios api file in real device using MAC

i am new to mac, so for i have installed xcode and successfully added the platform for ios.
When i give adb devices i am not able to detect my device name for iphone but when i connect android and give adb devices i am getting my device .
when i give ionic build ios i'm getting the following errors. i don't know how to enable the developer option in iphone
=== BUILD TARGET myFirst OF PROJECT myFirst WITH CONFIGURATION Debug ===
Check dependencies
Signing for "myFirst" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/subbarao/Desktop/myFirst/platforms/ios/cordova/build-debug.xcconfig,-workspace,myFirst.xcworkspace,-scheme,myFirst,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,myFirst.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/subbarao/Desktop/myFirst/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/subbarao/Desktop/myFirst/platforms/ios/build/sharedpch
You need a development provisioning profile on your build machine. Apps can run on the simulator without a profile, but they are required to run on an actual device.
If you open the project in Xcode, it may automatically set up provisioning for you. Otherwise you will have to create go to the iOS Dev Center and create a profile.
cordova run with ios error .. Error code 65 for command: xcodebuild with args:
Same question here by this guy
Try to sign in as ios dev account in Xcode
or try
ionic platform remove ios
ionic platform add ios
i was getting the same error but i tried the above command and its working now
thanks

ApplicationVerificationFailed from Nativescript CLI

I am using the latest version (2.0) of the Nativescript CLI. I recently updated by iPad to iOS 9.3 from iOS 7. Prior to this upgrade, I was able to run Nativescript apps on my device using "tns run ios". Since the upgrade, I get the following error:
Error: ApplicationVerificationFailed
ErrorDescription: The bundle being installed with bundle ID org.nativescript.bluetoothdemo2 is authorized by a free provisioning profile, but apps validated by those are not allowed to be installed from this source.
I have attempted to change the bundle ID (hence the 2) and generate new provisioning profiles to no avail. I have opened the project in xCode and the "Fix It" button is not available. The project does run in xCode.
This is how I solved the same problem.
1) Opened up XCode project that Nativescript generated, tried to run it, but it failed with message that apphas to be verified on the phone itself.
2) Opened up phone General settings > Profiles and Devices Management > Developer App.
3) Verified the app.
4) Built and run app via "tns run ios --device 1" normally without any problems.
Hope it helps :)
I would recommend you try the following:
1) Remove the platform/ios by running tns platform remove ios
2) Make sure your package.json contains the correct bundleID (this will be passed to your xcode project when you build).
3) Make sure you use the same BundleID from your Apple dev-certificates.
4) Add the platform/ios by running tns platform add ios
5) Prepare & Build: tns prepare ios & tns build ios
6) Go to your .../platforms/ios folder and open the .xcodeproj or .xcworkspace
7) Go to "General" tab of you main app target and under "Identity" group make sure you have the correct BundleID and the correct Team (your Apple dev account).
8) Go to Build Settings tab and under Code Signing group the Code Signing Identity key is set to iOS Developer (your dev Certificate), and that the Provisioning Profile is set to Automatic (when publishing it will automatically choose the correct profile).
Now you can just close XCode and run the app via CLI.

Resources