Running angularJS in an Captive Network Assistant (WISPr) on iOS and OSX

1.7k views Asked by At

From previous projects I know that Apple's Captive Network Assistant (aka WISPr client, too) runs a restricted browser, see How can I debug the browser in Captive Portal? and Ajax on Captive Network Assistant on iOS and OSX.

My hotspot is running a angularJS web page. On a Windows Phone 8.1 and an OS X Lion my angular page works fine. On my iOS 8.3 there must be a JavaScript error somewhere in the code, because I can see the angular variable expressions {{myVar}} in the code which means the angular framework isn't loaded properly.

Any idea what could be the cause?

2

There are 2 answers

2
mika On BEST ANSWER

Solved

Cause has been found, not by me but a friend of mine. Turns out that the CNA browser (WISPr client) doesn't allow the use of the browser's local storage. Whenever you try to write some data into the local storage, the application crashes. Thus, the solution is either to switch from local storage to normal cookies or to do a user agent detection in JavaScript and exclude CNA browser (WISPr clients) from the use of the local storage.

Many thanks @chedabob, the idea of checking if JS is enabled led to the local storage check. Really appreciate your support.

2
chedabob On

You could possibly use WeinRe to remotely debug it, however if the root of your problem is the Captive Portal view isn't running Javascript, this probably isn't going to help

https://people.apache.org/~pmuellr/weinre-docs/latest/