你确定你的框架结构完全正确吗?由于您之前只是将它用作子项目,因此您可能无法正确构建框架目录。
它应该看起来像:
MyFramework.framework //(directory)
info.plist
MyFramework //(symbolic link to Versions/Current/MyFramework)
Resources //(symbolic link to Versions/Current/Resources)
Headers //(symbolic link to Versions/Current/Headers)
Versions //(directory)
Current //(symbolic link to directory "A" below)
A //(directory)
Headers //(directory containing framework headers)
Resources //(directory holding framework resources)
MyFramework //(actual compiled library, really a .a file)
框架中的 .a 文件不应以 .a 结尾。如前所述,所有这些符号链接都必须正确,ls -l
框架目录中的“”应如下所示:
drwxr-xr-x 7 kendall admin 238B Feb 19 13:36 ./
drwxr-xr-x 11 kendall admin 374B Feb 19 13:36 ../
lrwxr-xr-x 1 kendall admin 24B Feb 19 13:36 Headers@ -> Versions/Current/Headers
lrwxr-xr-x 1 kendall admin 30B Feb 19 13:36 MyFramework@ -> Versions/Current/MyFramework
lrwxr-xr-x 1 kendall admin 26B Feb 19 13:36 Resources@ -> Versions/Current/Resources
drwxr-xr-x 4 kendall admin 136B Feb 19 13:36 Versions/
-rw-r--r-- 1 kendall admin 215B Feb 19 13:36 info.plist
info.plist 的内容(它告诉链接器框架中静态库的名称到底是什么)看起来像:
CFBundleDevelopmentRegion
English
CFBundleExecutable
MyFramework
CFBundleIdentifier
com.pushio.pushiomanager
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
FMWK
CFBundleSignature
????
CFBundleVersion
1.0.0