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?
Handoff
RSS for tagAllow 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
9 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
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!
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?
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?
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
}
}
}
}
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:)
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?
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.
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?