Allow users to start an activity on one device and seamlessly resume the activity on another device running iOS, iPadOS, or macOS using Handoff.

Posts under Handoff tag

31 Posts

Post

Replies

Boosts

Views

Activity

[macOS 26.4.x, iOS 26.4.x] Handoff broken?
Hello, with macOS' and iOS' recent updates (26.4.x), Handoff in my app appears to have become dysfunctional, as I receive the following message in the logs: getContinuationStreamsWithCompletionHandler(), inputStream=(null) outputStream=(null) error=Error Domain=NSPOSIXErrorDomain Code=94 "Bad message" UserInfo={NSLocalizedDescription=Could not set up internal streams} It ONLY works: From a Mac with 15.x to other Macs or iOS devices (on 26.4.x). All other combinations (see below) do NOT work: iOS (26.4.x) > iOS (26.4.x) iOS (26.4.x) > Mac (26.4.x) iOS (26.4.x) > Mac (15.x) Mac (26.4.x) > iOS (26.4.x) The Handoff prompt is shown in the Dock on Mac, in the app switcher on iOS, and in the Dock on iPadOS, but once I click/press it, I get the continuationStreams error. Now, is it my app, or the OS? Thank you kindly, – Matthias
7
0
503
3w
Issues with iPhone Mirroring
Hi! About a month ago (somewhere around the release of iOS 18.4.1 and MacOS 15.4.1) I started having issues with the iPhone Mirroring app, saying that it's unable to connect to iPhone, although it worked seamlessly before. In error console log I see this chain of events: error 19:00:51.054054+0200 iPhone Mirroring unable to get entitlements for client task. Error: nil error 19:00:51.054074+0200 iPhone Mirroring AppleEvent sender is not entitled error 19:00:51.098453+0200 iPhone Mirroring Tearing down the session due to: noCompatiblePhone error 19:00:51.139329+0200 iPhone Mirroring CAML error:727: No such class `LKEventHandler' error 19:00:51.139342+0200 iPhone Mirroring CAML error:727: Unknown value element `LKEventHandler' error 19:00:51.139349+0200 iPhone Mirroring CAML error:727: `o' element must have `type' attribute I tried literally every solution I could find, including deleting all possible preferences, but to no avail. It also might be worth mentioning that since these issues started, I can't AirPlay from my iPhone to my Mac unless I switch the "Allow Airplay for" option to either "Anyone on the same network" or "Everyone". Can anyone tell me if this may be something connected to those latest updates, or is there anything else I can try on my end? Thanks in advance!
1
0
266
Apr ’25
"Waiting for Handoff" Dialog Appearing in iOS 18 App Clip
When opening our App Clip from a Live Activity, the iOS system Handoff alert blocks our app on open. It is reproducible 100% of the time. The description in the system alert is: Waiting for Handoff to {My App}. We never had this issue before and believe it is related to iOS 18. I don't have Handoff enabled anywhere in my app. All uses of NSUserActivity explicitly block handoff userActivity.isEligibleForHandoff = false We have been able to locate this same issue in other iOS apps that use Live Activities and App Clips. Is this an iOS 18 system-level bug?
0
0
528
Oct ’24
Challenges with Remotely Controlling iPhone Camera from Mac: Need Guidance
Hello everyone, I am working on an iOS app that involves capturing images automatically, and I would like to control the start/stop of the capture process remotely from a Mac app. I explored the iPhone Mirroring feature, which allows some remote control but has the limitation of only functioning when the iPhone is locked, and it doesn’t permit access to the iPhone’s camera from the Mac. Ideally, I am looking for a solution that would allow me to: Remotely control the camera capture process on the iOS app from the Mac app. Ensure the iPhone’s camera remains fully operational and controllable from the Mac during the capture process. I have considered using options like Handoff for communication between the apps but faced some issues while communicating between the iOS and mac app. I would like to know if there is a more optimal solution within Apple’s ecosystem, or if there are APIs I might have overlooked. Any advice or guidance on how to achieve this functionality would be greatly appreciated! Thanks in advance!
1
0
652
Oct ’24
UIPasteboard.general.string not propagating to other devices when idle
I'm working on an app that uses UIPasteboard.general.string = "my text here" to copy text to the user's pasteboared so that they can then paste from another device. I'm doing this periodically based on conditions - so every 10-20 seconds, I have a new string to copy to the pasteboard. Consistently after 2 minutes, this stops working - the pasteboard on the local device updates, but my other devices don't receive the new pasteboard content. If I touch the screen of the device running my app to 'wake it up', it suddenly works again for another 2 minutes. I've tried UIApplication.shared.idleTimer = false but it has had no effect. Is there a way to keep the universal pasteboard working without constant app interaction?
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
755
Sep ’24
SwiftUI .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) doesn't seem to work
We need to read the value for userActivity.referrerUrl when the app is accessed through a Universal Link, which when using the UIKit lifecycle we can easily do by implementing the method scene(_: UIScene, continue: NSUserActivity) in SceneDelegate and filtering for activity type of NSUserActivityTypeBrowsingWeb. When the app uses the SwiftUI lifecycle that method doesn't get called, even though the app is correctly configured to use AppDelegate and SceneDelegate (through the @UIApplicationDelegateAdaptor wrapper). I can confirm that the setup is correct because the method scene(_: UIScene, willConnectTo: UISceneSession, options: UIScene.ConnectionOptions) in SceneDelegate is called on app launch. The obvious SwiftUI way of achieving the same would be by using the .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) modifier, but that doesn't work. Is this a bug?
3
1
1.2k
Aug ’24
Reading widget configuration intent when launching the app
I'm creating a configurable widget using AppIntentConfiguration in my SwiftUI app and wanted to read configuration's payload when the user taps on the widget and launches the app. Having read the WidgetKit's documentation I noticed I can just call userActivity.widgetConfigurationIntent(of: MyWidgetConfigurationAppIntent.self) inside .onContinueUserActivity() modifier, to get the intent's instance. This function works and returns the instance when user taps on the widget and the app is already running in the background, but returns nil when the app launches for the first time. Am I doing something wrong here, is this a desired behaviour? Is using Deep Links a more suited solution for this use case? I'm really not liking the idea of serialising instances of Measurement and UnitMass/UnitTemperature into URLs. Here's a sample code to illustrate: @main struct WidgetIntentTestApp: App { @State private var favouriteEmoji: String? private let intentActivityName = String(describing: ConfigurationAppIntent.self) var body: some Scene { WindowGroup { ContentView(favouriteEmoji: favouriteEmoji) .onContinueUserActivity(intentActivityName) { userActivity in guard let intent = userActivity.widgetConfigurationIntent(of: ConfigurationAppIntent.self) else { /// Intent is `nil` when the user activity `launches the app for the first time`. /// I would have expected this to work given the user activity's `.name` clearly matches the Intent's name fatalError("Expected intent but received `nil` - this should not have happened.") } favouriteEmoji = intent.favoriteEmoji } } } }
2
2
826
Aug ’24
Using iPadOS 18 with Mac running macOS 14.5
I have a Mac Mini M1 running macOS 14.5 Sonoma. Until recently I was running iPadOS 17 on my iPad, and things worked just fine. I had the iPad setup so that it displayed its own stuff, but allowed my to operate my mouse on the iPad screen by moving past the left hand side of my monitor. This combined with copy and paste between iPadOS and macOS gave me a great workflow. A couple of days ago I installed the dev beta of iPadOS 18 on my iPad, and seem to have lost access to all of the functionality described in the first paragraph. Can anyone advise of what I need to do to get it back, or is it just a case of waiting for Apple to re-establish the missing functionality in newer versions of the beta?
0
0
620
Jul ’24
(API to) switching device/display using keyboard with Universal Control
Universal Control works to share keyboard and mouse from one mac to another, but actually switching seems to require physically moving the mouse to the other display. Ideally, I'd like Apple to support some command available via command-key equivalents to cycle to other devices in the way that we can cycle through applications or windows. Seeking to program that directly, I was unable to find any Universal Control API's on point. Are there any? I can imagine restricted this to the OS only for security. In case there are display-driven API's, I see that system settings/displays shows all the displays from all devices, but I was unable to find a UI or API's to change focus to another display (other than moving the mouse to select the display). When I list displays programmatically, I only see the device-local displays. In case there are device-driven APIs: I can initialize a bluetooth session and secure credentials, but interaction seems to be unavailable.
1
2
1.1k
Mar ’24
Cannot Use Mac Virtual Display on MDM-enrolled Mac with Handoff Disabled
My employer has several MDM restrictions enabled for security reasons. Particularly, they disable Handoff in order to disable Universal Clipboard, since the two are coupled together in the MDM restrictions. This has the unfortunate side-effect of disallowing Mac Virtual Display on the Vision Pro, since it requires Handoff in order to work. Is there another way for them to disable only Universal Clipboard using MDM restrictions? If not, how could I go about requesting that the MDM restrictions be more granular?
1
0
837
Feb ’24
Universal Control can’t drag and drop files across devices.
Hey guys, I've updated my iPad Pro 2018 to iPadOS15.4 beta 3 and my MacBook Air to macOS Monterey 12.3 beta 3.  The Universal Control works for cross-device trackpad and keyboard. But I can't drag and drop files between these two devices. When I drag a photo from my MacBook to iPad, I can actually see the file icon appear on the verge of iPad screen but it will soon disappear. And when I try to do the other way around, the Mac doesn't even show anything. So I'm wondering whether it's a bug or it's due to my settings?  Have anyone experienced this problem yet?
3
1
8.4k
Jan ’23
Handoff with iCloud document-based app doesn't work
When tapping the Handoff icon of my app on the Mac or on the iPad, Xcode logs this error: [default personal] [ERROR] +[NSURL(BRAdditions) br_documentURLFromBookmarkableString:error:]: (passed to caller) error: Error Domain=BRCloudDocsErrorDomain Code=8 "Not Entitled" UserInfo={NSDescription=Not Entitled} When setting a breakpoint at NSApplicationDelegate.application(_:continue:restorationHandler:), I can see that userInfo.activityType is the one specified with the key NSUbiquitousDocumentUserActivityType under the Info.plist Document Types, but userActivity.userInfo is empty, so the document url is apparently not sent. Is there something else I have to set up?
1
0
1.7k
Nov ’22
Universal Control
Lost Universal control on M1 Mac Mini I have an M1 Mac Mini, Macbook Pro and iPad Pro all running the latest beta software (12.3 beta2). After rebooting my BT Broadband router I can no longer use my mac mini with Universal control. The Macbook and ipad are still working fine. Macbook can see and work with the ipad but can't see the mini and the Mini can see the Macbook to share its screen with but not Universal control and can't see the ipad at all. No VPN's being used, all on the same network sat next to each other and working fine yesterday. I've restarted all the machines with no luck. Can anyone help?
2
0
1.3k
Jun ’22
targetContentIdentifier on NSUserActivity nil on Handoff
I am using scenes and setting up Handoff between a Mac and iPad/iOS application. Whenever I receive the user activity on the iPad, targetContentIdentifier is always nil. I've confirmed that things like userInfo and persistentIdentifier are coming through by outputting them in func scene(_ scene: UIScene, continue userActivity: NSUserActivity), but without the targetContentIdentifier is always empty. Without it, I can't use the activation condition's and proper scene isn't being selected by iOS... is there something beyond setting it and marking an activity as eligible for handoff that I am missing?
1
0
1.9k
May ’22
onContinueUserActivity not Called with Handoff & SwiftUI
After following a tutorial about how to use SwiftUI in combination with Handoff I got this as result, but this isn't working for me. After trying a lot it seems like the OnContinueUserActivity is not called. The icon for handoff shows but once clicked on it, nothing happens. How can I fix this? import SwiftUI struct Board: View { 		@State var BoardId: String 				 		 		var body: some View { 				VStack{ 						Text("Board: \(BoardId)") 				}.onContinueUserActivity("bundleIdentifier.Board", perform: { userActivity in print("Handoff starting...") 						if let Board = userActivity.userInfo?["Board"] as? String { 								// Load handoff page 								self.BoardId = Board 								 						} 						 						logUserActivity(userActivity, label: "on activity") 				}) 				.userActivity("bundleIdentifier.Board", element: BoardId) {Board, activity in 						let bundleid = Bundle.main.bundleIdentifier ?? "" 												 						activity.addUserInfoEntries(from: ["Board": BoardId, 																													 "setby": bundleid]) 						logUserActivity(activity, label: "activity") 				} 				 		} } struct Board_Previews: PreviewProvider { 		static var previews: some View { 				Board(BoardId: "NaN") 		} } func logUserActivity(_ activity: NSUserActivity, label: String = "") { 		print("\(label) TYPE = \(activity.activityType)") 		print("\(label) INFO = \(activity.userInfo ?? [:])") }
1
0
1.7k
Mar ’22
[macOS 26.4.x, iOS 26.4.x] Handoff broken?
Hello, with macOS' and iOS' recent updates (26.4.x), Handoff in my app appears to have become dysfunctional, as I receive the following message in the logs: getContinuationStreamsWithCompletionHandler(), inputStream=(null) outputStream=(null) error=Error Domain=NSPOSIXErrorDomain Code=94 "Bad message" UserInfo={NSLocalizedDescription=Could not set up internal streams} It ONLY works: From a Mac with 15.x to other Macs or iOS devices (on 26.4.x). All other combinations (see below) do NOT work: iOS (26.4.x) > iOS (26.4.x) iOS (26.4.x) > Mac (26.4.x) iOS (26.4.x) > Mac (15.x) Mac (26.4.x) > iOS (26.4.x) The Handoff prompt is shown in the Dock on Mac, in the app switcher on iOS, and in the Dock on iPadOS, but once I click/press it, I get the continuationStreams error. Now, is it my app, or the OS? Thank you kindly, – Matthias
Replies
7
Boosts
0
Views
503
Activity
3w
Issues with iPhone Mirroring
Hi! About a month ago (somewhere around the release of iOS 18.4.1 and MacOS 15.4.1) I started having issues with the iPhone Mirroring app, saying that it's unable to connect to iPhone, although it worked seamlessly before. In error console log I see this chain of events: error 19:00:51.054054+0200 iPhone Mirroring unable to get entitlements for client task. Error: nil error 19:00:51.054074+0200 iPhone Mirroring AppleEvent sender is not entitled error 19:00:51.098453+0200 iPhone Mirroring Tearing down the session due to: noCompatiblePhone error 19:00:51.139329+0200 iPhone Mirroring CAML error:727: No such class `LKEventHandler' error 19:00:51.139342+0200 iPhone Mirroring CAML error:727: Unknown value element `LKEventHandler' error 19:00:51.139349+0200 iPhone Mirroring CAML error:727: `o' element must have `type' attribute I tried literally every solution I could find, including deleting all possible preferences, but to no avail. It also might be worth mentioning that since these issues started, I can't AirPlay from my iPhone to my Mac unless I switch the "Allow Airplay for" option to either "Anyone on the same network" or "Everyone". Can anyone tell me if this may be something connected to those latest updates, or is there anything else I can try on my end? Thanks in advance!
Replies
1
Boosts
0
Views
266
Activity
Apr ’25
"Waiting for Handoff" Dialog Appearing in iOS 18 App Clip
When opening our App Clip from a Live Activity, the iOS system Handoff alert blocks our app on open. It is reproducible 100% of the time. The description in the system alert is: Waiting for Handoff to {My App}. We never had this issue before and believe it is related to iOS 18. I don't have Handoff enabled anywhere in my app. All uses of NSUserActivity explicitly block handoff userActivity.isEligibleForHandoff = false We have been able to locate this same issue in other iOS apps that use Live Activities and App Clips. Is this an iOS 18 system-level bug?
Replies
0
Boosts
0
Views
528
Activity
Oct ’24
Challenges with Remotely Controlling iPhone Camera from Mac: Need Guidance
Hello everyone, I am working on an iOS app that involves capturing images automatically, and I would like to control the start/stop of the capture process remotely from a Mac app. I explored the iPhone Mirroring feature, which allows some remote control but has the limitation of only functioning when the iPhone is locked, and it doesn’t permit access to the iPhone’s camera from the Mac. Ideally, I am looking for a solution that would allow me to: Remotely control the camera capture process on the iOS app from the Mac app. Ensure the iPhone’s camera remains fully operational and controllable from the Mac during the capture process. I have considered using options like Handoff for communication between the apps but faced some issues while communicating between the iOS and mac app. I would like to know if there is a more optimal solution within Apple’s ecosystem, or if there are APIs I might have overlooked. Any advice or guidance on how to achieve this functionality would be greatly appreciated! Thanks in advance!
Replies
1
Boosts
0
Views
652
Activity
Oct ’24
UIPasteboard.general.string not propagating to other devices when idle
I'm working on an app that uses UIPasteboard.general.string = "my text here" to copy text to the user's pasteboared so that they can then paste from another device. I'm doing this periodically based on conditions - so every 10-20 seconds, I have a new string to copy to the pasteboard. Consistently after 2 minutes, this stops working - the pasteboard on the local device updates, but my other devices don't receive the new pasteboard content. If I touch the screen of the device running my app to 'wake it up', it suddenly works again for another 2 minutes. I've tried UIApplication.shared.idleTimer = false but it has had no effect. Is there a way to keep the universal pasteboard working without constant app interaction?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
0
Boosts
0
Views
755
Activity
Sep ’24
SwiftUI .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) doesn't seem to work
We need to read the value for userActivity.referrerUrl when the app is accessed through a Universal Link, which when using the UIKit lifecycle we can easily do by implementing the method scene(_: UIScene, continue: NSUserActivity) in SceneDelegate and filtering for activity type of NSUserActivityTypeBrowsingWeb. When the app uses the SwiftUI lifecycle that method doesn't get called, even though the app is correctly configured to use AppDelegate and SceneDelegate (through the @UIApplicationDelegateAdaptor wrapper). I can confirm that the setup is correct because the method scene(_: UIScene, willConnectTo: UISceneSession, options: UIScene.ConnectionOptions) in SceneDelegate is called on app launch. The obvious SwiftUI way of achieving the same would be by using the .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) modifier, but that doesn't work. Is this a bug?
Replies
3
Boosts
1
Views
1.2k
Activity
Aug ’24
Reading widget configuration intent when launching the app
I'm creating a configurable widget using AppIntentConfiguration in my SwiftUI app and wanted to read configuration's payload when the user taps on the widget and launches the app. Having read the WidgetKit's documentation I noticed I can just call userActivity.widgetConfigurationIntent(of: MyWidgetConfigurationAppIntent.self) inside .onContinueUserActivity() modifier, to get the intent's instance. This function works and returns the instance when user taps on the widget and the app is already running in the background, but returns nil when the app launches for the first time. Am I doing something wrong here, is this a desired behaviour? Is using Deep Links a more suited solution for this use case? I'm really not liking the idea of serialising instances of Measurement and UnitMass/UnitTemperature into URLs. Here's a sample code to illustrate: @main struct WidgetIntentTestApp: App { @State private var favouriteEmoji: String? private let intentActivityName = String(describing: ConfigurationAppIntent.self) var body: some Scene { WindowGroup { ContentView(favouriteEmoji: favouriteEmoji) .onContinueUserActivity(intentActivityName) { userActivity in guard let intent = userActivity.widgetConfigurationIntent(of: ConfigurationAppIntent.self) else { /// Intent is `nil` when the user activity `launches the app for the first time`. /// I would have expected this to work given the user activity's `.name` clearly matches the Intent's name fatalError("Expected intent but received `nil` - this should not have happened.") } favouriteEmoji = intent.favoriteEmoji } } } }
Replies
2
Boosts
2
Views
826
Activity
Aug ’24
Using iPadOS 18 with Mac running macOS 14.5
I have a Mac Mini M1 running macOS 14.5 Sonoma. Until recently I was running iPadOS 17 on my iPad, and things worked just fine. I had the iPad setup so that it displayed its own stuff, but allowed my to operate my mouse on the iPad screen by moving past the left hand side of my monitor. This combined with copy and paste between iPadOS and macOS gave me a great workflow. A couple of days ago I installed the dev beta of iPadOS 18 on my iPad, and seem to have lost access to all of the functionality described in the first paragraph. Can anyone advise of what I need to do to get it back, or is it just a case of waiting for Apple to re-establish the missing functionality in newer versions of the beta?
Replies
0
Boosts
0
Views
620
Activity
Jul ’24
Spare Phone Anyone?
Looking for a spare phone anyone may have that they aren using that I can use with no strings attached. Thanks in advance for being a blessing f:)
Replies
2
Boosts
0
Views
1.1k
Activity
Jul ’24
(API to) switching device/display using keyboard with Universal Control
Universal Control works to share keyboard and mouse from one mac to another, but actually switching seems to require physically moving the mouse to the other display. Ideally, I'd like Apple to support some command available via command-key equivalents to cycle to other devices in the way that we can cycle through applications or windows. Seeking to program that directly, I was unable to find any Universal Control API's on point. Are there any? I can imagine restricted this to the OS only for security. In case there are display-driven API's, I see that system settings/displays shows all the displays from all devices, but I was unable to find a UI or API's to change focus to another display (other than moving the mouse to select the display). When I list displays programmatically, I only see the device-local displays. In case there are device-driven APIs: I can initialize a bluetooth session and secure credentials, but interaction seems to be unavailable.
Replies
1
Boosts
2
Views
1.1k
Activity
Mar ’24
Cannot Use Mac Virtual Display on MDM-enrolled Mac with Handoff Disabled
My employer has several MDM restrictions enabled for security reasons. Particularly, they disable Handoff in order to disable Universal Clipboard, since the two are coupled together in the MDM restrictions. This has the unfortunate side-effect of disallowing Mac Virtual Display on the Vision Pro, since it requires Handoff in order to work. Is there another way for them to disable only Universal Clipboard using MDM restrictions? If not, how could I go about requesting that the MDM restrictions be more granular?
Replies
1
Boosts
0
Views
837
Activity
Feb ’24
Seamless Movement of AirPods between iPhones and MacBooks
Hi Devs, So I'm not the only one facing this issue. When we use MacBook and iPhone at the same time, the AirPods don't revert back to MacBook automatically and are needed to be connected manually by clicking on popup. Is this issue going to be solved in upcoming updates?
Replies
0
Boosts
0
Views
610
Activity
Aug ’23
macOS Monterey 12.3 Bluetooth connection problems since update
Upgrade to Monterey 12.3 couple days ago on my MacBook Air 2020. Since then, my bluetooth headphones and BT mouse are lagging, randomly disconnecting and reconnecting every few minutes or so. As this has never happened before the upgrade, I thought it was quite unusual. Anybody else with similar issues or any fixes?
Replies
57
Boosts
4
Views
25k
Activity
May ’23
Handoff not working on M1 Mac and 12 pro
My handoff/airplay devices are iPone 12 Pro (IOS 14.2.1), iPhone X(iOS 14.2), M1 MacBook Pro 2020 (Big Sur 11.0.1) and apple watch series 5.  iPhone 12 Pro and iPhone X can detect handoff from each other;But they both can't detect handoff from MacBook Pro(Big Sur 11.0.1).  I've tried all troubleshooting in all devices. 
Replies
9
Boosts
0
Views
7.6k
Activity
Apr ’23
Universal Control can’t drag and drop files across devices.
Hey guys, I've updated my iPad Pro 2018 to iPadOS15.4 beta 3 and my MacBook Air to macOS Monterey 12.3 beta 3.  The Universal Control works for cross-device trackpad and keyboard. But I can't drag and drop files between these two devices. When I drag a photo from my MacBook to iPad, I can actually see the file icon appear on the verge of iPad screen but it will soon disappear. And when I try to do the other way around, the Mac doesn't even show anything. So I'm wondering whether it's a bug or it's due to my settings?  Have anyone experienced this problem yet?
Replies
3
Boosts
1
Views
8.4k
Activity
Jan ’23
Cannot preview in this file - "<filename>.appex is an unsupported extension"
I wanted to use deviceActivity target (File->New->Target). A package was created with filename "TotalActivityView". But i am getting this error while trying to preview it. ERROR: Cannot preview in this file ".appex is an unsupported extension" How do I use the deviceActivity target in my project?
Replies
0
Boosts
0
Views
1.2k
Activity
Dec ’22
Handoff with iCloud document-based app doesn't work
When tapping the Handoff icon of my app on the Mac or on the iPad, Xcode logs this error: [default personal] [ERROR] +[NSURL(BRAdditions) br_documentURLFromBookmarkableString:error:]: (passed to caller) error: Error Domain=BRCloudDocsErrorDomain Code=8 "Not Entitled" UserInfo={NSDescription=Not Entitled} When setting a breakpoint at NSApplicationDelegate.application(_:continue:restorationHandler:), I can see that userInfo.activityType is the one specified with the key NSUbiquitousDocumentUserActivityType under the Info.plist Document Types, but userActivity.userInfo is empty, so the document url is apparently not sent. Is there something else I have to set up?
Replies
1
Boosts
0
Views
1.7k
Activity
Nov ’22
Universal Control
Lost Universal control on M1 Mac Mini I have an M1 Mac Mini, Macbook Pro and iPad Pro all running the latest beta software (12.3 beta2). After rebooting my BT Broadband router I can no longer use my mac mini with Universal control. The Macbook and ipad are still working fine. Macbook can see and work with the ipad but can't see the mini and the Mini can see the Macbook to share its screen with but not Universal control and can't see the ipad at all. No VPN's being used, all on the same network sat next to each other and working fine yesterday. I've restarted all the machines with no luck. Can anyone help?
Replies
2
Boosts
0
Views
1.3k
Activity
Jun ’22
targetContentIdentifier on NSUserActivity nil on Handoff
I am using scenes and setting up Handoff between a Mac and iPad/iOS application. Whenever I receive the user activity on the iPad, targetContentIdentifier is always nil. I've confirmed that things like userInfo and persistentIdentifier are coming through by outputting them in func scene(_ scene: UIScene, continue userActivity: NSUserActivity), but without the targetContentIdentifier is always empty. Without it, I can't use the activation condition's and proper scene isn't being selected by iOS... is there something beyond setting it and marking an activity as eligible for handoff that I am missing?
Replies
1
Boosts
0
Views
1.9k
Activity
May ’22
onContinueUserActivity not Called with Handoff & SwiftUI
After following a tutorial about how to use SwiftUI in combination with Handoff I got this as result, but this isn't working for me. After trying a lot it seems like the OnContinueUserActivity is not called. The icon for handoff shows but once clicked on it, nothing happens. How can I fix this? import SwiftUI struct Board: View { &#9;&#9;@State var BoardId: String &#9;&#9;&#9;&#9; &#9;&#9; &#9;&#9;var body: some View { &#9;&#9;&#9;&#9;VStack{ &#9;&#9;&#9;&#9;&#9;&#9;Text("Board: \(BoardId)") &#9;&#9;&#9;&#9;}.onContinueUserActivity("bundleIdentifier.Board", perform: { userActivity in print("Handoff starting...") &#9;&#9;&#9;&#9;&#9;&#9;if let Board = userActivity.userInfo?["Board"] as? String { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;// Load handoff page &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;self.BoardId = Board &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;logUserActivity(userActivity, label: "on activity") &#9;&#9;&#9;&#9;}) &#9;&#9;&#9;&#9;.userActivity("bundleIdentifier.Board", element: BoardId) {Board, activity in &#9;&#9;&#9;&#9;&#9;&#9;let bundleid = Bundle.main.bundleIdentifier ?? "" &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;activity.addUserInfoEntries(from: ["Board": BoardId, &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; "setby": bundleid]) &#9;&#9;&#9;&#9;&#9;&#9;logUserActivity(activity, label: "activity") &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9; &#9;&#9;} } struct Board_Previews: PreviewProvider { &#9;&#9;static var previews: some View { &#9;&#9;&#9;&#9;Board(BoardId: "NaN") &#9;&#9;} } func logUserActivity(_ activity: NSUserActivity, label: String = "") { &#9;&#9;print("\(label) TYPE = \(activity.activityType)") &#9;&#9;print("\(label) INFO = \(activity.userInfo ?? [:])") }
Replies
1
Boosts
0
Views
1.7k
Activity
Mar ’22