I’m getting some errors when I try to upload my [working on sim/device directly] app, which has the dropbox framework. Any ideas?:
Package Summary:
1 package(s) were not uploaded because they had problems:
/var/folders/zf/c_52lkhd1qgd5xc8kk9wdv5m0000gn/T/387E74BA-9CDA-48E9-8461-3F0650C2A56C/1252240821.itmsp - Error Messages:
ERROR ITMS-90087: “Unsupported Architectures. The executable for Tower Visit.app/Frameworks/ObjectiveDropboxOfficial.framework contains unsupported architectures ‘[x86_64, i386]’.”
ERROR ITMS-90209: “Invalid Segment Alignment. The app binary at ‘Tower Visit.app/Frameworks/ObjectiveDropboxOfficial.framework/ObjectiveDropboxOfficial’ does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.”
ERROR ITMS-90125: “The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple’s linker.”
You won’t need rot redo fxgen, just make sure the binary only has device slices. you might also be able to split and re-merge the exiting binary with the lipo command line tool.
The lipo command creates or operates on ``universal’’ (multi-architecture) files. It only ever produces one output file, and never alters the input file. The operations that lipo performs are: listing the architecture types in a universal file; creating a single universal file from one or more input files; thinning out a single universal file to one specified architecture type; and extracting, replacing, and/or removing architectures types from the input file to create a single new universal output file.
“and/or removing architectures types from the input file to create a single new universal output file.” is what you want, to drop the i386 and x86_64 slices from the framework binary.
(nasty, nasty habit, building libraries that mix iOS and Sim, and once Apple starts shipping ARM Macs, it’s gonna blow in everyone’s faces, this that hack
Got the idea. I now have done it manually, but get
E: No matching CPU architecture "arm64" in reference "/Users/Jeremy/towervisit/TowerVisit/Carthage/Build/iOS/ObjectiveDropboxOfficial/iOS/ObjectiveDropboxOfficial/iOS/ObjectiveDropboxOfficial.fx"
Architectures in the fat file: /Users/Jeremy/towervisit/TowerVisit/Carthage/Build/iOS/ObjectiveDropboxOfficial/iOS/ObjectiveDropboxOfficial/iOS/ObjectiveDropboxOfficial.framework/ObjectiveDropboxOfficial are: armv7 arm64
Mmm, more to it as now the build also says that the namespace “ObjectiveDropboxOfficial” is unknown, where it’s used.
Hmm, the build should only look at the .fx files, not at whats in the actual binary. stripping the binary should have no effect on what the compiler sees, at all. something else must have gone wrong.
not currently.
I suppose (regardless of. general post-build script feature) I could could do the lips stuff as part of the regular build, but it seems hacky — its really the input file thats already broken, and running this on the .framework prior to build should be the proper solution…
In case anyone else finds this, the final steps to get this on the app store were to copy to a new folder, do the lipo stuff and after making the merged one the new one, remove the other executables left in the framework that were used in merging (so the structure is identical to the original) and then re-import the framework into Fire, and all works. I just have to remove the project reference to the framework when I’m working on it with the simulator and add the original one in, then flip back when building for a release.