error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove...

執(zhí)行pod package xxx.podspec --force --no-mangle --exclude-deps --verbose
報錯。

    warning: Building targets in manual order is deprecated - check "Parallelize build for command-line builds" in the project editor, or set DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING in any of the targets in the current build to suppress this warning
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'AFNetworking' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'AFNetworking' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'AFNetworking' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'MJRefresh' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'MJRefresh' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'MJRefresh' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHCategorySDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHCategorySDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHCategorySDK' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SVProgressHUD' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'SVProgressHUD' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'SVProgressHUD' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'HSAMPaySDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'HSAMPaySDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'HSAMPaySDK' from project 'Pods')
    warning: no rule to process file '/var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/HSAMPaySDK/HSAMPaySDK/Classes/HSACommon/HSA-NetEncryption-iOS/Wrapper/SM2/libtommath-0.42.0/callgraph.txt' of type 'text' for architecture 'arm64' (in target 'HSAMPaySDK' from project 'Pods')
    warning: no rule to process file '/var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/HSAMPaySDK/HSAMPaySDK/Classes/HSACommon/HSA-NetEncryption-iOS/Wrapper/SM2/libtommath-0.42.0/changes.txt' of type 'text' for architecture 'arm64' (in target 'HSAMPaySDK' from project 'Pods')
    warning: no rule to process file '/var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/HSAMPaySDK/HSAMPaySDK/Classes/HSACommon/HSA-NetEncryption-iOS/Wrapper/SM2/libtommath-0.42.0/LICENSE' of type 'text' for architecture 'arm64' (in target 'HSAMPaySDK' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHModel' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHModel' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHModel' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'Toast' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'Toast' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'Toast' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHAlertSDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHAlertSDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHAlertSDK' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'Pods-packager' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'Pods-packager' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'Pods-packager' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHBaseSDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHBaseSDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHBaseSDK' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SDAutoLayout' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'SDAutoLayout' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'SDAutoLayout' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHUtiliitiesSDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHUtiliitiesSDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHUtiliitiesSDK' from project 'Pods')
    ** BUILD FAILED **
   

Cocoapods Packager的最新發(fā)布 1.5.0 在 2016 年, 最新的代碼提交在 2019 年,升級到Xcode14之后蘋果做了一些優(yōu)化席噩,Cocoapods Packager沒有適配
( Xcode 14 Release Notes,目前最低支持版本已經(jīng)提到了 iOS11,并且自然而然的移除了無法升級到 iOS11 的armv7, armv7s, and i386厦瓢。
)

解決辦法:通過修改cocoapods-packager的builder.rb 的 ARCHS 為
$(ARCHS_STANDARD)成功修復了Xcode14打已經(jīng)被移除的armv7(s)失敗的問題
參考目錄: /Library/Ruby/Gems/2.6.0/gems/cocoapods-packager-1.5.0
如果沒有提揍,可以考慮先找到gems的其他可能目錄,比如/usr/local/lib/ruby/gems/2.6.0/gems

原內(nèi)容:

    def ios_build_options
      "ARCHS=\'x86_64 i386 arm64 armv7 armv7s\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
    end

修改為:

def ios_build_options
   "ARCHS=\'$(ARCHS_STANDARD)\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments'"
end

如果提示沒有寫入權限煮仇,可以使用命令行

 sudo vim /Library/Ruby/Gems/2.6.0/gems/cocoapods-packager-1.5.0/lib/cocoapods-packager/builder.rb

感謝收藏劳跃!

?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市浙垫,隨后出現(xiàn)的幾起案子刨仑,更是在濱河造成了極大的恐慌,老刑警劉巖夹姥,帶你破解...
    沈念sama閱讀 216,591評論 6 501
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件杉武,死亡現(xiàn)場離奇詭異,居然都是意外死亡辙售,警方通過查閱死者的電腦和手機轻抱,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,448評論 3 392
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來旦部,“玉大人祈搜,你說我怎么就攤上這事∈堪耍” “怎么了容燕?”我有些...
    開封第一講書人閱讀 162,823評論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長婚度。 經(jīng)常有香客問我缰趋,道長,這世上最難降的妖魔是什么陕见? 我笑而不...
    開封第一講書人閱讀 58,204評論 1 292
  • 正文 為了忘掉前任,我火速辦了婚禮味抖,結(jié)果婚禮上评甜,老公的妹妹穿的比我還像新娘。我一直安慰自己仔涩,他們只是感情好忍坷,可當我...
    茶點故事閱讀 67,228評論 6 388
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著熔脂,像睡著了一般佩研。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上霞揉,一...
    開封第一講書人閱讀 51,190評論 1 299
  • 那天旬薯,我揣著相機與錄音,去河邊找鬼适秩。 笑死绊序,一個胖子當著我的面吹牛硕舆,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播骤公,決...
    沈念sama閱讀 40,078評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼抚官,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了阶捆?” 一聲冷哼從身側(cè)響起凌节,我...
    開封第一講書人閱讀 38,923評論 0 274
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎洒试,沒想到半個月后倍奢,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,334評論 1 310
  • 正文 獨居荒郊野嶺守林人離奇死亡儡司,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,550評論 2 333
  • 正文 我和宋清朗相戀三年娱挨,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片捕犬。...
    茶點故事閱讀 39,727評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡跷坝,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出碉碉,到底是詐尸還是另有隱情柴钻,我是刑警寧澤,帶...
    沈念sama閱讀 35,428評論 5 343
  • 正文 年R本政府宣布垢粮,位于F島的核電站贴届,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏蜡吧。R本人自食惡果不足惜毫蚓,卻給世界環(huán)境...
    茶點故事閱讀 41,022評論 3 326
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望昔善。 院中可真熱鬧元潘,春花似錦、人聲如沸君仆。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,672評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽返咱。三九已至钥庇,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間咖摹,已是汗流浹背评姨。 一陣腳步聲響...
    開封第一講書人閱讀 32,826評論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留萤晴,地道東北人参咙。 一個月前我還...
    沈念sama閱讀 47,734評論 2 368
  • 正文 我出身青樓龄广,卻偏偏與公主長得像,于是被迫代替她去往敵國和親蕴侧。 傳聞我的和親對象是個殘疾皇子择同,可洞房花燭夜當晚...
    茶點故事閱讀 44,619評論 2 354

推薦閱讀更多精彩內(nèi)容