'cordova build ios' create the app with 107 issues - ios

So my app i ready, i build the app with ionic v1 + cordova for android + ios by phpstorm and cordova cli.
The android working perfect!
but when i build the ios i open the .xcworkspace with the xcode and click on run and it's runnig on the iphone but with 107 issues.
And the issues it's from the plugins...
By the way for to success to running on ios I had to change the file Podfile to this:
# DO NOT MODIFY -- auto-generated by Apache Cordova
platform :ios, '8.0'
target 'xxx' do
project 'xxx.xcodeproj'
pod 'FirebaseMessaging', '~> 2.0.0'
pod 'GoogleToolboxForMac'
pod 'Google'
end
Someone have any idea how to fix that?
because, the push notification half working, i get the token but i don't get the notification on the phone, and yes i created all the certificate
my ionic info
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.13.0
ionic (Ionic CLI) : 3.13.0
global packages:
cordova (Cordova CLI) : 7.1.0
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
Cordova Platforms : ios 4.5.2
Ionic Framework : ionic1 1.3.3
System:
ios-deploy : 1.9.2
ios-sim : 6.0.0
Node : v6.10.2
npm : 5.4.2
OS : macOS Sierra
Xcode : Xcode 9.0 Build version 9A235
Misc:
backend : legacy
Thank you!

This is normal behaviour, plugins are created by the community and not always up to date, this is why you are seeing so much deprecation warnings. But these are just warnings so they should not cause any trouble, they are just there to inform you that this should probably be fixed some time in the future before the deprecated methods get removed from the SDK.
If you want to fix all of them as you asked you will have to fork every plugin you use and replace the deprecated parts with its successors.
The problem with your push notifications is related to something else and you should as another question with more detailed information on that.

Related

Ionic 3 build with --minifyjs flag get stucks on first load of app only in iOS

I have an Ionic 3 app that runs well in Android and iOS without the --prod flag. Now I want to test the App in production mode in iOS and Android.
When I try to run it on Android everything works great! and a little bit faster and smoother. Now I try to run it on iOS which it doesn't work. It gets stuck on the first load of the App on the Splashscreen. At first I expect that there is something wrong in my plugins or versions compatibility of my plugins and to the version of the iOS device.
But I was wrong I try to run it without the --uglifyjs, --minifycss, -aot, --optimizejs and it works, the app didn't get stuck at the first booth or first load. All these flags are part of the --prod flag right? But you notice that I didn't include --minifyjs in the flag. Because when I try to run it on --minifyjs the problem occurs again when it got stucks on the first load of the app.
I have also reference to my old question: Ionic cordova run ios --prod gets stuck on splash screen loader but that wasn't the problem anymore. It only happens when I try to use the --minifyjs flag.
Here is my ionic 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) : 7.1.0
local packages:
#ionic/app-scripts : 3.2.0
Cordova Platforms : ios 4.5.5
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
Node : v8.9.3
npm : 5.5.1
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
So what can be the problem with that? I think it is more of a compiling issue of minifying js files by angular and ionic by reducing its size. I think it affects some of the js files that caused the problem.
Appreciate if someone could help. Thanks in advance.

Ion-input loses focus while using bluetooth keyboard

I am working on entering text with Hardware keyboard(Bluetooth connected) connected to iPhone(iOS 9 and iOS 10) in Ionic 3. While entering, The input is losing its focus and even if i try to enter again, It is not taking any input from keyboard. This hardware keyboard is working well in Android phone but not in iOS.
I tried upgrading/re-installing updated keyboard plugin from Cordova. But no luck with that.
The below is my Ionic Info.
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0
Global Packages:
cordova (Cordova CLI) : 6.5.0
Local Packages:
#ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.1.2 browser 4.1.0 ios 4.1.1
Ionic Framework : ionic-angular 3.6.0
System:
ios-deploy : 1.9.1
ios-sim : 5.0.13
Node : v7.4.0
npm : 5.0.3
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
Misc:
backend : pro
If any ideas, Please let me know. Thank you.
EDIT
I tried with downgrading Ionic from 3.12 to 2.18. Still no luck. Input field still looses focus within milliseconds.
Install the Keyboard plugin.
In app.components.ts 's constructor :
platform.ready().then(() => {
keyboard.hideKeyboardAccessoryBar(false);
});
There are couple of things that need to be verified here , issue you are facing is something that is related to the WebViews especially for the iOS , so let's start from the Keyboard, try to install the ionic-plugin-keyboard
cordova plugin add ionic-plugin-keyboard --save
if you need more events related to how you want to trigger the Keyboard events refer the official doc
i generally use the ionic-wkwebview rather than going with the in build webview of iOS which resolves most of the problem. You can install the plugin as follows:
ionic cordova plugin add cordova-plugin-ionic-webview --save
For complete installation refer the ionic-wkwebview-official doc
Even for the ionic-plugin-keyboard , there was issue with the ion-input but it was resolved and issue is not with the plugin but with the Webview,
Here is the reference to that issue which got resolved .

