Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug embedded browser view in native Facebook iOS app

Tags:

My web application is malfunctioning when running inside the native Facebook app for iOS (clicking in a link does not open Safari, but an embedded browser inside the app).

When running the iOS emulator, in my desktop safari I have the option to attach the debugger to mobile Safari... So I was wondering if it was possible to do the same with an embedded view running in an iPhone connected with the USB cable.

Another problem that I've seen is that the Facebook app makes a very aggressive caching of any web content, so I cannot refresh the page and see if my changes work. The only way I have found to clean the web cache of the native iOS Facebook app is uninstalling and installing it again. A solution for that will be very welcome too.

like image 237
fortran Avatar asked Jun 03 '13 09:06

fortran


People also ask

How do you debug Facebook on the app browser?

You can now remote-debug sites in the Facebook in-app browser on Android. It is enabled automatically so once your device is in dev mode with USB debugging and a browser open just visit chrome://inspect to attach to the WebView.

How does Facebook in-app browser work?

A custom in-app browser allows Facebook to roll out the latest Chromium security patches directly to users, which install when users update the Facebook app. This helps ensure users aren't visiting pages using outdated software, which may pose security risks.


2 Answers

I think the solution to this problem is to use http://jsconsole.com with remote debugging. It will stream in exceptions and log statements remotely.

like image 150
Justin Ratner Avatar answered Sep 23 '22 22:09

Justin Ratner


I am using this. It works fine to me https://github.com/MicrosoftDX/Vorlonjs very easy to install

$ npm i -g vorlon $ vorlon 

after installation, you need to add this to your app

 <script src="http://localhost:1337/vorlon.js"></script> 
like image 45
Christian Avatar answered Sep 23 '22 22:09

Christian