-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS Background Reading #62
Comments
I was about to ask this question myself. Would be a really nice feature and should be possible with the CORENFC library having added this feature lately. |
Based on the code func application(_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
guard userActivity.activityType == NSUserActivityTypeBrowsingWeb else {
return false
}
// Confirm that the NSUserActivity object contains a valid NDEF message.
let ndefMessage = userActivity.ndefMessagePayload
guard ndefMessage.records.count > 0,
ndefMessage.records[0].typeNameFormat != .empty else {
return false
}
// Send the message to `MessagesTableViewController` for processing.
guard let navigationController = window?.rootViewController as? UINavigationController else {
return false
}
navigationController.popToRootViewController(animated: true)
let messageTableViewController = navigationController.topViewController as? MessagesTableViewController
messageTableViewController?.addMessage(fromUserActivity: ndefMessage)
return true
} I think it can't be fully handled by a FlutterPlugin. Instead you might need to go to the Runner app to read the tag info and do the deep linking yourself as any other universal/deeplinking related scenarios |
It's something similar to Android's foreground dispatching (#17). In these modes, you do not have to actively call some API to poll a tag. The OS will call your handler instead. However as a Flutter plugin, it is difficult to act as a handler. You have to add some rather complex native code to your project. So we might not be able to support this easily. |
I was wondering if anyone has successfully implemented iOS background reading in Flutter. Doing this requires some native code, and it's challenging for me to find any useful resources. Has anyone progressed on this issue? If so, could you possibly share some directions or even link to a GitHub repository with a Flutter example? Your insights would be incredibly helpful for those of us looking to implement this feature. Thank you! |
I'd be interested in this as well as we're trying to achieve background NFC scanning on iOS for a customer-specific feature. |
Need this too! I'm very surprised this doesn't exist yet. |
Hi everyone. Any development on this item? |
I had to implement it on my own. I wrote some iOS native code and used method channels. |
Hey @spehj thank you for the hint. |
@HenriqueMatias I wrote it from scratch in AppDelegate.swift |
Is it possible to do iOS Background reading?
Meaning reading a tag without the annoying pop-up of the iPhone.
The text was updated successfully, but these errors were encountered: