我正在使用fastlane发布一个应用程序。用于构建应用程序的xcodebuild命令的简化版本如下:
xcodebuild -workspace App.xcworkspace -scheme App
-configuration Release -sdk iphoneos13.6
-destination 'generic/platform=iOS' clean archive这不能给出(添加样本):
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from /Users/sudeepkumar/Zendrive/mobile-apps/ios/copilot/Pods/glog/src/symbolize.cc:55:
In file included from /Users/sudeepkumar/Zendrive/mobile-apps/ios/copilot/Pods/glog/src/utilities.h:73:
In file included from /Users/sudeepkumar/Zendrive/mobile-apps/ios/copilot/Pods/glog/src/base/mutex.h:141:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^我看到它选择了MacOSX.sdk,我希望它选择Xcode目录中的iPhoneOS sdk。这是失败的原因吗?还是别的什么?
xcrun输出:
» xcrun --show-sdk-platform-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
» xcrun --sdk iphoneos --show-sdk-platform-path
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform发布于 2020-08-31 18:53:33
Xcode正在使用/Library/CommandLineTools中的SDK。相反,它应该使用Xcode应用程序中的那些。跑
xcode-select -r或
xcode-select -s "/Applications/Xcode.app/Contents/Developer"验证依据
xcode-select -p其中一些可能需要sudo。
发布于 2020-09-05 20:55:23
xcodebuild -workspace App.xcworkspace -scheme App
-configuration Release -sdk iphoneos
-destination 'generic/platform=iOS' clean archive在xcodebuild man page中
-sdk [<sdkfullpath> | <sdkname>]
Build an Xcode project or workspace against the specified SDK,
using build tools appropriate for that SDK. The argument may be an
absolute path to an SDK, or the canonical name of an SDK.xcrun --sdk iphoneos --show-sdk-path检查SDK路径。iPhoneOS13.7.sdkiPhoneOS13.7.sdk是一个符号链接,它的原点是iPhoneOS.sdk。/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk另外,
xcodebuild -showsdks查看不同设备的所有参数-sdk iphoneos-sdk iphonesimulator-sdk watchos-sdk macosxhttps://stackoverflow.com/questions/63627237
复制相似问题