On Apr 12, 2017, at 1:04 AM, Rick Mann < email@hidden> wrote:
So, how do Apple's frameworks work then? Or other frameworks like PLCrashReporter?
Apple's frameworks are inside the SDKs, so there's a separate instance in the device and simulator SDK, and the linker finds the appropriate one because the search paths are set up for it.
3rd party frameworks have to use the unsupported (but necessary) ability to have a fat binary with both ARM and x86 in it. This whole situation really sucks, but in the 5 ½ years I've been dealing with it, Apple has never once acknowledged the problem, or even the existence of 3rd party iOS frameworks.
To make the framework fat, all you should need to do is use lipo to copy one binary into the other. I don't think you need to touch the rest of the framework or modify the plist.
Then there's the problem that when submitting an app to Apple, you have to use lipo to strip the simulator binary out of the embedded framework; both because it's a ton of unneeded data and because the verifier will reject the app if it's present. You can use a build-phase script to do that.
—Jens |