What makes NSCalendarsUsageDescription required?

后端 未结 5 1255
抹茶落季
抹茶落季 2020-12-24 02:51

When I upload to iTunes Connect, my app gets the error that the NSCalendarsUsageDescription privacy is not provided. I am aware that this information is now man

5条回答
  •  时光说笑
    2020-12-24 02:56

    According to apples documentation:

    NSCalendarsUsageDescription (String - iOS) This key lets you describe the reason your app accesses the user’s calendars. When the system prompts the user to allow access, this string is displayed as part of the alert.

    it then goes on to explain how to implement it:

    Important: To protect user privacy, an iOS app linked on or after iOS 10.0, and which accesses the user’s calendars, must statically declare the intent to do so. Include the NSCalendarsUsageDescription key in your app’s Info.plist file and provide a purpose string for this key. If your app attempts to access the user’s calendars without a corresponding purpose string, your app exits.

    Basically just insert this into you info.plist file

     NSCalendarsUsageDescription
    purpose for using calendar
    

    you can read more about cocoa keys here

提交回复
热议问题