簡體   English   中英

離子構建 ios 卡住了

[英]Ionic build ios is stuck

我在 IOS 中進行構建時遇到問題,當我在 android 中進行構建時沒有顯示任何問題a.No 顯示沒有錯誤僅掛起以下消息:

ionic build ios
Running command: /Users/kaos/Documents/Proyectos/Ionic/voxMonitor/hooks/after_prepare/010_add_platform_class.js /Users/kaos/Documents/Proyectos/Ionic/voxMonitor


add to body class: platform-ios

Building project: /Users/kaos/Documents/Proyectos/Ionic/voxMonitor/platforms/ios/voxMonitor.xcodeproj

    Configuration: Debug
    Platform: emulator


2016-09-14 00:57:11.666 xcodebuild[81377:2780361] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin' not present in DVTPlugInCompatibilityUUIDs

2016-09-14 00:57:11.668 xcodebuild[81377:2780361] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/OMQuickHelp.xcplugin' not present in DVTPlugInCompatibilityUUIDs

2016-09-14 00:57:11.669 xcodebuild[81377:2780361] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs

Build settings from command line:

    CONFIGURATION_BUILD_DIR = /Users/kaos/Documents/Proyectos/Ionic/voxMonitor/platforms/ios/build/emulator
    SDKROOT = iphonesimulator10.0
    SHARED_PRECOMPS_DIR = /Users/kaos/Documents/Proyectos/Ionic/voxMonitor/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/kaos/Documents/Proyectos/Ionic/voxMonitor/platforms/ios/cordova/build-debug.xcconfig':
    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
    CODE_SIGN_IDENTITY = iPhone Developer
    ENABLE_BITCODE = NO
    GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1
    HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
    IPHONEOS_DEPLOYMENT_TARGET = 8.0
    OTHER_LDFLAGS = -ObjC
    SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h
    TARGETED_DEVICE_FAMILY = 1,2

當我嘗試打開文件 xcodeproj 時,xcode 不會啟動並無限期地等待,直到強制退出。

我的離子信息:

Your system information:

    Cordova CLI: 6.3.1
    Ionic Framework Version: 1.3.1
    Ionic CLI Version: 2.0.0-beta.37
    Ionic App Lib Version: 2.0.0-beta.20
    ios-deploy version: 1.8.6
    ios-sim version: 5.0.8
    OS: Mac OS X El Capitan
    Node Version: v6.5.0
    Xcode version: Xcode 8.0 Build version 8A218a

值得一提的是,我目前使用的是 MacOS Sierra GM 和 Xcode 8 gm。

編輯:創建新項目並用我項目中的版本替換www目錄時,我可以構建ios,但是一旦你修改了任何文件不再編譯我可以,被掛在上面的屏幕上。

問題的根源在於項目文件夾位於 Documents 目錄中,而該目錄又同步到 iCloud,因此當您將項目移動到另一個不是 Documents 或 Desktop 的目錄時,您可以毫無問題地進行構建。 在 github 上的這個線程中,其他用戶以這種方式修復了它。

https://github.com/driftyco/ionic-cli/issues/1401#issuecomment-254989260

遵循這些步驟(並且在遵循這些步驟之前,請確保您已經在您的系統上安裝了IOS SDK

  1. 使用命令$ionic hooks remove
  2. 使用命令$ionic platform remove ios刪除平台
  3. 現在使用命令$ionic hooks add
  4. 現在使用命令$ionic platform ios添加平台
  5. 現在使用命令$ionic build ios創建構建
  6. 現在使用命令$ionic run ios運行您的應用程序

我的情況是在運行 $ ionic cordova build ios 時構建會掛起/卡住。 操作系統是 MacOS Mojave。

我的解決方案是更新 ionic 和 cordova 環境。 值得做 ionic cordova build ios --verbose 以查看構建過程中發生的情況。

$ brew link --overwrite ios-deploy
$ npm update -g native-run
$ npm install -g cordova ionic
$ npm install -g ionic-angular@latest

更新前配置:

離子:

Ionic CLI                     : 5.2.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework               : @ionic/angular 4.6.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics    : 7.2.4
@angular/cli                  : 7.2.4
@ionic/angular-toolkit        : 1.3.0

科爾多瓦:

Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, ios 5.1.1
Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 23 other plugins)

公用事業:

cordova-res : 0.9.0 
native-run  : 0.2.7 (update available: 0.3.0)

系統:

Android SDK Tools : 26.1.1 (/Users/haule/Library/Android/sdk)
ios-deploy        : 1.10.0
ios-sim           : 8.0.2
NodeJS            : v10.19.0 (/usr/local/Cellar/node@10/10.19.0/bin/node)
npm               : 6.13.4
OS                : macOS Mojave
Xcode             : Xcode 11.3.1 Build version 11C504

更新后配置:

離子:

Ionic CLI                     : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework               : @ionic/angular 4.6.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics    : 7.2.4
@angular/cli                  : 7.2.4
@ionic/angular-toolkit        : 1.3.0

科爾多瓦:

Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, ios 5.1.1
Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 23 other plugins)

公用事業:

cordova-res : 0.9.0
native-run  : 0.3.0

系統:

Android SDK Tools : 26.1.1 (/Users/haule/Library/Android/sdk)
ios-deploy        : 1.10.0
ios-sim           : 8.0.2
NodeJS            : v10.19.0 (/usr/local/Cellar/node@10/10.19.0/bin/node)
npm               : 6.13.4
OS                : macOS Mojave
Xcode             : Xcode 11.3.1 Build version 11C504

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM