문제

In TestFlight's documentation, it says that settings the device identifier in production will likely cause your application to be rejected.

However, it says nothing about using the advertising id as a replacement. I mean, it seems that apple would only reject it because retrieving the UDID is deprecated in iOS 7.

With that said, would apple care if I track my users in TestFlight using the advertising identifier?

// Obsolete in iOS 7 and Apple will reject application...
MonoTouch.TestFlight.TestFlight.SetDeviceIdentifier(UIDevice.CurrentDevice.UniqueIdentifier);
// ...but will it reject this?
MonoTouch.TestFlight.TestFlight.SetDeviceIdentifier(ASIdentifierManager.SharedManager.AdvertisingIdentifier.ToString());
MonoTouch.TestFlight.TestFlight.TakeOff(applicationToken);

Thanks!

도움이 되었습니까?

해결책

The UDID is deprecated so they only way to track users is using advertising identifier.

That's nothing wrong with that and it will not cause any problems during review.

다른 팁

Another way to identify a device/user is to use the UUID method of the NSUUID class to create a UUID and write its hex-string representation to the user defaults database.

In iOS 6 and later, Apple has done that work for you. Just call identifierForVendor method on the UIDevice class.

Here's a code snipped that you can use with iOS6 and up:

#define kApplicationUUIDKey @"kApplicationUUIDKey"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    NSString *UUID = [[NSUserDefaults standardUserDefaults] objectForKey:kApplicationUUIDKey];
    if (!UUID) {
        UUID = [[[NSUUID UUID] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""];

        [[NSUserDefaults standardUserDefaults] setObject:UUID forKey:kApplicationUUIDKey];
        [[NSUserDefaults standardUserDefaults] synchronize];
    }

    [TestFlight setDeviceIdentifier:UUID];
    [TestFlight takeOff:kTestFlightIdentifierKey];

...

}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top