2

I have an iMessage app (not an app with an iMessage extension) in which I have successfully added a binary framework (the project runs just fine on device and simulator)

However, I cannot successfully upload the project to App Store Connect - upload from the archive build returns the following errors:

Upload error

The relevant text of the error is:

The bundle ... contains disallowed nested bundles. Refer to https://developer.apple.com/go/id=framework-imessage

That link (if you follow the instructions for using an newer Xcode version) leads you back to the link below I used to add the framework to begin with... to run you will need Xcode 11 as I am using an XCFramework.

I added the framework to the iMessage app as instructed by Apple here:

https://developer.apple.com/library/archive/technotes/tn2435/_index.html

(see Embedding a Framework in an iMessage App section)

What do I need to change to the settings for the project or extension in order for the archive/upload process to succeed, while actually including the framework I need? I have searched on StackOverflow, and found a variety of posts related to cocoapods, or around various build settings of "Always Embed Swift Standard Libraries" that do not help.

I have reduced the problem down to a simple sample app you can see here, which builds and runs just fine but cannot be archived and uploaded:

https://www.dropbox.com/sh/jpa4oe7zlnb21wl/AACXkLbxIbayZUtJr3VDwO07a?dl=0

That directory contains a zip file of the project, and an image showing the error encountered.

0

2 Answers 2

0

You have .xcframework in your project. May be you haven't enable Build Libraries for Distribution in Build setting when you have build .xcframework. You can refer this link for this.

Edit:

Error message is Invalid Bundle. So check bundle name of message extension and frameworks which are in the .xcframework.

2
  • Thanks for the thought, but that setting is set for the XCFramework building target. Oct 23, 2019 at 17:53
  • Thanks for the edit, but if the bundle name were invalid I could not run the app - the sample app I posted runs just fine in a simulator or on device. It is ONLY submitting this to app store connect that I get an invalid bundle error. Oct 24, 2019 at 16:38
0

I've made a few changes regarding the stub app, it seems to work and validate ok.

  1. Remove the Embed Framework from the extension target.
  2. Add the Embed Framework in the app target, set the Destination to 'Frameworks'

2
  • Both solutions remove the framework from the extension, which causes the application to crash when you try to access anything from the framework. Especially the idea at the link, which I have seen mentioned in other StackOverflow answers to similar problems, is a terrible idea as you cannot just delete a framework the extension requires! Note that Apple notes about using frameworks with extensions require the framework be embedded and signed. Oct 23, 2019 at 18:00
  • Although I think you for the revised edit, the setting for "plugins" was created by Xcode when I created the iMessage project... you are confused about the target, the iMessage extension needs that set to framework, the stub app itself requires that be set to "Plugins". If you alter that setting and try to run the app in the simulator, it will tell you it requires a plugin but found none... please try running the application before you make suggestions. Oct 24, 2019 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.