我在我的应用程序中使用pushKit但是didUpdatePushCredentials委托从未调用过.xcode 9没有Voice over IP
功能 - >背景模式 - > IP语音
我正在关注此链接.. 实现pushkit
证书再次生成但不起作用.
我实现了新的pushkit voip推送通知,直到现在它已经在我测试的所有iOS8设备中正常工作,除了一个.我有一个iPhone iOS 8.0.2没有接收任何voip推送.它在我获得pushRegistry时正确注册:didUpdatePushCredentials:forType:delegate我测试了之前的远程推送(registerForRemoteNotifications)但是没有收到发送的voip push.
所以我的问题是:
*任何人都经历过pushkit voip推送通知的相同行为?
*它可能与iOS版本(iOS 8.0.2)有关吗?
*任何拥有此版本(iOS 8.0.2)的人都可以实施pushkit voip push并尝试接收voip推送通知以便丢弃版本问题吗?
如果您需要实现pushkit voip推送通知,您可以在stackoverflow问题上查看我的答案
我已经实施了PushKit。我已按照以下步骤操作:
我能够获得didUpdatePushCredentials设备令牌。工作于 --> iPhone 5s , iPhone6 Plus
didUpdatePushCredentials 不适用于 --> iPhone6 和 iPhone7
我为所有设备使用相同的证书和构建。不知道确切的问题。如果有人遇到过这种问题,请分享解决方法。
我的代码和证书链接
代码 -> https://www.dropbox.com/sh/x2615t7xn8mavs3/AADbX5nBuF5_08YNPX8wI59ga?dl=0
cer -> https://www.dropbox.com/sh/70l4htj1c46emog/AABxBalaoN1JP22dQp8-mNXGa?dl=0
Solution -----> I have changed Bundle identifier And create New certificate with New BundleId.
Run Code Online (Sandbox Code Playgroud) 我正在关注这篇文章和M Penades建立VoIP通知演示的答案.我可以使用注册通知,didRegisterUserNotificationSettings并可以从中获取voip令牌didUpdatePushCredentials.
但是当我使用休斯顿模拟向我的设备发送通知时,我可以1 push notification sent successfully从控制台获取消息但在设备端没有操作或日志.似乎didReceiveIncomingPushWithPayload永远不会被调用.
PS我正在使用Xcode 7.3,iPhone 6(iOS 9.3)和iPad Mini(iOS 9.3)进行开发.分布式Ad Hoc ipa用于安装.
这里的代码发布了.
import UIKit
import PushKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let voipRegistry = PKPushRegistry(queue: dispatch_get_main_queue())
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
//Enable all notification type. VoIP Notifications don't present a UI but we will use …Run Code Online (Sandbox Code Playgroud) 我正在使用OS X Yosemite
我在Composer中运行以下命令,因为Laravel无法始终正常下载和安装:
composer diagnose
结果:
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: …Run Code Online (Sandbox Code Playgroud)