sample-cloudkit-sharing icon indicating copy to clipboard operation
sample-cloudkit-sharing copied to clipboard

Setting UICloudSharingController.availablePermissions has no effect

Open mmklug opened this issue 4 years ago • 5 comments

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.

mmklug avatar Jul 02 '21 09:07 mmklug

I've reached out to the team that owns this controller and will update as soon as I hear back.

sjrmanning avatar Aug 09 '21 20:08 sjrmanning

I've reached out to the team that owns this controller and will update as soon as I hear back.

Thanks. Any news?

mmklug avatar Sep 30 '21 21:09 mmklug

This is still an issue--both in the main and swift-concurrency branch. Is there any fix?

ericboles avatar Mar 26 '22 17:03 ericboles

I see this as well, definitely appears to be a bug and an update would be appreciated.

stanlemon avatar Jun 26 '22 03:06 stanlemon

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.

mmklug avatar Aug 24 '22 15:08 mmklug