Posts

Post not yet marked as solved
0 Replies
130 Views
Hi, I've recently faced with an issue while dealing with PushKit and CallKit. Everything was working fine before adding a socket connection method to my code. I want to be connected to the socket before calling reportNewIncomingCall so I adjusted my code accordingly. Then I realized that completion block of reportNewIncomingCall is not being called. I don't understand why, any thoughts? The part of didReceiveIncomingPushWith delegate method, mentioned above: func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) { . . .             Log.addedCallInfotoAppDelegate.add("callID: \(String(describing: callID!)) callerName: \(callerName) uuID: \(String(describing: self.uuID!))")   let semaphore = DispatchSemaphore(value: 0)                 self.connectSocket { success in                     if success {                         Log.socketSuccessfullyConnected.add()                     } else {                         Log.errorWhileConnectingSocket.add()                     }                     self.update.remoteHandle = CXHandle(type: .phoneNumber, value: callerName)                     self.update.hasVideo = false                     self.update.localizedCallerName = callerName                     self.update.supportsGrouping = false                     self.update.supportsUngrouping = false                     self.update.supportsHolding = false                     self.provider.reportNewIncomingCall(with: self.uuID!, update: self.update) { error in                         Log.doneReporting.add()                         if error == nil {                             Log.didReportIncomingCall.add()                             if !stateCheck {                                 self.provider.reportCall(with: self.uuID!, endedAt: Date(), reason: .answeredElsewhere)                                 Log.reportedEndedCall.add()                                 self.uuID = nil                                 self.callID = nil                                 Log.deletedCallInfoFromAppDelegate.add()                             }                             semaphore.signal()                         } else {                             Log.errorWhileReportingIncomingCall.add(String(describing: error))                             semaphore.signal()                         }                     }         } else {             semaphore.signal()         }         semaphore.wait()         completion() }
Posted Last updated
.
Post not yet marked as solved
0 Replies
235 Views
Hi, I'm just wondering if there is a way to open a safari page from the iOS app I am developing with Swift. The link property could be used in this scenario but I want to emphasize that the page must be open on macOS. So basically what I want is like the handoff feature of Apple but mixed with the link property. Maybe I could open a page using link structure but kinda not display it? Is there any workaround you can think of?
Posted Last updated
.