Sign in with Linkedin doesn't trigger callback on iOS Safari when using the JS API - mobile-safari

I'm using SignIn with Linkedin on a website, via the JS API. It works fine on the few desktop browsers I've tested (Chrome and FF on Windows, Safari on MacOS), and on a slightly outdated Android Chrome. But it fails on iOS Safari (I use iOS 7).
The issue is that on iOS Safari, the callback passed as argument to IN.User.authorize is not executed.
The line looks like this: IN.User.authorize(this._getProfileData, this);
_getProfileData is executed on the desktop browsers mentioned above and Android Chrome, but not iOS Safari.
This issue can even be reproduced without iOS: via Chrome's developer tools, in device mode for iPhones and iPads.
Any clues?

Unfortunately, LinkedIn's JS SDK is incompatible with iOS 5+ due to the way that Javascript is paused during cross-window communication processes. You will need to fall back to server-side REST calls to ensure 100% platform compatibility.

Since the 1st of May 2019 this is no longer working : https://engineering.linkedin.com/blog/2018/12/developer-program-updates
Sign In with LinkedIn: Sign In with LinkedIn enables members to choose
a more convenient way to log-in to third party apps and allows those
apps to learn more about their new user. This API will only recognize
a new “Lite Profile” permission, which supports a reduced set of
member profile fields. See the documentation for more details.
and
SDKs: Our JavaScript and Mobile Software Development Kits (SDKs) will
stop working. Developers will need to migrate to using OAuth 2.0
directly from their apps.

Related

Why am I receiving Opentok error OT_TIMEOUT "Session.publish :: Could not publish in a reasonable amount of time" in mobile safari over LTE?

I've created an application that leverages the OpenTok libraries. My calls to Session.publish in my application work perfectly when running on desktop browsers (the latest Safari, Chrome, Firefox browsers) over WIFI as well as while tethering to my iPhone over LTE. Calls to Session.publish also work perfectly on iOS Mobile Safari over WIFI.
The problem happens when I try to call Session.publish on iOS Mobile Safari over LTE or 3G. Is there any reason this shouldn't work considering it doesn't look to be a bandwidth issue, nor a networking issue (as it works when I tether from my laptop to the LTE network) ?
Note 1: I've performed the Tokbox precall test # https://tokbox.com/developer/tools/precall/ and the connectivity to the "OpenTok Media Server" fails when running on iOS Mobile Safari over LTE. It's successful when running in every other scenario.
Note 2: I've also run the Tokbox playground tool # https://tokbox.com/developer/tools/playground/ and I get a hanging loading icon in the video window when running on iOS Mobile Safari over LTE. It's successful when running in every other scenario.
Any help or thoughts on this is much appreciated.
You need to contact TokBox support for this. They will check the impacted session log at their end and let you know the root cause.
Thanks!

Phonegap - Does it compile the webpages or simply wrap them

I'm new to Cordova and Phonegap. I've encountered a problem where some CSS3 cannot be displayed properly on my (old) Android.
So I wonder if Phonegap compiles the webpages into code (perhaps Java) or just simply wraps it and uses a native browser to open it.
I ask this is just simply out curiosity and wonder if I can implement ways in other forms to help it render.
Phonegap just uses a WebView (Which is essentailly a browser) control where it displays your webpages. Now each phone uses a different WebView control, and also this control varies among different versions of android. So if some parts of your page are not displayed correctly inside the phone's web browser, they won't show up correctly inside a phonegap app.
UPDATE:
A solution to this problem might be this:
"[Third-party WebViews] are platform-independent so that we no longer
have to deal with issues between Android versions," said Bowser, who
spoke Thursday at OSCON in Portland, Ore. An API will be provided so
that these WebViews work like plug-ins, and Bowser mentioned it will
support the recent Android OSes, such as KitKat, Jelly Bean, and
Gingerbread.

What browser engine does Android use for phonegap?

I'm trying to implement some CSS animations in a phone gap project. The animations run fine on an iOS device but not on my Android. In fact some things like dashed borders aren't even rendering.
Do I need any special vender prefixes for Android within a phonegap project?
PhoneGap uses native browser engines. So in android, it uses WebKit.
From PhoneGap
web view used by PhoneGap is the same web view used by the native
operating system.On iOS, this is the Objective-C UIWebView class; on
Android, this is android.webkit.WebView.Since there are differences in
the web view rendering engines between operating systems, make sure
that you account for this in your UI
This tutorial may be helpful for you. It shows how to target for specific browser(means specific render engine).
Hope this helps!
Take care because since version 4.4 (only) Android does use a Chromium based webview (I think before it was simply a webkit-based webview).
The WebView prior to 4.4 has a bad reputation as far as I've read.
This is another reason to use the Crosswalk project which has a Cordova plugin and permits to embed a specific version of Chromium, so that all your apps are using the same WebView engine no matter the SDK (a a cost of a big APK)

Mobile Browser emulator where Request.Browser.IsMobileDevice=True?

I'm currently testing an ASP.NET Web Application on the "Opera Mobile" emulator.
I've got the following code for testing purposes:
Response.Write(Request.Browser.IsMobileDevice)
This is returning False
Are there emulators which act exactly like a mobile browser, so that this would return True?
It would be a bit of a pain if I have to release the application each time so that I can access it on my actual mobile phone.
I don´t recommend you to use IsMobileDevice directly, because his db is not update. Microsoft launched mdbf, but now it´s abandoned.
You could override it using WURFL or 51degrees. But if you don´t need browser capabilities and you only need to know if it´s mobile device then you can use this script.
You might consider using this component:
https://github.com/51Degrees/dotNET-Device-Detection
It detects mobile browsers far more reliable than the built in detection in .NET

Designing issue in JQuery mobile with asp.net

I am creating mobile application in asp.net webform targeting IPhone, Android and blackberry. I am using JQuery-Mobile for the same.
Below is my first page I have developed with jquery-mobile.
I don't have iphone, android and blackberry. So my questions are:
Best Simulator I can use on windows XP/ Windows Server 2008 for Iphone, Andriod and Blackberry
Also, when I am running the application on the browser it is looking wierd. I mean textbox size, buttons. Is this the way it looks on normal webpage or it's my faulty design?
As I am developing application in asp.net, do I need to install latest browser which support HTML5 and CSS3 because below browser is IE7.
An old IE is not the best choice to test the capabilities of a HTML5+javascript framework...
For daily basis it's quite ok to use Firefox or any WebKit based browser (chrome, safari ...)
Emulators are very helpful, but to be sure your product works well you will probably need to give it a try on an actual device. I have already seen some reports of problems that show up only when working with the real device.
A team that I do some JQM stuff for has bought a cheap old ipod touch for testing. It's the most demanding apple product you can get. It has the oldest browser, causes most problems and is the slowest. Best choice! :)
Emulator for Android
Simulators for Blackberry
I'm sure Apple has one too - but I think you need to register as a iOS developer before you can get your hands on it. I believe using third-party iOS emulators is against Apple's policy.

Resources