Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions demo-ios-objc/demo-ios-objc/IdentifyViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "AppDelegate.h"
#import "demo_ios_objc-Swift.h"

@import AppTrackingTransparency;
@import OptableSDK;

@interface IdentifyViewController ()
Expand Down Expand Up @@ -51,18 +52,23 @@ - (IBAction)dispatchIdentify:(id)sender {

_identifyOutput.text = output;

NSError *error = nil;

[OPTABLE identify: @[
[OptableSDKIdentifier identifierWithType:OptableSDKIdentifierType_EmailAddress value:email],
[OptableSDKIdentifier identifierWithType:OptableSDKIdentifierType_PhoneNumber value:@"+1234567890"],
[OptableSDKIdentifier identifierWithType:OptableSDKIdentifierType_AppleIDFA value:@"06DE8C6A-A431-4235-A262-E3A9C2CCEB34"],
[OptableSDKIdentifier identifierWithType:OptableSDKIdentifierType_GoogleGAID value:@"D04BB8C3-5A3E-4964-9757-D38365F59E6A"],
[OptableSDKIdentifier identifierWithRawType:@"c" value:@"new-custom.ABC"],
[OptableSDKIdentifier identifierWithType:OptableSDKIdentifierType_Custom value:@"custom-7" customIdx:@7],
[OptableSDKIdentifier identifierWithString:@"c9:custom-9-id"],
]
error: &error];
// If the user gives consent to be tracked - IDFA will be added
// automatically to the list of identifiers,
// either in the `identify` or `targeting` calls
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
dispatch_async(dispatch_get_main_queue(), ^{
NSError *error = nil;

[OPTABLE identify: @[
[OptableSDKIdentifier identifierWithType:OptableSDKIdentifierType_EmailAddress value:email],
[OptableSDKIdentifier identifierWithType:OptableSDKIdentifierType_PhoneNumber value:@"+1234567890"],
[OptableSDKIdentifier identifierWithRawType:@"c" value:@"new-custom.ABC"],
[OptableSDKIdentifier identifierWithType:OptableSDKIdentifierType_Custom value:@"custom-7" customIdx:@7],
[OptableSDKIdentifier identifierWithString:@"c9:custom-9-id"],
]
error: &error];
});
}];
}

// MARK: - UITextFieldDelegate
Expand Down
Loading