Search Unity

Error: Stickers Pack iOS extension has conflicting provisioning settings

Discussion in 'Unity Build Automation' started by mmortall, Jul 13, 2017.

  1. mmortall

    mmortall

    Joined:
    Dec 28, 2010
    Posts:
    89
    I have Stickers extension for my XCode project. Build to iOS works perfectly from Editor but Cloud build fails with error:

    Code (CSharp):
    1. Unity-iPhone-Stickers has conflicting provisioning settings. Unity-iPhone-Stickers is automatically signed, but provisioning profile 567565e8-0d30-43d5-9b1f-0bfaa6c7a8df 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.
    2. 27367:        [xcode] Code signing is required for product type 'App Extension' in SDK 'iOS 10.3'
     
  2. mmortall

    mmortall

    Joined:
    Dec 28, 2010
    Posts:
    89
    Should I report a bug?
     
  3. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    786
    Unity Cloud Build relies on manual signing and only forcibly updates the ProvisioningStyle to Manual for the main Unity exported target currently (i.e. Unity-iPhone). It's something we are working on improving but in the meantime a reasonable workaround would be to add a postprocess step to update the ProvisioningStyle in the "Unity-iPhone-Stickers" TargetAttributes.

    Are you using a plugin to manage the stickers implementation or something custom?
     
  4. mmortall

    mmortall

    Joined:
    Dec 28, 2010
    Posts:
    89
    Thanks for the reply. I am using a plugin from git-hub for managing stickers. Internally it uses Unity XCode tools for modifying xcode project in post build step.

    Here is fragment of code to set the build target parameters for Unity-iPhone-Stickers target.

    Code (CSharp):
    1. private void SetStickerExtensionReleaseBuildFlags(XCBuildConfigurationData config, string infoPlistPath, string bundleId, string teamId, string targetDevice, string provisioningProfile = null, string provisioningProfileSpecifier = null)
    2.         {
    3.             config.AddProperty("ALWAYS_SEARCH_USER_PATHS", "NO");
    4.             config.AddProperty("ASSETCATALOG_COMPILER_APPICON_NAME", "iMessage App Icon");
    5.             config.AddProperty("CLANG_ANALYZER_NONNULL", "YES");
    6.             config.AddProperty("CLANG_CXX_LANGUAGE_STANDARD", "gnu++0x");
    7.             config.AddProperty("CLANG_CXX_LIBRARY", "libc++");
    8.             config.AddProperty("CLANG_ENABLE_MODULES", "YES");
    9.             config.AddProperty("CLANG_ENABLE_OBJC_ARC", "YES");
    10.             config.AddProperty("CLANG_WARN_BOOL_CONVERSION", "YES");
    11.             config.AddProperty("CLANG_WARN_CONSTANT_CONVERSION", "YES");
    12.             config.AddProperty("CLANG_WARN_DIRECT_OBJC_ISA_USAGE", "YES_ERROR");
    13.             config.AddProperty("CLANG_WARN_DOCUMENTATION_COMMENTS", "YES");
    14.             config.AddProperty("CLANG_WARN_EMPTY_BODY", "YES");
    15.             config.AddProperty("CLANG_WARN_ENUM_CONVERSION", "YES");
    16.             config.AddProperty("CLANG_WARN_INFINITE_RECURSION", "YES");
    17.             config.AddProperty("CLANG_WARN_INT_CONVERSION", "YES");
    18.             config.AddProperty("CLANG_WARN_OBJC_ROOT_CLASS", "YES_ERROR");
    19.             config.AddProperty("CLANG_WARN_SUSPICIOUS_MOVES", "YES");
    20.             config.AddProperty("CLANG_WARN_UNREACHABLE_CODE", "YES");
    21.             config.AddProperty("CLANG_WARN__DUPLICATE_METHOD_MATCH", "YES");
    22.             config.AddProperty("COPY_PHASE_STRIP", "NO");
    23.             config.AddProperty("DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym");
    24.  
    25.             config.AddProperty("DEVELOPMENT_TEAM", teamId); //same as for main target
    26.  
    27.             config.AddProperty("ENABLE_NS_ASSERTIONS", "NO");
    28.             config.AddProperty("ENABLE_STRICT_OBJC_MSGSEND", "YES");
    29.             config.AddProperty("GCC_C_LANGUAGE_STANDARD", "gnu99");
    30.             config.AddProperty("GCC_NO_COMMON_BLOCKS", "YES");
    31.             config.AddProperty("GCC_WARN_64_TO_32_BIT_CONVERSION", "YES");
    32.             config.AddProperty("GCC_WARN_ABOUT_RETURN_TYPE", "YES_ERROR");
    33.             config.AddProperty("GCC_WARN_UNDECLARED_SELECTOR", "YES");
    34.             config.AddProperty("GCC_WARN_UNINITIALIZED_AUTOS", "YES_AGGRESSIVE");
    35.             config.AddProperty("GCC_WARN_UNUSED_FUNCTION", "YES");
    36.             config.AddProperty("INFOPLIST_FILE", infoPlistPath); // e.g. relative to source root "Stickers/Info.plist"
    37.             config.AddProperty("IPHONEOS_DEPLOYMENT_TARGET", "10.3"); // stickers introduced in 10.0
    38.             config.AddProperty("MTL_ENABLE_DEBUG_INFO", "NO");
    39.             config.AddProperty("PRODUCT_BUNDLE_IDENTIFIER", bundleId); // usualbundleidwithsuffix.stickers
    40.             config.AddProperty("PRODUCT_NAME", "$(TARGET_NAME)");
    41.             if (!string.IsNullOrEmpty(provisioningProfile)) //not specified (automatic signing mode)
    42.             {
    43.                 config.AddProperty("PROVISIONING_PROFILE", provisioningProfile);
    44.             }
    45.             if (!string.IsNullOrEmpty(provisioningProfileSpecifier)) //not specified (automatic signing mode)
    46.             {
    47.                 config.AddProperty("PROVISIONING_PROFILE_SPECIFIER", provisioningProfileSpecifier);
    48.             }
    49.             config.AddProperty("SKIP_INSTALL", "YES");
    50.             config.AddProperty("TARGETED_DEVICE_FAMILY", targetDevice); // e.g. 1,2 universal
    51.             config.AddProperty("VALIDATE_PRODUCT", "YES");
    52.         }
    And this code I use for the main target

    Code (CSharp):
    1. string pathToProjectFull = pathToProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
    2.  
    3.                 PBXProject pbxProject = new PBXProject();
    4.                 pbxProject.ReadFromFile(pathToProjectFull);
    5.  
    6.                 string targetGuid = pbxProject.TargetGuidByName("Unity-iPhone");
    7.                 pbxProject.SetBuildProperty(targetGuid, "ENABLE_BITCODE", "NO");
    8.                 pbxProject.SetTeamId(targetGuid, PlayerSettings.iOS.appleDeveloperTeamID);
    9.  
    10.                 pbxProject.AddFrameworkToProject(targetGuid, "CoreMotion.framework", true);
    11.                 pbxProject.AddFrameworkToProject(targetGuid, "GameKit.framework", true);
    12.                 pbxProject.AddFrameworkToProject(targetGuid, "MediaPlayer.framework", true);
    13.                 pbxProject.AddFrameworkToProject(targetGuid, "MobileCoreServices.framework", true);
    14.                 pbxProject.AddFrameworkToProject(targetGuid, "UserNotifications.framework", true);
    15.                 pbxProject.AddFrameworkToProject(targetGuid, "MessageUI.framework", true);
    16.  
    17.  
     
    Last edited: Jul 20, 2017
  5. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    786
    @mmortall - can you PM me a link to your project. I have some changes on our end that we're testing and want to double check this will address your issue.
     
  6. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    786
    A fix for this went out today. If you still are running into these code signing issues, please let me know.