3

我在 IOS 中构建时遇到问题,当我在 android 中构建时没有显示任何问题。没有显示没有错误只挂在以下消息中:

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,但是一旦你修改任何文件不再编译我可以,被挂在上面的屏幕上。

4

3 回答 3

4

问题的根源在于项目文件夹位于 Documents 目录中,该目录又同步到 iCloud,因此当您将项目移动到另一个不是 Documents 或 Desktop 的目录时,您可以毫无问题地构建。在 github 上的这个线程中,显示​​了其他设法以这种方式修复它的用户。

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

于 2016-10-21T17:31:40.453 回答
1

请按照以下步骤操作(在执行这些步骤之前,请确保您已在系统上安装了IOS SDK

  1. 使用命令删除 Hooks$ionic hooks remove
  2. 使用命令删除平台$ionic platform remove ios
  3. 现在使用命令添加 Hooks$ionic hooks add
  4. 现在使用命令添加平台$ionic platform ios
  5. 现在使用命令创建构建$ionic build ios
  6. 现在使用命令运行您的应用程序$ionic run ios
于 2016-09-14T05:29:55.763 回答
0

我的情况是运行 $ 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
于 2020-03-03T05:10:01.800 回答