iOS Question Compiling problems after renewing enterprise-certs

schimanski

Well-Known Member
Licensed User
Longtime User
I'm using an enterprise-accout for my inhouse-apps. After renewing all certs and the mobileprovisioning-file, it is no longer possible to compile my app. In release, I always get an timeout, even i use the second hosted-builder. In debug, i get the following exception:

I'm not sure, if it is related to the following thread:

Updating the provisioning-profile in the mdm manually works....

B4X:
LinkStoryboards (in target 'B4iProject' from project 'B4iProject')
    cd /Users/administrator/Documents/UploadedProjects/<user id>
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
    /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module EIS --target-device iphone --target-device ipad --minimum-deployment-target 9.0 --output-format human-readable-text --link /Users/administrator/Documents/UploadedProjects/<user id>/Payload/EIS.app /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/LaunchScreen.storyboardc

ProcessInfoPlistFile /Users/administrator/Documents/UploadedProjects/<user id>/Payload/EIS.app/Info.plist /Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/B4iProject-Info.plist (in target 'B4iProject' from project 'B4iProject')
    cd /Users/administrator/Documents/UploadedProjects/<user id>
    builtin-infoPlistUtility /Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/B4iProject-Info.plist -producttype com.apple.product-type.application -genpkginfo /Users/administrator/Documents/UploadedProjects/<user id>/Payload/EIS.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -additionalcontentfile /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/LaunchScreen-SBPartialInfo.plist -additionalcontentfile /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/assetcatalog_generated_info.plist -requiredArchitecture arm64 -o /Users/administrator/Documents/UploadedProjects/<user id>/Payload/EIS.app/Info.plist
warning: The application supports opening files, but doesn't declare whether it supports opening them in place. You can add an LSSupportsOpeningDocumentsInPlace entry or an UISupportsDocumentBrowser entry to your Info.plist to declare support. (in target 'B4iProject' from project 'B4iProject')
warning: User-supplied CFBundleIdentifier value 'de.sekutor.eisep' in the Info.plist must be the same as the PRODUCT_BUNDLE_IDENTIFIER build setting value ''. (in target 'B4iProject' from project 'B4iProject')

CodeSign /Users/administrator/Documents/UploadedProjects/<user id>/Payload/EIS.app (in target 'B4iProject' from project 'B4iProject')
    cd /Users/administrator/Documents/UploadedProjects/<user id>
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    
Signing Identity:     "iPhone Distribution: Landesamt xxxxxxxxxxxxxxxxxx"
Provisioning Profile: "firebaseenterprise"
                      (56e68a8f-edd9-4261-a1e1-32cf8031de20)

    /usr/bin/codesign --force --sign A48EE38196BC95F85EC95364D1AAE943969CDA0F --keychain <user id> --entitlements /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/EIS.app.xcent --timestamp=none /Users/administrator/Documents/UploadedProjects/<user id>/Payload/EIS.app
Warning: unable to build chain to self-signed root for signer "(null)"
/Users/administrator/Documents/UploadedProjects/<user id>/Payload/EIS.app: errSecInternalComponent
Command CodeSign failed with a nonzero exit code


Error: ** BUILD FAILED **


The following build commands failed:
    CodeSign /Users/administrator/Documents/UploadedProjects/<user id>/Payload/EIS.app
(1 failure)
 

schimanski

Well-Known Member
Licensed User
Longtime User
Have you tried the secondary builder?
Yes, I tried it also with the secondary builder.

Worth deleting all keys and start from scratch. It shouldn't take too much time to create new keys, certificate and provision profile.

Seems not to be so easy because we've updated the provisioning-file manually. That works for the first. But as Admin in an enterprirse-account, it is not possible to make more than two dirstribution-certs from the same type. To make a new, the old one must be removed. But i think, that breaks the existing app in the workflow...
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
Can't you delete the non-working certificate (the last one created)?

After updating the provisioning-file manually over the mdm, the last one created certificate is also in workflow.

The problem seems to be the distribution-cert. The following screenshot shows the old and the new one. The new one is no longer trusted:

Screenshot.jpg


After that, i tried to set the cert from "Use System Defaults" to "Always Trust" in the trust-section of the keychain, but that does not help. Is it possible, that it is related to the following thing, which i found in more than one forum?

"Enterprise iOS Distribution Certificates generated after September 2, 2020 require the new intermediate certificate installed on any machines that will be code signing. Xcode 11.4.1 or later automatically downloads the new Apple Worldwide Developer Relations Intermediate Certificate, and it is also available directly from the Certificate Authority page. Confirm that the correct intermediate certificate is installed by verifying the expiration date is set to 2030."

The current MacOS-Latest(10.15) has xcode 11.7 listed as the default, so the intermediate cert must not be automatically downloaded automatically for xcode build/signing commands.

https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md

It would be great if MS could add the intermediate as a default in the keychain!

I'm not sure, if it is related only to the hosted builder (I'm using it) or not..

EDIT:
I have downloaded the attached intermediate certificate and copied it to the distribution-certificate. The result ist that the certificate i now "valid" in the keychain. But the compiling error is always the same. In release a timeout and in debug the attached exception:

Thanks for help...
 

Attachments

  • AppleWWDRCAG3.zip
    1.1 KB · Views: 147
  • error.txt
    381.3 KB · Views: 167
Last edited:
Upvote 0
Top