Xcode16.2升級后,打包上傳到App Store Connect問題

1、打包上傳到App Store Connect的時候

  • 非Xcode16可以正常上傳成功,但郵件會給出以下提示:

【意思就是April 24, 2025之前升級到最新的Xcode再進行上傳】

ITMS-90725: SDK version issue - This app was built with the iOS 17.4 SDK. 
Starting April 24, 2025, all iOS and iPadOS apps must be built with the iOS 18 SDK or later, 
included in Xcode 16 or later, in order to be uploaded to App Store Connect or submitted for distribution.
  • Xcode16在上傳時,直接會報以下錯誤:
ERROR: Validation failed - Unsupported SDK or Xcode version. Your app was built with an SDK or version of Xcode that isn’t supported. Although you can use beta versions of SDKs and Xcode to build and upload apps to App Store Connect, you need to use the latest Release Candidates (RC) for SDKs and Xcode to submit the app. For details on currently supported SDKs and versions of Xcode, visit: https://developer.apple.com/news/releases. - STATE_ERROR.VALIDATION_ERROR

正常情況下只要升級到最新的Xcode16,比如16.2版本以上問題就會自動解決。

2、升級到Xcode16.2打包遇見問題:contains incomplete bitcode

Validation failed (409)
Invalid Bundle Executable. The executable file 'SaasApp-Release.app/Frameworks/ZegoSampleBufferConverter.framework/ZegoSampleBufferConverter' contains incomplete bitcode. 
To compile binaries with complete bitcode, open Xcode and choose Archive in the Product menu. (ID: 51d83e7c-b1c8-4b59-8c07-974299324225)

解決方案:

1、找到出現(xiàn)問題的Frameworks路徑,放到下面數(shù)組中 framework_paths

2、在Podfile中 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/WCRLiveCore/Frameworks/ZegoSampleBufferConverter.framework/ZegoSampleBufferConverter",
   "Pods/AgoraRtm_Special_iOS/AgoraRtmKit.framework/AgoraRtmKit",
   "Pods/NIMSDK_XES/NIMSDK/NIMSDK.framework/NIMSDK",
   "Pods/TXIMSDK_iOS/ImSDK.framework/ImSDK",
   "Pods/WCRLiveCore/Frameworks/NERtcSDK.framework/NERtcSDK"
 ]
 framework_paths.each do |framework_relative_path|
   strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
 end

3、重新執(zhí)行pod install后,重新Archive上傳即可。

注意:如果不生效,建議刪除Pods中有問題的framework,再執(zhí)行pod install。

4、手動操作參考:

xcrun bitcode_strip -r ${framework_path} -o ${framework_path}

App Store 審核應(yīng)用時出現(xiàn)包含 bitcode 的報錯

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容