Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

iOS crahes: UnityNotificationData

Discussion in 'iOS and tvOS' started by Zagrava, Oct 21, 2021.

  1. Zagrava

    Zagrava

    Joined:
    Jul 18, 2016
    Posts:
    2
    After updating a Unity project to 2019.4.30f, the iOS build started crashing in the script UnityNotificationData.m. I've got a log from Firebase Crashlytics:
    Fatal Exception: NSInvalidArgumentException
    *** +[NSJSONSerialization dataWithJSONObject: options:error:]: Invalid top-level type in JSON write
    ___ReadNSDictionary_block_invoke + 227

    The most amount of crashes is on iOS 14 and 15.
     
  2. BojanJC

    BojanJC

    Joined:
    Mar 4, 2019
    Posts:
    1
    We were able to reproduce the crash with Xcode 13. Reverting to Xcode 12.5.1 resolved the crash.
     
  3. thomas_triplefun

    thomas_triplefun

    Joined:
    Sep 24, 2014
    Posts:
    25
    I've got the same here, after updating to xcode 13. It happens with the app built with xcode 12 installed on the phone and when I update it from an app built with xcode 13. From fresh install (without app installed before) it works.