Ionic build ios is stuck - ios

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:
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.
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.
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.

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. In this thread on github shows other users who managed to fix it this way.
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)
Remove Hooks with command $ionic hooks remove
Remove Platform with command $ionic platform remove ios
Now Add Hooks with command $ionic hooks add
Now add platform with command $ionic platform ios
Now create build with command $ionic build ios
Now Run your application with command $ionic run ios

My case was the build would hang/stuck when running $ ionic cordova build ios. OS is MacOS Mojave.
My solution was to update ionic and cordova environment. Worth doing ionic cordova build ios --verbose to see what is happening during the build process.
$ 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

Related

ionic ios build failed. Type 'CustomEvent' is not generic

When I run the command ionic cordova build ios I am getting the below error:
Running app-scripts build: --platform ios --target cordova
[12:54:28] build dev started ...
[12:54:29] clean started ...
[12:54:29] clean finished in 7 ms
[12:54:29] copy started ...
Config file "/Users/<user_name>/Documents/Working Folder/<project_name>/config/copy.config.js" not found. Using defaults instead.
[12:54:30] deeplinks started ...
[12:54:33] deeplinks finished in 3.10 s
[12:54:33] transpile started ...
[12:54:52] typescript: node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts, line: 41
Type 'CustomEvent' is not generic.
L40: onError: EventEmitter<any>;
L41: onProgress: EventEmitter<PDFProgressData>;
L42: pageChange: EventEmitter<number>;
[12:54:52] typescript: node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts, line: 42
Type 'CustomEvent' is not generic.
L41: onProgress: EventEmitter<PDFProgressData>;
L42: pageChange: EventEmitter<number>;
L43: src: string | Uint8Array | PDFSource;
Error: Failed to transpile program
at new BuildError (/Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/util/errors.js:16:28)
at /Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/transpile.js:159:20
at new Promise (<anonymous>)
at transpileWorker (/Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/transpile.js:107:12)
at Object.transpile (/Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/transpile.js:64:12)
at /Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/build.js:109:82
[12:54:52] copy finished in 23.56 s
Before building, I had
Removed node_modules, added again with npm i.
Removed and added ios platform using ionic cordova platform remove ios and ionic cordova platform add ios.
Upgraded cordova-ios from 4.4 to 5.1.0
My ionic info:
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.9
Cordova Platforms : ios 5.1.0
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
ios-sim : 8.0.2
Node : v10.0.0
npm : 5.6.0
OS : macOS
Xcode : Xcode 13.1 Build version 13A1030d
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro

Unable to install 'cordova-plugin-ms-adal' on ionic -4 (ios)

Issue -
Failed to install 'cordova-plugin-ms-adal': CordovaError: Using "requireCordovaModule" to load non-cordova module "fs" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
Configuration -
Ionic:
Ionic CLI : 5.4.15 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.11.13
#angular-devkit/build-angular : 0.801.3
#angular-devkit/schematics : 8.1.3
#angular/cli : 8.1.3
#ionic/angular-toolkit : 2.3.3
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : none
Cordova Plugins : cordova-plugin-ionic-webview 5.0.0, (and 27 other plugins)
System:
ios-deploy : 1.10.0
NodeJS : v12.13.1 (/usr/local/bin/node)
npm : 6.12.1
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504

An error occurred while running Cordova in ionic 2

I'm developing a Hybrid app using ionic 3 but when I build the app in IOS I'm getting below error.
Error
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
[ERROR] An error occurred while running Cordova build iOS (exit code 1).
My ionic environment info
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
local packages:
#ionic/app-scripts : 3.2.1
Cordova Platforms : ios 4.5.5
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.4
Node : v8.1.4
npm : 5.0.3
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro

ionic build ios error ( ionic cordova build ios )

When i run "ionic cordova build ios" get error below in terminal:
The following build commands failed:
Ld build/emulator/Posify\ Kitchen.app/Posify\ Kitchen normal x86_64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/YJD/Mayun_POS/posify-pos-fb-united/platforms/ios/cordova/build-debug.xcconfig,-workspace,Posify Kitchen.xcworkspace,-scheme,Posify Kitchen,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/YJD/Mayun_POS/posify-pos-fb-united/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/YJD/Mayun_POS/posify-pos-fb-united/platforms/ios/build/sharedpch
ionic info:
cli packages: (/Users/YJD/Mayun_POS/posify-pos-fb-united/node_modules)
#ionic/cli-utils : 1.17.0
ionic (Ionic CLI) : 3.17.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.3.0 ios 4.5.3
Ionic Framework : ionic-angular 3.8.0
System:
ios-deploy : 1.9.2
Node : v6.11.5
npm : 5.5.1
OS : macOS Sierra
Xcode : Xcode 9.0.1 Build version 9A1004
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
I figured it out myself. All of errors seem like "Error: Error code 65 for command: xcodebuild......" are because of certification or Provision profile.I applied the newest provision profile and it fixed.

Metadata version mismatch for module after creating IOS build ( node_modules/#ionic-native/network/index.d.ts, found version 4, expected 3 )

When i am trying to create IOS build getting error like below.
Error: Metadata version mismatch for module /Users/newuser/WebstormProjects/myproject/node_modules/#ionic-native/network/index.d.ts, found version 4, expected 3
at StaticSymbolResolver.getModuleMetadata (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:24474:34)
at StaticSymbolResolver._createSymbolsOf (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:24260:46)
at StaticSymbolResolver.getSymbolsOf (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:24241:14)
at /Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:23023:30
at Array.forEach (native)
at extractProgramSymbols (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:23022:79)
at AotCompiler.compileAll (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:22720:47)
at CodeGenerator.codegen (/Users/newuser/myproject/node_modules/#angular/compiler-cli/src/codegen.js:30:14)
at Function.NgTools_InternalApi_NG_2.codeGen (/Users/newuser/myproject/node_modules/#angular/compiler-cli/src/ngtools_api.js:61:30)
at Object.doCodegen (/Users/newuser/myproject/node_modules/#ionic/app-scripts/dist/aot/codegen.js:6:51)
cli packages:
#ionic/cli-utils : 1.16.0
ionic (Ionic CLI) : 3.16.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
#ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.3.0 browser 4.1.0 ios 4.4.0
Ionic Framework : ionic-angular 3.6.0
System:
Node : v6.11.1
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : legacy

Resources