Button Not responsive - IOS

159 views
Skip to first unread message

GG lin

unread,
Oct 26, 2015, 4:39:36 AM10/26/15
to phonegap
Dear All, 

I built an app using Cordova 5.1.1 and I submitted it to iTunes for apple review. 
However, the app was rejected by Apple since Apple review team reported that the "Log in" button was not responsive when tapped. 
Did anyone encounter this kind of problem? i.e. not able to reproduce the bug that reported by Apple review team or un-responsive buttons ?

The details of my App,

Cordova version: 5.1.1
Test divice: iPhone 6+ IOS 9.0.2
Target platform: IOS
Programming language: Jquery mobile + html
OS usd to build the app: Mac
Software used to compiled: Xcode

The code snippet is as following: 
function onclickLogin() {
            var username = $("#user_name").val();
            var password = $("#password").val();
            var deviceTokenParam = window.localStorage.getItem(regId_key);
            if(deviceTokenParam == null) {
                deviceTokenParam = "32e7c1fe27490699eea5ed6ba71f0628e89a528179bdd57ed3fd92der21b8e9c"; //hardcode here
                alert("deviceToken null");
            }
            var str = '{"userId":"' + username + '", "password":"'+ password +'", "os":"' + deviceModel + '", "deviceToken":"' + deviceTokenParam + '", "categoryTimestamp":143675989000, "lang":"en"}';
            console.log("the login str is: " + str);
            
            initWriteFile("username", username); 
            
            console.log("Get from Local: window.localStorage.getItem(regId_key) is: " + window.localStorage.getItem(regId_key));
            console.log("Get from Local: window.localStorage.getItem('categoryList') is: " + window.localStorage.getItem('categoryList'));
            console.log("Get from Local: window.localStorage.getItem('categoryListTimeStamp') is: " + window.localStorage.getItem('categoryListTimeStamp'));
            
            $.mobile.loading( "show" );
            $("body").addClass('ui-disabled');

From the screen shot provided by Apple review team,  the "loading icon" does not show, which means that the in the above code, the following code is not executed yet.
$.mobile.loading( "show" );
$("body").addClass('ui-disabled');

The code seems quite straight forward, why the button is not working? 

Can any one help? 

Jesse Monroy

unread,
Oct 26, 2015, 5:35:06 PM10/26/15
to phonegap
On Monday, October 26, 2015 at 1:39:36 AM UTC-7, GG lin wrote:
Dear All, 

I built an app using Cordova 5.1.1 and I submitted it to iTunes for apple review. 
However, the app was rejected by Apple since Apple review team reported that the "Log in" button was not responsive when tapped. 
Did anyone encounter this kind of problem? i.e. not able to reproduce the bug that reported by Apple review team or un-responsive buttons ?


Did you test the button?

Jesse
 

GG lin

unread,
Oct 26, 2015, 9:12:47 PM10/26/15
to phonegap
Yes, I have tested it on my own device and there is no problem.
But apple review team just told me that it was not working.

Jesse Monroy於 2015年10月27日星期二 UTC+8上午5時35分06秒寫道:

GG lin

unread,
Oct 26, 2015, 11:24:58 PM10/26/15
to phonegap
The app passed Apple's review just now after I appealed to them. 


GG lin於 2015年10月27日星期二 UTC+8上午9時12分47秒寫道:

GG lin

unread,
Nov 1, 2015, 9:53:09 PM11/1/15
to phonegap
Yes. We tested the button on local device, it is OK. 


Jesse Monroy於 2015年10月27日星期二 UTC+8上午5時35分06秒寫道:

GG lin

unread,
Nov 2, 2015, 1:38:45 AM11/2/15
to phonegap

I would like to discuss more on our case.

 

Although Apple Review Team has accepted the app, we still experience it as an intermittent error; we have one reported case so far.  The victim is using iPhone 5, newly upgraded to v9.1.  She was able to install it from App Store, successfully operated the app on the first day but failed again (same Button not responsive error) from second day and onward. 

 

We had tried to simulate the error using other resources but in vain; we tried iPad, iPhone 4, 5S, (another) iPhone 6, 6 S Plus, all showed positive results.

 

Does anyone have any idea on this problem?  Is it possible that it is related to the speed of the processor of the phone?

 

We are really stuck and puzzled.  We appreciate any help from you.  Thanks in advance!



GG lin於 2015年10月26日星期一 UTC+8下午4時39分36秒寫道:

mharr

unread,
Nov 2, 2015, 11:03:24 AM11/2/15
to phonegap
How are you binding your "onclickLogin" function to the button?  Are you using jQuery.on("click") or similar, and if so, are you waiting for jQueryMobile's mobileinit event before doing this?

Also suggest that you move the mobile.loading("show") and addClass(".ui-disable") to the top of your function, so that user gets loading indicator while all your onclick code is running (especially while that initWriteFile function is working).  An unhandled js error in that code could just get swallowed and it would appear the button is unresponsive since it never got to the mobile.loading statement.

GG lin

unread,
Nov 3, 2015, 8:41:17 PM11/3/15
to phonegap
Thank you for you reply. 
I will follow your suggestions and doing more testing after the I enhance the code. 
I will let you know if I have any updates. 

mharr於 2015年11月3日星期二 UTC+8上午12時03分24秒寫道:

Jesse Monroy

unread,
Nov 3, 2015, 11:03:51 PM11/3/15
to phonegap
@mharr

I'm sure you know, but just throwing this out. inline Javascript is being phased out with the new CSP security protocol.
This should NOT effect IOS, even iOS9, but I have not been following this thread that well.

(BAD) Solution: turn off ALL whitelist security.
https://github.com/jessemonroy650/top-phonegap-mistakes/blob/master/the-whitelist-system.md

Better Solution: walk through worksheet.
https://github.com/jessemonroy650/top-phonegap-mistakes/blob/master/whitelist-matrix.md#csp

Best of Luck
Jesse

Jesse Monroy

unread,
Nov 3, 2015, 11:09:05 PM11/3/15
to phonegap
@mharr,
this should also not affect JQuery.
Jesse

Reply all
Reply to author
Forward
0 new messages