Ionic 5 with Capacitor getting 'plugin_not_installed' with plugin 'cordova.plugins.diagnostic'. Tried installing with this doc.
I have:
config.xml has
<plugin name="cordova.plugins.diagnostic" spec="^5.30.0" />.
package.json has
"cordova": {
"plugins": {
...
"cordova.plugins.diagnostic": {}
...
}
}
and
"dependencies": {
...
"#ionic-native/diagnostic": "^5.30.0",
...
"cordova.plugins.diagnostic": "^6.0.2",
...
}
Here's my output for cordova plugin list
com.googlemaps.ios 3.9.0 "Google Maps SDK for iOS"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-geolocation 4.1.0 "Geolocation"
cordova-plugin-googlemaps 2.7.1 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-nativegeocoder 3.4.1 "NativeGeocoder"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova.plugins.diagnostic 6.0.2 "Diagnostic"
And have tried these commands:
ionic capacitor sync ios
cordova build
ionic build
ionic cordova run ios -l
First, when using Cordova plugin inside a capacitor project, use this commands.
npm install cordova.plugins.diagnostic #ionic-native/diagnostic
Refer docs for details
Secondly, remove your platform and ios folders that have been already created.
Then, for Capacitor follow these commands.
ionic capacitor add ios
ionic build
ionic capacitor sync ios
ionic capacitor open ios
For any subsequent changes to your code, you just have to run
ionic build && ionic capacitor sync ios (if you have added any new package/plugin)
ionic build && ionic capacitor copy ios (if only code has been changed)
You say your project is built on capacitor, then you don't have to run ionic cordova run ios command, or any cordova commands
Refer this command docs
Related
I'm writing an app with Ionic v1, AngularJS 1.5 and Cordova cli v8.
Last week I updated my Mac OS (mac os Catalina 10.15.5) and now I'm having trouble launching app onto my ios emulators.
This is how I try to run my app: cordova run ios --emulator
cordova requirements ios
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-28,android-26,android-19
Gradle: installed /usr/local/Cellar/gradle/6.2.1/bin/gradle
Requirements check results for ios:
Apple macOS: installed darwin
Xcode: installed 11.5
ios-deploy: installed 1.10.0
CocoaPods: installed 1.9.0
ionic info
[WARN] Bad integration name: gulp
Ionic:
Ionic CLI : 5.4.16 (/Users/aubrey/node_modules/ionic)
Ionic Framework : ionic1 1.3.5
#ionic/v1-toolkit : 1.0.22
Cordova:
Cordova CLI : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : android 8.1.0, ios 5.1.0
Cordova Plugins : cordova-plugin-ionic-webview 5.0.0, (and 17 other plugins)
Utility:
cordova-res : 0.15.1
native-run : 1.0.0
System:
Android SDK Tools : 26.1.1 (/usr/local/share/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 Catalina
Xcode : Xcode 11.5 Build version 11E608c
cordova plugins list
cordova-android-support-gradle-release 3.0.1 "cordova-android-support-gradle-release"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-customurlscheme 5.0.1 "Custom URL scheme"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-inappbrowser 4.0.0 "InAppBrowser"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-safariviewcontroller 1.6.0 "SafariViewController"
cordova-plugin-save-image 0.3.0 "SaveImage"
cordova-plugin-settings-hook 0.2.7 "Cordova Settings Hooks"
cordova-plugin-splashscreen 5.0.4 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova.plugins.diagnostic 4.0.12 "Diagnostic"
ionic-plugin-keyboard 2.2.1 "Keyboard"
This is the error that I'm getting:
** BUILD SUCCEEDED **
Deploying to simulator
No target specified for emulator. Deploying to "iPhone-SE--2nd-generation-, 13.5" simulator.
Running command: /Users/aubrey/Documents/Repos/selfserviceapp/node_modules/ios-sim/bin/ios-sim launch /Users/aubrey/Documents/Repos/selfserviceapp/platforms/ios/build/emulator/Self Service.app --devicetypeid com.apple.CoreSimulator.SimDeviceType.iPhone-SE--2nd-generation-, 13.5 --log /Users/aubrey/Documents/Repos/selfserviceapp/platforms/ios/cordova/console.log --exit
[ios-sim] device.name: iPhone SE (2nd generation)
[ios-sim] device.runtime: iOS 13.5
device.id: 6FCCD0AD-2E43-489A-B623-4D9AAA667637
[ios-sim] Simulator already running.
[ios-sim] An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
[ios-sim] An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.softworks.selfservice.app" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application "com.softworks.selfservice.app" is unknown to FrontBoard").
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
[ios-sim] The operation couldn’t be completed. Application "com.softworks.selfservice.app" is unknown to FrontBoard.
Application "com.softworks.selfservice.app" is unknown to FrontBoard.
com.softworks.selfservice.app: -1
[ios-sim] logPath: /Users/aubrey/Documents/Repos/selfserviceapp/platforms/ios/cordova/console.log
Simulator successfully started via `ios-sim`.
I tried this on a brand new project by cordova create hello and it does work for this brand new app but not for my project.
Edit correction: I created a fresh project with the Cordova 8.1.2 cli and tried to run it in the emulator and I got the same result.
What I have tried:
deleted node_modules, bower_components, plugins folders
tried Cordova platform rm ios & Cordova platform add ios
I did quite a research on this one, and even though it is a very common issue none of the solutions worked for me so I keep getting the dreaded:
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability
My configuration is this:
Ionic:
Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/#ionic/cli)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 8.1.0, ios 4.2.0, windows 4.4.2
Cordova Plugins : cordova-plugin-ionic-webview 5.0.0, (and 13 other plugins)
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v10.16.2 (/usr/local/bin/node)
npm : 6.14.5
OS : macOS Catalina
Xcode : Xcode 11.5 Build version 11E608c
Plugins:
com.verso.cordova.clipboard 0.1.0 "Clipboard"
cordova-clipboard 1.3.0 "Clipboard"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-crop 0.3.1 "CropPlugin"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-plugin-x-socialsharing 5.6.3 "SocialSharing"
cordova-plugin-x-toast 2.6.0 "Toast"
cordova-sqlite-storage 2.2.0 "Cordova sqlite storage plugin"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"
uk.co.workingedge.cordova.plugin.sqliteporter 1.1.1 "sqlite porter"
Could anyone identify something that screams "this one uses UIWebView and you should change it!" ?
UPDATE:
In order to fix the issue I followed these steps:
Made sure that cordova-plugin-ionic-webview was in version >= 5.0.0
Added
<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
...
</platform>
To config.xml
updated ionic npm install -g ionic#latest
updated cordova npm install -g cordova#latest
updated ionic scripts npm install #ionic/app-scripts#latest
Then removed the iOS platform ionic cordova platform rm ios
Re-added the iOS platform ionic cordova platform add ios
and rebuild it ionic cordova prepare ios
I have fixed my app for the exact issue recently and Here are the steps I have followed to fix the issue:
1) Ensure your cordova-plugin-ionic-webview is updated to the latest version 5.0.0. You need to run these two commands to do that.
ionic cordova plugin remove cordova-plugin-ionic-webview
ionic cordova plugin add cordova-plugin-ionic-webview#latest
2) Ensure your cordova-ios is updated to the latest version 6.0.0. Run this command to update it.
npm install cordova-ios#latest --save
3) Check your package.json to see if the versions are updated for both cordova-ios and cordova-plugin-ionic-webview.
4) Ensure you add WKWebViewOnly preference to config.xml file.
<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
...
</platform>
5) This is the most important step. Ensure you remove the ios platform and add it again. Run these commands to remove and add the ios platform.
ionic cordova platform rm ios
ionic cordova platform add ios
Now, when you build the ios app and publish it to the app store, you can see the issue will be fixed.
I have upgraded my environment from ionic 1 to ionic 3.19.1. However, my project is still ionic v1 (or if im not mistaken below v1, not sure)
I ran the command
ionic cordova build ios --v1
and there is this failure.
Discovered plugin "cordova-plugin-console" in config.xml. Adding it to the project
Installing "cordova-plugin-console" for ios
Plugin doesn't support this project's cordova-ios version. cordova-ios: 4.5.4, failed version requirement: <4.5.0
Skipping 'cordova-plugin-console' for ios
what does it mean and how to resolve it?
My environment is below:
ionic version 3.19.1
cordova version 8.0.0
npm version 5.6.0
macos High Sierra 10.13.1
xcode 9.2
You simply need to uninstall cordova-plugin-console.
Check cordova-ios 4.5.0 release here.
Important! If you have included cordova-plugin-console in your project, you must remove it, otherwise your project will not build.
It is now integrated into cordova-ios platform(4.5.0 onwards).
Your current version is cordova-ios: 4.5.4 according to the error message.
Here is the issue tracker of integration into cordova-ios.
Do:
ionic cordova plugin remove cordova-plugin-console
Good Morning!
Well I've been maintaining an ionic Cordova app but I'm having to upgrade it to the Iphone and I'm not getting it I've already searched a lot in various corners but I still can not solve my problem.
Log error
https://pastebin.com/f6c9N32p
Ionic V1 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) : 7.1.0
local packages:
Cordova Platforms : android 6.3.0 ios 4.5.0
Ionic Framework : ionic1 1.1.0
System:
ios-deploy : 1.9.2
Node : v8.9.3
npm : 5.5.1
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Plugin List
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-device 1.1.3 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-inappbrowser 1.6.0-dev "InAppBrowser"
cordova-plugin-splashscreen 4.0.0 "Splashscreen"
cordova-plugin-statusbar 2.2.0 "StatusBar"
cordova-plugin-whitelist 1.3.0 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 2.1.2 "PushPlugin"
Setting the "Build Active Architecture Only" to 'Yes' resolved the same issue on my end.
Build Active Architecture Only is on Xcode -> Build Settings
Did you try to change value to "No" of Enable Bitcode
XCode ss
Ok, so here is my solution, Go to the general properties, and uncheck the "Automatically manage signing" checkbox, and then check it again
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.