Home/Code tips/Handling the new iOS 10 privacy settings

Handling the new iOS 10 privacy settings

Views:
49

With the introduction of iOS 10, a number of privacy settings need to be handled in your Delphi apps.

You may have arrived at this post because you’ve installed Delphi 10.1 Berlin Update 1, installed Xcode 8 on your Mac, added the iOS 10 SDK to Delphi, recompiled your app that uses the camera or other “private” service, only to find it crashes when it attempts to access that service. You’re in luck because it’s a fairly simple fix. There’s a fairly comprehensive article on the Xamarin blog site that covers the ins and outs of what privacy settings are now required, so I won’t go into that here. What I’ll describe here is what you need to do in Delphi in order to fix the problem.

In your project options, select an iOS platform that supports the services that you need to set usage descriptions for (usually just iOS Device 32 bit and/or iOS Device 64 bit), select the Version Info section, and right-click the list of options:

2016-09-21_13-00-05

Click the “Add Key” item, and enter the name of the key corresponding to the usage description:

2016-09-21_13-00-43

..and click OK. Then click into the edit area next to the entry with that key, and enter a description that’s meaningful. In my case, the camera is being used for scanning of QR codes:

2016-09-21_13-01-16

..and click OK. You’ll need to do this for each service that requires a description (see the article on the Xamarin blog site).

That’s it!

 

By | 2017-02-19T07:02:32+00:00 September 21, 2016 5:14 pm|Code tips|0 Comments

About the Author:

Leave a Reply

Show Buttons
Hide Buttons