Page 1 of 1

Getting Blank Screen on iOS App update from Store

Posted: Tue May 30, 2017 7:30 am
by Sithan

Hi,

We are showing a notification screen after login state. When we update an app from the app store, the notification screen becomes blank. This screen looks not refreshing or reset properly. But this works fine (no blank screen) when we un-install the app and install it fresh from the app store.

The above use case doesn't happening when we do update from TestFlight but it happens only in production from App store. Is there any settings or configurations that we need to specify to make the app refresh properly when we update the app from the app store?

It would be great and appreciate you if you could assist us on this issue as earlier as possible since we are about to a next release to the store.

P.S: When we login, we are storing the login user ID in the appery Device collection tables to identify the registered device and the login User.

Looking forward to your quickest response.

Thanks,
SK


Getting Blank Screen on iOS App update from Store

Posted: Tue May 30, 2017 6:41 pm
by Serhii Kulibaba

Hello,

Could you clarify, what functionality do you have on the load/page show events? Please check, does it work without any functions there?


Getting Blank Screen on iOS App update from Store

Posted: Wed May 31, 2017 6:10 am
by Sithan

Hi Serhii,

Thanks for your concern in looking into our issue.

On page show event, we are invoking a method to update the user id and stage name (unique identifier of user) in the device collection tables. This is to identify the user who are all login to the same device and to send the respective device notification of the login users.

Please find below script to update user info from the device the user login.

var app = document.URL.indexOf( 'a href="http://" rel="nofollow"http:///a' ) === -1 && document.URL.indexOf( 'a href="https://" rel="nofollow"https:///a' ) === -1;
if(app)
{
updateuseridappery();
}

function updateuseridappery() {
var cuurentuserdevicetoken = localStorage.getItem('devicetoken_app');
var cuurentuserdeviceID = localStorage.getItem('deviceid_app');

Code: Select all

 //alert(cuurentuserdevicetoken+"token"); 
 if (localStorage.getItem('key')) { 
     var requestBody = { 
         "userid": localStorage.getItem('key'), 
         "stagename": "" + localStorage.getItem('stagename') + "" 
     }; 
 } else { 
     requestBody = { 
         "userid": 0 
     }; 
 } 
 var deviceids = cuurentuserdeviceID.search(';'); 
 if (deviceids != -1) { 
     var deviceids = cuurentuserdeviceID.split(';'); 
     var device = deviceids[0] + "%3B" + deviceids[1]; 
 } else { 
     var device = cuurentuserdeviceID; 

 } 

 $.ajax({ 
     url: "[url=https://api.appery.io/rest/push/reg/]https://api.appery.io/rest/push/reg/[/url]" + device + "", 
     headers: { 
         "X-Appery-App-Id": apperyAppID, 
         "Content-Type": "application/json" 
     }, 
     data: JSON.stringify(requestBody), 
     type: 'PUT', 
     crossDomain: true, 
     dataType: 'json', 
     success: function(data2) { 
         // alert("successssfully device stored"); 
     }, 
     error: function(status, error) { 
         $.mobile.loading('hide'); 
         //navigator.notification.alert("", null, 'Opps! There seems to be an error. Please try again later.'); 
     }, 
 }); 

}

For your information, we get the device token and device id from the local storage variables that has been set on Device ready event as below,

setTimeout(function() {
var deviceid= localStorage.getItem('pushNotificationDeviceID');
var devicetoken=localStorage.getItem('pushNotificationToken');

Code: Select all

 if(devicetoken){ 
     localStorage.setItem('devicetoken_app',devicetoken); 
 } 
 if(deviceid){ 
     localStorage.setItem('deviceid_app',deviceid); 
 } 

}, 1);

Let me know if you need any other details.

Looking forward to your response.

Thanks,
SK


Getting Blank Screen on iOS App update from Store

Posted: Thu Jun 01, 2017 2:25 pm
by Serhii Kulibaba

Please disable all these functions and test the application again. Does it work without them?

If you want us to help you debug the app, please consider purchasing the Advisory Pack service: http://appery.io/service. This service includes app debugging as well as any other custom app help. If this particular issue turns out to be an Appery.io bug, we will credit back the hours spent on this issue and you will be able to use them toward another issue.