Post

Replies

Boosts

Views

Activity

Could someone summarize Catalyst and M1 Mac relationship?
Hi. When Catalyst was released, I understood that it consisted of two factors, compiling for Intel CPU and UIKit on macOS. So you needs to add target "Mac" and Mac.entitlements on Xcode to run your app on Catalyst. Now M1 Mac appears and it runs iPhone/iPad apps without the above compilation if they are distributed. In this case, still do iPhone/iPad apps run on Catalyst? (I mean that macOS-specific features such as UIHoverGestureRecognizer work on M1 Mac if you implement some using these features.) 2. Why don't you need Mac.entitlements? The above two questions are just what I come up with. Detail summary is welcome. Thanks
0
0
701
Jan ’21
Is it impossible to include an URL of a file in iCloud Drive in NSUserActivity#userInfo?
Hi. I want to create a new UIScene when my app opens a file in some condition. So I wrote requestSceneSessionActivation in scene(_:openURLContexts:).     func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {     &#9;&#9;let options = UIScene.ActivationRequestOptions()     &#9;&#9;options.requestingScene = scene     &#9; UIApplication.shared.requestSceneSessionActivation(nil, userActivity: createUserActivity(for: url), options: options) { error in       &#9;&#9;&#9;print(debug: error)     &#9;&#9;}   &#9;}     private func createUserActivity(for url: URL) -> NSUserActivity {     &#9;&#9;let userActivity = NSUserActivity(activityType: getUserActivityType(idx: 1)!)     &#9;&#9;userActivity.requiredUserInfoKeys = ["url"]     &#9;&#9;userActivity.addUserInfoEntries(from: ["url": url])     &#9;&#9;(UIApplication.shared.delegate as? AppDelegate)?.url = url &#9;&#9;    return userActivity &#9;&#9;} But scene(_:willConnectTo:options:) gets an empty userInfo. Is it impossible to include an URL of a file in iCloud Drive in NSUserActivity#userInfo? I guess that it is not because it is a Security-Scoped URL. Is my understanding right? And if so, how can I pass a Security-Scoped URL to a scene to be created? Of course, If you make a property for it in your AppDelegate, you can do it but I think that it is not normal. Thank you in advance,
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
811
Dec ’20