标签: pushkit

Xcode 9中缺少Voip(IP语音)

我在我的应用程序中使用pushKit但是didUpdatePushCredentials委托从未调用过.xcode 9没有Voice over IP

功能 - >背景模式 - > IP语音

在此输入图像描述

我正在关注此链接.. 实现pushkit

证书再次生成但不起作用.

voip ios pushkit

17
推荐指数
1
解决办法
6255
查看次数

WhatsApp 网络客户端如何仍然使用最新的 iOS 更新(SDK 版本 13.0+)?

暗模式支持已添加到 WhatsApp 客户端的 2.20.31 版(2020 年 3 月发布)中。这是一项仅限 iOS 13 的功能,从外观和感觉来看,它似乎是一个完全本机的实现。我认为可以安全地假设该应用程序现在正在使用 iOS SDK 13.0 或更高版本进行编译。

问题是,从 iOS 13 开始,Apple 现在要求在收到 VoIP 通知时显示本机呼叫屏幕- 否则,该应用程序将不会收到任何进一步的 VoIP 通知。在之前的 iOS 版本中,一些应用程序(包括 WhatsApp)似乎在用户尝试使用 Web 客户端时使用“假”传入 VoIP 呼叫在后台静默唤醒应用程序,以便后者可以直接连接和交换数据用手机。

但是,截至最新版本,尽管 Apple 引入了限制,但 Web 客户端似乎仍能像以前一样工作。使用调试器可以在用户在 PC 上打开 Web 客户端时观察到 iOS 应用程序唤醒,但从未显示呼叫屏幕。这可以根据我们的需要反复进行。

WhatsApp 的日志似乎证实了上面写的内容

default 17:09:44.515731+0000    callservicesd   Call source <CXXPCCallSource 0x111ecb0a0 identifier=UKFA9XBX6K.net.whatsapp.WhatsApp isConnected=1 processIdentifier=417 isPermittedToUsePublicAPI=1 isPermittedToUsePrivateAPI=0> registered with configuration <CXProviderConfiguration 0x111e9bb40 localizedName=?WhatsApp ringtoneSoundURL=(null) iconTemplateImageData=0x0 maximumCallGroups=1 maximumCallsPerCallGroup=1 supportsAudioOnly=1 supportsVideo=1 supportsEmergency=0 supportsVoicemail=0 supportsCurrentPlatform=1 includesCallsInRecents=1 audioSessionID=1151157 supportedHandleTypes=2>
Run Code Online (Sandbox Code Playgroud)

如果我们尝试使用我们的应用程序执行此操作,结果会大不相同: …

ios whatsapp pushkit

17
推荐指数
1
解决办法
2215
查看次数

Firebase Cloud Messaging是否支持VOIP pushkit服务?

有没有人对Firebase Cloud Messaging支持VOIP pushkit服务有所了解.

如果是,那么有人可以提供相同的指导.

同样的事情在Skype/Hangout/WhatsApp或任何其他基于VOIP的应用程序中实现.

提前致谢.

push-notification ios firebase google-cloud-messaging pushkit

15
推荐指数
2
解决办法
8220
查看次数

使用PushKit VoIP通知的后台运行时间

我正在编写使用PushKit通知的VoIP应用程序,我找不到有多少后台执行时间给我一个传入推送?

我检查的第一件事是,[UIApplication sharedApplication].backgroundTimeRemaining但是这个计数器不会被下一次推送重置,即使使用,应用程序仍然保持活动状态backgroundTimeRemaining == 0.

我的问题是如何保持时间,直到应用程序被系统冻结?或者如何根据传入的PushKit推送次数计算此时间.

在应用程序冻结之前,我需要这样才能优雅地关闭套接字/连接.

ios pushkit

13
推荐指数
0
解决办法
893
查看次数

在iOS 9+上永远不会调用Apple PushKit didUpdatePushCredentials

我正在为iPhone开发一个VoIP应用程序.为了接听电话,Apple开发了PushKit,因此开发人员可以使用APNS发送VoIP通知.

