Skip to content

Commit 7fd05e6

Browse files
authored
Merge pull request #1766 from segmentio/DOC-279
DOC-279
2 parents 032eb6a + b641a62 commit 7fd05e6

File tree

1 file changed

+3
-17
lines changed
  • src/connections/sources/catalog/libraries/mobile/ios

1 file changed

+3
-17
lines changed

src/connections/sources/catalog/libraries/mobile/ios/index.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -777,32 +777,18 @@ Analytics.setup(with: configuration)
777777
...
778778

779779
SEGAnalyticsConfiguration* configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"];
780-
781780
// Enable advertising collection
782781
configuration.enableAdvertisingTracking = YES;
783782
// Set the block to be called when the advertisingID is needed
784783
// NOTE: In iOS 14, you'll need to manually do authorization elsewhere and only when it has been authorized, return the advertisingIdentifier to segment via the block below
785-
configuration.adSupportBlock = ^{
786-
return [[ASIdentifierManager sharedManager] advertisingIdentifier];
787-
}
788-
784+
configuration.adSupportBlock = ^{
785+
return [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
786+
};
789787
[SEGAnalytics setupWithConfiguration:configuration];
790788
```
791789
{% endcodeexampletab %}
792790
{% endcodeexample %}
793791
794-
> warning ""
795-
> In some cases, builds may fail with the following error if you are using XCode version 12 or higher:
796-
> `Incompatible block pointer types assigning to 'SEGAdSupportBlock _Nullable' (aka 'NSString * _Nonnull (^)(void)') from 'NSUUID * _Nonnull (^)(void)'`
797-
>
798-
> If you see this error, change the following on **line 39** of the `SEGAnalyticsConfiguration.h` class:
799-
>
800-
> From this:
801-
> `typedef NSString *_Nonnull (^SEGAdSupportBlock)(void);`
802-
>
803-
> To this:
804-
> `typedef NSUUID *_Nonnull (^SEGAdSupportBlock)(void);`
805-
>
806792
807793
The same value for IDFA will used across all (device and cloud-mode) integrations.
808794

0 commit comments

Comments
 (0)