我使用最新的fastlane版本2.141和
--------------------------- | -------------------------------------------------------------- |
| OS | 10.15 |
| Ruby | 2.6.3 |
| Bundler? | false |
| Git | git version 2.22.0 |
| Installation Source | /usr/local/bin/fastlane |
| Host | Mac OS X 10.15 (19A603) |
| Ruby Lib Dir | /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib |
| OpenSSL Version | LibreSSL 2.8.3 |
| Is contained | false |
| Is homebrew | false |
| Is installed via Fabric.app | false |
| Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version | 11.3.1 |
我要求Fastalene“ fastlane构建”,并希望获取本地应用程序文件。 但是我出错了。
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/3c/mlppx6h92875_71f3w39c8v00000gn/T/gym_config20200203-9409-1rhcgra.plist -archivePath '/Users/hq/Library/Developer/Xcode/Archives/2020-02-03/BLU 2020-02-03 17.00.39.xcarchive' -exportPath /var/folders/3c/mlppx6h92875_71f3w39c8v00000gn/T/gym_output20200203-9409-fu1vea
497 2020-02-03 17:02:27.381 xcodebuild[10097:747090] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/3c/mlppx6h92875_71f3w39c8v00000gn/T/BLU_2020-02-03_17-02-27.380.xcdistributionlogs'.
498 2020-02-03 17:02:27.488 xcodebuild[10097:747090] [MT] IDEDistributionMethodManager: -[IDEDistributionMethodManager orderedDistributionMethodsForTask:archive:]: Error = Error Domain=IDEDistributionMethodManagerErrorDomain Code=2 "Unknown Distribution Error" UserInfo={NSLocalizedDescription=Unknown Distribution Error}
499 error: exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but found app-store
500 Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key 'method': expected one of {}, but found app-store" UserInfo={NSLocalizedDescription=exportOptionsPlist error for key 'method': expected one of {}, but found app-store}
我的fastlane文件很简单
desc "Build application"
lane :build do
install_provisioning_profile(path: ENV["PROVISIONING_PROFILE"])
import_certificate(certificate_path: ENV["CERT_PATH"],
certificate_password: ENV["CERT_PWD"],
keychain_name: ENV["KEYCHAIN_NAME"],
keychain_password: ENV["HQ_PWD"])
gym(
scheme: ENV["SCHEME"],
clean: true,
output_directory: "build",
export_options: {
method: 'app-store'
}
)
在快速通道的详细日志中,我发现了一条奇怪的消息:
e' from project 'BLU')
cd /Users/zakabluk/Documents/git/githubBLU/mobile-ios/app/BLU
builtin-RegisterExecutionPolicyException /Users/zakabluk/Library/Developer/Xcode/DerivedData/BLU-gvvvkwpjdlklocherkkkepucneic/Build/Intermediates.noindex/ArchiveIntermediates/BLU/InstallationBuildProductsLocation/Applications/BLU.app
note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'BLU' from project 'BLU')
也许这有助于理解我的问题。
答案 0 :(得分:0)
我已修复以下情况:
对于目标和项目集:跳过安装-是(构建设置)。
删除超过行的权利。
并更改了带状架构的脚本:
# This removes the unsupported archetypes from frameworks on the build phase.
echo "Target architectures: $ARCHS"
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
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"
echo $(lipo -info "$FRAMEWORK_EXECUTABLE_PATH")
FRAMEWORK_TMP_PATH="$FRAMEWORK_EXECUTABLE_PATH-tmp"
# remove simulator's archs if location is not simulator's directory
case "${TARGET_BUILD_DIR}" in
*"iphonesimulator")
echo "No need to remove archs"
;;
*)
if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "i386") ; then
lipo -output "$FRAMEWORK_TMP_PATH" -remove "i386" "$FRAMEWORK_EXECUTABLE_PATH"
echo "i386 architecture removed"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH"
fi
if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "x86_64") ; then
lipo -output "$FRAMEWORK_TMP_PATH" -remove "x86_64" "$FRAMEWORK_EXECUTABLE_PATH"
echo "x86_64 architecture removed"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH"
fi
;;
esac
echo "Completed for executable $FRAMEWORK_EXECUTABLE_PATH"
echo $(lipo -info "$FRAMEWORK_EXECUTABLE_PATH")
done