Help Center> Object Storage Service> SDK Reference> iOS> Event Notification> Viewing Event Notification Settings

Viewing Event Notification Settings

You can call getBucketNotification to view event notification settings of a bucket. Sample code is as follows:

static OBSClient *client;
NSString *endPoint = @"your-endpoint";
NSString *SK = @"*** Provide your Secret Key ***";
NSString *AK = @"*** Provide your Access Key ***";
    
// Initialize identity authentication.
OBSStaticCredentialProvider *credentialProvider = [[OBSStaticCredentialProvider alloc] initWithAccessKey:AK secretKey:SK];
    
//Initialize service configuration.
OBSServiceConfiguration *conf = [[OBSServiceConfiguration alloc] initWithURLString:endPoint credentialProvider:credentialProvider];
    
// Initialize an instance of OBSClient.
client = [[OBSClient alloc] initWithConfiguration:conf];
    
// View event notification settings.
OBSGetBucketNotificationRequest *request = [[OBSGetBucketNotificationRequest alloc] initWithBucketName:@"bucketname"];
[client getBucketNotification:request completionHandler:^(OBSGetBucketNotificationResponse *response, NSError *error){
   NSLog(@"%@",response);
}];