在iOS 8上一切正常.当我更新到iOS 9时,注册后PKRegistryDelegate不会触发该方法didUpdatePushCredentials.

有什么想法/建议吗?

iphone voip apple-push-notifications ios pushkit

12
推荐指数
1
解决办法
2631
查看次数

间歇和临时iOS钥匙串故障

我们有一个应用程序,它严重依赖于能够使用iOS访问用户的会话令牌Keychain.当我们的应用程序打开时,首先检查的是令牌是否可用 - 如果没有,我们会向用户显示登录屏幕.我们不使用任何第三方库,并使用Keychain's SecItemAdd()/ SecItemCopyMatching()直接使用以下选项:

  • kSecClassGenericPassword
  • kSecAttrAccessibleAlwaysThisDeviceOnly

在正常使用期间,我们看到很少甚至没有问题.

问题

我们已经有用户报告,在打开他们的应用程序时,他们会显示登录屏幕(建议Keychain无法找到值),当他们实际登录时.我们发现在这个例子中,我们发现在杀死和重新启动时该应用程序,用户恢复正常(会话被发现Keychain).一旦我们发现这一点,我们尝试添加一个指数退避来继续查询Keychain,认为它可能只在前几秒内不可用.这不起作用,并向我们证明Keychain似乎无法用于整个应用程序启动会话.我们无法重现此问题.它似乎非常间歇性地发生.

经过进一步调查,我们发现通常,用户在遇到此问题之前已收到VoIP推送.我们仍然无法可靠地重现这个问题,但是在调试时发现我们Keychain.session被发现是nil在接收这些推送时(我们也依赖它),这是在用户打开他们的应用程序之前看到他们是伪"退出".

我们使用PushKitPKPushRegistry进行VoIP推送.这要求我们的应用程序启用"后台模式:IP语音".我们按照Apple的文档建议使用所有这些.这是一个示例:

func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType) {
    guard let _ = Keychain.session else {
        print("Session token not available")
        return
    }
    handle(notification: payload.dictionaryPayload)
}
Run Code Online (Sandbox Code Playgroud)

此代码依赖于Keychain.session在接收VoIP推送时立即可用.如前所述,我们已经看到了它不可用的实例,因此这个函数退出并简单地返回.

我也发现了这个相关的Apple论坛帖子,暗示这可能是一个iOS错误.

有谁可以帮我们解决这个问题?任何帮助将不胜感激.即使这实际上是一个iOS错误,我们也可以采用解决方法.

keychain ios swift pushkit callkit

12
推荐指数
2
解决办法
600
查看次数

iOS 13 Killing应用程序,因为它在收到PushKit VoIP回调后从未向系统发布来电

升级到iOS Beta 13之后,我注意到了一件不愉快的事情:我的应用有时会因传入的VoIP推送而崩溃。

在崩溃报告中,我看到以下内容:

iOS 13 Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP callback 

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x1af21b9f0 __exceptionPreprocess
1  libobjc.A.dylib                0x1af7284fc objc_exception_throw
2  CoreFoundation                 0x1af11efec + 
 [_CFXNotificationTokenRegistration keyCallbacks]
3  Foundation                     0x1aeda1330 -[NSAssertionHandler 
 handleFailureInMethod:object:file:lineNumber:description:]
4  PushKit                        0x19caa6b54 -[PKPushRegistry 
 _terminateAppIfThereAreUnhandledVoIPPushes]
5  libdispatch.dylib              0x1afa441ec _dispatch_client_callout
6  libdispatch.dylib              0x1af9f6c6c 
_dispatch_lane_barrier_sync_invoke_and_complete
7  PushKit                        0x19caa5b74 __73-[PKPushRegistry 
 voipPayloadReceived:mustPostCall:withCompletionHandler:]_block_invoke
8  libdispatch.dylib              0x1afa43678 
 _dispatch_call_block_and_release
9  libdispatch.dylib              0x1afa441ec 
  _dispatch_client_callout

10 libdispatch.dylib              0x1af9f61f8 
_dispatch_main_queue_callback_4CF$VARIANT$mp
11 CoreFoundation                 0x1af1992a0 
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE …
Run Code Online (Sandbox Code Playgroud)

voip apple-push-notifications pushkit callkit ios13

11
推荐指数
1
解决办法
5275
查看次数

Android中的VOIP推送通知

我正在开发一个VOIP应用程序.VOIP推送是从亚马逊SNS发送的,使用推送套件和呼叫套件我们显示来电屏幕.即使应用程序处于后台或退出时,也可以显示此调用者屏幕.

不幸的是,android没有VOIP推送.如何在Android中实现?或者有任何解决方案可以在两个平台上工作吗?

android voip ios pushkit callkit

8
推荐指数
1
解决办法
3705
查看次数

iOS 13 中的 VoIP 来电本机蜂窝通话失败

我已经在 iOS 中使用 VoIP PushKit 实现了用于音频和视频通话的 CallKit,它在 iOS 12 和之前的版本中运行良好,在 iOS 13 和 13.1 中也运行正常。

但它在两种情况下失败:

1)我们的应用程序处于前台状态。当蜂窝电话正在运行并且收到 VoIP 推送时,呼叫套件来电屏幕会显示 5 - 10 秒,然后蜂窝电话和 VOIP 通话都失败并显示“呼叫失败”警报。

2)我们的应用程序处于后台或已终止状态。当蜂窝电话正在运行并且收到 VoIP 推送时,蜂窝电话和 VOIP 通话都会失败,并显示“呼叫失败”警报。这次没有显示来电界面。

我在这里展示我的代码:

- (void)registerAppForVOIPPush {

    PKPushRegistry *pushRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()];
    pushRegistry.delegate = self;
    pushRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP];
}
Run Code Online (Sandbox Code Playgroud)

然后推送代表

#pragma mark PKPushRegistryDelegate ----

- (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials: (PKPushCredentials *)credentials forType:(NSString *)type {

    NSString *newToken = [self hexadecimalStringFromData:credentials.token];
    //Make a note of this token to a server to send VOIP for …
Run Code Online (Sandbox Code Playgroud)

voip objective-c pushkit callkit ios13

8
推荐指数
1
解决办法
2534
查看次数

PushKit没有构思凭据

我在这里挣扎了一段时间,可能这是我的错误,但我无法在任何地方找到它,这是一个答案.

我在某些方面实现了PushKit,但没有一个是有效的.

我已经添加了正确的后台模式,以正确的方式实现了回调,didUpdatePushCredentials正在被正常调用...

但是,credentials: PKPushCredentials!变量,给我一个错误指针......它不是空的......不是零...没有任何东西......它根本就没有值......它被分配了垃圾......因为这个原因..我收到了EXC_BREAKPOINT ..

我试过3种不同的设备......行为相同......

我已经创建了VoIP推送证书......

我以不同的方式做到了:

  • 通过在didRegisterForRemotePushNotification之后创建void Push Registry对象
  • 通过创建推送注册表而无需注册远程推送通知...
  • 通过使用主队列,全局队列和自定义队列创建注册表.

总是一样......

这是代码:

extension AppDelegate : PKPushRegistryDelegate {

func registerForVoipPush() {

    self.registry = PKPushRegistry(queue:nil)

    if self.registry != nil {

        self.registry!.delegate = self
        self.registry!.desiredPushTypes = Set<String>(arrayLiteral: PKPushTypeVoIP)
    }

    //let notificationSettings = UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories:nil)
    //UIApplication.sharedApplication().registerUserNotificationSettings(notificationSettings)
}

func pushRegistry(registry: PKPushRegistry!, didUpdatePushCredentials credentials: PKPushCredentials!, forType type: String!) {

    //print out the VoIP token. We will use this to test the nofications.
    NSLog("voip token: \(credentials.token)") …
Run Code Online (Sandbox Code Playgroud)

voip push ios pushkit

7
推荐指数
1
解决办法
1618
查看次数