How to Build an IOS Archive for Xcode Organizer

KenNickersonKenNickerson USMember ✭✭✭

I have an app ready for distribution, using Visual Studio 2015. Built an an adhoc ipa to upload through Application Loader. Really struggling with the issue of Application Loader generating an error because the ipa has (associated domain) entitlements. I am getting the infamous itms-90046 error stating a code signing issue. Well it isn't that and Apple support didn't tell me there was a limitation or bug there and Application Loader has a limitation with entitlements. If I remove the entitlements, it will load. I rebuilt my distribution certificate and provisioning profile and now looking to use Xcode Organizer. Is there a way to take the ipa and create an archive so I can use that in Xcode organizer. Is there a tool in Xamarin Studio to do that? Please help!!

Ken

Best Answer

Answers

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai

    @KenNickerson,

    I am not 100% sure on what you are trying to achieve or what the issue is. However, you can use Xamarin Studio and the "Archive for Publishing" feature to create an archive. That will show up in Xcode -> Window -> Organizer.

  • KenNickersonKenNickerson USMember ✭✭✭
    edited March 2017

    @JohnMiller

    So the issue is I am using visual studio to build an IOS app which has entitlements. I am trying to publish by build an adhoc ipa which I am then trying to upload to iTunes Connect via Application Loader. This gives me the err itms-90046 stating my provisioning profile doesn't match the bundled entitlements (or something to that affect). I read you can use Organizer to publish an app with entitlements. I just don;t know how to proceed with building the archive to import into Organizer and go from there. I am trying the MSBuILD in program files/xamarin but getting command not recognized.

    How do I get from Visual Studio to Xamarin Studio?

    thanks for the quick response.

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai
    edited March 2017

    @KenNickerson,

    I uploaded an app last night that had Entitlements through Application Loader. Are you familiar with some other bug that is preventing yours from working?

    There isn't a way to create an Archive from Visual Studio right now (https://bugzilla.xamarin.com/show_bug.cgi?id=54279). However, I am not sure that's required. Are you sure this isn't some configuration issue in the app with the provision? I noticed that others reported similar issues with the native (not xamarin) tooling. One of the solutions mentioned was:

    Turn ON associated domains in Capabilities, but leave it empty. Find the entitlements.plist file for your app in the bundle, manually delete the entilement for associated domains. Don't turn off associated domains in capabilities.
    Visit https://developer.apple.com/account/ios/identifiers/bundle/bundleList.action and click on App IDs, then your App ID and make sure "Associated Domains" is turned off.

  • KenNickersonKenNickerson USMember ✭✭✭
    edited March 2017

    @JohnMiller

    I am glad to hear that you had success with it. I am using the associated domains entitlement. When I took it out, I was able to get further in the upload process. I rebuilt the distribution certificate and provisioning profile. I did notice that the property group items in my csproj didn't exactly align with what I have configured in the IOS build property and bundle signing windows. In the xml it is showing the generic iPhone Distribution however on the UI it is showing the specific iPhone Distribution code sign. Should I close VS and manually edit the csproj file. Is ther something I can do on the MAC side to correct. Company has the gun to my head to get this published. Thanks for your help and support.

    I changed the the code sign profile in the UI and it saved in the xml, however when I build I am getting an error regarding the code sign profile and should a guid. I read you suggested that be removed. I have tried that but going in circles.

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai

    @KenNickerson,

    You should see something matching for the configuration in the .csproj. For example, look for the PropertyGroup that corresponds to the configuration you are using. Something like:

    <PropertyGroup Condition= " '$(Configuration)|$(Platform)` == `Release|iPhone` ">
    

    There should be an element for <CodesignKey> that has the full name of the certificate in it. The <CodesignProvision> should have an ID (like a GUID) in it.

  • KenNickersonKenNickerson USMember ✭✭✭

    @JohnMiller

    There are property groups for ahoc, release and appstore. I am using adhoc which has the full name and the codekeyprovision guid. There other 2 are not configured correctly, however, I assume that shouldn't matter. On Xcode, the entitlements appear when I click on the information icon next to the provisioning profile. I can;t believe it is this quirky

  • KenNickersonKenNickerson USMember ✭✭✭
    edited March 2017

    @JohnMiller

    I editted the codesignprovision and removed the guid. the UI render it as automatic. I am still getting the itms-90046 message on the app load stating the bundles signature contains code signing entitlements that are not supported on IOS. Specifically value mycompany.org for key com.apple.developer.associated-domains in Payload/MyAppIOS.app/MyAppIOS is not supported.

    here is my entitlements.plist...

    <dict>
        <key>application-identifier</key>
            <string>66RFJY2R68.com.mycompany.companyHealth</string>
         <key>com.apple.developer.associated-domains</key>
         <array>
            <string>mycompany.org</string>
            <string>www.mycompany.org</string>
         </array>
     </dict>
    

    Please help

  • PatrickLongPatrickLong USMember ✭✭

    I'm also trying to use Xcode -> Organizer so that I can validate an app package rather than wait for Apple to reject it. We only use VS 2015 on Windows. The mac is simply there as a build machine.

    If I want my package to appear in the "Archives" tab so i can "Validate" it what do I need to do?

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai

    @PatrickLong,

    You'll have to open your solution in Visual Studio for Mac on the Mac and choose the Archive for Publishing feature from the right-click menu on the iOS Project.

  • KenNickersonKenNickerson USMember ✭✭✭

    @PatrickLong You do not want it to appear in the Archives. You need to build it on your windows environment as an AdHoc build. THat will place an IPA file on your MAC under the folder Library/mtbc/builds/your app name/GUID/bin/iPhone/ad-hoc

    From there you need to use the ApplicationLoader in XCode under Open Developer Tool.

  • PatrickLongPatrickLong USMember ✭✭

    I could not get application loader to work AND we don't ever have the project loaded on the mac. However I did use the ArchiveOnBuild setting in the csproj.

    Now that I have the Archive's my question is how much Validation does "Validate" actually do. Is it all the automated testing that gets done normally when you publish?

  • KenNickersonKenNickerson USMember ✭✭✭

    I would say it is the standard validation

Sign In or Register to comment.