Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug iOS Universal Link - Crashing on Cold Boot

Discussion in 'iOS and tvOS' started by Npicouet, Mar 7, 2024.

  1. Npicouet


    May 17, 2018
    Hello! I'm running into an issue with Universal Links. It works fine when the app is suspended.
    When the app is cold booted from a universal link, it hangs indefinitely on a black screen.

    I've logged the errors in Unity and it seems to come from this section of code during launch.
    I've attached pictures of the logged threads as well.

    I do have Firebase in the app for other purposes as you can see in the logged thread.
    Is this a Unity bug, or a collision between Firebase and Unity? Any way to fix this?

    Code (CSharp):
    1. - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
    2. #if defined(__IPHONE_12_0) || defined(__TVOS_12_0)
    3.     restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring> > * _Nullable restorableObjects))restorationHandler
    4. #else
    5.     restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler
    6. #endif
    7. {
    8.     NSURL* url = userActivity.webpageURL;
    9.     NSLog( @"url is %@", url);
    10.     if (url)
    11.         UnitySetAbsoluteURL(url.absoluteString.UTF8String);
    12.     return YES;
    13. }

    Attached Files:

  2. Evaldas_Unity


    Unity Technologies

    Jun 23, 2016
  3. SebastianDudzicSPL


    Jul 5, 2022
    Hey. I have same problem on iOS only. It started after Unity update from 2021.3.23 to 2021.3.36.
    Any updates on this issue?