Search Unity

iOs 13 - systematic crash

Discussion in 'iOS and tvOS' started by Arthur_VR, Sep 23, 2019.

  1. Arthur_VR

    Arthur_VR

    Joined:
    Jun 18, 2019
    Posts:
    2
    Hello,

    Since the iOs 13 update, one of our 2 main apps is having quite the problem : it systematically crashes just after opening. To be precise, our first session runs perfectly, but every next one crashes just after the splashscreen.

    Since the crash seems to occur when we first load some (PlayerPrefs) datas saved on the 1st run, we suspect it might (somehow) come from it being corrupted at the 1st session being closed, but we don't have much confidence about that conclusion.

    We originally archived it through Xcode 10, but updating to Xcode 11 didn't solve the issue.

    We use few external SDKs (Firebase for remote notifications, and Gamesparks for our server communication), and those are also used on our other game, which doesn't have any trouble with iOs 13. The few Xcode Capabilities we use are the Push Notifications, the In-App Purchase, and the BackgroundMode "Remote notifications" (but again, those are the same on our working game). Our bugged-on-iOs13 game doesn't have any problem on both Android and WebGL, the other 2 platforms we build for. It also doesn't have any trouble on iOs10/11/12.

    We were wondering if maybe somebody else met a similar problem, and/or if there was a known practice or patch about it.

    Thanks in advance
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. Arthur_VR

    Arthur_VR

    Joined:
    Jun 18, 2019
    Posts:
    2
    Hi,

    Sorry for the delay, but after getting our hands on devices' log we started investigating, and we actually solved our problem!

    Just to share the intel, ultimately it came down to a cached file path containing one more "/" than necessary, in a very specific case on our end. It seems this was handled well before, but is not tolerated anymore for some reason (it results in an Uncaught exception: NSInvalidArgumentException: -[NSURLResponse allHeaderFields]: unrecognized selector sent to instance on the WWWConnection.mm file, line 180). Solving this path problem solved our systematic crash on iOS 13

    Thanks for the reactivity anyway :)
     
    joliao likes this.
  4. plolley

    plolley

    Joined:
    Dec 19, 2014
    Posts:
    7
    I had the same problem and it was because of too many '/' characters when loading 'file://' URIs on iOS.

    This page helped:
    https://docs.unity3d.com/ScriptReference/WWW.html

    Notes http://, https:// and file:// protocols are supported on iPhone. ftp:// protocol support is limited to anonymous downloads only. Other protocols are not supported.

    Note: When using file protocol on Windows and Windows Store Apps for accessing local files, you have to specify file:/// (with three slashes).​

    Thanks! :)
     
  5. chrisendicott

    chrisendicott

    Joined:
    Apr 19, 2017
    Posts:
    8
    We had a similar problem on iOS 13 with file:/// paths, which have previously worked perfectly on previous versions of iOS. Fixed by reducing to file://, but still not sure of the underlying cause.

    Thanks to the above posters for their insights!