Ionic View App with iOS device where data has not been shown - android

I have developed a small Ionic2 app.It is working fine on both locally on the web browser and "Ionic view" app's Android device.But the problem is on the Ios device.It shows UI correctly but no data.I have tested this on Ionic app viewer on Ios mobile device.Can you tell me why this strange behavior. I'm using Php as a web API layer (or back end).Can you tell me where is the issue is? If you need any info please let me know.At this moment I don't know what to provide here?

OP's feedback
Actually, the issue was Date format. We have to use ISO date format with the safari.
OLD
I guess that the problem is because the request is using SSL (https), with the request without SSL (http) should be work.
Source: https://forum.ionicframework.com/t/solved-ionicview-app-http-request-to-external-api/18696

Related

How can I run ionic-angular application that calls APIs as Android App on a device

I have built an ionic angular application that connects to an API end point. On the web browser it works well. I compiled it for Android platform and opened it on the Android studio. When I connect my phone to the PC and run the application, it opens the login page which by default loads when the application starts up. However, immediately upon starting up it is supposed to make an API call which loads the initialization data, it instead generates a message as shown in the image attached.
error from API call in ionic-angular app on android
I have tried to find out, but it seems that the API calls are being blocked as the initialization data is not retrieved from the remote server. I checked through and found some related problems but their solutions never worked for me. Some of the links I referred to are:
XMLHttpRequest failed on App
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/
https://stackoverflow.com/questions/54275697/ionic-4-app-not-working-in-android-device#:~:text=2%20Answers&text=Go%20to%20AVD%20manager%20in,android%20and%20it%20should%20work.&text=When%20I%20had%20this%20issue,use%20the%20'new'%20operator.
Could someone point me to some info that can help me fix this issue.
I am relatively new in Angular and Ionic programming and I don't have a experience in using raw JavaScript though I use TypeScript in Angular framework.
I was able to fix my issue with the help from the link
https://imstudio.medium.com/android-8-cleartext-http-traffic-not-permitted-73c1c9e3b803

ionic 4 app not working correctly on other android devices

i'm building ionic 4 app and install it on my device it works fine
but when i try to install on other devices, it looks like this
i've tried to debug this problem with chrome but everything works fine.
images and texts are from json file and not showing up, i think maybe it's because android version i use is different, anyone know what to do?
This is an error I am getting from your provided .apk file. This is a very common issue. To get data from the server your using URL http://mobile.youthscarf.id/ionic/link_data.php To avoid this error I will recommend you to use URL starts with https://. according to the new android security update we have to use certified URL. You can get free SSL for testing purposes from https://www.sslforfree.com/

ICANN Name collision for react-native android

I have a react-native app with ios and android versions. Both versions use a webview to access a web site. The ios version works when pointed to either the production web site or local development version. The web site uses ruby on rails and the development server is pow.
When I run the android app, it loads but when it tries to access a local version of the web site, it returns the following error:
console.error: "Encountered an error loading page", {"canGoForward":false,"code":-2,"canGoBack":false,"description":"net::ERR_ICANN_NAME_COLLISION","loading":false,"title":"","url":"http://my_app.dev/,"target":69}
The same happens if I use localhost rather than the my_app.dev. It does however work when pointed to the external production url i.e my_app.com.
I have tried using a different android device, and the error changes to ERR_CONNECTION_REFUSED. The first device used the android browser whereas the second looks like it uses chrome. So it does appear to be a browser specific problem. Reading this link, I used nslookup my_app.dev to work out the ip address as 127.0.53.53 and entered
127.0.53.53 my_app.dev
into the /private/etc/hosts file. However this still gives same error. How do I fix this?
A work around for this problem is to find out the ip address of the development machine, say 192.168.0.33, configure the server to allow external access at my_app.192.168.0.33.xip.io, and then in the react app, configure the host url as http://my_app.192.168.0.33.xip.io. However this means running the server in special mode, so it would be better to find a direct answer to this question.

Phonegap Assistance

I have the following scenario below: Please guide me.
I already have an existing web application develop using PHP & MySql, It works perfectly on
on a normal browser. What I would like to do is have the very same functionality, on
my "Android App" "iOS" and "BB".
I have been going through multiple forums, and I am still very confused. Here are my reasons:
I do not just want to load the app in the "WebView".
I want to be able to log in to my web app through phonegap, (need to send the credentials to the web app)
After logging in I want to be able to format the generated .html (to display on mobile)
On my browser it allows me to upload content to the server, if possible I would like to this as well:)
I already have the latest version of PhoneGap + ADT & SDK + Eclipse, I can develop static html apps
without any hassles, now, I just need to have client side html that talks to my server side php.
Something similar to the Facebook app and the Facebook Mobile Version.
Any suggestions.
I have just completed a project using PhoneGap, Backbone JS and Require JS, these acted as my MVC for the front end application which sent ajax request to my back end PHP application, which was converted into a rest API. Laravel does this quite well, but it might have to be a custom build for you if you are already relying on a bespoke PHP build.
I was able to deploy to Android and iOS. However, using PhoneGap means that your application will be loaded in a WebView, this might help exaplain a WebView in more detail.

Sencha Touch 2: Web API REST Service Can be consumed on Chrome, but not working on FF and Android APK

I Followed this tutorial:
http://www.youtube.com/watch?v=lsD56AilUxw
http://www.danielgallo.co.uk/post/creating-a-sencha-touch-app-in-sencha-architect-that-communicates-with-a-asp-net-web-api-backend/
on how to consume ASP.NET WebAPi from ST2 App.
I could make it work on google chrome putting ST app on same IIS site than WebApi to prevent cross-domain issues, even I added "Add New" functionality with no problem... but I could notice that was not running on Firefox, only shows NavigationView with no list in there. also, no JS errors.
Even I tried publishing webapi service to test server with an accesible through internet hostname and pointed ST2 app to there. then packaged for android device but same issue at runtime. showing Navigation but no items on list. (tried in emulator and real device)
can you give me a hand on that?
I will really appreciate it
When building your native application, you are running into the same problem that you had before with Chrome - cross-domain issues. You cannot use standard AJAX calls using Sencha Touch native apps alone.
The only solution when using only Sencha Touch is to use a JSON-P proxy: http://docs.sencha.com/touch/2.2.1/#!/api/Ext.data.proxy.JsonP
Another possible solution is to use something like PhoneGap (Cordova) to allow for cross-domain requests like this. You can then whitelist your server to allow for these requests.

Categories

Resources