Check dependencies error in Cordova iOS build - ios

After updating to High Sierra and Xcode 9.1, I'm unable to build Cordova apps. The first failure was about the team being missing, so I turned that on. I'm now hung up on:
Check dependencies
Code Signing Error: xxx has conflicting provisioning settings. xxx is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
It seems pretty obvious, but when I do what it says, I don't get anywhere. I've fiddled with all various settings of automatic and manual settings (dev and production) that seemed reasonable. I've even built a whole new certificate and distribution profile, but no change. I've followed instructions from After upgrading to xcode 9, cordova app won't build, error 70, requires provisioning profile with no luck. I've googled up a lot of issues with the Xcode upgrade, but there doesn't seem to be a comprehensive list of exactly what needs to change for support. I'm just finding various snippets that don't work for me...
Currently working with cordova-ios version 4.5.3.

After a disgusting amount of time spent on this, I was finally able to get mine published... I'll outline what I remember of the workflow below:
run ionic cordova platform rm ios then ionic cordova platform add ios
open Xcode and select your development team, keep the signing set to automatic
run ionic cordova build ios --prod – don't add the --release flag
if you now have a .xcarchive file in platforms/ios, open it in Xcode and skip to the very bottom, otherwise continue to the next point
open the .xcodeproj file and click Product > Archive – this will create the release build
If you get the "check dependencies" error at this point:
uncheck / disable automatic signing
re-check / enable automatic signing
run Product > Archive again
This should successfully build your app release, at which point you'll have the option to "Submit to App Store"... Good luck!

Related

Flutter iOS could not build the precompiled application for the device

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 think I have done necessary code signing work but build still failing in Ionic

Building an Ionic app to try and test on my iPhone. I downloaded XCode last night and went in and created a profile with my Apple ID, as well as changing the bundle identified in the "General" and "Signing & Capabilities" tab. However when I run "ionic cordova build ios --prod" I get the error:
error: No profiles for 'io.ionic.starter' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'io.ionic.starter'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'MyApp' from project 'MyApp')
** ARCHIVE FAILED **
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.
cordova build ios exited with exit code 65.
Re-running this command with the --verbose flag may provide more information.
It seems to me as though I have done the necessary code signing procedures that I read from Ionic's website, so I am unsure why it still isn't working.
To run the app in your iPhone there are several steps, check these:
You have created your app ID in the website.
You have created your provisioning profile in the website, and downloaded to your computer and added to your Mac (web -> download profile -> double-click)
You have created a development certificate (search how to create a certificate using a Certificate Signing Request generated in your Mac ) and then downloaded that certificate and added to your Mac.
There are two certificates. Distribution certificate is used to publish the app, but development certificate is used simply to run the project in your iPhone, you need that.
But honestly, it's all much easier if you use XCode instead of the console. In the console run the command without --prod, to apply ionic changes to the iOS project. Then if you want to run the app, it's easier if you open XCode and just click play.
With XCode there's the option "Automatically manage signing" that will handle most of this for you automatically. You just have to login to your account using XCode (it will prompt you) and let it do it for you.

Flutter Codemagic iOS testflight app store issue

I am trying to build and release my flutter app to the app store. I am using Codemagic to do so since I do not own a Mac machine. However, this is the error I run into every time I run a build:
error: Runner has conflicting provisioning settings. Runner is
automatically signed for development, but a conflicting code signing
identity iPhone Distribution has been manually specified. Set the code
signing identity value to "iPhone Developer" in the build settings
editor, or switch to manual signing in the Signing & Capabilities
editor. (in target 'Runner' from project 'Runner')
I've tripled checked my configurations in codemagic i.e. provided both certificates, selected release built, completed App Store Connect etc.
I am frustrated at this point and any/all help will be grateful, thank you!
If anyone ever stumbles here with the same issue, the solution was to ensure that the bundle ids matched with the one on developer portal.

debug version of react-native IOS app builds successfully. Release version fails.

I've been able to successfully build the Debug version of this IOS app. However, I'd like to create an IPA to make sure it works on various iphones. The first thing I did was go product->scheme->edit scheme. I then switched from Debug to Release. After cleaning, and attempting to build the release version of the app. I immediately get an error: "MYapp has conflicting provisioning settings. MYapp is automatically signed, but provisioning profile MYApp Distribution has been manually specified. Set the provisioning profile value to "automatic" in the build settings editor, or switch to manual signing in the project editor(in target MYapp).
The first thing I tried was switching Code Signing Style to manual in build settings. This resulted in a new error:
error: Provisioning profile "MYApp Distribution" doesn't include signing certificate "iPhone Developer: Name here (XXXXXXXX)". (in target 'MYApp')
I went back to the General tab in Targets and clicked on "automatically manage signing". I tried to rebuild and got the same error the first time I tried to build.
I'm not sure where the conflict is coming from. This post indicated that simply clicking the automatic signing would do the trick.
I'm quite new to using Xcode and understanding provisioning profiles.
You simply can not build a release edition. The process of giving a release version is quite different. It goes from Xcode(local) to App Store(testFlight for testing) and then into App Store(Official Release).
I found this link and can relate to this situation.
Your provisioning profile isn't valid. It doesn't have a valid distribution certificate. You have to go to apple developer and it to certificates and profiles. Create it there and install it via keychain on your macbook. Othervise you can't build an ipa. More info here

Xcode: Can I set Code Signing Profile from the command line

I have a batch build script that I run to build a common codebase for iOS apps into 100+ unique IPAs. I use Xcode 4.2 on OS X Lion.
The build settings for each app are set using PlistBuddy and the build works by running
PlistBuddy, installing app icons, running xcodebuild, then xcrun. It has been tested and
works correctly when targeting a single app.
Each app has a unique distribution provisioning profile that currently must be manually assigned via Xcode's Project settings -> Code Signing section (for release builds).
My problem is that the build script will not be able to match the App to its profile during the xcodebuild phase. It will simply try to use the most recent app's profile, then generate the error:
[BEROR]Code Sign error: Provisioning profile 'MOST RECENT APP'S PROVISIONING PROFILE ID HERE' can't be found.
Desperately looking for a way to either set this via command line (security, plistbuddy, or xcodebuild?). My batch script is quite useless without it.
I found the answer - it was simple. The problem was that in my Xcode target Code Signing settings, I had set a specific distribution profile for the build (out of 90 or so).
What fixed it was simply selecting the profile under "Automatic Profile selection".
Once that was done, xcodebuild was able to run successfully.

Resources