UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Day22, Project 3: "[ShareSheet] connection invalidated" error

Forums > 100 Days of Swift

I followed the video and added the "Privacy - Photo Library Additions" to the infolist. When I try to save an image though I get this error message: [ShareSheet] connection invalidated. Does anyone know how to fix this?

3      

And the image is saved? If not check if you have correct key in Info.plist

Also Xcode likes to display these kinds of messages pretty often. If you app works and the error message does not appear serious I would say dont worry about it.

3      

Oh ok. I thought it wasn't saving the image but it actually is. Thanks for the help!

3      

Does "Twitter", "Facebook", "Whatsapp", etc. show up on the Sharesheet only if the user had downloaded the respective apps on her phone? Does it appear automatically or is there some process to include it on the Sharesheet?

3      

The first challenge for Project 3 is:

Try adding the image name to the list of items that are shared. The activityItems parameter is an array, so you can add strings and other things freely.

If I do:

vc = UIActivityViewController(activityItems: [image, "photo1.jpg"], applicationActivities: [])

what happens when I select "Copy" or "Print" in the Sharesheet? Is the image and the string name both copied? What would it do with these two pieces of data if I later select "Paste" in another app, or what will be printed on the printer? I don't get it.

3      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.