Angular route is not working with Cordova iOS - ios

I'm facing an issue with Cordova, Cordova-ios 6.2.0 and Angular 12.0.
When I'm building my app with Cordova and launch it in an emulator (or with a device), I'm arriving to a white screen.
I did some research and try some "fix" but nothing worked.
Finlly, I've find that it could be because of the balise.
So, I tried to play with the tag and modify the href with ., ./, / but nothing worked.
I've tried without and it worked, but without routing.
Has someone already had this problem?

The Angular router needs the app to be hosted on a "proper" HTTP scheme and does not work with file: URLs. You can check how your app runs, if you open the JavaScript console for your app running on an iOS device with Chrome and typing location.href. If you see file: you need to set up a custom scheme.
Please checkout the documentation and this announcement https://cordova.apache.org/announcements/2020/06/01/cordova-ios-release-6.0.0.html

Related

Ionic 6 app getting CORS error accessing develper.google.com on iPad only

I have an ionic 6 app built with angular and cordova. I can build the app just fine for iOS and it runs on an iPhone with no issues.
But for some reason, when running the same build on an iPad I get CORS error accessing developers.google.com (I assume this is from firebase, which is in my app)
Most of the other questions I've found involve Capacitor, which I am NOT using.
Similar, but I'm not making http requests directly. I'm using AngularFire: https://forum.ionicframework.com/t/cors-issue-when-sending-request-from-ionic-to-firebase-cloud-function/185239
I've been able to repeat this scenario. If I remove the app from the iPad simulator and run it again, it works. However, if I refresh using Safari dev tools, or just re-run the app, the issue occurs. (maybe it's a timing issue?)
erorrs.
Some more information around the erorrs
The way I managed to address this was to switch from the Cordova build to the Capacitor build following the instructions here:
https://capacitorjs.com/docs/cordova/migrating-from-cordova-to-capacitor
Essentially, once I started using the newly create ios folder instead of the old platform/ios that was generated by Cordova, the error stopped.
I don't know why, but maybe this will help someone else.

is it possible to open a link from ionic cordova app from ios platform in microsoft-edge browser

I have an ionic cordova app, on ios platform , i want to open some links in edge browser rather than the inappbrowser or the default browser.
i have gone through a number of articles, and have tried a lot of things but nothing seems to work for me.
I have also made changes in info.plist of project and added the urlschema. the code i'm using to open link is mentioned below
:
const browser = window.open('microsoft-edge:'+ 'https://google.com' ,'_blank');
But you could try the following
https://github.com/apache/cordova-plugin-inappbrowser/releases
OSX Quirk
At the moment the only supported target in OSX is _system.
So if device system browser set to edge

Meteor AngularJS Ionic IOS device blank page

I am building a Meteor hybrid app that using AngularJS and ionic, so I decided to use driftyco:ionic, since meteoric:ionic doesn't support Angular.
Everything works fine on web browser, however, it is blank when it runs on ios devices or simulator with no warnings or errors showing. I get rid of driftyco:ionic, content is able to show on ios devices. Thus, I believe there is something I did wrong with driftyco:ionic, so I got a blank page.
My repo https://github.com/yumikohey/bringMe ?
I deployed to 52.89.149.88(most updated) and bring-me.meteor.com(older version)
Thanks for your help.
Create mobile-config.js and add App.accessRule('*');
Re-run meteor

InAppBrowser not launching

I've installed Phonegap using the npm and my app is working great, except when I call window.open to launch a website it does not give me the footer with the done button so my app get's stuck on the called web page.
I am using XCode to build an ios app.
I've used npm to add the InAppBrowser plugin. It added the to to the config.xml.
I've added the site to my whitelist in config.xml. The site opens fine, just without the done button/footer.
It added the InAppBrowser plugin entry to:
/#myapp#/platforms/#platform#/www/cordova_plugins.js
It added the InAppBrowser plugin folder in /#myapp#/platforms/#platform#/plugins/
The related SRC files for InAppBrowser are in the platform folder as well
(for example IOS plugin src files are: /#myapp#/platforms/#platform#/#appname#/Plugins/)
I added a console.log function to InAppBrowser.js to confirm that the plugin is loaded, but it does not generate a log entry.
I've tried many things to get the footer/done button to show without any success, but I seem to be missing something here.
I solved this problem by recreating the Xcode project using cordova (instead of phonegap). I went through all of the solutions several times with no luck, so I used the terminal to build a new cordova project, added the InAppBrowser to the project, then copied my code and assets from the old project to the new one. Launched the app on my ipad and it all worked just fine.
I don't suspect it's a problem with Phonegap 3.1.0. I think there was a project issue that kept it from working and starting over with a clean project did the trick.
All is well.
One note is that I saw postings that reported cordova interrupts the console.log function, so be careful with that. Alerts work just fine.

Sencha app with Cordova on Xcode

I am trying to build a ios package using sencha and phone gap. I followed the steps here http://vimeo.com/56673251. I am able to build and run the package on ios simulator. However, I can only see the index.html page. All the model, view and controller folders with js files created by sencha are not copied there. So, I am not able to run the app which i built using sencha.
When i click on the app/view/Main.js i get error The requested URL was not found on this server.
Any help on this would be great.
I think that the problem is that they expect you to run only the "production" version of you app inside cordova. When you set production the microloader is not used and everything is compiled into one file instead. That should solve the issue.

Resources