can't reach rest api hosted on remote server from safari browser of iphone simulator - rest

my xamarin.forms app needs to get data from sql server and for this i used a rest api. i hosted the webservice on a remote server and tested the app on my android phone. it worked well. when i tried to test the app on iphone simulator using mac in cloud to pair my vs to a mac, my app couldn't connect to the webservice. my HttpResponseMessage.IsSuccessStatusCode returned false. i tried to reach my service by copying its url in safari in my iphone simulator but i got: your search didn't match any documents. any suggestions?

Related

Flutter mobile app works during testing and fails from the Google Play Store

Original problem: My flutter app using the http package connects to a rest service to get the data needed. If I am connected via my modems wifi, the connection would fail (but not timeout) on the login attempt. The circular spinner would spin forever (tried for 15 minutes). If I connect using my router's wifi, or my mobile data, the connection is fine. The app logs in and runs correctly.
I created a web app to test and after trying a few things, I found port 443 was the problem. I changed the port on my rest service and the app and now 2 emulators and 2 physical devices all work perfectly during testing.
Then yesterday I published the app update to the Play Store and the App Store. I'm still waiting on the app store to approve, but testing from TestFlight worked perfectly on my iPhone.
Google approved the app quite quickly, but when I install the update from the Play Store, no connection at all works now. I have tried uninstalling and rebooting the phone (Galaxy S22+ running Android 13 and a Galaxy S8 running Android 9) but regardless of whether I connect using mobile data or either wifi, the login sits trying forever. The app does not crash, it just won't login and although there is a timeout on the login connection, it doesn't timeout.
What could be the difference between the test version which works great, and the version I build for uploading to the Play Store?

Ionic 4 App - works locally but does not work in google play (store)

My application, built with Ionic 4, Firebase, Postgres, Nodejs, Express has a client side and a server side.
the auth is implemented using firebase, and some server logics is implemented using an heroku postgres Daas.
I deployed the server project (the nodejs express with postgres db) to heroku. it works well (tested in postman).
but when I enter the app via google play (app store),
It shows blank white screen, and nothing happens.
the app works locally on my android machine (tested with devapp), works in browser, the server is tested, and client is tested too.
the only thing that does not work is the deployment to google play

not register ionic application on mobilefirst to use

In mobile first tutorial,
one step is mfpdev app register
Question is what is the use of the registration
as I develop an ionic project and can connect to mobile first without registration when Cordova web resources Previewed with the Mobile Browser Simulator using MobileFirst command mfpdev app preview
mobile first 8
ionic 3
mfpdev app register command will register your application with MobileFirst Server. Without registering your application with the server, the application on the mobile device will fail to connect to server with an error 'application does not exist'.
If you do not want to use mfpdev app register command, you can register your application manually at MFP Operations console.
For more details , refer : Registering an application
Update : If you are using command mfpdev app preview to preview your web resources with the Mobile Browser Simulator, Security checks are not run on the server-side and security challenges are not sent to the client that runs in Mobile Browser Simulator.
MobileFirst Development Server includes a confidential client "test" that has an unlimited allowed scope ("*"). By default mfpdev app preview uses this confidential client.
NOTE : command mfpdev app preview is meant for preview the UI , OAuth protocol is not fully supported
For more details, refer :Previewing Cordova web resources with the Mobile Browser Simulator
Thanks for #manjunath kallannavar for all the supports
Unrestricted right (without login) to both protected and unprotected resources lead me to confidential client.
As pre https://youtu.be/DlxZYxXszIw?t=15m40s, the author mentions user is as confidential client when using mfpdev app preview.
However, this is not documented in IBM reference. (Please quote if you find one)
Also, by using ionic cordova run android in emulator, finally challenge received.
Conclusion, with mfpdev app preview, user right = confidential client => can access all resources
Credit to #manjunath kallannavar
Official explanation:
MobileFirst Development Server includes a confidential client "test" that has an unlimited allowed scope ("*"). By default mfpdev app preview uses this confidential client.

Web site hosted on Heroku is not available only on IPhone

Nodejs app is deployed on Heroku (Europe). When I open it from my IPhone 4 (IOS 7) site is not available (response time ends) NOTE: sometimes it's available.
When I launch it locally everything is working ok.
On android and PC everything is working ok.
http://www.happyscan.me/
http://happyscan.herokuapp.com/

Debugging Servlets in Eclipse

I have created a web application using the Google Web Toolkit that is able to receive some data by a mobile client via Http Post. The transmission of the data works well and also the server / client communication using GWT RPC is no problem at all.
However, I need to debug the webserver when receiving data from the mobile device. As I am using Hibernate and MySQL within the web application I do not use the Google App Engine. So if I deploy the web application in local host mode it is only accessible on the localhost:8888.
Now, if I send data from the mobile phone, I have to send it to the locally assign IP address as the localhost of the mobile phone emulator is not the localhost of the computer, where the web application is running. To ensure that everything works, I tried to do some posts outside the emulator (on the machine the emulator is running on). This works, but how can I post from the emulator to my web application?
How can I get access to debug my system? I've already tried to deploy the final application to a tomcat server and use remote debugging, but that fails too.
Best regards,
Florian
Well if I understand your question correctly, the real problem isn't debugging the app on the servlet, the real problem that you're looking at is debugging from a mobile phone. When the mobile phone hits your local network (I'm guessing you're pointing at 192.168..?) you are accessing the compiled GWT code that does not communicate with the debugger.
Put another way, when you debug locally using a browser, you are actually not running compiled GWT code, but instrumented code that is executed with the GWT Debugging Plugin, that happens to work exactly like compiled GWT code. (mostly). So while your local version has "?gwt.codesvr=127.0.0.1:9997" or the like, your mobile phone version cannot do the same, and cannot thus communicate with the debugger.
The best that I've been able to do is to use logging extensively. If you're using an iOS device and change the settings are your safari, it can output logs for you from mobile safari. Also, if you're using the Android debugger with a WebView app, you can attach a listener for log messages and then ferry them on to the ADB and view those in Eclipse. Definitely not as good as a debugger, but that's the best I've come up with so far, and if anyone has a better solution I would love to know it :)
Hope that helps!