TestFlight Beta Testing, build x.x must contain the correct beta entitlement.

wallymwallym USInsider, Beta ✭✭✭

This isn't a Xamarin question, but it's driving me up the wall, so I thought I would start here. I have an iOS app that I am trying to get up and going on Testflight. Long story short, it is an app that I worked on about 18 months ago, an I just picked back up. I am trying to test it via TestFlight. I am able to upload it via the "Application Loader." In iTunes Connect, I am getting the message that implies that it does not have the correct beta entitlements. I have recreated new provisioning profiles. Unfortunately, when I look in the provisioning profile, it still does not appear to have the appropriate beta entitlement. In reading on SO, recent provisioning profiles should have the necessary entitlement. I created all of my certificates and provisioning profiles this week (first week of January '15). I am using an distribution identity and the associated provisioning profile. When I open the provisioning profile in TextEdit, I do not see any beta entitlement settings. I'm at a loss here. Any suggestions are appreciated. I figure that I am missing something, but danged if I can find it.

Wally

Posts

  • c0lbyc0lby USMember ✭✭✭

    @wallym‌

    If you have are using an Entitlements.plist file (screenshot attached), you'll have to add the beta entitlement manually, as it's absence overrides it even if the entitlement is in your Provisioning Profile (rant below)

    <key>beta-reports-active</key>
    <true/>
    

    Let me know if that didn't do the trick, as I pretty much tried everything, and may still have a few suggestions.

    Rant: This one got me too, after literally 11 phone calls and countless emails with the iTunes Connect team and a couple of different Engineering teams at Apple, over a period of several weeks, I figured it out. Apple didn't help at all. They just kept telling me to regenerate the Provisioning profile over, and over [and over], even though I manually opened the profile after several regenerations, and it did actually have the entitlement.

    c0lby

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai

    @wallym,

    I have ran into this twice before so far. The first time, here. The second time I believe it was from an incorrect profile trying to be used.

    Have you verified that you created a new App Store Distribution profile for the test flight build?

  • c0lbyc0lby USMember ✭✭✭

    @wallym‌ here is the screenshot I lied about :)

  • wallymwallym USInsider, Beta ✭✭✭
    edited January 2015

    Thanks everyone. I had recreated the provisioning profiles, certificates, and created distribution certificates till I was blue in the face. It never worked. I opened the provisioning file in TextEdit and could see the necessary entitlement, but it didn't seem to work. Creating the Entitlements.plist file did seem to get me headed in the right direction. I finally went through all of this and now have installed my app via the iTunes Connect/Testflight service.

    Rant on: Geez, how did Apple take a good enough service called TestFlight and effectively overcomplicated it. This is always what big companies do, they kill things off just like this. Ugghhhh, the humanity..................Rant off.

    Thanks again everyone!!!! :-)

  • WilliamGrandWilliamGrand USMember

    @c0lby‌ editing the Entitlements.plist did the trick, but then I have to manually remove it again for development. Otherwise, I get a Your code signing/provisioning profiles are not correctly configured. error. Is there another work around?

  • rmaciasrmacias USBeta, University ✭✭✭✭✭
    edited January 2015

    @WilliamGrand‌, you can create two separate Entitlements.plist files. Something like "Entitlements-Dev.plist" and "Entitlements-BetaTest.plist". Take a look at Colby's screenshot. From there in your Debug build configuration, you can set the Custom Entitlements to "Entitlements-Dev.plist", and on your Test Flight Build Configuration (you may have to create one) set Custom Entitlements to "Entitlements-BetaTest.plist".

  • WilliamGrandWilliamGrand USMember

    Fantastic. Thanks!

  • CTCHANGCTCHANG AUMember ✭✭
    edited March 2015

    I also having the same problem, and I did delete all my certificates, development and distribution provisioning profiles. But still faced the same problem.

    After a long night of 3.5 hours searching the web for solutions, and yet stuck in the same hole.

    At the end, I read again the Q&A https://developer.apple.com/library/ios/qa/qa1830/_index.html carefully, and found these...

    To resolve this error, you need to install an App Store distribution profile within Xcode. Since App Store provisioning profiles are the only profiles containing the beta-reports-active entitlement, the error indicates that an App Store provisioning profile matching your app's bundle identifier couldn't be found in Xcode's local profile library.

    Since beta-reports-active was added in September 2014, all App Store profiles that were generated prior to September 2014 must be regenerated to pick up the new entitlement.

    And I resolve my testflight beta testing entitlements by rebuild the Ad-Hoc with AppStore distribution profile.

  • Christopher_MillerChristopher_Miller USUniversity ✭✭

    I'm going through this right now. What needs to be in the Entitlements.plist? I have created all new certificates and a new distribution profile for this app (it uses Push Notifications, it needs it's own dist profile). I refreshed my account in Xcode, so that should be current on my machine. If I build for release or ad-doc without an Entitlements.plist, it uploads to iTunesConnect, but complains that the app "must contain the correct beta entitlement".

    If I compile with a Entitlements.plist file,, it fails with an ITMS-90163 error:

    "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile: 'beta-reports-active' in 'Payload/FormsTemplateiOS.app/FormsTemplateiOS'."

    Is this what I should be using for Entitlements.plist?

    <?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>beta-reports-active</key>
    <true/>
    </dict>
    </plist>
    
  • MarkMadlangbayanMarkMadlangbayan USUniversity ✭✭

    That's what I have. Plus make sure that your .csproj's Ad-Hoc|iPhone has the Entitlements.plist.

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
        <CodesignProvision>0000000000-0000-000-0000-0000000000</CodesignProvision>
        <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
    </PropertyGroup>
    
  • DannyCDannyC US ✭✭✭✭

    @ChrisMiller, I had the same issue and got around it by using the profile created by Xcode that starts with the name "XC: yourBundleIdentifier". Refresh your provisioning profiles and check if Xcode creates one for you, it might have the entitlements you need. Provisioning profiles is something Apple needs correct as it's a major PIA.

  • Christopher_MillerChristopher_Miller USUniversity ✭✭

    @DannyC: How did you get Xcode to create the profile for your bundle? It created an "XC Ad Hoc:*" (for me or one of our Obj-C dev teams), but I need a bundle specific one for the push notifications.

  • DannyCDannyC US ✭✭✭✭

    Honestly, not sure how Xcode created it.

  • Christopher_MillerChristopher_Miller USUniversity ✭✭

    What appeared to work wss to go into XCode, create a new iPhone app in Obj-C, add code to register for push notifications and then build an archive file. This created a “XC:bundle identifier” distribution profile with the push notification set and the beta entitlement.

  • Rushi.8941Rushi.8941 USMember

    In September'14, Apple changed the way the provisioning profiles used to work. Now you would need the AppStore distribution provisioning profile instead of Ad-Hoc provisioning profile in order to distribute app for testing on TestFlight. Doing this, sets "beta-reports-active" to "true" in the provisioning profile itself. The way to test it is to change the .mobileprovision to .xml and check for this. Then build the app in Visual Studio with "AppStore" configuration on "iPhone" platform. Clean and rebuild the solution.

  • PaoloBroccoPaoloBrocco USMember ✭✭
    edited June 2015

    Hi there, guess what, I set distribution provisioning profiles for AppStore and for AdHoc. I have downloaded them, double clicked them on my mac so that they get added in the Keychain Access.

    I restarted the build host, even rebooted my mac...

    I build my solution from Visual Studio 2013 (which is connected to the build host) wit the following options:

    • Build configuration: AppStore, iPhone
    • iOS Signing Bundle: Distribution (automatic)
    • Provisioning profile: the AppStore provisioning profile I created...

    A few seconds after starting the buid I get this error:

    No valid iOS code signing keys found in keychain.

    UPDATE: Actually I got a hint that made me solve this, in this thread.

    To sum up, check if the private key is really there, in the keychain access. I'm not a mac expert and I thought it was there, but it wasn't. Some people say to regenerate the provision profile, but if you have the private key you can just import it...

  • BobisbackBobisback USUniversity ✭✭

    @c0lby said:
    @wallym‌

    If you have are using an Entitlements.plist file (screenshot attached), you'll have to add the beta entitlement manually, as it's absence overrides it even if the entitlement is in your Provisioning Profile (rant below)

    <key>beta-reports-active</key>
    <true/>
    

    Let me know if that didn't do the trick, as I pretty much tried everything, and may still have a few suggestions.

    Rant: This one got me too, after literally 11 phone calls and countless emails with the iTunes Connect team and a couple of different Engineering teams at Apple, over a period of several weeks, I figured it out. Apple didn't help at all. They just kept telling me to regenerate the Provisioning profile over, and over [and over], even though I manually opened the profile after several regenerations, and it did actually have the entitlement.

    c0lby

    Where does this key go in the plist file?

    Thanks,
    Bob

  • @ChrisMiller.0950 said:
    I'm going through this right now. What needs to be in the Entitlements.plist? I have created all new certificates and a new distribution profile for this app (it uses Push Notifications, it needs it's own dist profile). I refreshed my account in Xcode, so that should be current on my machine. If I build for release or ad-doc without an Entitlements.plist, it uploads to iTunesConnect, but complains that the app "must contain the correct beta entitlement".

    If I compile with a Entitlements.plist file,, it fails with an ITMS-90163 error:

    "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile: 'beta-reports-active' in 'Payload/FormsTemplateiOS.app/FormsTemplateiOS'."

    Is this what I should be using for Entitlements.plist?

    <?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>beta-reports-active</key>
    <true/>
    </dict>
    </plist>
    

    After running your steps I solved the problem, thanks ChrisMiller.0950

  • MinghuMinghu USMember ✭✭

    Hi,

    I have faced a issue when I publish IPA with application loader.
    ERROR ITMS-90163: "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: 'inter-app-audio' in 'Payload/CarSeerMobileApp.iOS.app/CarSeerMobileApp.iOS'."

    How can I solve this?

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @Minghu

    It looks like you will need to add the Inter App Audio entitlement to the App ID that your provisioning profile is using.

    1. Go to the Apple developer portal: https://developer.apple.com/account/ios/identifier/bundle
    2. Select the appropriate App ID and click the "Edit" button
    3. Place a check mark next to Inter-App Audio
    4. Click "Done" button

    You may need to then regenerate and re-download the provisioning profile.

  • MinghuMinghu USMember ✭✭

    Thanks JGoldberger.
    This seems to be solved,
    but got another error.
    ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait' in bundle 'com.01Inventions.carseer'."

    Please help me again with this issue.
    Regards.

  • gromovicgromovic Member ✭✭
    edited May 2018

    Working on visual studio 2017 only, not Xcode at all, most confusing is about certificates and profiles...
    Which to download where, and how it works?.. since I use mac only as server for simulator and for Application loader...
    How visual studio build interacts with profiles and certs?

Sign In or Register to comment.