I am using custom code to log a user in to my app. I had raised a previous support ticket which helped me to get the code working - Custom code login help needed
The problem I have is that this is failing for users on iOS device. The code is exactly the same for both
I have 2 questions:
1 - is there anything in this code that you would think means that login would fail for iOS users?
2 - i would like to return the error information as a variable in UI Builder so I can troubleshoot what the error is. How would I do that? I thought āreturn errorā on line 50 but this isnāt working.
Hi Alexander, I donāt know how to access this. Where would I see the error message?
I was thinking of returning it from the custom code and setting it as a variable and then emailing this to myself. But Iām sure thereās an easier way.
On the GoNative side it is possible the gonative.auth module is not loaded when you are calling the status function. Try adding this within a gonative_library_ready() function. See the section on āCalling Commands on Page Loadā JavaScript Bridge Overview
Regarding the JavaScript you are using to facilitate the login it is likewise possible that function is not yet loaded so you could check it is available before calling.
iOS and Android both vary across devices on these points.
Perhaps a new test page with only the code we need will be useful.
But first, could you check if the logs will be in real time logging if you login with android (or other successful way)?
Great! So, if there was an error when logging from iOS, it would also be logged.
I think you need to make changes to the code based on the recommendations you received from GoNative and test this case.