wait_fences: failed to receive reply: 10004003 error - UIAlert WITHOUT UITextField present

前端 未结 5 1504
难免孤独
难免孤独 2020-12-01 15:12

I am working on an app where a UIAlert pops up the first time the user begins using it to ask if they want to use their current location. This happens within the main contro

5条回答
  •  被撕碎了的回忆
    2020-12-01 15:33

    The reason for this wait_fences: failed to receive reply: can also be that you try to show an alert while not being on the mainThread (which is the GUI thread).

    Dispatching to the GUI thread helps:

    dispatch_async(dispatch_get_main_queue(), ^{ 
      [mainAlert show];
    });
    

提交回复
热议问题