-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provisioning Profile not setup correctly with new build system #536
Comments
I am running into something similar, does your generated exportOptions.plist contain a provisioningProfile key which is wrapped with double quotes, like this:
|
That is actually a good thing to check @nik0kin. @joeldhenry @slotto @rolandnagy? |
My above issue is fixed in the unreleased 5.1.0 version |
I'm trying to move it along in my limited spare time, but I'm not going to commit to any particular timeline. I don't think I'm going to try to add anything else beyond what's already tagged in the milestone, so whenever those things are addressed I will start the release process. |
But I'm also curious what change fixed this problem... I don't see anything in master/5.0.1 that changes how the provisioning profile is set up. |
I'm getting a similar error when I build an ad-hoc, manually signed build with Xcode 10.1, iOS Cordova 5.0.0.
I can work around this by opening the project in Xcode, and re-selecting the provisioning profile. After that, subsequent cordova CLI builds will build and archive just fine, until I delete the directory in which the xcodeproj lives. It's weird because Xcode shows the profile's name as selected, but it requires you manually re-select it from the drop down list. Unfortunately this breaks my CircleCI builds which are building for my ad hoc devices. Automatic provisioning works fine for my Debug builds. |
If it helps, I diffed the .xcodeproj file before and after. Before:
In the After 're-selecting' the profile from the drop down menu: In addition to what I describe in Before: In the |
I solved this issue by opening the project in XCode and selecting a team/provisioning profile. Previously, I didn't have to do this step. |
Sadly this is not possible for CI triggered builds |
@joeldhenry or has anyone else figured out a way to work around this without manual intervention, i.e.: in a way compatible with build servers? |
@dpogue I think that @nik0kin is saying that his issue with the double quotes is fixed in master, but not necessarily the issue described by @joeldhenry? |
I have the same problem. |
Here is the workaround for now: use the UUID instead of the profile provision name |
I also ran into this issue recently when updating from I have managed to resolve the issue in my particular situation by removing the branch-cordova-sdk 3.2 from my project. I am going to dig in further today to see why removing branch resolves the issue, but before I do it would be nice to see a show of hands from others that have experienced this issue, if they also use the branch sdk as well? |
… 9.0.0 by defining either the Developer or Distribution identities depending on the configuration config name (Release/Debug) Without this change distribution builds are configured to attempt a build with a debug/developer signing cert: apache/cordova-ios#536 (comment)
… 9.0.0 by removing the explicit declaration of the code sign identity in the enableEntitlements script Without this change distribution builds are configured to attempt a build with a debug/developer signing cert: apache/cordova-ios#536 (comment)
I resolved my issue in two different ways: by forking the branch-sdk and:
Hope this is helpful for others |
Hay Peeps, So... I've been having the same issue where my release build was not building as it was trying to use the dev time cert (and banging head on wall for a week or so) I've now pined down the culprit, at least for my use case thanks to this thread, but writing it up here incase it helps anyone else in the same bucket of crud! Basically I have an Ionic 3 build that was working until I updated cordova-ios (5.0.1) to the latest version (may have also updated branch-cordova-sdk (version 3.2.0) but can't remember of the top of my head) While https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking-attribution/pull/577/files has not been merged, I've been able to identify it as a fix locally by modifying my As a fix for now.. I have stored the modified version of the
|
Can I have an update on this? im on cordova-ios 5.1.1 and still have this iossue. I can fix the issue by using --provisioningProfile="[UUID]" as suggested by @GODBS , but this a pretty annoying solution, since every regeneration of a provisioning profile will require a build change, as apposed to using the the provisioning profile name which doesnt have to change |
I have a similar (but slightly different) issue for manual signing on [email protected]. This is done by build.js in /bin/templates/scripts/cordova/lib/build.js By amending that code once the ios is installed, I can get the build to work locally with Xcode 11.4 and in my Travis build with Xcode 11.3: https://github.com/Freegle/iznik-nuxt/blob/app-ios/.travis.yml with this crucial line:
I can do a PR to fix this one, if it looks right for everyone. |
@chriscant I would definitely appreciate a PR for that! Unfortunately I don't have a good setup for testing manual signing, but from what I've read it sounds like that's the right approach. If we moved from |
I change my cordova-ios version to 5.1.1 from 4.5.5 for WKWebView API iOS update but I got an issue in code snippet 1. @chriscant I tried your changes in \platforms\ios\cordova\lib in the code snippet 2 below but not works on me got the same issue also in code snippet 1 and suddenly my remotebuild stop in figure 1 for details. Btw, I used manage signing certificate in my build.json file.
` if (buildOpts.codeSignResourceRules) { if (buildOpts.provisioningProfile) { if (buildOpts.developmentTeam) { Platform I used Cordova plugins on my project: I hope you reply to me soon @dpogue and @chriscant, let me know if you need additional information on my issue. Thanks in advance! |
@pepenemo My changes only help if using manual signing eg --automaticProvisioning="false" or equivalent in build.json. What's in your build.json? Getting the codeSignIdentity, packageType and provisioningProfile right is crucial - and seems to be tricky. Can you see what's at the end of the log file? It would be useful to try it directly in the remote mac, not via remotebuild. Can you try that? You might well need to be using Xcode 11.x on the Mac. |
@chriscant my build.json code in /build.json. `
OutputRuntimeErrorInVS2017.txt in my VS2017 Output window...
it is the auto-generated setting build-in tools for apache cordova in VS 2017 -
I forgot to mention that my set-up to my project is running in windows 10 using my laptop and I used the remotebuild in this guide - https://docs.microsoft.com/en-us/visualstudio/cross-platform/tools-for-cordova/?view=toolsforcordova-2017 and I used MacOS High Sierra and had iPad connected on it which iOS version 9.3.5 . I don't know the set-up using remote mac or just a miss communication between us.
I will try it now if it working in cordova-ios new version. Thanks for the help and I hope you reply me again asap. |
For additional information my project is working on [email protected] but when I tried to switch to the 5.1.1 got an issue... |
@pepenemo I had worked out that that was your set up. I do use VC2017 on Windows but build Android by hand and don't use its remote build for iOS. I get error code 70 when an incorrect provisioning profile is selected (but I don't know if 70 means only this). It would be helpful to know about the Mac that you are building on. I presume that the provisioning profiles are installed already. I guess you must be using automatic provisioning. In this case, I don't know how much of the build.json settings are actually used. Nonetheless, I'd say that codeSignIdentity should be exactly "iPhone Distribution" or "iPhone Developer" and your developmentTeam and provisioningProfile shouldn't be blank (unless you've redacted them). With the latest cordova-ios you don't need the legacy build system. Are there any other options apart from from 6.5.0? It always seems to be a pain setting this stuff to work. If you can get a screen on the Mac that might help. |
@chriscant I take a screenshot on Mac at fyi I redacted my provisioning profile... my code content in <--project name-->/build.json file. |
@pepenemo OK. I wouldn't include the team project name in the codesignidentity. Just have it as exactly "iPhone Distribution" or "iPhone Developer". |
@chriscant I try it now thanks... |
@chriscant I got same issue again in the ss below by trying "iPhone Developer" in 'codeSignIdentity' in build.json for running debug... OutputRuntimeBuildErrorLog.txt runtime error logs for additional information. |
@pepenemo Getting the right incantations is tricky - I've spent days trying to get it right at times :-( |
@chriscant thank you so much spending time on this big help :) . Btw, I added an ss below fyi in my Xcode 10.1 project running in macOS High Sierra version 10.13.6 :) |
@pepenemo FYI: Apple say "Starting April 2020, all iOS apps submitted to the App Store must be built with the iOS 13 SDK or later, included in Xcode 11 or later." |
@chriscant hey thanks for the reply and info helps a lot. But my issue was building an iOS app using [email protected] on my current Xcode version, are we able to consider the supported Xcode version mentioned in this link - https://www.npmjs.com/package/cordova-ios and ss below to emphasize because I was tried it many times (almost 2-3 weeks) but doesn't work. |
@chriscant can I request your information about your Xcode XX.X.X version and macOS Mojave XX.XX.X version? that the [email protected] was able to run in your machine. So that I will update my Mac conform to your version. I hope you reply to me soon again and thanks a lot for helping me much appreciated! |
Xcode 10 is what cordova supported and was tested against. Xcode 11 requirement is not a cordova requirement but an Apple requirement if you want to deploy to the iOS app store. The reason for the disconnect is not all developers build for the app store, we do have users who build apps for enterprise/in-house installations. While not explicitly mentioned in the readme, In regards to your issue at hand, I cannot really provide a comment. I let Xcode automatically manage the signing and provisions and that has always worked for me. Sometimes I need to uncheck and re-check that "automatically manage signing" box however. |
@pepenemo Automatic signing is usually easier if you have access to the same Mac. To set up automatic signing for me has usually involved doing something interactively within Xcode at least once before the cordova build will work eg unchecking and checking the "automatically manage signing" box. I had to use manual signing for my Travis build which sets up a Mac virtual machine for each build. I used several helpful articles online to get my Travis script in place: https://github.com/Freegle/iznik-nuxt/blob/app-ios/.travis.yml I got a second hand Macbook Air (2013) which runs the latest MacOS Catalina 10.15 that runs Xcode 11.4.1. |
Thank you so much @chriscant and @breautek for the support and information! Much appreciated. I will explore now the Travis VM and if it working I'll update the macOS and I'll keep posting here for my updates :) |
Update: Still an issue with latest cordova-ios 6.1.0, must use UUID rather than profile filename to automate build process, which is frustrating when provisioning profile changes such as adding new devices. |
Don't know how relevant it is to you by now but i solved the problem by changing the build.json file like this (cordova-ios v6.2.0) when using cordova build ios : { The same works with release version or/and ad-hoc profile.
|
Building with the CLI:
cordova build ios --device --codeSignIdentity="iPhone Developer" --provisioningProfile="NAME" --developmentTeam="TEAMID"
after upgrading to cordova-ios 5.0.0, the following error occurs:
i am using a provisioning profile which contains an entitlement and my project also has the aps-entitlement.
cordova-ios 4.5.5 build fine.
The text was updated successfully, but these errors were encountered: