Xcode16 pod HandyJSON 报错

Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-O


image.png

添加下面这段

      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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。