【问题标题】:Issue while building a nativescript app with iOS 12.1 SDK使用 iOS 12.1 SDK 构建 nativescript 应用程序时出现问题
【发布时间】:2019-01-03 18:27:52
【问题描述】:

我已经使用 NativeScript 构建了我的 android 和 iOS 应用程序。对于 Android,一切都很好......但是当我尝试发布适用于 iOS 的应用程序时,我从 Apple Store 连接中收到了这个错误:

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 应用程序中的部署目标更改为 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

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

【问题讨论】:

  • 看起来你已经包含了一个 32 位目标。
  • @IanMacDonald 那在哪里?怎么改?
  • 您在项目中使用的 NativeScript 运行时版本是什么?
  • @Manoj 版本是(我运行 tns --version)5.0.1
  • 运行时版本是您在package.json 中指定为tns-ios 的版本。您指的是 CLI 版本。

标签: ios nativescript angular2-nativescript


【解决方案1】:

如果有人遇到同样的问题...请检查我从 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=",
]) 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-09
    • 2017-04-29
    • 1970-01-01
    • 2022-07-15
    • 2022-06-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多