使用 iOS 12.1 SDK 构建 nativescript 应用程序时出现问题

Issue while building a nativescript app with iOS 12.1 SDK

我已经使用 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 target 更改为 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,MacBook Pro i5 和 macOS Mojave

所以我不知道是哪个问题..你能帮我吗?

万一有人遇到同样的问题...请检查我从 NickIliev

GitHub 那里得到的答案

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

open /usr/local/lib/node_modules/nativescript/lib/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=",
])