问题1: type argument ‘nw_proxy_config_t‘ is neither an Objective-C object nor a block type
解决方案:在Podfile文件的末尾加上这个:
post_integrate do |installer|
compiler_flags_key = 'COMPILER_FLAGS'
project_path = 'Pods/Pods.xcodeproj'
project = Xcodeproj::Project.open(project_path)
project.targets.each do |target|
target.build_phases.each do |build_phase|
if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
build_phase.files.each do |file|
if !file.settings.nil? && file.settings.key?(compiler_flags_key)
compiler_flags = file.settings[compiler_flags_key]
file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
end
end
end
end
end
project.save()
end
问题2:Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.
解决方案:
在 targets-->Build Settings -->Other Linker Flags 里添加 -ld_classic 或者 或者 或者 -ld64
问题3:打包报错Command PhaseScriptExecution failed with a nonzero exit code
解决方案:
找到Pods-xxxx-frameworks.sh文件,加-f ,
替换代码:source="$(readlink -f "${source}")"
如图所示:
问题4:跑模拟器失败
选择模拟器之后报错:Building for iOS Simulator, but linking in dylib built for iOS, file 'xxxx.framework/LookinServer' for architecture arm64
截图解决方案:打开xcode,选择product---> destination---> destination Architectures --> show Rosetta Destinations
这种方式打开的模拟器运行就没问题了。不是M1芯片的,应该是可以直接跑的。
网友评论