Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
344 views
in Technique[技术] by (71.8m points)

ios - xcode 7.1 swift framework app builds but not archiving

I have created a sample Framework in Swift, xcode 7.1. The framework is then built for Profiling, released version. Released framework then added(embedded) to an iOS test app.

The app builds fine, but when trying to archive it. An error occurs, stating "bitcode bundle could not be generated because '.../Test/FW.framework/FW' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture arm64"

The Framework and app projects are on default settings, Bitcode enabled for both.

To make sure Framework have bitcode, this command on Framework

"otool -l FW.framework/FW | grep __LLVM"

yields

segname __LLVM

segname __LLVM

segname __LLVM

segname __LLVM

What am I missing? I have included both projects here, you can download them and try archiving.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

xcode requires that bitcode for all embedded frameworks is generated during archiving.

Copying the release build of framework/dylib isn't enough

do
archive the framework and THEN use the archived version of the framework from then on.

to get xcode to archive a framework (normally it only archives apps), set the build setting 'skip install' to NO for the framework target!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...