Post

Replies

Boosts

Views

Activity

Reply to Error unsupported Swift architecture.
1.lipo -create x86_64 && arm64 input0 = "#{iphoneos_framework}/#{framework_name}" input1 = "#{iphonesimulator_framework}/#{framework_name}" output = "#{universal_framework}/#{framework_name}" cmd = "lipo -create #{input0} #{input1} -output #{output}" system(cmd) || raise("lipo create failed for #{scheme}") 2.use shell copy input1/Modules/***.swiftmodule into output/Modules/***.swiftmodule x86_64-apple-ios-simulator.abi.json; x86_64-apple-ios-simulator.swiftdoc; x86_64-apple-ios-simulator.swiftmodule; x86_64-apple-ios-simulator.swiftsourceinfo; 3.use ruby script change #elif defined(x86_64) swift_header = "#{universal_framework}/Headers/#{framework_name}-Swift.h" if File.exist?(swift_header) cmds = ["sed -i '' \"2 s/^#elif defined(__x86_64__) \\&&\\ __x86_64__/#if defined(__x86_64__) \\&\\& __x86_64__ \\|\\| defined(__arm64__) \\&\\& __arm64__/\" #{swift_header}", "sed -i '' 's/#if 0//g' #{swift_header}"] cmd_swift = cmds.join(';') system(cmd_swift)
Feb ’23