TestFlight, MacInCloud and an odyssey

I've developed an enterprise iOS app using Xamarin 4.2.0.719 (Xamarin.iOS is 10.2.0.4) in Visual Studio 2015 on a Windows 10 computer, tested it on a MacInCloud machine using the simulator on there, and am now trying to get it on our company iPad. According to the internet I should approach this using TestFlight. So I looked around for walkthroughs, and found this:

https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/testflight/

But I'm just not able to get this to work, hence this post.

Here is what I did:

  1. In the "Certificates, Identifiers & Profiles" page (https://developer.apple.com/account/ios/profile/) I created a certificate of type "App Store and Ad Hoc".
    -> https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/testflight/#Provisioning_Changes
    points me to
    https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/app_distribution/app-store-distribution/#Creating_a_Distribution_Certificate
    which tells me to create the certificate this way. However, this guide does not mention TestFlight, so this is my first doubt, whether this is actually correct.

  2. In the "Certificates, Identifiers & Profiles" page I created a distribution profile of type Ad Hoc (since it says on the profile creation page "to install your app on a limited number of registered devices").
    -> The Xamarin guide tells me to choose "App Store" for the profile to publish to the App Store, which I don't want to. This is my second doubt. Is Ad Hoc actually the right choice for TestFlight?

  3. I downloaded and installed the profile on the Mac.

  4. In Xcode under Preferences -> Accounts -> My Accounts -> Team Details I downloaded the created profile.

  5. In Visual Studio in the project settings of the iOS project I specifically selected the new profile (I also tried using the "Automatic" choices, with the same effects).

  6. For the debug settings I selected "Ad-Hoc" and "iPhone". In the project properties in the tab "iOS IPA Options" I checked "Build ad-hoc/enterprise package (IPA)".

  7. In the Entitlements.plist I added a key named "beta-reports-active" as described here: https://forums.xamarin.com/discussion/30528/testflight-beta-testing-build-x-x-must-contain-the-correct-beta-entitlement
    Apparently this is needed to mark this build for TestFlight when uploading the IPA later. There are no other key-value-pairs in the entitlements.

  8. I sent the generated IPA from /bin/iPhone/Ad-Hoc//iOS.ipa to the MacInCloud.

  9. I tried uploading the IPA using the Application Loader on the MacInCloud. This results in this error:
    "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'beta-reports-active' in 'Payload/iOS.app/iOS'."
    -> At first I tried uploading it withous this beta-reports-active entitlement, which resultet in the app being uploaded to the AppStore, which is definitely not what I want.

And this is where I'm stuck. I'd appreciate if anyone can tell me what I'm doing wrong. I just want to push my app to TestFlight, surely it can't be that hard.

Best Answer

  • Daniel_ITVTDaniel_ITVT DE
    Accepted Answer

    Sorry for the late reply. Resource planning, you know the deal.
    So here's how I managed to distribute it via TestFlight:

    In short, I left out step 7. Step 9 says "...which resulted in the app being uploaded to the AppStore..." which is actually not true, it's just being uploaded to iTunesConnect, from where I continued publishing to TestFlight. This solved my problem. I didn't find this piece of information anywhere, hence my frustration and confusion.

    You don't include the "beta-reports-active" entitlement anymore. You just build your IPA package in Xamarin Studio/Visual Studio (compile for "iPhone" and "Ad-Hoc"), upload it using the Application Loader, and then once all errors are handled it's in your iTunesConnect. It's not in the AppStore at this point! From there you can publish it to TestFlight via the TestFlight tab by selecting your version to test. I think the publishing profiles aren't as important as they sound to be, although I didn't test the other profile options.

Answers

  • Did you solve this issue?

    Please share your experience with us.

  • Daniel_ITVTDaniel_ITVT DEMember
    Accepted Answer

    Sorry for the late reply. Resource planning, you know the deal.
    So here's how I managed to distribute it via TestFlight:

    In short, I left out step 7. Step 9 says "...which resulted in the app being uploaded to the AppStore..." which is actually not true, it's just being uploaded to iTunesConnect, from where I continued publishing to TestFlight. This solved my problem. I didn't find this piece of information anywhere, hence my frustration and confusion.

    You don't include the "beta-reports-active" entitlement anymore. You just build your IPA package in Xamarin Studio/Visual Studio (compile for "iPhone" and "Ad-Hoc"), upload it using the Application Loader, and then once all errors are handled it's in your iTunesConnect. It's not in the AppStore at this point! From there you can publish it to TestFlight via the TestFlight tab by selecting your version to test. I think the publishing profiles aren't as important as they sound to be, although I didn't test the other profile options.

Sign In or Register to comment.