ios ui not reacting to touch events, no errors, no crash, nothing to indicate what is wrong.

ok so to start i am working on a cross platform project for work. i basically could just use a hand narrowing down what is causing an issue with the ios side of the project. Android works perfectly and as i want it to for now. ios did work as expected last week when i last updated its code and tested it.

i have a log in page. (displays page fine no issues, opens up sign up page as well and navigates back when button is pushed)

log in works, i have set breakpoints and followed code through this part. it hits the api and returns server status code gets users profile data and token information and opens the "masternav"(master detail page)

after it "logs in" this is where is just stops doing anything. the menu does not open, none of masterdetail detail page buttons can be hit. i set break points on each click function and nothing. the console only shows :

[0:] OK
[0:] 4
[0:] eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6Im1hdHRwQG5lc2RhLmNhIiwic3ViIjoibWF0dHBAbmVzZGEuY2EiLCJqdGkiOiIwOTQyNTE4NS00MzRiLTQyNmItYjMxMS1lYTdiNzIzMzQ5ZGIiLCJpYXQiOiIxLzE1LzIwMTggNzoyNjo1MiBQTSIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6IjQiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiI0IiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy92ZXJzaW9uIjoiMSIsIm5iZiI6MTUxNjA0NDQxMiwiZXhwIjoxNTE2MDQ4MDEyLCJpc3MiOiJIZXJlMldvcmsiLCJhdWQiOiJIZXJlMldvcmsifQ.fz7iZaMjAZ2hfnz2NbMMgZjsYScPAbDLxG_PesuRZ-uGgi6sAxK7D0STxwNYsVr1JOVPh50VlCUtZqNM5f_1eQ
[0:] 2018-01-15T19:26:52.1687068Z
[0:]
[0:]
[0:] OK
[0:] Get profile was successful
[0:] Matt Perley
[0:] coming alive again....

^^^is the output of the log in function. the really weird thing is while im writing this question im now getting some new messages:

2018-01-15 14:26:57.813 VolMobile.iOS[267:28155] <_UISystemGestureGateGestureRecognizer: 0x17419b450>: Touch: Failed to receive system gesture state notification before next touch
2018-01-15 14:26:57.813 VolMobile.iOS[267:28155] <_UISystemGestureGateGestureRecognizer: 0x17419b380>: Gesture: Failed to receive system gesture state notification before next touch
2018-01-15 14:26:58.285 VolMobile.iOS[267:28155] <_UISystemGestureGateGestureRecognizer: 0x17419b450>: Touch: Failed to receive system gesture state notification before next touch
2018-01-15 14:26:58.286 VolMobile.iOS[267:28155] <_UISystemGestureGateGestureRecognizer: 0x17419b380>: Gesture: Failed to receive system gesture state notification before next touch

2018-01-15 14:27:00.014 VolMobile.iOS[267:28155] Cannot snapshot view (>) with afterScreenUpdates:NO, because the view is not in a window. Use afterScreenUpdates:YES.

other than the console output above there is no indication of an error, builds and deploys fine, as i said i can go through the log in process but as soon as i hit the landing page it just freezes, no crash, error, nothing.

the only major changes i have made in last week was adding an android background location service to the app and its not even mentioned in the pcl anywhere and its pretty bare bones, literally just the service that gets your location every minute. there is no background service for ios yet as that was the intended goal of today. besides that i cleaned up several functions/methods to get rid of spagetti code. but none of those changes broke the android app.

android works perfectly fine as it always has, its just ios giving an issue.

--i swear ive read that there were time limits on functions running or something on ios?

--could my log in process be running to long causing an error?

--is there a limit to http calls per second or something? because i am hitting one api and then making another call to 2 seperate endpoints a few times for different data.

--yes i am googling as i go. no im not a noob, however this is likely an issue i have caused i wont deny it lol.
i was trying to clean the app up so it didnt look like shit and making the code reusable as i have recently finished developing all of the concepts.

i can take pics and images but as this project is confidential and this is my first professional developer job i am going to try and avoid just posting them publicly, please feel free to request them to provide assistance, personally i dont mind sharing code but my boss does.

if anyone would possibly know whats going on please let me know. im going to continue looking into this while i wait so hopefully i will be able to resolve this issue on my own.

i am kind of new to xamarin and mobile development but not to programming or c#. i hope this makes sense as i am very frustrated and tired of looking at this so i may not come off as coherent as id like.

thank you to anyone who can try and shed some light on this.
Matt

Best Answer

  • Matt_PerleyMatt_Perley CA ✭✭
    Accepted Answer

    lmao found it. Thank you @JohnHardman, i gave you a like . it turned out to be none of the above. it was a series of custom gestures i had been developing that caused the issue. i have removed them on ios and now the ios version works fine again.

