使用admin.pushapps.mobi的iG的PhoneGap推送通知

时间:2015-03-23 13:00:36

标签: ios cordova phonegap-plugins pushapps

如何在ios平台上接收PhoneGap推送通知......?

我正在使用http://admin.pushapps.mobi控制台发送通知,我已经为ios配置了所有内容,并在我的javascript文件中使用了app令牌。我已经发送了admin.pushapps.mobi的通知,但它没有在我的应用中进行审核。

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

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

2 个答案:

答案 0 :(得分:0)

你应该检查PushApps的2件事情是否按预期工作:

  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];
    }
    

答案 1 :(得分:-1)

请勿使用pushapps.mobi向您提供所有有限的通知和用户计划,并且在您获得超过数百万用户后关闭您的帐户然后告诉您是否要返回您的帐户越来越多钱juswsh图层