//
//  DOPushNotifications.h
//  DOCore
//
//  Created by Ben Dolman on 10/29/14.
//
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, DOAPNsEnvironment) {
    DOAPNsEnvironmentProduction,
    DOAPNsEnvironmentDevelopment,
};

typedef NS_ENUM(NSUInteger, DOPushNotificationType) {
    DOPushNotificationTypeUnknown = 0,
    DOPushNotificationTypeSync,
    DOPushNotificationTypePing
};

@interface NSBundle (PushNotifications)

/**
 * Detects the current APS environment by reading the bundle's embedded provisioning profile.
 * If there is an error reading the profile the production environment is assumed.
 */
- (DOAPNsEnvironment)do_APNsEnvironment;

@end

extern NSString *DOStringFromAPNsEnvironment(DOAPNsEnvironment environment);

/// Determines the type of notification
extern DOPushNotificationType DOPushNotificationTypeForUserInfo(NSDictionary *userInfo);
