AWSPushManagerConfiguration Class Reference
Inherits from | NSObject |
---|---|
Declared in | AWSPushManager.h AWSPushManager.m |
– initWithPlatformARN:
Returns an instance of AWSPushManagerConfiguration
. Use this as the configuration object for AWSPushManager.
- (instancetype)initWithPlatformARN:(NSString *)platformARN
Parameters
snsPlatformARN |
The SNS Platform ARN |
---|
Return Value
an instance of AWSPushManagerConfiguration
Discussion
Swift
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
AWSServiceManager.defaultServiceManager().defaultServiceConfiguration = configuration
let pushManagerConfiguration = AWSPushManagerConfiguration(snsPlatformARN: "SNS_PLATFORM_ARN")
AWSPushManager.registerPushManagerWithConfiguration(pushManagerConfiguration, forKey: "defaultPushManager")
Objective-C
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
identityPoolId:@"YourIdentityPoolId"];
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
credentialsProvider:credentialsProvider];
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
AWSPushManagerConfiguration *pushManagerConfiguration = [[AWSPushManager alloc] initWithSNSPlatformARN:@"SNS_PLATFORM_ARN"];
[AWSPushManager registerPushManagerWithConfiguration:pushManagerConfiguration
forKey:@"defaultPushManager"];
Declared In
AWSPushManager.h
– initWithPlatformARN:topicARNs:serviceConfiguration:
Returns an instance of AWSPushManagerConfiguration
. Use this as the configuration object for AWSPushManager.
- (instancetype)initWithPlatformARN:(NSString *)platformARN topicARNs:(nullable NSArray<NSString*> *)topicARNs serviceConfiguration:(nullable AWSServiceConfiguration *)serviceConfiguration
Parameters
platformARN |
The SNS Platform ARN |
---|---|
serviceConfiguration |
AWSServiceConfiguration object; nil for default configuration |
topicARN |
The list of SNS topics that could be registered |
Return Value
an instance of AWSPushManagerConfiguration
Discussion
Swift
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
let pushManagerConfiguration = AWSPushManagerConfiguration(snsPlatformARN: "SNS_PLATFORM_ARN", topicARNs: nil,serviceConfiguration: configuration)
AWSPushManager.registerPushManagerWithConfiguration(pushManagerConfiguration, forKey: "defaultPushManager")
Objective-C
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
identityPoolId:@"YourIdentityPoolId"];
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
credentialsProvider:credentialsProvider];
AWSPushManagerConfiguration *pushManagerConfiguration = [[AWSPushManager alloc] initWithSNSPlatformARN:@"SNS_PLATFORM_ARN"
topicARNs:nil
serviceConfiguration:configuration];
[AWSPushManager registerPushManagerWithConfiguration:pushManagerConfiguration
forKey:@"defaultPushManager"];
Declared In
AWSPushManager.h