Forum Xamarin.iOS

Upload App with Extension to AppStore Failure (w/Images)

PedroFernandesPedroFernandes PTMember ✭✭
edited September 2014 in Xamarin.iOS

Hi there!

I am having problems to upload my app and it's extension to itunes connect.

Things i want to clarify:

  • Bundle Identifiers are correct (containing app id + ."TodayExtension")

Things i've found out:

  • To upload a Extension you need to create an App ID and distribution provisioning profile for the extension bundle identifier as the latest xcode required.

After having problems i tried to create the app ID for the extension. the problem is that the Extension project doesn't allow me to specify the Bundle Provisioning Profile, so i broke in the project file and forced it to do so:

Even so i keep getting this error on trying to archive the bundle:

So i tryied to Zip App Bundle and then upload it with Application Loader and this error occurred:

Can someone help me, i really need to deploy this iOS 8 Update.

@JeffreyStedfast‌ or @RolfBjarneKvinge‌ can you please help me?

Regards ;)


  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    Things i've found out:

    To upload a Extension you need to create an App ID and distribution provisioning profile for the extension bundle identifier as the latest xcode required.

    As far as I'm aware, this is not the case.

    After having problems i tried to create the app ID for the extension. the problem is that the Extension project doesn't allow me to specify the Bundle Provisioning Profile, so i broke in the project file and forced it to do so:

    Pretty sure this is wrong.

    Even so i keep getting this error on trying to archive the bundle:

    I'll look into this today, this seems like a bug in Xamarin Studio.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    My patch to fix the archive bug is being reviewed right now. I expect that it'll make it into 5.5... if not, I can provide a custom build.

  • PedroFernandesPedroFernandes PTMember ✭✭

    @JeffreyStedfast‌ I'm glad you fixed it!

    When can I expect the update? I'm asking this because I'm in really hurry to update my app. I have lots of customers complaining.

    If it takes some time would you mind to provide a custom build? I'm sure it would help someone else also

    thank you!!

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    Sure. contains the fix for archiving.

  • PedroFernandesPedroFernandes PTMember ✭✭

    @JeffreyStedfast Thank you. it surely fixed the archive bug.

    When i try to upload it using xCode trough "Archives" tab it gives me this error:
    So i really guess i need to use a different provisioning profile for the Today Extension.

    But in Xamarin Project there is now way to choose the profile. only in the main/container app.

    From the logic the today extension is inheriting the profile of the container app.

    What do you think?

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai


    Based on the screenshot, it looks like your archived build is using your personal development provisioning profile instead of your distribution provisioning profile.

    If I understand correctly, the* keys only exist in the development provisioning profiles.

    The second error suggests that the 6EZCE958S9 value is your Developer ID and not your Team ID, which, again, suggests that your archive was built with your development provisioning profile instead of your distribution profile.

    Could you double-check your build options to verify my diagnosis?

  • PedroFernandesPedroFernandes PTMember ✭✭
    edited September 2014

    @JeffreyStedfast‌, I double-checked in my build options and it was in distribution anyways..

    If you take a look at this i think you may understand what the problem may be:

    As you can see it is being signed with the Distribution profile, and the Extension is also using the distribution profile.

    However as you can see in the details the Extension "app-identifier" is "com.wake.clock" which it should be "com.wake.clock.WakeWidget"

    Why is this happening?

    EDIT: by safety i removed all the development profiles from my computer and only kept the distribution ones to make sure nothing could fail but still i have those errors

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    Okay, thanks. I have some ideas... I'll look into this some more today.

  • PedroFernandesPedroFernandes PTMember ✭✭

    @JeffreyStedfast‌ did you found what's going on?

    Sorry to call you again but this is really annoying not being able to deploy my app, sorry for my impatience.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    No, I haven't had any luck figuring out the problem yet.

  • PedroFernandesPedroFernandes PTMember ✭✭

    @JeffreyStedfast‌ what should i do in the meanwhile?

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    It looks like app extensions need to use their own xcent file when codesigning. I'm working on a fix but it might take me a day or so. I'll post something when I have something that seems to work.

    In the meantime, you could try manually code-signing your app extension. Copy & paste the Entitlements XML from your provisioning profile into a new file to use as your "Entitlements.xcent" file and expand the variables/*'s/etc and then copy & paste the command-line used for code-signing your regular app. You may need to increase the verbosity of the build logging in your preferences to see this.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    I might actually have something for you to test in an hour or two... waiting on our build bots

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    This build of Xamarin Studio adds support for setting codesigning rules for App Extension projects:

    You'll also need an updated Xamarin.iOS (still waiting on the build bot for that).

    In the meantime, You'll want to add an Entitlements.plist file to your app extension project if you don't already have one (the .csproj probably references an Entitlements.plist file but most app extension projects did not add one by default)

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    Unfortunately I found a bug in my code just as the build bot finished and by the time I submitted a new patch, the build bots have a bit of a backlog of builds (looks like I'll be waiting another 4-5 hours for the latest build), so I won't be able to post a build tonight.

  • PedroFernandesPedroFernandes PTMember ✭✭

    @JeffreyStedfast‌ that's ok. I see you are solving the problem. You guys are awesome. Always on the edge :D

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    @PedroFernandes‌ the build bots have finished. Give a try.

    The import bits are installed into /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/ - if the build works for you and you'd prefer to use a version of Xamarin.iOS that is deemed "Stable", you could make a copy of the files in that directory, install the Stable version of Xamarin.iOS, and then copy those files back into place.

    What I did was make it such that the build for the App Extension handles its own code-signing, rather than having it get signed as part of the code-signing of the final app bundle. It looks like this is needed based on the "application-identifier" string being wrong. I originally thought it was the prefix that was wrong, but it should have been "com.wake.clock.WakeWidget" which means it has to use a different xcent file than the main app bundle.

  • PedroFernandesPedroFernandes PTMember ✭✭

    @JeffreyStedfast‌ I tried to build it but it seems that it doesn't want to cooperate with us..

    Project Build Options:

    Error Compiling:

    Build Log is attached. i'm trying to help i just don't know what to do because this kind of problems seems to be beyond of my expertise :S

    log.txt 58.9K
  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    @PedroFernandes‌ Looks like the device builds of our development branch are broken right now, but the MSBuild stuff should be fine.

    What you can do is make a copy of the files in /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/ and then downgrade back to the Stable release, and then copy those files back into place. That should work.

  • PedroFernandesPedroFernandes PTMember ✭✭

    @JeffreyStedfast‌ Okay, i just downgraded the version but i still have those problems on validating process before uploading to App Store about the code signing.

    I'm in a urgent situation.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    Excellent! If it's not too late, I'll see if I can squeeze the fixes into 8.2.

  • PedroFernandesPedroFernandes PTMember ✭✭

    Awesome, I'm glad i reported this issue and you guys solved it ;)

  • PedroFernandesPedroFernandes PTMember ✭✭

    @jstedfast Hi there!

    I have this problem again, all i did was to update Xamarin and fix some of my bugs i had.. and then Archive and validate with xCode.

    I think this issue is not fixed yet even in the alpha channel.

    PS: check your replies to this thread to contextualize :)

    Can you help me here?

    Here is a screenshot of the problem:

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    You'll need Xamarin Studio 5.5.4 which is due out any day now... (I thought it'd already be released, but I guess not) and probably Xamarin.iOS 8.5.x for the App Extension fixes.

    Actually, I can probably post just the MSBuild stuff since no other Xamarin.iOS changes are needed.

    Unzip that file in /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/

    That will fix up the build targets (but note that you'll need to unzip again if you update Xamarin.iOS).

  • PedroFernandesPedroFernandes PTMember ✭✭

    Thank you I'll try it out today and I'll let you know.

  • PedroFernandesPedroFernandes PTMember ✭✭

    @jstedfast It worked.

    Thanks once again ;)

    My best regards

  • xeoxeo NZMember

    @jstedfast‌ I am using Xamarin Studio 5.5.4 (Beta Channel) but the error is still there.
    Using the zip file you provided works.

  • PedroFernandesPedroFernandes PTMember ✭✭

    @jstedfast I'm using the Studio 5.6.3 and i think we still have that issue there.

    However the zip file you provided to us is fixing our problems.

    My app got approved in the App Store and now the extension works perfectly ;)

    Best Regards,
    Pedro Fernandes

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    The files contained within the zip file are not actually part of the Xamarin Studio install, they are part of Xamarin.iOS.

    Unfortunately, since I've changed so much code, those changes will probably not be making it into any release before Xamarin.iOS 8.6.0 (they are in 8.6.0 for sure) which I think is scheduled for sometime in early January.

  • xeoxeo NZMember

    So, if we want to submit an app which includes an extension, should we keep using your zip file till the version 8.6.0?

  • PedroFernandesPedroFernandes PTMember ✭✭

    @xeo i believe that's what he said.

    At least what @jstedfast‌ said is that until Xamarin.iOS reaches 8.6.0 you need to keep using that zip to deploy your app to the App Store.

    At least it is working for me right now.

    Best Regards,
    Pedro Fernandes

  • xeoxeo NZMember

    @jstedfast‌ Just updated to the new beta, I am not able to compile the extension anymore.
    I receive the following error:

    MTOUCHTASK: error MT2002: Failed to resolve "Security.SecCertificate Security.SecTrust::get_Item(System.Int32)" reference from "Xamarin.iOS, Version=, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"

    Any hint?

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    @xeo, the Unified API changed between Xamarin.iOS 8.4 and 8.6, and you're using a component which hasn't been updated to 8.6 yet (it's using API that is no longer present in 8.6).

  • xeoxeo NZMember

    @RolfBjarneKvinge I understand thank you.
    Gosh I am concerned, we had to wait months for components to be updated to unified api and now they have to recompile it again. It's not looking good for the 1st february deadline (but I am always pessimist!).
    For now I've reverted back to the stable version.

  • ImmortalImmortal PLMember

    Hey @jstedfast

    I'm having the same issue with an app with an extension. I've tried to apply your fix (replacing the Xamarin.iOS targets) and it helped with the code signing issues. However, the app still won't go through the application loader. I'll now get this error message:

    ERROR ITMS-90207: "Invalid Bundle. The bundle at '' does not contain a bundle executable."

    Could you help?

  • ImmortalImmortal PLMember

    Well, nevermind. I've updated Xamarin and it worked.

Sign In or Register to comment.