Search Unity

Achiveios project with jenkins CI issue

Discussion in 'iOS and tvOS' started by Yijiankeji, Nov 19, 2020.

  1. Yijiankeji

    Yijiankeji

    Joined:
    Jul 27, 2019
    Posts:
    43
    Hello everyone,
    I use Jekenins to automate the xcodebuild unity project and use automatic signatures. It tells me:

    Code Signing Error: UnityFramework has conflicting provisioning settings. UnityFramework is automatically signed, but provisioning profile Automatic has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the Signing & Capabilities editor.

    But I checked in xcode gui, UnityFramework Target is set :automaticaly manager signing.

    However, if I manually use XCode GUI to archive, it can be archived successfully.
    This is my shell in jenkins:

    xcodebuild \
    -project ${IOS_PROJ_PATH}/Unity-iPhone.xcodeproj \
    -scheme Unity-iPhone \
    -configuration "Release" \
    -archivePath ${IOS_PROJ_PATH}/Unity-iPhone.xcarchive \
    CODE_SIGN_IDENTITY="iPhone Developer" \
    CODE_SIGN_STYLE="Automatic" \
    PROVISIONING_STYLE="Automatic" \
    PROVISIONING_PROFILE="Automatic" \
    PROVISIONING_PROFILE_SPECIFIER="Automatic" \
    DEVELOPMENT_TEAM="xxxxxxxxx" \
    -allowProvisioningUpdates \
    -allowProvisioningDeviceRegistration \
    IPHONEOS_DEPLOYMENT_TARGET="12.0" \
    clean archive


    How can I solve this?

    UnityVer: 2019.4.15f1
    XCode 12.2
     
  2. van_ustwo

    van_ustwo

    Joined:
    Jul 10, 2012
    Posts:
    82
    Unity generate 2 targets in Xcode.

    Unity-iPhone <- Your game
    UnityFramework <- plugins and Unity frameworks

    Your error in Jenkins suggest that you are manually setting provisioning profile for both targets. What you need to do is specify Unity-iPhone target to be manually signing and leave UnityFramework to automatic
     
  3. Yijiankeji

    Yijiankeji

    Joined:
    Jul 27, 2019
    Posts:
    43
    Thanks for the reply, can provisioning profile sign it automatically in jenkins? because our bundle ids are update frequently for each app that there must be autosign.
     
  4. Yijiankeji

    Yijiankeji

    Joined:
    Jul 27, 2019
    Posts:
    43
    I want to use auto sign for bundle id by jenkins, is there some way to solve?
     
  5. van_ustwo

    van_ustwo

    Joined:
    Jul 10, 2012
    Posts:
    82
    My workaround is to use Fastlane update_code_signing_settings action before running build.
    This will change manually code signing to "Unity-iPhone" target but leave "UnityFramework" to automatic.
    The only thing Jenkins need is keep the latest provisioning profiles you need.


    update_code_signing_settings(
    use_automatic_signing: false,
    targets: ["Unity-iPhone"],
    profile_name: "profile name # Replace this with the proper Provisioning profile name
    )
     
  6. Yijiankeji

    Yijiankeji

    Joined:
    Jul 27, 2019
    Posts:
    43
    Thanks reply.
    Our App's profile isn't specify manually, I need auto sign the same,Does it suit you this way?
     
  7. peacefulshade

    peacefulshade

    Joined:
    Jul 25, 2012
    Posts:
    12
    If someone stumbles across this issue, add this parameter:

    CODE_SIGN_STYLE=Manual

    to the xcodebuild command.
     
  8. Vincent_Han

    Vincent_Han

    Joined:
    Apr 21, 2022
    Posts:
    1
    replace PROVISIONING_PROFILE to PROVISIONING_PROFILE_APP
     
    Last edited: Apr 21, 2022