Error installing ionic push plugin (for iOS) on windows

I'm developing an app in Ionic for iOS and Android, added both platforms to the project.
I'm getting the following when I add the push plugin. It installs for android, but not for iOS
ionic cordova plugin add phonegap-plugin-push --save
> cordova plugin add phonegap-plugin-push --save
× Running command - failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova plugin add phonegap-plugin-push --save (exit code 1):
Installing "phonegap-plugin-push" for android
Subproject Path: CordovaLib
Installing "phonegap-plugin-push" for ios
Failed to install 'phonegap-plugin-push': undefined
Error: WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/claide-1.0.2/lib/claide/command.rb:439:in `help!': [!] You cannot run
CocoaPods as root. (CLAide::Help)
Here is the ionic info
PS D:\scripturi\Ionic\dangle> ionic info
#ionic/cli-plugin-cordova : 1.6.2
#ionic/cli-plugin-ionic-angular : 1.4.1
#ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0
global packages:
Cordova CLI : 7.0.1
local packages:
#ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.6.0
System:
Node : v7.2.1
OS : Windows 10
npm : 3.10.10
Tried removing the platforms and adding them back.
Any suggestions how to fix this?
The iOS verison of the plugin requires a CocoaPod (Firebase) to be installed. CocoaPods are used to manage ObjC and Swift dependencies and are only available in OSX environments, so it's quite expected that the plugin install fails on windows.
I'd suggest you remove the iOS platfom when developing on a windows machine.

Update phonegap cordova version

I am trying to update the latest cordova version to my project. I did run the below command:
$ sudo npm update -g cordova
after running this command, I checked and using cordova info command I can see that I have the latest version of cordova
Node version: v0.12.2
Cordova version: 5.3.1
Config.xml file:
However, when I go to the platform folder and ran
cordova platform version ios
The results is showing that I am still in the older version.
Installed platforms: ios 3.9.1
Available platforms: amazon-fireos, android, blackberry10, browser, firefoxos, osx, webos
I tried using the cordova platform update but I am getting an error, see below. Am I missing anything?
cordova platform update ios#5.3.1
Failed to fetch platform ios#5.3.1
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: version not found: cordova-ios#5.3.1
The various parts or cordova (cli, platforms, plugins) all move and release independently, which means they all can and will have different version numbers. For example the current release of the cordova-ios platform is 3.9.1 and the current release of android is 4.1.1. You can see what platforms are available by running
cordova platform list
You can see all published versions for a given platform via npm
npm view cordova-{platform} versions
replacing {platform} with anything given by the list command above.
Hope this helps!

Why I am not able to update to the lastest iOS Cordova Platform?

I need to update my iOS app created with Cordova to last version but something is not clear:
cordova -v
returns: "4.2.0"
cordova platform list
returns: "Installed platforms: ios 3.7.0"
If i try to run:
cordova platform update ios
I get: "iOS project is now at version 3.7.0"
If i try to run:
cordova platform add ios#4.0
I get:
Error: No compatible version found: cordova-ios#'>=4.0.0-0 <4.1.0-0'
Valid install targets:
["3.5.0","3.6.0","3.6.1","3.6.3","3.7.0"]
so, what is the last platform available for iOS? 3.7.0?
Why Cordova gives instructions on how to update to 4.0.0 then? (Upgrading iOS)
Thank you!
Well, It looks a bit confusing but the version of the Cordova CLI does not necessarily follows the versions of the platforms.
As you can see here:
Cordova CLI last version is 4.3.0 => Cordova CLI
iOS Platform last version is 3.8.0 => Cordova iOS Platform
Android Platform last version is 3.7.1 => Cordova Android Platform
The issue is that there is now fragmentation in Cordova versions. 4.2.0 is the Cordova CLI version.
As the Valid Install Targets suggests, 3.7.0 is the latest iOS version of Cordova.

Resources