We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
/// get DeviceToken [DeviceToken] static Future<String?> deviceToken() async { Map<String, dynamic> args = {}; return _methodChannel.invokeMethod('deviceToken', args); }
The text was updated successfully, but these errors were encountered:
我是修改了iOS代码,增加didRegisterForRemoteNotificationsWithDeviceToken方法,在这个方法中获取deviceToken,将值写入userdefault。
Sorry, something went wrong.
放AppDelegate.swift里
override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { let deviceTokenStr = [UInt8](deviceToken).map{String(format: "%02x", $0)}.joined() NSLog("deviceToken:--------> " + deviceTokenStr) UserDefaults.standard.set(deviceTokenStr, forKey: "push_device_token") }
No branches or pull requests
/// get DeviceToken [DeviceToken]
static Future<String?> deviceToken() async {
Map<String, dynamic> args = {};
return _methodChannel.invokeMethod('deviceToken', args);
}
The text was updated successfully, but these errors were encountered: