广告标示符(adId)  adfv标示符的那些问题
2015-11-24 19:01
204 查看
1.如何识别一个应用安装在同一个设备上呢?
2.如何识别一个企业的应用安装在同一个设备上呢?
苹果给我们提供了advertisingIdentifier 来解决问题1;
只要是同一台设备,那么advertisingIdentifier就是一样的
但是如果在设置-隐私-广告那里关掉这个权限或是还原设备的话,就没办法了哭死去吧
苹果给我们提供了identifierForVendor 来作为一个企业的app标示符
比如: com.game.yoyo
com.game.xoxo
只要在同一台设备上,那么 identifierForVendor 是一样的
如果:com.game.yoyo
com.buyer.yoyo
不管是不是同一个应用 identifierForVendor 都是不一样的
上代码:
广告id:
#import<AdSupport/AdSupport.h>
//每个设备有唯一一个,如果重置广告或设置-隐私-关闭广告就会关闭更换
NSString *adId = [[[ASIdentifierManagersharedManager]advertisingIdentifier]UUIDString];
企业id:
NSString *idfv = [[[UIDevicecurrentDevice]identifierForVendor]UUIDString];
2.如何识别一个企业的应用安装在同一个设备上呢?
苹果给我们提供了advertisingIdentifier 来解决问题1;
只要是同一台设备,那么advertisingIdentifier就是一样的
但是如果在设置-隐私-广告那里关掉这个权限或是还原设备的话,就没办法了哭死去吧
苹果给我们提供了identifierForVendor 来作为一个企业的app标示符
比如: com.game.yoyo
com.game.xoxo
只要在同一台设备上,那么 identifierForVendor 是一样的
如果:com.game.yoyo
com.buyer.yoyo
不管是不是同一个应用 identifierForVendor 都是不一样的
上代码:
广告id:
#import<AdSupport/AdSupport.h>
//每个设备有唯一一个,如果重置广告或设置-隐私-关闭广告就会关闭更换
NSString *adId = [[[ASIdentifierManagersharedManager]advertisingIdentifier]UUIDString];
企业id:
NSString *idfv = [[[UIDevicecurrentDevice]identifierForVendor]UUIDString];
相关文章推荐
- CenterOS6.5 配置sendmail
- Tomcat日志配置
- C++ 文件里面调用C文件里面的函数——extern "C" 用法解析
- 7种文件类型属性的获取与修改(系统调用)
- arm-linux3.0自定义系统调用
- Neither BindingResult nor plain target object for bean name 'internationalMakePrice' available as re
- 第二个Sprint
- OpenGL: 渲染管线理论详解
- Eclipse中自动提示的方法参数都是arg0,arg1的解决方法
- oracle查看允许的最大连接数和当前连接数等信息
- cassandra命令
- Andriod React Native 样式表中可用样式属性
- plsql中正则及decode中使用
- hibernate 环境搭建
- PL/SQL Developer 的 SQL 编辑窗口显示行号
- zoj3310 DP题
- 【以太网数据结构】地址解析协议ARP
- SQL使用记录
- Cavans时钟动画
- 77个因子的合数的编程