1.DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead
解决方法:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end
2.SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/ lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target
新版Xcode缺少arc文件
在老版本的Xcode下面路径中找到arc文件夹,复制到新版本的下面目录中
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
-
xxx pod库报错:Command SwiftCompile failed with a nonzero exit code
pod下找到对应的库,把Compilation Mode, release下也改成Incremental
8781712716120_.pic.jpg -
Command PhaseScriptExecution failed with a nonzero exit code
8791712716392_.pic.jpg
项目中搜索:source="{source}")"
替换成:source="{source}")"
5.报错原因:iOS12上启动奔溃,dyld: Library not loaded: /System/Library/Frameworks/SwiftUI.framework/SwiftUI
Referenced from: /var/containers/Bundle/Application/73E9CC61-6EBE-46DB-A786-4E47290284AD/xxx.app/xxx
Reason: image not found
项目中没有使用SwiftUI ,但是在适配iOS 17时还是报这个问题。
经排查,SwiftUI 使用 LC_LOAD_WEAK_DYLIB,而 Foundation 使用 LC_LOAD_DYLIB。这就是我们想要的。
https://developer.apple.com/forums/thread/126506
解决方法:
路径:Build Phases -> Linking Binary With Libraries 添加 SwiftUI.framework,并且status设置成Optional
网友评论