[Interest] Camera not worknig on IOS

Till Oliver Knoll till.oliver.knoll at gmail.com
Tue Jul 7 12:53:36 CEST 2015



> Am 07.07.2015 um 10:50 schrieb Daniel Fran├ža <daniel.franca at gmail.com>:
> 
> Thanks for the answer.
> It seems that we still need to mix with native Cocoa code :( 
> https://forum.qt.io/topic/41071/solved-how-to-store-a-qimage-to-ios-camera-roll-photo-album/3
> https://forum.qt.io/topic/45295/solved-accessing-ios-photo-folder/5

I haven't read the forum entry linked above, but in general your (iOS) application needs special permission from the OS to access the "Photos" folder (unlike on desktop, where its sufficient to set the com.apple.security.assets.pictures.read-only Entitlement - once you have that set, your sandboxed Mac application may access files in the Pictures folder with traditional file IO, that is QFile etc.). (*)

That permission needs to be explicitly asked for by the application, by calling the proper APIs (and Qt does not yet provide a wrapper API for those, so I understand).

QStandardPaths just tells you where the location of "Pictures" is - once your application has the permission from iOS. (On Android similar/the same, I guess).

Cheers,
  Oliver

(*) That Entitlement really means "access to Pictures folder without user interaction. That is, no "Powerbox" file dialog involved.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150707/13f76fcc/attachment.html>


More information about the Interest mailing list