Does anybody know what's wrong with this situation? Is there any additional step to take to make Share Extension work on Mac Catalyst?
My To-Do app uses Share Extension to create a task data with web page title, URL, and assigned goal, (from Safari), and store a task data to Core Data. It does work on iOS devices, but doesn't from Mac Catalyst version.
The Core Data is synced via iCloud among iOS/MacOS devices. By the way, Share Extension default view was too small on Mac Catalyst, so I replaced it with a custom view.
Data share is working on iOS devices with the new custom view, but not from Mac Catalyst version (the custom view looks fine, though). After pressing Post button, Xcode doesn't crash and I don't see an error log in console, perhaps Xcode is not logging from Share Extension.
Any input is appreciated.
Thank you
Post
Replies
Boosts
Views
Activity
Used Catalyst to port iOS app to MacOS, but Share Extension view is too small on MacOS Safari. The height needs to be changed, but self.preferredContentSize = NSSize(width: 200, height: 500) or CGSize(width: 200, height: 500) seems to not be called in viewDidLoad()
Any input helps, thanks.
ShareViewController.swift
override func viewDidLoad() {
super.viewDidLoad()
#if targetEnvironment(macCatalyst)
self.preferredConstenSize = NSSize(width: 200, height: 500)
#else
#endif
}