sample-cloudkit-sharing
sample-cloudkit-sharing copied to clipboard
Setting UICloudSharingController.availablePermissions has no effect
In CloudSharingView.swift, sharingController.availablePermissions is set to [.allowReadWrite, .allowPrivate].
According to the documentation, I would expect the user not to be presented the share options "Anyone with the link" and "View only", but running the app these options are available.
I've reached out to the team that owns this controller and will update as soon as I hear back.
I've reached out to the team that owns this controller and will update as soon as I hear back.
Thanks. Any news?
This is still an issue--both in the main and swift-concurrency branch. Is there any fix?
I see this as well, definitely appears to be a bug and an update would be appreciated.
This issue seems to have been resolved in iOS 16 (just tested under Xcode 14.0 beta 6). Now if sharingController.availablePermissions is set to only one of each complementary options, e.g. [.allowReadWrite, .allowPrivate] no NavigationLink will be showed on the UICloudSharingController. The NavigationLink will only be shown if .availablePermissions contains both complementary actions for at least one of the two Share Options sections ("Who can access" & "Permission"), i.e. if the user has a choice at all. Only the relevant Sections will be shown, as described under https://developer.apple.com/documentation/uikit/uicloudsharingcontroller/1649602-availablepermissions.