Xcode 6中的Shell脚本调用错误

我曾经用iOS-Universal-Framework编译通用静态库,并且工作正常,直到我将Xcdoe升级到6。

我得到了以下错误

** BUILD SUCCEEDED ** 

创build通用静态库/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool -static / Users / taofang / Library / Developer / Xcode / DerivedData / xxxxx / Build / Products / Debug -iphoneos / xxx.framework / xxx /Users/taofang/Library/Developer/Xcode/DerivedData/xxxxx/Build/Products/Debug-iphonesimulator/xxx.framework/xxx -o / Users / taofang / Library / Developer / Xcode / DerivedData /xxxxx/Build/Products/Debug-iphoneos/xxx.framework/xxx.temp错误:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool:无法打开文件:/Users/taofang/Library/Developer/Xcode/DerivedData/xxxxx/Build/Products/Debug-iphonesimulator/xxx.framework/xxx(没有这样的文件或目录)

如果我使用Xcode 5来完成这项工作,那就没事了。

除此之外,我selectDevice作为我的编译目标,但是为什么libtool试图在iphonesimulator文件夹下打开文件?

这意味着在任何生成文件夹中都没有头文件。 这可能是因为你没有configuration你的库项目来导出任何头文件。

转到您的项目目标>>构build阶段>> +标记>>添加一个新的构build阶段

您需要添加复制文件阶段,将您想要的标题复制到包含文件夹。

而不是chmod a+x [PATH] ,我可以用chmod 777 [PATH]来解决它。