最近要做一个voip方面的业务,教程一搜一大堆,但是给手机推voip服务的后台几乎没有涉及,有没有朋友做过类似的功能,帮帮我呗。后台我只会APNS推送,voip该如何推啊?
apns可以附带信息,手机端需要安装voip的应用,估计会有提示
apns可以附带信息,手机端需要安装voip的应用
VoIP 其实和APNS 一样但是目前没有发现类似于JPush 做Apns 一样的第三方来做VOIP 的所以还是按照官方文档一步一步弄,如PushKit 而且实现VoIP 还需要注册单独的证书
而且需要在Apple开发者后台做相应的配置。而且要实现单独的 delegate :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self voipRegistration]; return YES; }
// Register for VoIP notifications
- (void) voipRegistration { dispatch_queue_t mainQueue = dispatch_get_main_queue() // Create a push registry object PKPushRegistry * voipRegistry = [[PKPushRegistry alloc] initWithQueue: mainQueue]; // Set the registry's delegate to self voipRegistry.delegate = self; // Set the push type to VoIP voipRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP]; }
还有就是 APNS 和VoIP 实现的推送是不一样的 token 所以不能通过APNS 做 VoIP (目前我认为 )
希望对你有帮助
中国地区禁止使用CallKit