記一次iOS上線提審

標(biāo)簽(空格分隔): work


公司最近的一次App提交過程中遇到的一些問題,現(xiàn)貼在這里,有檢索到本篇的朋友們可借鑒。

首先是上傳到iTunes Connect構(gòu)建版本,點擊以下藍(lán)色按鈕,之后會有蘋果為你的代碼進(jìn)行檢查:

image_1bu7k3nt22m3cmearq636qua9.png-14.8kB
image_1bu7k3nt22m3cmearq636qua9.png-14.8kB

本人在ios11上做了提交,發(fā)現(xiàn)問題進(jìn)行分類:

  1. 第一個是第三方庫存在x86_64,i386的鏈接庫,有以下問題:
iTunes Store Operation Failed
ERROR ITMS-90087: "Unsupported Architectures. The executable for LeWaiJiao.app/Frameworks/GCDWebServers.framework contains unsupported architectures '[x86_64, i386]'."

PS:以下所有翻譯來源于歐路詞典,粘貼過來的,僅供參考;

iTunes Store Operation Failed
ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'LeWaiJiao.app/Frameworks/GCDWebServers.framework/GCDWebServers' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."
無效段對齊。應(yīng)用程序二進(jìn)制的“l(fā)ewaijiao。應(yīng)用程序/框架/ gcdwebservers??蚣? gcdwebservers”沒有正確對齊。嘗試用新的Xcode版本重建應(yīng)用程序。
iTunes Store Operation Failed
ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."
“二進(jìn)制無效。在lc_encryption_info負(fù)荷指令加密信息丟失或無效,或是已經(jīng)加密的二進(jìn)制。這個二進(jìn)制文件似乎沒有用蘋果的鏈接器構(gòu)建?!?
iTunes Store Operation Failed
WARNING ITMS-90080: "The executable 'Payload/LeWaiJiao.app/Frameworks/GCDWebServers.framework' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library."
“可執(zhí)行的有效載荷/ lewaijiao。應(yīng)用程序/框架/ gcdwebservers??蚣堋辈皇且粋€獨立的可執(zhí)行文件的位置。請確保您的構(gòu)建設(shè)置配置為創(chuàng)建餅可執(zhí)行文件。更多信息請參閱技術(shù)問答qa1788在iOS開發(fā)者庫位置獨立的可執(zhí)行的建筑?!?
ERROR ITMS-90362: "Invalid Info.plist value. The value for the key 'MinimumOSVersion' in bundle ***.app/Frameworks/SDK.framework is invalid. The minimum value is 8.0"

后面這個90362貌似是連帶問題,定位的時候發(fā)現(xiàn)與最小版本無關(guān),所以一同被解決了;

解決方法呢是在該工程里添加腳本處理這些被添加進(jìn)來的第三方庫,如下:


image_1bu7kmq06140t1nmhkf11sfq1civm.png-235.5kB
image_1bu7kmq06140t1nmhkf11sfq1civm.png-235.5kB
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"

# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"

EXTRACTED_ARCHS=()

for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done

echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"

echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done

以上代碼來源于Google,解決方法經(jīng)確認(rèn)iOS11 + Xcode9.0有效;

  1. 項目有icon不合規(guī)定的錯誤
iTunes Store Operation Failed
ERROR ITMS-90717: "Invalid App Store Icon. The App Store Icon in the asset catalog in 'LeWaiJiao.app' can't be transparent nor contain an alpha channel."
無效應(yīng)用程序商店圖標(biāo)。在資產(chǎn)目錄中的lewaijiao App Store圖標(biāo),應(yīng)用程序不能透明也包含alpha通道?!?

該錯誤原因是上傳的icon不符合蘋果規(guī)定,公司項目存在的問題是1.使用了圓角;2.有透明alpha通道;
解決方法自然容易了,找設(shè)計重新做,自己解決的話第二個可以DIY,如下:

image_1bu7l6vhrvhm51b13pjvrlc0p13.png-100.4kB
image_1bu7l6vhrvhm51b13pjvrlc0p13.png-100.4kB

用系統(tǒng)預(yù)覽打開icon圖片,點掉Alpha的勾,再保存就可以了;


image_1bu7l8bt61p6v1mp11csi15ri1dmg1g.png-128.6kB
image_1bu7l8bt61p6v1mp11csi15ri1dmg1g.png-128.6kB
  1. 提交上傳結(jié)束后又出現(xiàn)了一個問題
App Installation failed, No code signature found.

真機(jī)無法運行了!這個問題純屬偶然,所以繼續(xù)解決;打開終端,輸入

sudo chmod -R 777 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk 

修改文件權(quán)限,然后修改字段屬性,打開:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist

,修改 CODE_SIGNING_REQUIRED 字段為 YES ,保存;

?著作權(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)容