0

I have the same problem to develop the iOS application with Delphi XE 10.2. update 3 My application will crash when I click save image (save to camera roll) using IFMXPhotoLibrary.

It happened with iPhone 8 iOS 12.

I am using:

Delphi Tokyo 10.2 update 3, Hotfix: Delphi Tokyo 10.2.3 (HotFix 05.2018), PAServer: Version 10.3.1.10, Xcode: 10.0, Xcode command line tools: 9.4.1

Below is source code:

if TPlatformServices.Current.SupportsPlatformService(IFMXPhotoLibrary, Service) then
     Service.AddImageToSavedPhotosAlbum(imageMain.Bitmap);

I have already added a new key, NSPhotoLibraryUsageDescription, to the Version Information section of the project options. The value is be any text that will be displayed when the application requests permission to use the camera roll.

  • Due to (even more) changes in iOS 11, you need to provide a description for usage of adding photos to albums. In Project Options, go to the Version Info section and add the key: NSPhotoLibraryAddUsageDescription and an appropriate description – Dave Nottage Oct 11 '18 at 00:27
  • The NSPhotoLibraryAddUsageDescription key was provided "App need access library photos". The App continue to crashing. – Alexandre Sales Oct 11 '18 at 12:29
  • Then you have either not added it correctly, or the app is crashing for another reason. Please check whether your Project Options look like this: https://raw.githubusercontent.com/DelphiWorlds/KastriFree/master/Configuration/NSPhotoLibraryAddUsageDescription.png. I believe the key is case-sensitive. If you have that correct, use the Console app on the Mac (in Applications/Utilities) to check the logs as to why the app is crashing and/or provide a callstack from Delphi if available – Dave Nottage Oct 11 '18 at 12:56
  • Yes thanks. Now it worked. The key is case sensitive. Just add the NSPhotoLibraryAddUsageDescription key. Thank you @DaveNottage. – Alexandre Sales Oct 11 '18 at 13:55

0 Answers0