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.
Related
I'm trying to run my Flutter code on a real-device, but I am encountering a code signing issue. See logs.
In Xcode, the project seems to have been using using the right team identifier. I use my machine to work on various Flutter & iOS projects.
Logs
Could not build the precompiled application for the device.
════════════════════════════════════════════════════════════════════════════════
Building a deployable iOS app requires a selected Development Team with a
Provisioning Profile. Please ensure that a Development Team is selected 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 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
For more information, please visit:
https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices
Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
Error launching application on Joshua’s iPhone 13.
If you've encountered this issue, it's likely that the project you just opened is using the old certs.
To make sure you're using the correct certs for your Flutter project, in the command line clear the config:
flutter config --clear-ios-signing-cert
This is going to force your Flutter app to use the new certificates.
Next, restart the terminal.
Last, make sure the Xcode project is using the provisioning profile/s.
From the Projects / left side panel of Xcode, click Runner
Under TARGETS, click Runner
Next, click Signing & Capabilities
Last, choose the correct provisioning profile/s
I'm able to build the macOS app from Xcode and run successfully, but when I'm trying to run it from Android Studio it's giving me the following error:
Provisioning profile "mac Team Provisioning Profile: doesn't include the currently selected device"
If I go to my apple developer account I can see my device UUID there as well.
If you're on Mac M1, your device will have two UUIDs: one when Xcode / xcodebuild is running natively, the other when running under Rosetta.
To register your device ID under Rosetta:
Applications folder > Xcode > right-click > Get Info > check "Open using Rosetta"
Open app in Xcode
Runner > Runner > Signing & Capabilities > ensure "Automatically manage signing" is checked
Xcode will give you an error about the device ID not being in the provisioning profile > click the fix button
Repeat steps 3. & 4. for any extensions you might have
Xcode will add the device ID to your profile. You can now uncheck "Open using Rosetta" to have Xcode running natively again.
See also this github issue.
You can try running the project via xcode first then running it via flutter SDK. This solved the mentioned issue for me.
That has been solved by:
Deleting the provisioning profiles from the following path:
~/Library/MobileDevice/Provisioning/Profiles/
Flutter clean
Run again
EDIT
You might need to open the project from Xcode and build it from there, and don't forget the pod install command
Open your project from Xcode
Select the device that experienced the issue from the devices list.
check this
Product > Clean Build Folder
Product > Build
Then Xcode will then ask you to register the device to your developer account. Add it and run your project as normal from Flutter.
Worked for me :
Delete macos folder inside your flutter project , and then run this command :
flutter create .
it creates a new macos folder for you and you can run your project now
I have created a iOS app using ionic 4 with cordova and I have used following command to build iOS platform.
ionic cordova platform add ios#4.5.1
ionic cordova build ios --prod --release
After that I have open the xcodeworkspace file using Xcode and tested using simulator as well.
But when I trying to upload it to App Store I can't do it because this automatically manage signing doesn't work.
Here is the error Xcode shows.
Xcode Version : 12.1
I have try following solutions but didn't work them.
Deleting provisioning profiles in ~/Library/MobileDevice/
Restart the Xcode
Adding and removing push notification capabilities as described here iOS - automatic signing is unable to resolve
All the solutions in here as well Xcode - error
The file path is APP > Platforms > ios > Cordova > build-release.xconfig
And in the file, iPhone Distribution is explicitly set for CODE_SIGN_IDENTITY.
Change:
CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
To:
CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
After all these solution it shows above error.
EDIT
I have a doubt with this signing certificate also. Is this normal with individual developer program ?
EDIT 2
Here I have noticed identifiers are automatically created using Xcode. But there is no certificates or profiles. Why is that?
EDIT 3
Manual signing works
After suggestion by
#MostafaHarb
I have add certificates and profiles manually add install them. After that only it allows me to use manual signing.
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
Is it possible to deploy an ionic app to your ios device without publishing it on the app store? I do have a Mac and a developers license, the app I want to use is for private use (for about 5 users).
Yes, indeed you can.
You first have to build your project for ios:
ionic build ios
Then you have to open up (with Xcode) the .xproj project that was generated by ionic build ios command (you'll see the exact location in the command's output).
Now you have to connect your iPhone to you Mac computer and you'll be able to choose your iPhone as a "deployment" device.
Click run in Xcode and after the Xcode finishes guiding you through creating a provisioning profile you'll have the app on your phone.
For more info take a look at https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html
Of course, you just need Xcode to generate the ipa so you can install it anywhere.
Check this guide: http://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html As ionic is essentially cordova the steps are similar.
Steps to upload ipa to App Store and Device (ionic App)
Step 1
1. Import Project to Mac Laptop
2. Create a new Project in Mac via terminal and import all SRC Folder from old project to new Project.
3. Open the New Project.
4. Copy the Dependency from old Projects from Dependencies and paste in New Project in Dependencies
5. Don’t remove old Dependency of new Project just install new one
6. Fire command Npm install once dependency and Src Folder is copied to new Project
7. Go to config.xml change widget id, version, Description, author email, href.
8. Change Version in package-lock.json
9. Npm install
10. Don’t Forget to Save All Files.
Step 2
1. Ionic serve -l
If you have installed Native Plugins (I.e. camera, network, base 64 etc.), Reinstall that All Native Plugins.
2. Verify that app is running in browser
3. Ionic cordova build ios
Step 3
1. Go to developer.apple.com
2. Click on Identifier-> App Id.
3. Register App Id Name and Bundle Id
4. Click on Continue and Register
5. Go to Provisional Profile
6. Click + Sign
7. Click on Development
8. Select Ios App Development
9. Select IPhone Listed
10. Generate Profile Name by Giving Name
11. Continue and Profile will be Ready
12. Click on Done.
Step 4
1. Go to Project-> ios-> projectName.xcodeproj
2. Xcode will be opened when you open file projectName.xcodeproj
3. Click on Project and Automatic Signing
4. Select your Device and Click on Run Button
5. Change Bundle Name and Bundle Identifier Name in INFO
6. File -> Project Setting ->Shared Project Setting -> Build Setting ->Select Legacy Build System instead of Default (Verify Once)
7. Click on Run Button Your App will be Deployed in iPhone