V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
LSBs
V2EX  ›  iDev

有人搞蓝牙开发的吗?corebluetooth ble 外设 CBPeripheral identifier 在什么情况下会改变?

  •  
  •   LSBs · 2016-07-05 13:36:20 +08:00 · 2969 次点击
    这是一个创建于 2874 天前的主题,其中的信息可能已经有所发展或是发生改变。
    corebluetooth ble 外设 CBPeripheral identifier 在什么情况下会改变? 网上查了下资料众说纷纭. 现在确认的是不同的手机连同一个设备, identifier 是不同的. 一个手机连同一个设备. identifier 也会变吗? 是在什么情况下会变?
    7 条回复    2016-07-07 10:15:10 +08:00
    NovemberEleven
        1
    NovemberEleven  
       2016-07-05 13:48:35 +08:00
    每一个 iphone 手机的获取 identifier 都不一样,只有 android 能拿到 mac 地址。
    yemenchun1
        2
    yemenchun1  
       2016-07-05 14:41:24 +08:00
    你可以扫描所有的蓝牙设备然后选择连接呀, 如果只有一个蓝牙设备而且是你的设备就直接连接.
    LSBs
        3
    LSBs  
    OP
       2016-07-05 16:26:12 +08:00
    @yemenchun1 我现在需要知道的 identifier 如果在同一个手机同一个外设的情况下会不会改变
    LSBs
        4
    LSBs  
    OP
       2016-07-05 16:26:39 +08:00
    @NovemberEleven 那同一个手机连同一个外设能保证 identifier 不变吗?
    yemenchun1
        5
    yemenchun1  
       2016-07-05 18:22:43 +08:00 via iPhone
    @LSBs 我记不清了,之前写的时候想找一个设备的固定标识符,但没有成功。你可以下载一个 LightBlue App 直接测试,如果你自己不会写的话。
    NovemberEleven
        6
    NovemberEleven  
       2016-07-05 18:53:45 +08:00
    @LSBs 能~
    jamescheng
        7
    jamescheng  
       2016-07-07 10:15:10 +08:00
    应该是会变的...iOS8 以后就不能用 macaddress 了...我们那个时候做了绑定了一个 macaddress 的属性...然后去解析的...
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2466 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 08:04 · PVG 16:04 · LAX 01:04 · JFK 04:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.