1
iPhone 6에서 내 앱을 실행하는 중에 오류가 발생합니다. VoIP 기능을 구현하려고합니다.iPhone 6에 voip 앱을 설치할 수 없습니다.
이에 대한 해결책은 무엇인가? 어떤 도움을 주시면 감사하겠습니다. 감사.
아래의 코드를 VoIP 기능으로 사용하고 있습니다.
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let voipRegistry = PKPushRegistry(queue: DispatchQueue.main)
voipRegistry.desiredPushTypes = [PKPushType.voIP]
voipRegistry.delegate = self;
}
extension AppDelegate : PKPushRegistryDelegate {
func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) {
NSLog("PusRegistry didUpdateCredential....")
let deviceTokenString: String = pushCredentials.token.map { String(format: "%02.2hhx", $0) }.joined()
NSLog("PushCredentials: \(deviceTokenString)")
UIPasteboard.general.string = deviceTokenString
showLocalNotifiacation(text: "Received pushCredential")
NSLog("Token is : \(deviceTokenString)")
}
func pushRegistry(_ registry: PKPushRegistry,
didInvalidatePushTokenFor type: PKPushType) {
}
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType) {
NSLog("<><><><><><><><><><><><><><><><><>><><><><><><><>><><>><><><><><")
NSLog("<><><><><><><><><><><><><><><><><>><><><><><><><>><><>><><><><><")
NSLog("<><><><><><><><><><><><><><><><><>><><><><><><><>><><>><><><><><")
NSLog("<><><><><><><><><><><><><><><><><>><><><><><><><>><><>><><><><><")
NSLog("<><><><><><><><><><><><><><><><><>><><><><><><><>><><>><><><><><")
NSLog("<><><><><><><><><><><><><><><><><>><><><><><><><>><><>><><><><><")
NSLog("<**************** Syncing data because of VOIP ***************")
sharedSilentPushSyncManager.syncDataForOperation("Syncing... for voip")
showLocalNotifiacation(text: "Received voip push")
}
}
귀하의 노력은 무엇입니까? –
xcode를 사용하여 앱을 실행하려고합니다. –
해당 프로필에 대해 기기를 등록하셨습니까? – Rivendell