'-[UIDevice uniqueGlobalDeviceIdentifier]: unrecognized selector sent to instance 0x68170c0

本文介绍了一种在iOS开发中遇到的UUID生成异常问题及其解决方案。该问题源于UIDevice+IdentifierAddition.m文件未被编译导致的方法调用失败。通过检查Xcode中的构建阶段并确保相关文件被正确编译,可以有效解决此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


8 down vote accepted

It looks like UIDevice+IdentifierAddition.m is not being compiled. To check / add it:

  1. Click on the project in the navigator on the left in Xcode.
  2. Select the app target.
  3. Select the 'Build Phases' tab.
  4. Open up 'Compile Sources'.
  5. Check that UIDevice+IdentifierAddition.m is in there. If not, then click the '+', select it and click add.

The exception points to this as the fix because it's saying that there is no method on UIDevice called uniqueGlobalDeviceIdentifier, which is added by the category.


//解决办法

http://stackoverflow.com/questions/9897162/ios-uuid-generation-throwing-a-strange-exception

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值