Jump to content
Sign in to follow this  
Rollo62

Apple GetTimerTick64 - mach_absolute_time: How to handle the NSPrivacyAccessedAPIType privacy?

Recommended Posts

Hi there,

I was looking into the GetTimerTick64 function and see that under Apple products, the mach_absolute_time function is used, to get a precide timer.

Unfortunately Apple requires privacy declarations of mach_absolute_time:
mach_absolute_time    NSPrivacyAPITypes     NSPrivacyAccessedAPICategorySystemBootTime

Quote

NSPrivacyAccessedAPICategorySystemBootTime

    The following APIs for accessing the system boot time require reasons for use.

        systemUptime

        mach_absolute_time()

    In your NSPrivacyAccessedAPITypeReasons array, supply the relevant values from the list below.
 

    35F9.1

        Declare this reason to access the system boot time in order to measure the amount of time that has elapsed between events that occurred within the app or to perform calculations to enable timers.

        Information accessed for this reason, or any derived information, may not be sent off-device.
        There is an exception for information about the amount of time that has elapsed between events that occurred within the app, which may be sent off-device.

    8FFB.1

        Declare this reason to access the system boot time to calculate absolute timestamps for events that occurred within your app, such as events related to the UIKit or AVFAudio frameworks.
        Absolute timestamps for events that occurred within your app may be sent off-device. System boot time accessed for this reason, or any other information derived from system boot time,
        may not be sent off-device.

    3D61.1

        Declare this reason to include system boot time information in an optional bug report that the person using the device chooses to submit. The system boot time information must be prominently displayed
        to the person as part of the report.

        Information accessed for this reason, or any derived information, may be sent off-device only after the user affirmatively chooses to submit the specific bug report including system boot time information,
        and only for the purpose of investigating or responding to the bug report.


For the usual usage of GetTimerTick64(), I would say the 35F9.1 would be most relevant.
I would say this is used in any apps using some kind of internal timing or timerticks behaviour, that will fall under these requirements.
Regarding such funktion, I think they can easily automatically test for this, if your app uses the function, or not, so it should already give a warning in an automated test from Apple Review.

I do not use the absolute boot time, which they claim to be dangerous, but only derived timer ticks informations, which fall under the exception.

My questions are:
- Does the exception above mean, that you don't need to give such informations in the manifest?
   Or do you need to put it there anyway, no matter of exception or not, to declare that you make use of the mach_absolute_time() funtion.

- Did Delphi already took care of this somehow ( I cannot see any of such entries in any manifest )?

- How do you handle this, does anybody include these markers in the manifest?

- Is anybody aware of, that Apple was rejecting an App in the Review, because of this?  

- If yes, how did you solved this with Apple?  Perhaps you could share some logs or noted from their review, how they explain such issue to you.

This would be interesting to clarify, before tapping into another Apple booby trap.
 

Share this post


Link to post
8 hours ago, Rollo62 said:

Or do you need to put it there anyway, no matter of exception or not, to declare that you make use of the mach_absolute_time() funtion.

Yes. In Kastri, I have a "base" privacy manifest that covers this, in this folder, though the reason for mach_absolute_time used is 3D61.1. 35F9.1 is probably more relevant, and I'm not sure why the other one was chosen.

8 hours ago, Rollo62 said:

Did Delphi already took care of this somehow ( I cannot see any of such entries in any manifest )?

Not "out of the box", as yet, as far as I know.

8 hours ago, Rollo62 said:

How do you handle this, does anybody include these markers in the manifest?

See above 🙂

8 hours ago, Rollo62 said:

Is anybody aware of, that Apple was rejecting an App in the Review, because of this? 

If you omit a required reason, Transporter will reject your app when you do an upload. If anyone has used the manifest from Kastri (I have not as yet), they haven't made me aware of any rejections at the review stage 🙂

 

  • Like 1

Share this post


Link to post

Thanks, I will look into it.
Strange, I have never seen such a Transporter issue yet, but time will come :classic_biggrin:
Does it clearly tell you the reason of the rejection?
 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×