错误一:
/Users/mac/Desktop/Test_project/mobile-ios/Test/Test-Bridging-Header.h:4:9 failed to emit precompiled header '/Users/mac/Library/Developer/Xcode/DerivedData/App-apvcgkuclncgfqdlzqcoffyaexos/Build/Intermediates.noindex/PrecompiledHeaders/Test-Bridging-Header-swift_2XM5A7557GAXB-clang_2CWGL4QL6AMZ7.pch' for bridging header '/Users/mac/Desktop/Test_project/mobile-ios/Test/Test-Bridging-Header.h'
OC项目依赖 Swift三方库的桥接报错,网上看了很多解决方法都不能解决我的问题,最后解决办法:
编译正常, 模拟器可以跑起来, 但是打包报错:
Sandbox: rsync.samba(41023) deny(1) file-write-create /Users/mac/Library/Developer/Xcode/DerivedData/Test-apvcgkuclncgfqdlzqcoffyaexos/Build/Products/Debug-iphonesimulator/Test.app/Frameworks/CHTCollectionViewWaterfallLayout.framework/_CodeSignature
文件权限问题引起的报错,解决办法:
找到项目所在路径/Pods/Target Support Files/Pos-xxAPP/Pods-xxAPP-frameworks.sh文件,替换
source="$(readlink "${source}")"
为
source="$(readlink -f "${source}")"
又换了一个错误信息,继续报错:
Showing All Messages
/Users/mac/Desktop/chimelong_project/mobile-ios/Pods/Target Support Files/Pods-Test/Pods-Test-frameworks.sh: line 132: ARCHS[@]: unbound variable
最后把之前的Excluded Architectures arm64配置删了,竟然可以打包了,正常跑模拟器也正常了,哈哈哈哈,莫名其妙。如下如
中间也有对cocoapods 进行版本升级,总之最后能运行和正常打包了, 可能是Xcode的bug。