7 Replies
      Latest reply: Sep 30, 2016 8:38 AM by coderkyle RSS
      yakimant Level 1 Level 1 (0 points)

        We are using the following xcodebuild command:

        xcodebuild PROVISIONING_PROFILE_SPECIFIER='...' -workspace App.xcworkspace -scheme "App" -derivedDataPath "Output/iphoneos10" -sdk iphoneos -configuration Beta CODE_SIGN_IDENTITY="..." -archivePath "Output/iphoneos10/App.xcarchive" clean archive
        
        
        

         

        It is almost the same as Xcode 7 one (PROVISIONING_PROFILE_SPECIFIER instead of PROVISIONING_PROFILE).

         

        And we get the following entitlement:

        ⇒  codesign --display --entitlements :- ./Output/iphoneos10/App.xcarchive/Products/Applications/App.app

        Executable=/Users/user/Workspace/app/Output/iphoneos10/App.xcarchive/Products/Applications/App.app/App
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
                <key>application-identifier</key>
                <string>SOMEID.com.some.App</string>
                <key>beta-reports-active</key>
                <true/>
                <key>com.apple.developer.team-identifier</key>
                <string>TEAMID</string>
                <key>get-task-allow</key>
                <false/>
                <key>keychain-access-groups</key>
                <array>
                        <string>SOMEID.com.some.App</string>
                </array>
        </dict>
        </plist>
        
        
        

         

        See, that

                <key>aps-environment</key>
                <string>production</string>
        
        
        

        is missing, even that it is present in provisioning profile.

         

        The same for

        Output/iphoneos10/Build/Intermediates/ArchiveIntermediates/App/IntermediateBuildFilesPath/App.build/Beta-iphoneos/App.build/App.app.xcent
        
        
        

        'aps-environment' is missing

         

        For Xcode 7 'xcodebuild' it is Ok - both 'codesign --display --entitlements' and 'App.app.xcent' has 'aps-environment'.

         

        I have compared the xcodebuild output and found the following difference:

        Xcode 7:

        ProcessProductPackaging /Applications/Xcode-7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/Entitlements.plist Output/iphoneos/Build/Intermediates/ArchiveIntermediates/App/IntermediateBuildFilesPath/App.build/Beta-iphoneos/App.build/App.app.xcent
        ...
        builtin-productPackagingUtility /Applications/Xcode-7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/Entitlements.plist -entitlements -format xml -o /Users/user/Workspace/app/Output/App/iphoneos/Build/Intermediates/ArchiveIntermediates/App/IntermediateBuildFilesPath/App.build/Beta-iphoneos/App.build/App.app.xcent
        
        
        

        Xcode 8:

        ProcessProductPackaging "" Output/iphoneos10/Build/Intermediates/ArchiveIntermediates/App/IntermediateBuildFilesPath/App.build/Beta-iphoneos/App.build/App.app.xcent
        ...
        builtin-productPackagingUtility -entitlements -format xml -o /Users/user/Workspace/app/Output/App/iphoneos10/Build/Intermediates/ArchiveIntermediates/App/IntermediateBuildFilesPath/App.build/Beta-iphoneos/App.build/App.app.xcent
        
        
        

         

        Is anything changed? Should I use CODE_SIGN_ENTITLEMENTS parameter and specify

        /Applications/Xcode-8.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/Entitlements.plist
        
        
        

        ?

         

        PS Apple bug number is 28076333

        Open radar is here: http://www.openradar.me/28076333