PhoneGap使用admin.pushapps.mobi为ios推送通知



如何在ios平台中接收PhoneGap推送通知。。。?

我正在使用http://admin.pushapps.mobi控制台发送通知,我已经为ios配置了一切,并在我的javascript文件中使用了应用令牌。我已经从admin.pushapps.mobi发送了一个通知,但它没有在我的应用程序中进行审查。

我正在使用他们提供的演示。。。。。下面是完整的链接https://github.com/PushAppsService/PhonegapBuildExampleApp

有人能解释一下我错在哪里吗?如果有任何其他具有PhoneGap文档的推送通知服务,这将是有帮助的。

您应该检查两件事,以便PushApps按预期工作:

  1. 证书和设置配置文件匹配
  2. 您应该验证您的AppDelegate.m包含的wiki:中提到的内容

    #import "PushApps.h"
    #pragma mark - Push Notifications
    #ifdef __IPHONE_8_0
    - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
    {
       [[PushAppsManager sharedInstance] didRegisterUserNotificationSettings:notificationSettings];
    }
    - (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler
    {
       [[PushAppsManager sharedInstance] handleActionWithIdentifier:identifier forRemoteNotification:userInfo  
    completionHandler:completionHandler];
    }
    #endif
    - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
    {
       // Notify PushApps of a successful registration.
       [[PushAppsManager sharedInstance] updatePushToken:deviceToken];
    }
    // Gets called when a remote notification is received while app is in the foreground.
    - (void)application:(UIApplication *)application didReceiveRemoteNotification:  (NSDictionary *)userInfo
    {
       [[PushAppsManager sharedInstance] handlePushMessageOnForeground:userInfo];
    }
    - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
    {
       // keeps you up to date with any errors during push setup.
       [[PushAppsManager sharedInstance] updatePushError:error];
    }
    

不要使用pushapps.mobi给你所有有限的通知和用户计划,在你获得超过一百万用户后,关闭你的账户,然后告诉你是否想退还你的账户越来越多的钱juswsh层

最新更新