Search Unity

My app can only be played on iOS 11. "safeAreaInsets" is only available on iOS 11.0

Discussion in 'iOS and tvOS' started by Sir-Magic, Jun 25, 2018.

  1. Sir-Magic

    Sir-Magic

    Joined:
    Jul 20, 2015
    Posts:
    50
    Hi,

    I just finished my game and it has a warning in Xcode saying "'safeAreaInsets' is only available on iOS 11.0 or newer". I'm getting this error from a class called Keyboard.mm, which is strange seeing as my game never uses any keyboard functionality. I would like my game to be available on older versions of iOS, what can I do?
     
  2. kluepfel

    kluepfel

    Joined:
    Feb 20, 2018
    Posts:
    1
    I get the same warning, but the app runs on my iOS 9 iPad.

    The safeAreaInsets is new in iOS11 to let iOS developers avoid UI that would otherwise block your UI (including the iPhone X notch). If you use it from earlier iOS versions, it always returns 0 (i.e. no insets).

    So this warning should be safe to ignore.
     
    Sir-Magic likes this.
  3. Sir-Magic

    Sir-Magic

    Joined:
    Jul 20, 2015
    Posts:
    50
    Yep, can now confirm this is correct (app is on appstore).