繁体   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