APACHE CORDOVA device ready screen is coming in IOS device 🙄 đŸ€”

My ionic 2 app is working fine in browser and android device, but when I am trying to run it on ios Device via Xcode, APACHE CORDOVA screen is overriding the ionic app view, screen shot is added below.

So though this might be a issue with my codes and all, so tried with new app (created based on the exact steps provided in this page).
But for the new app also device is showing same, APACHE CORDOVA DEVICE READY screen

UPDATE : adding Xcode Logs:

2016-03-17 20:36:44.573 V2 Test[592:164991] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don’t want.
Try this:
(1) look at each constraint and try to figure out which you don’t expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
“NSLayoutConstraint:0x13fd40590 V:|-(20)-[UIInputSetContainerView:0x13fd353f0] (Names: ‘|’:UITextEffectsWindow:0x13fd38960 )”,
“NSLayoutConstraint:0x13fd2ecf0 ‘UIInputWindowController-top’ V:|-(0)-[UIInputSetContainerView:0x13fd353f0] (Names: ‘|’:UITextEffectsWindow:0x13fd38960 )”
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x13fd40590 V:|-(20)-[UIInputSetContainerView:0x13fd353f0] (Names: ‘|’:UITextEffectsWindow:0x13fd38960 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-03-17 20:36:44.714 V2 Test[592:164991] Apache Cordova native platform version 3.8.0 is starting.
2016-03-17 20:36:44.715 V2 Test[592:164991] Multi-tasking → Device: YES, App: YES
2016-03-17 20:36:44.719 V2 Test[592:164991] Unlimited access to network resources
2016-03-17 20:36:44.725 V2 Test[592:164991]

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read “iOS Data Storage Guidelines” at:
Optimizing Your App’s Data for iCloud Backup | Apple Developer Documentation
To disable web storage backup to iCloud, set the BackupWebStorage preference to “local” in the Cordova config.xml file

2016-03-17 20:36:45.543 V2 Test[592:164991] Resetting plugins due to page load.
2016-03-17 20:36:45.984 V2 Test[592:164991] Finished load of: file:///var/mobile/Containers/Bundle/Application/B757F2BA-5BB1-4175-998E-C16FBF2C9123/V2%20Test.app/www/index.html

###Beside the above log these are two warning

#1.

/Users/Piccaza/ionic-projects/learning/fobs-aplha/platforms/ios/V2 Test/Classes/AppDelegate.m:138:1: Conflicting return type in implementation of ‘application:supportedInterfaceOrientationsForWindow:’: ‘UIInterfaceOrientationMask’ (aka ‘enum UIInterfaceOrientationMask’) vs ‘NSUInteger’ (aka ‘unsigned long’)

#2.

(null): A launch storyboard or xib must be provided unless the app requires full screen.

anyone can help me with this?:pensive:

Could you tell me what steps you took to get this?
I’ve never seen this before

1 Like

Many many thanks for looking into this :slight_smile:

Following is the steps I have followed,

STEP 1: Created a new project using following command

ionic start fobs-alpha --v2

STEP 2: cd into the directory

cd fobs-alpha

STEP 3: Adding cordova, I think I can skip this step, but still trying out most of the time.

sudo npm install -g cordova

STEP 4: Add ios platform

ionic platform add ios

STEP 5: Change permission for all files in the project folder to all user rw

Done this by getting the Get Info option on the right click context menu from mac.

STEP 6: Open the xcodeproj file in xcode

After doing step 4 I will have a xcodeproj file in
/Users/Piccaza/ionic-projects/learning/fobs-aplha/platforms/ios/V2 Test.xcodeproj
which is opened in xcode by double click.

STEP 7: Run in xcode

  1. Connected my device
  2. Selected the connected device in the xcode, set all the configuration for universal and os version to my iPad os version.
  3. Click run on the xcode

###Result
The screenshot I have given above. :frowning:

And, I am able to replicate this too.

Hmm, alright I see whats happening here.

So you’re adding an ios project, but you’re never actually building the es6 code and bundling things down to es5 and moving it over to www/

Let’s try this.

ionic start tmp --v2
cd tmp
ionic platform add ios
ionic emulate ios 
# or 
ionic run ios --device

There’s no need to open xcode in this case, as we can simulate/deploy to a real device from the command line.

1 Like

Thanks dude. I never thought we can able to run into ios device without using the xcode ide.

Let me try this and connect you back asap.

Ohh!! # :disappointed_relieved::cry:

Nothing happened as excepted. Following is the details of my console log:
I expected the app to run on the device as in android, but nothing came up.

#->cd ionic-projects/learning/
[Piccaza@Dipaks-MacBook-Pro] ~/ionic-projects/learning
#->ionic start tmp --v2

One awesome Ionic app coming right up


Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic2-starter-tabs/archive/master.zip
[=============================] 100% 0.0s
Installing Node Modules

♬ ♫ ♬ ♫ Your Ionic app is ready to go! ♬ ♫ ♬ ♫

Make sure to cd into your new app directory:
cd tmp

To run your app in the browser (great for initial development):
ionic serve

To run on iOS:
ionic run ios

To run on Android:
ionic run android

To test your app on a device easily, try Ionic View:
http://view.ionic.io

New! Add push notifications, update your app remotely, and package iOS and Android apps with the Ionic Platform!
Appflow Dashboard

New to Ionic? Get started here: http://ionicframework.com/docs/v2/getting-started

[Piccaza@Dipaks-MacBook-Pro] ~/ionic-projects/learning
#->cd tmp
[Piccaza@Dipaks-MacBook-Pro] ~/ionic-projects/learning/tmp
#->ionic platform add ios
[Piccaza@Dipaks-MacBook-Pro] ~/ionic-projects/learning/tmp
#->ionic run ios --device
Installing cordova-plugin-device
Installing cordova-plugin-console
Installing cordova-plugin-whitelist
Installing cordova-plugin-splashscreen
Installing cordova-plugin-statusbar
Installing ionic-plugin-keyboard

∆ Compiling Sass to CSS
√ Matching patterns: app/theme/app.+(ios|md|wp).scss

∆ Copying fonts
√ Matching patterns: node_modules/ionic-angular/fonts/**/*.+(ttf|woff|woff2)

∆ Copying HTML
√ Matching patterns: app/**/*.html

∆ Compiling and bundling with Webpack

√ Using your webpack.config.js file
√ Sass compilation complete
√ HTML copied to www/build
√ Compiling files complete.

Hash: 61f915a4e86ee995299b
Version: webpack 1.12.11
Time: 3944ms
Asset Size Chunks Chunk Names
app.bundle.js 2.73 MB 0 [emitted] main
[0] multi main 64 bytes {0} [built]
+ 365 hidden modules

√ Webpack complete

√ Fonts copied to www/build/fonts
[Piccaza@Dipaks-MacBook-Pro] ~/ionic-projects/learning/tmp

Hmm could you try one more time. This is a known issue that should be fixed in master, but you may need to run the run command twice

1 Like

#Wow Awesome.

I got something new while trying as command on sudo

[Piccaza@Dipaks-MacBook-Pro] ~/ionic-projects/learning/tmp
#->sudo ionic run ios --device

∆ Compiling Sass to CSS
√ Matching patterns: app/theme/app.+(ios|md|wp).scss

∆ Copying fonts
√ Matching patterns: node_modules/ionic-angular/fonts/**/*.+(ttf|woff|woff2)

∆ Copying HTML
√ Matching patterns: app/**/*.html

∆ Compiling and bundling with Webpack

√ Using your webpack.config.js file
√ Sass compilation complete
√ HTML copied to www/build
√ Compiling files complete.

Hash: 61f915a4e86ee995299b
Version: webpack 1.12.11
Time: 3710ms
Asset Size Chunks Chunk Names
app.bundle.js 2.73 MB 0 [emitted] main
[0] multi main 64 bytes {0} [built]
+ 365 hidden modules

√ Webpack complete

√ Fonts copied to www/build/fonts
Running command: /Users/Piccaza/ionic-projects/learning/tmp/hooks/after_prepare/010_add_platform_class.js /Users/Piccaza/ionic-projects/learning/tmp
add to body class: platform-ios
Running command: /Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/run --device
ios-deploy was not found. Please download, build and install version 1.2.0 or greater from GitHub - ios-control/ios-deploy: Install and debug iPhone apps from the command line, without using Xcode into your path. Or ‘npm install -g ios-deploy’ using node.js: http://nodejs.org
ERROR running one or more of the platforms: Error: /Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
[Piccaza@Dipaks-MacBook-Pro] ~/ionic-projects/learning/tmp

I will try all the suggestions and come back. Thanks dude. :slight_smile:

####And the sudo command went up in another place:

sudo npm install -g ios-deploy
npm WARN lifecycle ios-deploy@1.8.5~preinstall: cannot run in wd %s %s (wd=%s) ios-deploy@1.8.5 ./src/scripts/check_reqs.js && xcodebuild /usr/local/lib/node_modules/.staging/ios-deploy-298c9491
npm ERR! Darwin 15.3.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “ios-deploy”
npm ERR! node v5.3.0
npm ERR! npm v3.7.3
npm ERR! path /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod ‘/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy’
npm ERR! enoent ENOENT: no such file or directory, chmod ‘/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy’
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /Users/Piccaza/ionic-projects/learning/tmp/npm-debug.log

You shouldn’t have to run the command with sudo ever.

Let’s try running only these command. No using Get Info to change permission (which is probably causing some errors)

sudo npm install -g ionic@beta ios-sim ios-deploy
ionic start tmp --v2
cd tmp
ionic platform add ios
ionic emulate ios 
# or 
ionic run ios --device
1 Like

sudo npm install -g ionic@beta ios-sim ios-deploy this command took me to the previous error:

npm ERR! enoent ENOENT: no such file or directory, chmod ‘/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy’
npm ERR! enoent ENOENT: no such file or directory, chmod ‘/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy’
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.

Hmm, can you do which ionic?

#->ionic -v
2.0.0-beta.19

ok, try to run npm install ios-deploy without sudo.

Do you have npm setup so that you don’t need to use sudo?

I have executed following commands and seems to be reached another point:

brew update
sudo brew upgrade node
brew upgrade node
npm install -g npm
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

then the error command told while running for ios

npm install -g ios-deploy

Again running the ionic run ios got new error:

Got error:

Error code 65 for command: xcodebuild with args: -xcconfig,/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/build-debug.xcconfig,-project,V2 Test.xcodeproj,ARCHS=armv7 armv7s arm64,-target,V2 Test,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/build/sharedpch
> ERROR running one or more of the platforms: Error: /Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/run: Command failed with exit code 2

sudo ionic run ios --device

##Full log

∆ Compiling Sass to CSS
√ Matching patterns: app/theme/app.+(ios|md|wp).scss

∆ Copying fonts
√ Matching patterns: node_modules/ionic-angular/fonts/**/*.+(ttf|woff|woff2)

∆ Copying HTML
√ Matching patterns: app/**/*.html

∆ Compiling and bundling with Webpack

√ Using your webpack.config.js file
√ Sass compilation complete
√ HTML copied to www/build
√ Compiling files complete.

Hash: 61f915a4e86ee995299b
Version: webpack 1.12.11
Time: 4738ms
Asset Size Chunks Chunk Names
app.bundle.js 2.73 MB 0 [emitted] main
[0] multi main 64 bytes {0} [built]
+ 365 hidden modules

√ Webpack complete

√ Fonts copied to www/build/fonts
Running command: /Users/Piccaza/ionic-projects/learning/tmp/hooks/after_prepare/010_add_platform_class.js /Users/Piccaza/ionic-projects/learning/tmp
add to body class: platform-ios
Running command: /Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/run --device
Building project : /Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/V2 Test.xcodeproj
Configuration : Debug
Platform : device
Build settings from command line:
ARCHS = armv7 armv7s arm64
CONFIGURATION_BUILD_DIR = /Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/build/device
SDKROOT = iphoneos9.2
SHARED_PRECOMPS_DIR = /Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/build/sharedpch
VALID_ARCHS = armv7 armv7s arm64

Build settings from configuration file ‘/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/build-debug.xcconfig’:
CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_RESOURCE_RULES_PATH = $(SDKROOT)/ResourceRules.plist

=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET V2 Test OF PROJECT V2 Test WITH CONFIGURATION Debug ===

Check dependencies
Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found.

** BUILD FAILED **

The following build commands failed:
Check dependencies
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/build-debug.xcconfig,-project,V2 Test.xcodeproj,ARCHS=armv7 armv7s arm64,-target,V2 Test,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/build/sharedpch
ERROR running one or more of the platforms: Error: /Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
[Piccaza@Dipaks-MacBook-Pro] ~/ionic-projects/learning/tmp

##Update
####Also am trying to run on iPad!!

Alright, you don’t need to run sudo for brew ever.

sudo brew uninstall node
brew install node
sudo npm install ionic@beta cordova ios-sim ios-deploy
1 Like

I have un-installed and installed without sudo

then for the next command got following error,

Check dependencies

Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “io.ionic.starter” were found.

** BUILD FAILED **

The following build commands failed:
Check dependencies
(1 failure)

Error code 65 for command: xcodebuild with args: -xcconfig,/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/build-debug.xcconfig,-project,V2 Test.xcodeproj,ARCHS=armv7 armv7s arm64,-target,V2 Test,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/build/sharedpch

####ERROR running one or more of the platforms: Error: /Users/Piccaza/ionic-projects/learning/tmp/platforms/ios/cordova/run: Command failed with exit code 2

You may not have the required environment or OS to run this project

Okay, so now your device does not have the provision profile install.

This you need to do through xcode.

It’s only a one time process, so once it’s done you shouldn’t need to do it again.

What you can do is

ionic build ios

then open the xcode project and run to your device.
This will install the provisioning profile as well.