Upload build to itunes error from xcode 10.1

﹥>﹥吖頭↗ 提交于 2019-12-24 20:26:32

问题


I try to validate build / upload build to iTunes the error was occurred.

Note : I am using custom framework and developed in Objective-c language.

Review ipa content

This is screenshot of custom framework summary, please check warning inside the screenshot.

Warning text of review ipa content (Custom framework)

macOS High Sierra is the last version of macOS that will run 32-bit apps without compromise. The Mac App Store will require all apps (including updates) to be exclusively 64-bit by June 2018.

Error I am also write script in Project->Target->Build Phase->Run Script

both scrip are same, I just shared both link for your reference.

Script link

Link 1 : Unable to submit archive including Here Maps Premium SDK with Xcode 8.2.1

Link 2 : http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/

This project was uploaded from xcode 9.4 but when I update my custom framework the error was occurred.

Thank you.


回答1:


It took me days to figure out the correct run script for Xcode 10. But I have it now and it works fine. Here it is :

######################

# Options

######################




REVEAL_ARCHIVE_IN_FINDER=false




FRAMEWORK_NAME="${PROJECT_NAME}"




SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework"




DEVICE_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework"




UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal"




FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.framework"







######################

# Build Frameworks

######################




xcodebuild -workspace ${PROJECT_NAME}.xcworkspace -scheme ${PROJECT_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} -UseModernBuildSystem=NO clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1




xcodebuild -workspace ${PROJECT_NAME}.xcworkspace -scheme ${PROJECT_NAME} -sdk iphoneos -configuration ${CONFIGURATION} -UseModernBuildSystem=NO clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphoneos 2>&1




######################

# Create directory for universal

######################




rm -rf "${UNIVERSAL_LIBRARY_DIR}"




mkdir "${UNIVERSAL_LIBRARY_DIR}"




mkdir "${FRAMEWORK}"







######################

# Copy files Framework

######################




cp -r "${DEVICE_LIBRARY_PATH}/." "${FRAMEWORK}"







######################

# Make an universal binary

######################




lipo "${SIMULATOR_LIBRARY_PATH}/${FRAMEWORK_NAME}" "${DEVICE_LIBRARY_PATH}/${FRAMEWORK_NAME}" -create -output "${FRAMEWORK}/${FRAMEWORK_NAME}" | echo




# For Swift framework, Swiftmodule needs to be copied in the universal framework

if [ -d "${SIMULATOR_LIBRARY_PATH}/Modules/${FRAMEWORK_NAME}.swiftmodule/" ]; then

cp -f ${SIMULATOR_LIBRARY_PATH}/Modules/${FRAMEWORK_NAME}.swiftmodule/* "${FRAMEWORK}/Modules/${FRAMEWORK_NAME}.swiftmodule/" | echo

fi



if [ -d "${DEVICE_LIBRARY_PATH}/Modules/${FRAMEWORK_NAME}.swiftmodule/" ]; then

cp -f ${DEVICE_LIBRARY_PATH}/Modules/${FRAMEWORK_NAME}.swiftmodule/* "${FRAMEWORK}/Modules/${FRAMEWORK_NAME}.swiftmodule/" | echo

fi




######################

# On Release, copy the result to release directory

######################

OUTPUT_DIR="${PROJECT_DIR}/Output/${FRAMEWORK_NAME}-${CONFIGURATION}-iphoneuniversal/"




rm -rf "$OUTPUT_DIR"

mkdir -p "$OUTPUT_DIR"




cp -r "${FRAMEWORK}" "$OUTPUT_DIR"




if [ ${REVEAL_ARCHIVE_IN_FINDER} = true ]; then

open "${OUTPUT_DIR}/"

fi  

The only thing I had to do is to create a new project for my custom framework on Xcode 10 and copy all files from Xcode 9 project and recompile it again. Directly recompiling Xcode 9 project on Xcode 10 didn't work somehow.



来源:https://stackoverflow.com/questions/54684751/upload-build-to-itunes-error-from-xcode-10-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!