I am trying to add CloudKit sharing to my app using the new iOS 15 share method
https://developer.apple.com/documentation/coredata/nspersistentcloudkitcontainer/3746834-sharemanagedobjects
In the app there are 3 core data entities (Folder, Item, Comment) with the following relationships:
A Folder contains many Items
An Item has many Comments
I want to use CloudKit to share just the Item entity, not any of its relationships. Is this possible to do with the share(_:to:completion:) method?
Currently, when I pass an Item to the share method it also includes the Folder and Comments in the CKShare. How do I prevent this?
A similar question was posted here with no response: https://developer.apple.com/forums/thread/697630
Post
Replies
Boosts
Views
Activity
I am trying to add CloudKit sharing to my app using the new iOS 15 share method https://developer.apple.com/documentation/coredata/nspersistentcloudkitcontainer/3746834-share
In the app there are 3 core data entities (Folder, Item, Comment) with the following relationships:
A Folder contains many Items
An Item has many Comments
I want to use CloudKit to share just the Item entity, not any of its relationships. Is this possible to do with the share(_:to:completion:) method?
Currently, when I pass an Item to the share method it also includes the Folder and Comments in the CKShare. How do I prevent this?
I updated to beta 4 and started getting this error when I try to apply the .sidebar appearance to the primary view of a UISplitViewController.
To replicate this issue I modified the 'Modern Collection Views' sample code to use a UISplitViewController and set the primary view to be the sample code.
As soon as the primary view becomes visible, the app crashes with this error
2020-08-05 08:34:36.582560-0500 Modern Collection Views[38363:6217715] * Assertion failure in -[UIListContentConfiguration _enforcesMinimumHeight], UIListContentConfiguration.m:470
2020-08-05 08:34:36.605817-0500 Modern Collection Views[38363:6217715] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unknown style: 10' First throw call stack:
(
0 CoreFoundation 0x00007fff20438fda __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff2017712e objc_exception_throw + 48
2 CoreFoundation 0x00007fff20438e03 +[NSException raise:format:] + 0
3 Foundation 0x00007fff20785e3a -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 UIKitCore 0x00007fff24782071 -[UIListContentView _intrinsicSizeWithinSize:] + 600
5 UIKitCore 0x00007fff2478128b -[UIListContentView systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:] + 107
6 UIKitCore 0x00007fff23d27d81 -[UICollectionViewCell systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:] + 310
7 UIKitCore 0x00007fff23d23950 -[UICollectionReusableView preferredLayoutAttributesFittingAttributes:] + 392
8 UIKitCore 0x00007fff23d233af -[UICollectionReusableView _preferredLayoutAttributesFittingAttributes:] + 65
9 UIKitCore 0x00007fff23cbba01 -[UICollectionViewListCell _preferredLayoutAttributesFittingAttributes:] + 168
10 UIKitCore 0x00007fff23ce998a -[UICollectionView _checkForPreferredAttributesInView:originalAttributes:] + 557
11 UIKitCore 0x00007fff23cea626 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] + 879
12 UIKitCore 0x00007fff23cea2b1 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:] + 31
13 UIKitCore 0x00007fff23cef8e9 -[UICollectionView _updateVisibleCellsNow:] + 6166
14 UIKitCore 0x00007fff23cf4aad -[UICollectionView layoutSubviews] + 351
15 UIKitCore 0x00007fff24b4d822 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2874
16 QuartzCore 0x00007fff27a1c60f -[CALayer layoutSublayers] + 258
17 QuartzCore 0x00007fff27a22ac1 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 575
18 UIKitCore 0x00007fff24b38f8c -[UIView(Hierarchy) layoutBelowIfNeeded] + 573
19 UIKitCore 0x00007fff24b4041d +[UIView(Animation) performWithoutAnimation:] + 84
20 UIKitCore 0x00007fff23e7759b -[UIPanelController _animateFromRequest:toRequest:withAffectedSides:forceOverlay:velocity:] + 1936
21 UIKitCore 0x00007fff23e78173 -[UIPanelController animateToRequest:forceOverlay:withVelocity:] + 611
22 UIKitCore 0x00007fff23ea7dfa -[UISplitViewControllerPanelImpl _transitionFromDisplayMode:toDisplayMode:] + 1100
23 UIKitCore 0x00007fff23eb81ea -[UISplitViewControllerPanelImpl _triggerDisplayModeAction:] + 195
24 UIKitCore 0x00007fff245fc19a -[UIApplication sendAction:to:from:forEvent:] + 83
25 UIKitCore 0x00007fff23b400cd -[UIBarButtonItem _triggerActionForEvent:] + 158
26 UIKitCore 0x00007fff23b885d2 __64-[_UINavigationBarContentView _setupStaticNavBarButtonAnimated:]_block_invoke.182 + 36
27 UIKitCore 0x00007fff2451901e -[UIAction _performActionWithSender:] + 75
28 UIKitCore 0x00007fff23f2fd2b -[UIControl _sendActionsForEvents:withEvent:] + 284
29 UIKitCore 0x00007fff23f2e644 -[UIControl touchesEnded:withEvent:] + 500
30 UIKitCore 0x00007fff24638a8a -[UIWindow _sendTouchesForEvent:] + 1287
31 UIKitCore 0x00007fff2463a903 -[UIWindow sendEvent:] + 4774
32 UIKitCore 0x00007fff24614366 -[UIApplication sendEvent:] + 633
33 UIKitCore 0x00007fff246a50e9 __processEventQueue + 17086
34 UIKitCore 0x00007fff2469ae08 __eventFetcherSourceCallback + 104
35 CoreFoundation 0x00007fff203a7607 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
36 CoreFoundation 0x00007fff203a74ff __CFRunLoopDoSource0 + 180
37 CoreFoundation 0x00007fff203a69e1 __CFRunLoopDoSources0 + 248
38 CoreFoundation 0x00007fff203a11b9 __CFRunLoopRun + 878
39 CoreFoundation 0x00007fff203a0960 CFRunLoopRunSpecific + 567
40 GraphicsServices 0x00007fff2b9e7db3 GSEventRunModal + 139
41 UIKitCore 0x00007fff245f5bd9 -[UIApplication _run] + 912
42 UIKitCore 0x00007fff245faaea UIApplicationMain + 101
43 Modern Collection Views 0x000000010150247b main + 75
44 libdyld.dylib 0x00007fff20256431 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unknown style: 10'
terminating with uncaught exception of type NSException
CoreSimulator 732.10 - Device: iPad Pro (11-inch) (2nd generation) (AEA64DAA-6467-4B67-8CE7-F03BF6770045) - Runtime: iOS 14.0 (18A5342e) - DeviceType: iPad Pro (11-inch) (2nd generation)