I recently updated our CloudKit collaboration invite codebase to use the new UIActivityController and NSItemProvider invitation as described in Apple's documentation. We previously used UICloudSharingController's init(preparationHandler:), which is since deprecated.
We have all of the previous functionality in place: we successfully create a CKShare, send the invite out, engage the share, and collaborate. However, we cannot get the Messages CKShare preview to use our custom image and title (henceforth referred to as “collaboration metadata”). Previously, while using UICloudSharingController's init(preparationHandler:) to commence the share invite, the collaboration metadata successfully displayed in the Messages conversation. Now, we have a generic icon of our app and “Shared with App-Name" title, leading to a loss of contextual integrity for the invite flow.
My question: How do we make the collaboration metadata appear in the Messages conversation?
Here is our code for creating the UIActivityController, NSItemProvider, CKShare, and other related entities. It encapsulates the entire CloudKit CKShare invite setup. You will note that we do configure the CKShare with metadata, and we do set the LPLinkMetadata on the UIActivityItemsConfiguration. GitHub Gist.
The metadata does successfully appear in the UIActivityController and the CKShare's image and title are available to the person receiving the share once they engage it and open it in our app – but the Messages preview item retains the generic message content. Also please note that this issue does occur in the production environment.
As a final note, examining UICloudSharingController's definition leads me to believe that supplying a UIActivityItemSource is the key to getting correct Messages collaboration metadata in place. My efforts at using an item adhering to UIActivityItemSource in the UIActivityViewController used to send the share did not yield the rich previews and displayed metadata I am aiming for.
Shared with You
RSS for tagBring your app’s collaboration experiences into Messages and FaceTime, and highlight content from your app that people shared in Messages in a Shared with You section within your app.
Posts under Shared with You tag
6 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I learned Sharplay from the WWDC video. I understand the creation of seats, but I can't learn some of the following contents well, so I hope you can help me. The content is as follows: I have set up the seats.
struct TeamSelectionTemplate: SpatialTemplate {
let elements: [any SpatialTemplateElement] = [
.seat(position: .app.offsetBy(x: 0, z: 4)),
.seat(position: .app.offsetBy(x: 1, z: 4)),
.seat(position: .app.offsetBy(x: -1, z: 4)),
.seat(position: .app.offsetBy(x: 2, z: 4)),
.seat(position: .app.offsetBy(x: -2, z: 4)),
]
}
It was mentioned in one of my previous posts: "I hope you can give me a SharePlay Button. After pressing it, it will assign all users in Facetime to a seat with elements quantified in TeamSe lectionTemplate.", and someone replied to me and asked me to try systemCoordinator.configuration.spatialTemplatePreference = .custom (TeamSelectionTemplate()), however, Xcode error Cannot find 'systemCoordinator' in scope How to solve it? Thank you!
Sharing IPS files produced by my app to my app failed.Only in ios17.
LaunchServices: open operation <NSBlockOperation: 0x606d2abc0> failed with error: Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)" UserInfo={_LSLine=742, _LSFunction=_LSIsRequestValid}
in my app, i use sharelink with SWCollaborationMetadata to share collaboration in Message.when i click send button, the Message shows "An Error Occurred, Unable to start collaboration".
is there sombody to tell me how to fix it?
I am creating an app where i am opening the direct share extension in app for different apps like instagram, snapchat and whatsapp. It is working fine i know there share extension bundle id and it open perfectly. I also need to open the iMessages share extension in app i have found the bundle id of iMessage share extension it is com.apple.UIKit.activity.Message but when i try to open it got error extension not found.
Any one have any idea how i can find the right bundle if for iMessage share extension ?
I am using an iOS SPM package LNExtensionExecutor and create a bridge between React Native and this native package.
Hi,
I am having trouble with Share Play working.
When I create and run the GroupActivity sample in SharePlay, I get the following message and GroupActivity does not work.
https://mitemmetim.medium.com/shareplay-tutorial-share-custom-data-between-ios-and-macos-a50bfecf6e64
Dropping activity as there is no active conversation: <TUMutableConversationActivityCreateSessionRequest 0x2836731c0 activityIdentifier=jp.co.1planet.sample.SharePlayTutorial.SharePlayActivity applicationContext={length = 42, bytes = 0x62706c69 73743030 d0080000 00000000 ... 00000000 00000009 } metadata=<TUConversationActivityMetadata 0x28072d380 context=CPGroupActivityGenericContext title=SharePlay Example sceneAssociationBehavior=<TUConversationActivitySceneAssociationBehavior 0x28237a740 targetContentIdentifier=(null) shouldAssociateScene=1 preferredSceneSessionRole=(null)>> UUID=3137DDE4-F5B2-46B2-9097-30DD6CAE79A3>
I tried running it on Mac and iOS, but it did not work as expected.
By the way, we are also trying the following
https://developer.apple.com/forums/thread/683624
I have no knowledge of GroupActivity; I have Group Activities set in Capability. Do I need to set anything else? Please let me know if you can find any solution to this message. By the way, I am using Xcode 15.2 Beta, iOS 17.1.1 and iOS 17.3 Beta, Mac OS 14.2.1 (23C71).
Best Regards.