简体   繁体   English

生产中的TestFlight setDeviceIdentifier

[英]TestFlight setDeviceIdentifier in production

In TestFlight's documentation , it says that settings the device identifier in production will likely cause your application to be rejected. 在TestFlight的文档中 ,它说在生产环境中设置设备标识符可能会导致您的应用程序被拒绝。

However, it says nothing about using the advertising id as a replacement. 但是,它没有提及使用广告ID进行替换。 I mean, it seems that apple would only reject it because retrieving the UDID is deprecated in iOS 7. 我的意思是,苹果似乎只会拒绝它,因为在iOS 7中不建议使用UDID。

With that said, would apple care if I track my users in TestFlight using the advertising identifier? 话虽如此,如果我使用广告标识符在TestFlight中跟踪我的用户,苹果公司会关心吗?

// 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. UDID已弃用,因此,他们跟踪用户的唯一方法是使用广告标识符。

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. 标识设备/用户的另一种方法是使用NSUUID类的UUID方法创建UUID,并将其十六进制字符串表示形式写入用户默认数据库。

In iOS 6 and later, Apple has done that work for you. 在iOS 6和更高版本中,Apple为您完成了这项工作。 Just call identifierForVendor method on the UIDevice class. 只需在UIDevice类上调用identifierForVendor方法即可。

Here's a code snipped that you can use with iOS6 and up: 这是一段可以在iOS6及更高版本上使用的代码:

#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 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TestFlight到生产 - TestFlight to Production TestFlight的开发和生产 - TestFlight development and production TestFlight 中用于生产和登台的单独应用程序? - Separate apps in TestFlight for production and staging? 使用 Testflight sdk 获取 iOS 应用的生产数据 - Getting Production data for iOS apps with Testflight sdk 用于Testflight和生产版本的单独的iOS应用和图标 - Separate iOS apps and icons for Testflight and production builds Meteor应用程序不会在生产中的iOS上下载数据,但可以在TestFlight中使用 - Meteor app does not download data on iOS in production, but works in TestFlight 如何将 google play 和 testflight 中的 beta 用户移动到生产应用程序 - How to move beta users in google play and testflight to the production app 现在,TestFlight Live成为私有的FlightPath测试版,我们还能将TestFlight留在生产版本中吗? - Now that TestFlight Live became private FlightPath beta, can we still leave TestFlight in production builds? iOS InApp 购买在生产中不起作用(在 testflight 中可以) - iOS InApp purchases do not work in Production (okay in testflight) 适用于Testflight版本的APNS aps-environment-Entitlement / App的生产版本 - APNS aps-environement-Entitlement for Testflight Version / Production build of App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM