1 Reply
      Latest reply on Jan 8, 2017 1:24 PM by eskimo
      Henrik Jensen Level 1 Level 1 (0 points)



        I'm having an issue with CallKit and PushKit that I would like some feedback on.

        The following is happening in my VoIP application


        1. Locked device
        2. PushKit notification wakes up my app
        3. CallKit triggers incoming call UI
        4. User answers call
        5. App needs to read critical files from disk but files are protected


        After the user answers the call in step 4 the application needs to read configuration details from the disk, otherwise it cannot into my VoIP backend. But the file system is protected and cannot be accessed before the user launches my app from the CallKit UI.


        Am I doing this wrong?

        How am I supposed to get access to the protected files? My app doesn't set NSFileProtectionComplete in the entitlements file.

        • Re: CallKit, getting access to protected files?
          eskimo Apple Staff Apple Staff (13,345 points)

          App needs to read critical files from disk but files are protected

          If you need to access files from background code, you should explicitly set the file protection on those files to allow that access.  Most folks use NSFileProtectionCompleteUntilFirstUserAuthentication but that may not work for a VoIP app where, IIRC, the VoIP can ‘ring’ before first unlock.  If that’s the case, your only option is NSFileProtectionNone.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"