归档文件:Ld * / Objects-normal / arm64 / test normal arm64

时间:2019-06-24 03:09:44

标签: ios

第一步:

xcodebuild -project Pods/Pods.xcodeproj build

秒:

xcodebuild archive -project 'test.xcodeproj' -configuration 'Debug' -scheme 'test' -archivePath './app.xcarchive' LIBRARY_SEARCH_PATHS="./build/*"

我收到了消息:

** ARCHIVE FAILED **

The following build commands failed:
    Ld /Users/Jerry/Library/Developer/Xcode/DerivedData/test-gatfkskyhzymghdnanjebfcrqchs/Build/Intermediates.noindex/ArchiveIntermediates/test/IntermediateBuildFilesPath/test.build/Debug-iphoneos/test.build/Objects-normal/arm64/test normal arm64
(1 failure)

1 个答案:

答案 0 :(得分:0)

现在,我导致了这个问题。 那我的代码:

#!/bin/bash

proName='project name'
proURL='your project path'
api_key='your api key'
configuration='Debug' #Release
#打包
arch(){
    echo '开始编译Pods'
    xcodebuild -project Pods/Pods.xcodeproj build
    echo '开始编译project'

xcodebuild -archivePath "./build/${proName}.xcarchive" -workspace $proName.xcworkspace -sdk iphoneos -scheme $proName -configuration $configuration archive
}
#导出ipa
exportIPA(){
    echo '开始导出ipa'
    xcodebuild -exportArchive -archivePath "./build/${proName}.xcarchive" -exportPath './app' -exportOptionsPlist './ExportOptions.plist'
}
#上传ipa到蒲公英
upload(){
if [ -e "${proURL}/app/${proName}.ipa" ]
then
    echo '开始上传ipa/apk到蒲公英'
    curl -F "file=@${proURL}/app/${proName}.ipa" -F "_api_key=${api_key}" 'http://www.pgyer.com/apiv2/app/upload'
else
    echo "在目录:${proURL}/app/${proName}.ipa 不存在"
fi
}
startarch(){
    arch
    if (($? == 0))
    then
        echo 'archive success?'
        startExportIPA
    else
        echo 'archive faild❌'
    fi
}
startExportIPA(){
    exportIPA
    if(($? == 0))
    then
        echo 'exportIPA success??'
        startUPLoadIPA
    else
        echo 'exportIPA faild ❌'
    fi
}
startUPLoadIPA(){
    upload
    if(($? == 0))
    then
        echo 'uploadIPA success'
    else
        echo 'uploadIPA faild ❌'
    fi
}


if (($# == 0))
#then
#    startarch
#elif (($# == 1))
then
        while :
        do
        echo '???***********************???'
        echo  "输入 1 到 4 之间的数字:"
        echo  "输入 1:从编译打包开始至结束"
        echo  "输入 2:从导出IPA开始至结束"
        echo  "输入 3:从上传ipa开始至结束"
        echo  "输入 4:退出"
        read a
        case $a in
            1)startarch
            break;;
            2)startExportIPA
            break;;
            3)startUPLoadIPA
            break;;
            4) break;;
        esac
        done
fi

这是我的代码,它可以正常工作,也希望您能这么做。