My Ionic app was working absolutely fine until I got a message to upgrade Cordova from 6.0.0 to 6.1.0 after running cordova prepare to compile in xcode.
I then received a message to update to cordova-ios#4.0.0 or higher, which I also did.
This is when the trouble started. My app lost resources and I had to start updating plugins too. Did some searching and removed the platform and re-added.
Latest problem, which I can't seem to google is there is now a spinner that won't go away, and won't let me interact with the app. See screenshot below. I've remove all reference to $ionicLoading, even though the loader does not look like this.
Please, any help on where I can start debugging this would be greatly appreciated!
Mysterious loader that won't remove
Ended up being a problem with Ionic Keyboard. Steps to get it fixed for me was to:
cordova platform rm ios
cordova platform add ios
cordova plugin rm ionic-plugin-keyboard
cordova plugin add ionic-plugin-keyboard
Removed this code from js:
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
Then ran cordova prepare
Related
I've managed to follow all the steps in the block materials up to installing Cordova but hit some problems when trying to add android. The error says that Cordova failed to fetch cordova-android#^9.1.0. Attached is the screen grab showing the list of errors:
Screenshot of Android installation error in Cordova
I have tried uninstalling and reinstalling all components including Cordova right from the very first step multiple times but I still cannot get it to work. I have also already checked that I am not going through a proxy server.
I tried adding android to Cordova using the command:
cordova platform add android
It should have added the Android platform for development in Cordova.
I have an IONIC 5 / cordova project and I use InAppBrowser to open a link.
In the next code:
const browser = this.iab.create(url);
I get error "WARN: InAppBrowser is not installed or you are running on a browser. Falling back to window.open" on execution time in IOS device and IOS emulator.
I have tried all kinds of things that I have found on the internet:
First, I have done many test with #ionic-native/in-app-browser plugin, but I always get the same result:
Remove node_modules, www, platform/ios
Re-install(remove and install) in-app-browser libraries
Recompile in dev and prod mode.
Same error..
I have tried it again with the new plugin:
$ ionic cordova plugin add cordova-plugin-inappbrowser
$ npm install #awesome-cordova-plugins/in-app-browser
I change the code to get the new native plugin
$ ionic cordova platform add ios
BUILD DEVEL and PROD
$ ionic cordova build ios
$ ionic cordova build ios --prod
Same result.
I have verified that the cordova plugins are installed in the /Plugins folder of the XCode project.
I have a couple of things to comment on:
Now I use XCode 13, but In XCode 12 works fine. To upgrade the XCode I have upgrade MacOS from Catalina To Monterey.
The only difference between the two projects is that in XCode 13 "Legacy build system" is disabled since it's "deprecated".
I don't know if XCode doesn't import the libraries, I don't know if "Legacy Build System" is necessary. I know nothing... :-(
Can anybody help me?
Thanks.
I found the problem.
In my project I have an "Object.prototype" function that it produce a big problem to loop objects.
Referring InAppBrowser pluguin, in file inappbrowser.js:
callbacks = callbacks || {};
for (var callbackName in callbacks) {
iab.addEventListener(callbackName, callbacks[callbackName]);
}
Perhaps it could be improved with an Object.keys(callbacks), but I think that It was my problem.
Thanks.
I recently dupdated
Xcode from 7.3.1 to 8.2.1
Cordova from 6.1.1 to 6.5.0
on my OS X elCapitan 10.11.6.
Before the update everything works just fine, my cordova app compiles and all plugins are working as expected. BUT after the aforementioned updates none of my plugins are working.
I already tried:
removing and adding platform ios
removing all plugins and readding them
creating a new cordova project, adding my www and add the plugins (Upgrade Cordova Version of an iOS app)
creating a new cordova project (via cli) and adding just the camera plugin (to see if simple plugins are working)
no success, none of the plugins are working, but it compiles without errors.
When I do a rollback to Xcode 7.3.1 and cordova 6.1.1 everything is working again. It already cost me two days. Any hint will be appreciated!
Your problem sounds similar to this one. You can confirm this by seeing if your plugins start responding after you put your app in the background (press Home button) then back into the foreground.
Since you have upgraded to XCode 8, you'll now be building against the iOS 10 SDK, hence a stricter Content-Security-Policy is applied. To resolve this, see this answer.
I was having some issues lately with my Node / NPM / Ionic installations, so removed everything and installed again.
Since then, I notice a weird behavior after I start new projects through Ionic CLI (v1.7.7) - by running ionic start myApp blank, for instance (I've already tried removing ios platform and adding again before building the project).
Whenever I add the iOS platform, I noticed that the index.html file is not copied to the platforms/ios/www folder
When I run the app on iPhone it gets stuck at the "Apache Cordova - Device Ready" screen (probably as a result from the previous);
Splash screen shows Cordova logo, instead of Ionic one which used to be shown with my previous installation;
Application icon also shows Cordova logo - used to show Ionic logo
Cordova version is 5.3.3.
I'm running OS X Yosemite and my Node.JS version is 5.0.0.
I just had the same problem. I am on Mac OSX El Cap. I did everything you did, plus adding in homebrew (much easier on CLI see http://www.johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/)
I was stuck till I tried this stackoverflow question:(Cordova run --debug building blank app) where I found that I was having the same problem - ionic build is not copying the www folder over to the /platforms/ios/www folder. Once I copied this over it worked in the ios emulator.
I hope that helps till they fix it! What a pain! I like the platform - but not this error.
Someone from the Ionic Forum suggested downgrading Node to 4.2.2. It worked! :)
It looks to me that Phonegap 3.3.0 broken. I do:
$ cordova create app de.app.name "app-name"
$ cd app
$ cordova platform add ios
Open the xcode project in platforms/ios/*.xcodeproj and run it (xcode 5.0.2). I get an Exception with a parsing error for config.xml.
I notice that www/config.xml and platforms/ios/www/config.xml are broken. There is some binary empty space at the end of the file. Removing that fixes the error but still I cannot install any plugins.
Does anyone else have this problem? How can I fix this?
Update
If I stick with phonegap commands things looking better:
$ phonegap create app de.app.name "app-name"
$ cd app
$ phonegap local build ios
config.xml looks fine now and does contain much more. platforms/ios/www/config.xml is bigger but still has the broken ending. Also plugin installation still does not work.
Update 2
Found a nice tutorial with does demand to use cordova instead of phonegap and does something like this:
cordova create App com.App.Name App
cd App
cordova platform add ios
cordova build ios
cordova plugin add org.apache.cordova.console
But still platforms/ios/www/config.xml is broken before I add the plugin and even with fixed config.xml it still throws the error. Same same. Also I tried reinstalling phonegap & cordova and restarting the Mac.
Problem is caused by the directory I am in. If I did cd ~ and run the same command it just works!
I was in \Volumes/www with is a samba share mounted over smbfs.