使用iOS 12.1 SDK构建本机脚本应用程序时出现问题

时间:2019-01-03 18:27:53

标签: ios nativescript angular2-nativescript

我已经使用NativeScript构建了android和iOS应用。对于Android来说,一切都很好...但是,当我尝试为iOS发布该应用程序时,我从Apple Store connect得到了此错误:

SDK Version Issue - This app was built with the iOS 11.3 SDK. Starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later.

因此该应用程序被拒绝...因此,我在de Properties-> iOS-> Deployment Target中将NativeScript SideKick应用程序中的Deployment目标更改为12.1

但是当我运行tns run ios

我得到:

clang: error: invalid iOS deployment version '-mios-simulator-version-min=12.1', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]
note: Using new build systemnote: Planning buildnote: Constructing build description
** BUILD FAILED **

我的计算机是64b,装有macOS Mojave的MacBook Pro i5

所以我不知道是什么问题。.请你帮我一下?

1 个答案:

答案 0 :(得分:0)

如果有人遇到相同的问题...请检查我从NickIliev从GitHub那里得到的答案

从本地NativeScript CLI安装中打开文件,例如(在Mac上为示例路径)

open /usr/local/lib/node_modules/nativescript/lib/services

在services文件夹中,找到并打开ios-project-service.js

修改设备和模拟器构建的VALID_ARCHS和ARCHS,以便删除arm7i386

对于设备版本,删除arm7

 const defaultArchitectures = [
    'ARCHS=arm64', , // remove arm7 here
    'VALID_ARCHS=arm64' , // remove arm7 here
]; 

对于模拟器版本,请删除i386

return __awaiter(this, void 0, void 0, function* () {
    args = args
        .concat([
        "build",
        "-configuration", buildConfig.release ? "Release" : "Debug",
        "-sdk", "iphonesimulator",
        "ARCHS=x86_64", // remove i386 here
        "VALID_ARCHS=x86_64", , // remove i386 here
         "ONLY_ACTIVE_ARCH=NO",
         "CONFIGURATION_BUILD_DIR=" + path.join(projectRoot, "build", "emulator"),
         "CODE_SIGN_IDENTITY=",
])