microsoftconnect/intune-app-wrapping-tool-ios

Error when trying to wrap an archive in an Azure DevOps macOS agent

Closed this issue · 2 comments

Describe the bug:
When trying to wrap an archive in an Azure DevOps macOS agent I receive an error whilst the package is being extracted.

To Reproduce

  1. Configure a build pipeline. To download Objective-C application, build it, sign it and create the archive with an appropriate provisioning profile. Which is successful.
  2. Mount the IntuneMAMPackager using the command 'hdiutil mount "Microsoft Intune Application Restrictions Packager for iOS.dmg"' - Which is successful.
  3. Run the command sudo /Volumes/IntuneMAMAppPackager/IntuneMAMPackager/Contents/MacOS/IntuneMAMPackager -v -i "/output/InContact.ipa" -o "/output/InContact_IntuneSigned.ipa" -c "" -p $(IntuneProfile.secureFilePath)
  4. See error

Expected behavior:
A clear and concise description of what you expected to happen.

Screenshots and logs:
I receive a message from the verbose output stating

WARNING: By default, the Microsoft Intune App Wrapping Tool changes the build string of the target app to help ensure it can be successfully deployed as an upgrade should you decide to wrap the same version/build of the app with a newer version of the wrapping tool (to take advantage of new features). Use of the build string override option (-b) is only recommended if testing revealed some issue in app deployment or functionality caused by the default changes to the build string. For more information on iOS app versions (CFBundleShortVersionString) and build strings (CFBundleVersion), visit https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html#//apple_ref/doc/uid/TP40012582-CH28-SW18
Application packaging in progress...
Version of MACOSX is 12.6.7
Version of XCode installed is Xcode 14.2
Build version 14C18

Parsing provisioning profile...
Parsing main app provisioning profile...
Parsing extension provisioning profiles...
Checking that main provisioning profile has not expired...
Checking that extension provisioning profiles have not expired...
Checking if signing certificate is valid...
Number of certificates returned by query: 1
Checking certificate at index: 0
Getting certificate common name.
Possible name match found. Checking if certificate is contained in provisioning profile...
Computing SHA-256 fingerprint of certificate.
Checking if SHA-256 hash exists in provisioning profile.
Certificate was found in the provisioning profile.
Checking if certificate issuer is Apple.
Checking if signing certificate is found in each extension profile...
Creating temporary directories...
Failed to extract application to temporary directory.
Cause of the error to be provided for investigation:Error Domain=IntuneAppPackager Code=9 "/usr/bin/unzip exited with an error." UserInfo={NSLocalizedDescription=/usr/bin/unzip exited with an error.}

Smartphone (please complete the following information):
N/A

Intune app wrapping tool (please complete the following information):
Version 17.4.1

Additional Information:
My config for building my code in the agent is

  • task: Xcode@5
    inputs:
    actions: 'build'
    scheme: 'InContact2-Prod'
    sdk: 'iphoneos'
    configuration: 'Release'
    xcWorkspacePath: '**/project.xcworkspace'
    xcodeVersion: 'default' # Options: 8, 9, 10, 11, 12, default, specifyPath
    packageApp: true
    signingOption: 'default'
    signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
    provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
    exportPath: 'output/InContact.ipa'

It turned out that xcode@5 isn't generating the archive correctly. In fact it was just an empty file that had been created

Hi @AndyAHolmes ,
Can you please let me know how you've configured the wrapping tool in Azure DevOps Pipeline. I am trying to do it and couldn't figure what to do in the step 1 you've mentioned above.
"Configure a build pipeline. To download Objective-C application, build it"
It would be so much helpful if you can let me know.

Thanks in advance