博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
替代udid方法
阅读量:2396 次
发布时间:2019-05-10

本文共 1044 字,大约阅读时间需要 3 分钟。

转载自:https://github.com/gekitz/UIDevice-with-UniqueIdentifier-for-iOS-5

 
 authored 9 months ago
a year ago  []
2 years ago  []
2 years ago  []
9 months ago  []
a year ago  []
 README.markdown

Description

Apple stopped supporting a unique identifier for iOS. This source code solves the problem. It generates a unique identifier based on the mac address of the device in combination with the bundle identifier.

What you need to do:

  • copy NSString+MD5Addition and UIDevice+IdentifierAddition to your project.

  • if your are using ARC in your project, you have to add the -fno-objc-arc flag to both files. 

  • use [[UIDevice currentDevice] uniqueDeviceIdentifier] to retrieve the unique identifier (it's a hash of your Bundle ID + MAC address)

  • use [[UIDevice currentDevice] uniqueGlobalDeviceIdentifier] to retrieve a global unique identifier (it's a hash of the MAC address, used for tracking between different apps).

  • have fun and follow  ;)

//Thanks to Erica Sadun for her UIDevice+Hardware Addition (used for the mac address retrieval).

License

see license file.

你可能感兴趣的文章
网易工程师 Ruheng 一文教你轻松学会 Git
查看>>
文字与编码的奥秘(下)
查看>>
阿里分布式事务框架 GTS 全解析
查看>>
一个字节的网络漫游故事独白
查看>>
RabbitMQ 消息可靠性、延时队列以及高可用集群
查看>>
分布式系统的可靠性指的是什么 —— 你可能从来就没有认真思考过
查看>>
布隆过滤器过时了,未来属于布谷鸟过滤器?
查看>>
面试题 —— 数字幻方
查看>>
5折抢购最后一天 | 戴尔顶级配置电脑,限时秒!
查看>>
SpringBoot 究竟是如何跑起来的?
查看>>
阿里开源限流组件 Sentinel 集群流控全解析
查看>>
深度解密HTTP通信细节
查看>>
日活亿级用户的服务器架构要怎么搭?
查看>>
MySQL 是怎样运行的:从根儿上理解 MySQL
查看>>
开源搜索技术的核心引擎 —— Lucene
查看>>
码洞技术文章大全
查看>>
RPC 服务器之【多进程描述符传递】高阶模型
查看>>
程序员年龄增大后的职业出路是什么?
查看>>
快学 Go 语言 第 1 课 —— Hello World
查看>>
《快学 Go 语言》第 4 课 —— 低调的数组
查看>>