Answers

  • JohnHardmanJohnHardman GBUniversity mod
    edited January 2018

    @Matt_Perley - Without code it's impossible to say. However, you might want to check (in this order):

    (1) Consider turning off Multitasking Gestures in the Settings panel
    (2) Are you doing too much work on the UI thread? You need to allow the o/s to process any UI interactions from the user, so if you have anything CPU intensive happening on the UI thread, that could be the problem
    (3) Are you attempting to interact with the UI from a thread other than the UI thread? See Device.BeginInvokeOnMainThread
    (4) Have you set InputTransparent on any Views?
    (5) Are you using RelativeLayout?

  • Matt_PerleyMatt_Perley CAMember ✭✭

    i know 100 percent how difficult it is without code to troubleshoot, and i apologize for the lack of a visual.

    ive come accross the gesture suggestion already and have turned it off (currently still off)

    im not using relative layout, the page that loads in is only using a gridview on a content page with 1 button, some minor ui experiments (e.g. rounded stacklayouts) and a background image. all of these items were there when i had the ios version working last week.

    and no in this situation i am not using input transparent.

    basically what happens is :

    this line wont be used by end users just me:
    string NewStr = Services.UriServices.GetAppVersion.NameStripper(str); <--strips @alpha/@beta out of user name so it can determine what server to hit.

    RtnVal = await LoginService.logInService(NewStr, PassWord.Text); <--log in button clicked

    enter log in function:
    try
    {
    HttpClient client = new HttpClient();
    var jsonString = JsonConvert.SerializeObject(jsonObject); //serialize data into json string
    var content = new StringContent(jsonString, Encoding.UTF8, "application/json");
    var result = await client.PostAsync(uri, content); //attempt to log in...
    Debug.WriteLine(result.StatusCode); //send the result to the console.
    if (result.StatusCode == System.Net.HttpStatusCode.OK) //if response is ok...
    {
    var resultContent = await result.Content.ReadAsStringAsync();
    var TokenCreation = await LogInHelper.CreateTokenFromData(resultContent); <--this creates the bearer token model and fills with data from server response....
    if (TokenCreation == true)
    {

        var logHelp = await LogInHelper.DataSerializer(resultContent, username); <--saves the users token for nonruntime    purposes (im changing this soon)
    }
    

    }


    example of TokenCreation --------------------------------------
    try
    {
    if (JsonData != null || JsonData != "")
    {
    var tm = JsonConvert.DeserializeObject(JsonData);
    AppData.AppData.AccessToken = tm;
    Debug.WriteLine(tm.profile_id);
    Debug.WriteLine(tm.access_token);
    Debug.WriteLine(tm.issue_date);

                    AppData.AppData.logState = AppData.AppData.LoggedInStatus.online; //set the app to online if there is a connection
                    RtnVal = true;
    

    }

    example of DataSerializer--------------------------------------------

    try
    {
    if (AppData.AppData.RememberMe == true)
    {
    if (TokenData != null && username != null || TokenData != "" && username != "")
    {
    AppData.AppData.UsersName = username; //sets username
    Debug.WriteLine(AppData.AppData.UsersName);
    AppData.AppData.UsersTokenCache = TokenData; //sets token..
    Debug.WriteLine(AppData.AppData.UsersTokenCache);
    RtnVal = true;
    }
    }

                if (AppData.AppData.RememberMe != true)
                {
                    AppData.AppData.UsersName = null; //sets username
                    Debug.WriteLine(AppData.AppData.UsersName);
                    AppData.AppData.UsersTokenCache = null; //sets token..
                    Debug.WriteLine(AppData.AppData.UsersTokenCache);
                    RtnVal = true;
    

    }

    then after the api responds with response code of ok ....

    procede with a getProfile http call. --> if remember me is true cache profile data
    another http call to the geofence/geozone endpoint --> if remember me true cache geofence data

    then it displays the home page.

    theres alot of other code and an auto login function as well as offline log in.

    literally this all worked before i implemented the location background service to android, after that this whole ios thing went to heck in a handbasket.

    i havent seen any errors regarding memory or warnings as i took care of those last week. im sure i could utilize the uithread some more but that page itself has very very little anything on it.

    ill try and get a few images.
    thank you for a really seepdy response though! very appreciated. hope my rant here is not to overwhelming, i would image its hard to read again apologies.

  • Matt_PerleyMatt_Perley CAMember ✭✭





    /

  • Matt_PerleyMatt_Perley CAMember ✭✭
    Accepted Answer

    lmao found it. Thank you @JohnHardman, i gave you a like . it turned out to be none of the above. it was a series of custom gestures i had been developing that caused the issue. i have removed them on ios and now the ios version works fine again.

  • JohnHardmanJohnHardman GBUniversity mod

    @Matt_Perley - LOL - I thought about listing that as the first thing to check, but discounted it as so few people write their own custom gesture handlers that I assumed you hadn't. Ah well. BTW - have you checked out MR.Gestures? It may already do what you need, and is very good value.

  • Matt_PerleyMatt_Perley CAMember ✭✭

    i have and i would like to use mr.gestures in the future as it does look very nice. just waiting for approval to be able to do so. and our apps are using alot of custom code and im templating it all as i go to create our own plugins for future development. and yaa i got in to work today and was looking through my code saw the CustomGestureListener class and kinda thought hey what if xD that what if solved the issue.

Sign In or Register to comment.