问题
I have a Jenkins CI setup where xcodebuild would be run to produce the IPA files for my iOS project. Lately we have made a change to cocoapods setup that causes the app to crash at startup.
The change was the decision to build the pods as frameworks instead of static libraries.
Now when I open the generated .app folder and peek inside, I could see a Frameworks directory with each of the pods inside. More notably, the actual frameworks didn't make it to these folders. Instead, they are symbolic links pointing to the actual file in DerivedData/AppName-xxxx/Build/Intermediates/ArchiveIntermediates/AppName/IntermediateBuildFilesPath/UninstalledProducts
.
This will cause a crash on app startup in which the log will say something like "The framework wasn't loaded".
I've tried several xcodebuild params from here such as SKIP_INSTALL=YES
without much success. Also I must note that doing the Archive command from the Xcode UI will not result in this problem.
来源:https://stackoverflow.com/questions/33209961/crash-on-startup-xcodebuilds-archive-command-adds-symbolic-links-to-frameworks