简体   繁体   English

离子构建 ios 卡住了

[英]Ionic build ios is stuck

I have trouble making a build in IOS, when I do a build in android not show any problema.No shows no mistake is only hung with the following message:我在 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

when I try to open the file xcodeproj, xcode does not start and waits indefinitely until the force exit.当我尝试打开文件 xcodeproj 时,xcode 不会启动并无限期地等待,直到强制退出。

My ionic info :我的离子信息:

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

worth mentioning that I am currently using MacOS Sierra GM and Xcode 8 gm.值得一提的是,我目前使用的是 MacOS Sierra GM 和 Xcode 8 gm。

Edit : when creating a new project and replace the www directory with the version in my project, I can build ios, but once you modify any file no longer compile I can, being hung on the screen above.编辑:创建新项目并用我项目中的版本替换www目录时,我可以构建ios,但是一旦你修改了任何文件不再编译我可以,被挂在上面的屏幕上。

The origin of the problem is the project folder is inside the Documents directory which in turn is synchronized to iCloud, so when you move the project to another directory that is not Documents or Desktop, you can build without problems.问题的根源在于项目文件夹位于 Documents 目录中,而该目录又同步到 iCloud,因此当您将项目移动到另一个不是 Documents 或 Desktop 的目录时,您可以毫无问题地进行构建。 In this thread on github shows other users who managed to fix it this way.在 github 上的这个线程中,其他用户以这种方式修复了它。

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

Follow these steps(And Before following these steps make sure you have installed IOS SDK on your system)遵循这些步骤(并且在遵循这些步骤之前,请确保您已经在您的系统上安装了IOS SDK

  1. Remove Hooks with command $ionic hooks remove使用命令$ionic hooks remove
  2. Remove Platform with command $ionic platform remove ios使用命令$ionic platform remove ios删除平台
  3. Now Add Hooks with command $ionic hooks add现在使用命令$ionic hooks add
  4. Now add platform with command $ionic platform ios现在使用命令$ionic platform ios添加平台
  5. Now create build with command $ionic build ios现在使用命令$ionic build ios创建构建
  6. Now Run your application with command $ionic run ios现在使用命令$ionic run ios运行您的应用程序

My case was the build would hang/stuck when running $ ionic cordova build ios.我的情况是在运行 $ ionic cordova build ios 时构建会挂起/卡住。 OS is MacOS Mojave.操作系统是 MacOS Mojave。

My solution was to update ionic and cordova environment.我的解决方案是更新 ionic 和 cordova 环境。 Worth doing ionic cordova build ios --verbose to see what is happening during the build process.值得做 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

Config before update:更新前配置:

Ionic:离子:

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:科尔多瓦:

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)

Utility:公用事业:

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

System:系统:

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

Config after update:更新后配置:

Ionic:离子:

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:科尔多瓦:

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)

Utility:公用事业:

cordova-res : 0.9.0
native-run  : 0.3.0

System:系统:

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