Sunday, June 14, 2026
HomeiOS Developmentswift - Greatest approach to implement a shared container so app may...

swift – Greatest approach to implement a shared container so app may be goal for sharing photographs on iOS from photographs library

[ad_1]

I’m on the lookout for a really helpful approach to implement the performance in an IOS app to be a goal app for sharing photographs from throughout the Images Library.

The flexibility to share photographs with my app, from throughout the photographs app on iOS gadgets is vital so the person can management their pictures expertise, selecting the digicam they need and the post-processing expertise they need, earlier than deciding how the picture is for use.

“Take Photograph” -> “Optionally edit picture” -> “Use picture”

is the standard sequence of occasions and the person ought to have the ability to management which app is used for every of the three steps.

As a substitute, proper now, the person does:

“Take picture” -> “Optionally edit picture” -> “Open my app” -> “Launch the PHPhotoPicker to pick out some photographs” -> “seek for after which choose the picture(s)” -> “Use the photographs in my app after they’ve been returned”.

The transfer away from the picture library the place they picture has been edited, into my app, simply to return to the picture library the place the correct picture must be discovered, is a poor person expertise.

The principle issues in implementing the improved person expertise are:

The apple developer references appear targeted on accessing photographs within the picture library from inside my very own app.
e.g.:

I’ve had some success creating the shared container app with a shared app group to allow my app to be a goal for picture sharing utilizing an method that simply up to date the swift code to model 5 in this IOS Share Extension tutorial for iOS 8. The instance code additionally does a pleasant job of utilizing a customized URL to launch my app to point out the photographs which were obtained. Nevertheless:

a) The instance doesn’t work for a couple of sharing operation earlier than having to restart the instance app and I can not but pinpoint why.

b) I can not but share the date and placement info with my app. I encounter permission restrictions. How do I request permission? That is limiting as a result of the photographs are getting used to seed the details about an statement, the place the timing and placement of the statement are virtually as vital as the photographs themselves.

c) I’m unclear on the really helpful approach to retailer knowledge that’s being shared with my app. Consumer default? The file system? Shared entry to core knowledge? the person defaults appears to behave erratically when used to switch giant quantities of knowledge.

d) Untangling the difficulties is sluggish as a result of I can not discover easy methods to view log info generated within the share extension. Proper now, I retailer messages generated within the share extension within the app group person defaults after which log these messages from my predominant app – so ugly.

Insights into any of these 4 points will probably be appreciated.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments