Static frameworks, resource bundles, and a lot of pain

We ended up reverting the static framework with resources. We started working on this driven by this documentation page by Apple that describes how to include resources in static frameworks. The theory is that, on embed, the binaries are stripped. What happens in reality is that it fakes a binary, and it’s fine; things work locally after all the fixes here and there that we had to put out there. However… when you try to upload the app to the App Store, the validation fails:

ITMS-90171: Invalid bundle structure - The “MyApp.app/Frameworks/MyModule.framework/MyModule” binary file is not permitted. Your app cannot contain standalone executables or libraries other than a valid CFBundleExecutable for a supported bundle.

In other words, simulators and (devices?) are happy with the bundle layout, but the App Store is not, and Apple never reconciled the two worlds, so no, static frameworks don’t support resources.

I’ve reverted all the changes we made over the past two weeks, and hopefully nothing has broken; if it has, please let me know. I doubt we’ll ever try this again in the near future since we are eroding your trust by doing so. I’m very sorry for this, but we naively believed the support was there.