• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
'UNUserNotificationCenter' is only available on iOS 10.0 or newer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'UNUserNotificationCenter' is only available on iOS 10.0 or newer


  • Subject: 'UNUserNotificationCenter' is only available on iOS 10.0 or newer
  • From: Steve Christensen <email@hidden>
  • Date: Fri, 12 May 2017 10:30:01 -0700

Xcode 8.3.1, iOS SDK 10.3, iOS deployment target 9.0, Obj-C.


I am including an import of <UserNotifications/UserNotifications.h> in the target's prefix file. I am seeing a bunch of warnings in UNUserNotificationCenter.h that point here:

__IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
@interface UNUserNotificationCenter : NSObject	<— 1. 'UNUserNotificationCenter' has been explicitly marked partial here

The build log shows them associated with one of my .m source files that conditionally uses UNNotificationCenter on 10.0 and later, but it doesn't actually tag any of the source lines. It doesn't appear for any other source file, even though the prefix file is applied to all of them.

I haven't seen these warnings in the last few versions of Xcode but I just started noticing this after I updated to Xcode 8.3.1. I have appended a relevant section of the build log below.

Is there something that I should be doing now to deal with this warning? Ideally I don't want to just disable the warning globally but rather deal with the underlying cause for why it's appearing for this particular file.

Thanks,
Steve

-------------------
warning: 'UNUserNotificationCenter' is only available on iOS 10.0 or newer [-Wunguarded-availability]
In file included from …/MessageManager.m:1:
In file included from …/Prefix.pch:44:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.h:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h:34:12: note: 'UNUserNotificationCenter' has been explicitly marked partial here
@interface UNUserNotificationCenter : NSObject
           ^
note: enclose 'UNUserNotificationCenter' in an @available check to silence this warning
warning: 'UNUserNotificationCenter' is only available on iOS 10.0 or newer [-Wunguarded-availability]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h:34:12: note: 'UNUserNotificationCenter' has been explicitly marked partial here
note: enclose 'UNUserNotificationCenter' in an @available check to silence this warning
warning: 'UNUserNotificationCenter' is only available on iOS 10.0 or newer [-Wunguarded-availability]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h:34:12: note: 'UNUserNotificationCenter' has been explicitly marked partial here
note: enclose 'UNUserNotificationCenter' in an @available check to silence this warning
warning: 'UNUserNotificationCenter' is only available on iOS 10.0 or newer [-Wunguarded-availability]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h:34:12: note: 'UNUserNotificationCenter' has been explicitly marked partial here
note: enclose 'UNUserNotificationCenter' in an @available check to silence this warning
warning: 'UNUserNotificationCenter' is only available on iOS 10.0 or newer [-Wunguarded-availability]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h:34:12: note: 'UNUserNotificationCenter' has been explicitly marked partial here
note: enclose 'UNUserNotificationCenter' in an @available check to silence this warning
warning: 'UNUserNotificationCenter' is only available on iOS 10.0 or newer [-Wunguarded-availability]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h:34:12: note: 'UNUserNotificationCenter' has been explicitly marked partial here
note: enclose 'UNUserNotificationCenter' in an @available check to silence this warning
6 warnings generated.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: 'UNUserNotificationCenter' is only available on iOS 10.0 or newer
      • From: Devin Coughlin <email@hidden>
  • Prev by Date: Both Xcode or codesign fail behind a proxy (timestamp not found)
  • Next by Date: Problem with Storyboard
  • Previous by thread: Re: Project and header searchpaths for iOS in a workspace
  • Next by thread: Re: 'UNUserNotificationCenter' is only available on iOS 10.0 or newer
  • Index(es):
    • Date
    • Thread