Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-O
添加下面这段
if target.name == 'HandyJSON'
config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
end
上传App Store时,bitcode库报错,记录好名称,查找本地路径
方法1,记得替换framework_paths
post_install do |installer|
bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
framework_path = File.join(Dir.pwd, framework_relative_path)
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
puts "Stripping bitcode: #{command}"
system(command)
end
framework_paths = [
"Pods/LibraryA/LibraryA/dynamic/LibraryA.xcframework/ios-arm64_armv7/LibraryA.framework/LibraryA",
"Pods/LibraryB/LibraryB.xcframework/ios-arm64_armv7/LibraryB.framework/LibraryB"
]
framework_paths.each do |framework_relative_path|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
end
end
方法2手动处理
查看大于0则要处理
otool -l YourFramework | grep __LLVM | wc -l
处理
xcrun bitcode_strip -r YourFramework.framework/YourFramework -o YourFramework.framework/YourFramework
崩溃1:View was already initialized:
原因: 重复使用init,例如: [[[UIView alloc] init] initWithType:1]
崩溃2:Set maskView
to nil
before adding it as a subview of xxView
原因:不能用maskView
作为属性名
钥匙串:open /System/Library/CoreServices/Applications/Keychain\ Access.app