Displaying advertising identifier value in iOS app (XCode 5)

Needed to display advertising identifier within a simple one page app.
Here are the items I added to include this value. This was in Xcode 5.

File : BlahViewController.m

label

@property (weak, nonatomic) IBOutlet UILabel *advertisingIdentifierval;

on load

- (void)viewDidLoad
{
[super viewDidLoad];
self.advertisingIdentifierval.text = [self getadvertisingIdentifierval];
}

get the actual string

- (NSString *)getadvertisingIdentifierval {
NSString *advertisingIdentifierval = [[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString];
return advertisingIdentifierval;
}

File : BlahViewController.h

import necessary class

#import <AdSupport/ASIdentifierManager.h>

File : BlahViewController.xib

Created label to show the advId using the UI label tools.
Connected referencing outlet (Ctrl + drag):
advertisingIdentifierval to File’s Owner

Built and voila … it shows up in my simple app.