Как отладить сборку не удалось в ios для приложений родного скрипта? - PullRequest
0 голосов
/ 03 февраля 2020

Я просто запускаю tns run ios --emulator и получаю это:

/Users/me/Desktop/proj/projfront/App/platforms/ios/Pods/MBProgressHUD/MBProgressHUD.m:87:34: error: no known class method for selector
      'labelColor'
       _contentColor = [[UIColor labelColor] colorWithAlphaComponent:0.7f];
                                 ^~~~
/Users/me/Desktop/proj/projfront/App/platforms/ios/Pods/MBProgressHUD/MBProgressHUD.m:378:101: error: use of undeclared identifier
      'UIActivityIndicatorViewStyleLarge'
                activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleLarge];
                                                                                                    ^
/Users/me/Desktop/proj/projfront/App/platforms/ios/Pods/MBProgressHUD/MBProgressHUD.m:1065:32: error: use of undeclared identifier
      'UIBlurEffectStyleSystemThickMaterial'
            _blurEffectStyle = UIBlurEffectStyleSystemThickMaterial;
                               ^
3 errors generated.
note: Using new build systemnote: Planning buildnote: Constructing build description
* BUILD FAILED *

Unable to apply changes on device: 96EBA70E-38D5-4C6A-B30B-21BECF697C9C. Error is: Command xcodebuild failed with exit code 65.

Я понятия не имею, как это отладить. Он просто отлично работает на Android. Вот мой пакет. json:

{
  "nativescript": {
    "templateVersion": "v2",
    "tns-android": {
      "version": "6.0.0"
    },
    "tns-ios": {
      "version": "6.0.1"
    }
  },
  "dependencies": {
    "@nativescript/theme": "^2.2.1",
    "@nstudio/nativescript-cardview": "^1.0.0",
    "@nstudio/nativescript-checkbox": "^1.0.0",
    "@nstudio/nativescript-floatingactionbutton": "^2.0.0",
    "@nstudio/nativescript-loading-indicator": "^3.0.1",
    "axios": "^0.19.2",
    "nativescript-exoplayer": "^4.0.2",
    "nativescript-iqkeyboardmanager": "^1.5.1",
    "nativescript-masked-text-field": "^4.0.3",
    "nativescript-plugin-firebase": "^10.3.3",
    "nativescript-social-share": "^1.6.0",
    "nativescript-ui-autocomplete": "^6.0.0",
    "nativescript-vue": "^2.4.0",
    "tns-core-modules": "^6.0.0",
    "vuex": "^3.1.1"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "babel-loader": "^8.0.2",
    "nativescript-dev-webpack": "^1.0.0",
    "nativescript-vue-template-compiler": "^2.0.0",
    "nativescript-worker-loader": "~0.9.0",
    "node-sass": "^4.9.2",
    "vue-loader": "^15.4.0"
  }
}

1 Ответ

1 голос
/ 04 февраля 2020

labelColor - это новое свойство, введенное в iOS 13. Вам необходим XCode 11 для сборки для iOS 13.x и выше. Тем не менее, один из плагинов загружает модуль под названием MBProgressHUD. Этот модуль использует новейший iOS API. Но ваша сборка скорее всего дает сбой, потому что она построена с XCode 10.x или более поздней версией. Чтобы решить эту проблему, попробуйте построить с XCode 11 и с последним tns-ios (6.3.x и выше) + последний tns-core-modules.

...