[ad_1]
It appears to be like just like the Share Extension permits different “host” apps to share content material with my “containing” app. How do I share content material from my app with different apps utilizing the usual iOS share sheet? I’ve discovered info on use UISheetPresentationController and UIActivityViewController. What’s Apple’s designated normal API to share content material from my iOS app? I’d assume their designated means would present all of the the apps that the share sheet can share with. Is UIActivityViewController the best way that’s most meant by Apple to do that?
This text appears to be like like a pleasant easy tutorial: UIActivityViewController by instance, however after I attempt the primary phase of code that it teaches, it does not work just like the article says it ought to.
Here is my code:
Here is the debug window:
2022-10-20 21:08:10.536367-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [Default] Process TrialUIActivityV[34244]/1#3 LF=0 could not discover entitlement CopresenceCore.Entitlement.publicAPI error nil
2022-10-20 21:08:11.266049-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [Default] Process TrialUIActivityV[34244]/1#3 LF=0 could not discover entitlement CopresenceCore.Entitlement.publicAPI error nil
2022-10-20 21:08:12.000344-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [default] LaunchServices: retailer (null) or url (null) was nil: Error Area=NSOSStatusErrorDomain Code=-54 "course of could not map database" UserInfo={NSDebugDescription=course of could not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2022-10-20 21:08:12.001351-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [default] Try and map database failed: permission was denied. This try is not going to be retried.
2022-10-20 21:08:12.001421-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [db] Did not initialize shopper context with error Error Area=NSOSStatusErrorDomain Code=-54 "course of could not map database" UserInfo={NSDebugDescription=course of could not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2022-10-20 21:08:12.062430-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [default] -imageForImageDescriptor: can do IO please undertake -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This may turn out to be a fault quickly.)
2022-10-20 21:08:12.199153-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [default] LaunchServices: retailer (null) or url (null) was nil: Error Area=NSOSStatusErrorDomain Code=-54 "course of could not map database" UserInfo={NSDebugDescription=course of could not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2022-10-20 21:08:12.199262-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [default] Try and map database failed: permission was denied. This try is not going to be retried.
2022-10-20 21:08:12.199340-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [db] Did not initialize shopper context with error Error Area=NSOSStatusErrorDomain Code=-54 "course of could not map database" UserInfo={NSDebugDescription=course of could not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2022-10-20 21:08:12.199640-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [default] -imageForImageDescriptor: can do IO please undertake -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This may turn out to be a fault quickly.)
2022-10-20 21:08:12.240705-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [LayoutConstraints] Altering the translatesAutoresizingMaskIntoConstraints property of a UICollectionReusableView that's managed by a UICollectionView just isn't supported, and can lead to incorrect self-sizing. View: <_UIActivityContentFooterView: 0x131d15bc0; baseClass = UICollectionReusableView; body = (16 474.5; 343 52); layer = <CALayer: 0x281180420>>
2022-10-20 21:08:13.864915-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [LayoutConstraints] Unable to concurrently fulfill constraints.
In all probability at the least one of many constraints within the following checklist is one you do not need.
Do this:
(1) have a look at every constraint and check out to determine which you do not count on;
(2) discover the code that added the undesirable constraint or constraints and repair it.
(
"<NSLayoutConstraint:0x283245f90 UIStackView:0x131d56460.centerY == UIView:0x131d54de0.centerY (lively)>",
"<NSLayoutConstraint:0x283246490 _UIActivityActionCellTitleLabel:0x131d55cc0.top >= 54.5 (lively)>",
"<NSLayoutConstraint:0x283245ea0 V:|-(>=4)-[UIStackView:0x131d56460] (lively, names: '|':UIView:0x131d54de0 )>",
"<NSLayoutConstraint:0x283246850 'UISV-canvas-connection' UIStackView:0x131d56460.high == _UIActivityActionCellTitleLabel:0x131d55cc0.high (lively)>",
"<NSLayoutConstraint:0x2832468a0 'UISV-canvas-connection' V:[_UIActivityActionCellTitleLabel:0x131d55cc0]-(0)-| (lively, names: '|':UIStackView:0x131d56460 )>",
"<NSLayoutConstraint:0x28324e5d0 'UIView-Encapsulated-Structure-Top' UIView:0x131d54de0.top == 30 (lively)>"
)
Will try to recuperate by breaking constraint
<NSLayoutConstraint:0x283246490 _UIActivityActionCellTitleLabel:0x131d55cc0.top >= 54.5 (lively)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this within the debugger.
The strategies within the UIConstraintBasedLayoutDebugging class on UIView listed in <UIKitCore/UIView.h> might also be useful.
presentation accomplished
2022-10-20 21:08:18.385209-0500 TrialUIActivityViewControllerHackingWithSwiftPaulHudson[34244:1256968] [TraitCollection] Class CKBrowserSwitcherViewController overrides the -traitCollection getter, which isn't supported. If you happen to're making an attempt to override traits, you have to use the suitable API.
[ad_2]
