xcode 8 w/jenkins xcode plugin, how to specify provisioning profiles - ios

Error
"Unity-iPhone requires a provisioning profile. Select a provisioning profile for the "Release" build configuration in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.2'"
When Automatic code signing is unchecked Xcode is asking for a Release AND Debug provisioning profiles. This works when I manually build but I cannot figure out how to have Jenkins specify 2 provisioning profiles.
This is what I have set in Jenkins Custom xcodebuild arguments.
PROVISIONING_PROFILE= CODE_SIGN_IDENTITY="iPhone Distribution"
I have tried repeating the profile name. I've also tried using PROVISIONING_PROFILE_SPECIFIER.
In Jenkins Custom xcodebuild arguments is there a way to specify a profile for release and debug?

Hmm... I don't believe you need both provisioning profiles. Go to the Project Editor and look under Signing. If you don't have a profile, click the dropdown and go add. If you do... click it... you know... Then try running it again.

Related

How can I Solve this error when iOS build in Flutter

How can I solve this error?
Error (Xcode): No profiles for 'com.school.wcc2' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.school.wcc2'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
It appears that there was a problem signing your application prior to installation on the device.
Verify that the Bundle Identifier in your project is your signing id in Xcode
open ios/Runner.xcworkspace
Also try selecting 'Product > Build' to fix the problem:
Encountered error while building for device.
Go to project folder, open the iOS project in Xcode. On the left hand side, select the root, navigate to signing and capability
It would loo something like this.
In order to deploy your app in iPhone, you would need development provisioning profile. If you manage your developer account you can go for "Automatically manage signing" and Xcode would do all the needful.
Else, you would need to request the provisioning certificate from your team.
After creating the profile, restart your IDEs.

Xcode signing using Jenkins

I am trying to sign and archive my Unity application with Jenkins. I have the Xcode jenkins plugin installed and everything seems to run well except for a strange problem.
During the xcodebuild phase, when the archive should be signed, I get the following error:
error: No signing certificate "iOS Development" found: No "iOS
Development" signing certificate matching team ID "QF6V2M666X" with a
private key was found. (in target 'Unity-iPhone')
Now the problem is that I am not trying to build for development, but for production. I have a production provisioning profile used, which is pointing the production certificate. The team id is the production team id (changed here for security reasons). Here is another part of the build output:
Going to invoke xcodebuild:, scheme: Unity-iPhone, sdk: DEFAULT,
project: DEFAULT, configuration: Release, clean: NO, archive:YES,
consolelog:YES, symRoot: DEFAULT, buildDir: DEFAULT,
developmentTeamID: QF6V2M666X
[sr-ios] $ /usr/bin/xcodebuild -scheme
Unity-iPhone -configuration Release archive -archivePath
When I open the project in Xcode, I can see that for some reason Xcode selects "IOSDeveloper" in the code signing identities part and not "IOSDistribution" (or the actual certificate in the provisioning profile):
I don't know if this can be changed from Jenkins, but I think Xcode should pick this up from the provisioning profile.
So I managed to find the problem and solve it, here is the solution for others.
In Unity 2018 they added a new option to the iOS player settings, in the "Other settings" section, called IOS Provisioning Profile->Profile type:
This option is used to select the signing identity. I guess you can use "Automatic" but in my case, since I am using Jenkins, I am setting it on a build script like this:
PlayerSettings.iOS.iOSManualProvisioningProfileType =
ProvisioningProfileType.Distribution;
When this option is set, xcode is able to sign the app correctly for distribution.

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

Attempting to install the Release version on my device gets conflict profiles

I am trying to install the Release version of my app on my device to test it.
When I select the Edit > Scheme and under RUN I choose "Release" for Build Configuration
But I get the error:
My App has conflicting provisioning settings. My App 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 is
required for product type 'Application' in SDK 'iOS 10.2'
I have gone to Code Signing and Ensured that my release is my iOS Distribution
I have deleted all my profile, certs and re-imported. I have cleaned the build. I have removed my account.
When I switch to Manual Signing I get the error:
No signing certificate "iOS Distribution" found
No "iOS Distribution" signing certificate matching team ID "XXXXXXXXXX" with a private key was found.
But it is in my KeyChain.
I'm so frustrated. Has anyone else solved this?
You're supposed to use the iOS developer profile when running builds on your device. You can build in release mode still. However you can't install distribution signed binaries through Xcode.
You can create an ad-hoc profile to test push notification for the release build. It is same as the distribution build.

Provisioning profile not getting set while building Xcode project using Jenkins

I am connecting to gitlab to pull source code and build the app through Jenkins. At build time, i am changing the bundle ID, certificate and provisioning profile for the App. But for some reason, the provisioning profile is not getting set while the former two works perfectly. I have added the profiles in KISS plugin and also provided the path to the profile in the Xcode plugin.
I have configured as below
I am getting the following error while building the App
App requires a provisioning profile. Select a provisioning profile for the "Release" build configuration in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
Attaching the console screenshot

Resources