You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i try to convert to swift code for get push voip and wakes up my app:
// Handle incoming pushes
func pushRegistry(_ registry: PKPushRegistry,
didReceiveIncomingPushWith payload: PKPushPayload,
for type: PKPushType, completion: @escaping () -> Void) {
FlutterVoipPushNotificationPlugin.didReceiveIncomingPush(
with: payload,
forType: type.rawValue
)
let payloadDict = payload.dictionaryPayload["aps"] as! Dictionary<String, Any>
let message = payloadDict["msg_data"] as! String
print(message)
let data = try! JSONSerialization.jsonObject(with: message.data(using: .utf8)!, options: []) as! [String:Any]
let uuid = data["msg_id"] as! String
let uID = data["u_id"] as! Int
let callerName = data["msg_name"] as! String
FlutterCallKitPlugin.reportNewIncomingCall(
uuid,
handle: String(uID),
handleType: "generic",
hasVideo: false,
localizedCallerName: callerName,
fromPushKit: true
)
}
push voip woking ok, my app can wakes up and get push payload.
but i get error: displayIncomingCall throws an error: parameter 'localizedName' cannot be nil'
in reactnative has result but still don't know how to solver it in Flutter: here
i test with swift code then my app show call scene. But still cannot process call, of course because this code working in swift not Flutter: provider.reportNewIncomingCall(with: UUID(), update: update, completion: { error in })
So how to implement it with swift support? Thank.
Sorry my bad english!
The text was updated successfully, but these errors were encountered:
i try to convert to swift code for get push voip and wakes up my app:
provider.reportNewIncomingCall(with: UUID(), update: update, completion: { error in })
So how to implement it with swift support? Thank.
Sorry my bad english!
The text was updated successfully, but these errors were encountered: