iOS開發(fā)之藍(lán)牙開發(fā)

藍(lán)牙

1.GameKit
簡介:

  • 實現(xiàn)藍(lán)牙設(shè)備之間的通訊
  • 只能使用在iOS設(shè)備之間同一個應(yīng)用內(nèi)連接
  • 從iOS7開始過期了
  • 但是GameKit是最基本的藍(lán)牙通訊框架
  • 通過藍(lán)牙可以實現(xiàn)文件的共享(僅限設(shè)備沙盒中的文件)
  • 此框架一般用于游戲開發(fā)(比如五子棋對戰(zhàn))
#import "ViewController.h"
#import <GameKit/GameKit.h>

@interface ViewController ()<GKPeerPickerControllerDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate>
/**
 *  顯示圖片
 */
@property (weak, nonatomic) IBOutlet UIImageView *showImg;

/*
 *  保存當(dāng)前回話
 */
@property (nonatomic, strong) GKSession *session;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

#pragma mark - delegate
/*
 * 連接藍(lán)牙的方式    附近    在線
 */
- (void)peerPickerController:(GKPeerPickerController *)picker didSelectConnectionType:(GKPeerPickerConnectionType)type {
    NSLog(@"%s  %d  type =%lu  picker %@",__func__,__LINE__,(unsigned long)type,picker);
}

// 連接會話的方式   附近  在線
- (GKSession *)peerPickerController:(GKPeerPickerController *)picker sessionForConnectionType:(GKPeerPickerConnectionType)type {
    
    return nil;
}

/* 連接成功
 *  peerID  連接成功的設(shè)備id
 *  session  當(dāng)前回話  只需要保存當(dāng)前的會話  即 可 數(shù)據(jù)傳遞
 */
- (void)peerPickerController:(GKPeerPickerController *)picker didConnectPeer:(NSString *)peerID toSession:(GKSession *)session {
    
    // 隱藏選擇器
    [picker dismiss];
    
    // 接收數(shù)據(jù)的回調(diào)  GameKIt  必須實現(xiàn)的
    [session setDataReceiveHandler:self withContext:nil];
    
    // 保存會話
    self.session = session;
}

// 只要有數(shù)據(jù)回來  那么就會調(diào)用
- (void) receiveData:(NSData *)data fromPeer:(NSString *)peer inSession: (GKSession *)session context:(void *)context
{
//    if (!data) return;
    // 轉(zhuǎn)換圖片
    UIImage *img = [UIImage imageWithData:data];
    
    dispatch_async(dispatch_get_main_queue(), ^{
        self.showImg.image = img;
    });
}

/*
 *  退出
 */
- (void)peerPickerControllerDidCancel:(GKPeerPickerController *)picker
{
    
}

#pragma mark - imageDelegate
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info
{
    self.showImg.image = info[UIImagePickerControllerOriginalImage];
    [picker dismissViewControllerAnimated:YES completion:nil];
}

#pragma mark - 按鈕的點擊
- (IBAction)connect:(id)sender {
    // 創(chuàng)建藍(lán)牙選擇器
    GKPeerPickerController *picker = [[GKPeerPickerController alloc]init];
    picker.delegate = self;
    // 顯示
    [picker show];
}

- (IBAction)selectImg:(id)sender {
    UIImagePickerController *imgPicker = [[UIImagePickerController alloc]init];
    imgPicker.delegate = self;
    imgPicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    [self presentViewController:imgPicker animated:YES completion:nil];
    
}
- (IBAction)sendImg:(id)sender {
    if (!self.showImg.image) return;
    //圖片轉(zhuǎn)化
    NSData *data = UIImagePNGRepresentation(self.showImg.image);
    
//    GKSendDataReliable  安全模式
//    GKSendDataUnreliable 不安全模式
    [self.session sendDataToAllPeers:data withDataMode:GKSendDataUnreliable error:nil];
    
    NSLog(@"session  =  %@" , self.session);
}
@end

2.mutipeerConnectivity

  • iOS 7引入的一個全新框架
  • 多點連接
  • 替代GameKit框架
  • 多用于文件的傳輸
  • iOS設(shè)備不聯(lián)網(wǎng)也能跟附近的人聊天
    • FireChat
    • See You Around
    • 以上近場聊天App都是基于mutipeerConnectivity框架
  • 搜索和傳輸?shù)姆绞?
    • 雙方WIFI和藍(lán)牙都沒有打開:無法實現(xiàn)
    • 雙方都開啟藍(lán)牙:通過藍(lán)牙發(fā)現(xiàn)和傳輸
    • 雙方都開啟WIFI:通過WIFI Direct發(fā)現(xiàn)和傳輸衷掷,速度接近AirDrop
    • 雙方同時開啟了WIFI和藍(lán)牙:模擬AirDrop,通過低功耗藍(lán)牙技術(shù)掃描發(fā)現(xiàn)握手脯宿,然后通過WIFI Direct傳輸
#import "ViewController.h"
#import <MultipeerConnectivity/MultipeerConnectivity.h>
/*
    1. 注冊一個廣告  告訴別人  我的設(shè)備是可以被發(fā)現(xiàn)
    2. 掃描藍(lán)牙設(shè)備   需要實現(xiàn)代理方法
    3. 使用一個MCSession對象存儲當(dāng)前會話   需要實現(xiàn)代理方法
    4. 使用MCSession 對象 發(fā)送和接收數(shù)據(jù)
 */
#define SERVICE_TYPE @"xmg"
@interface ViewController ()<MCBrowserViewControllerDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate,MCSessionDelegate>
@property (weak, nonatomic) IBOutlet UIImageView *showImg;

// 保存會話
@property (nonatomic, strong)MCSession *m_session;

/** 發(fā)送廣告 */
@property (nonatomic, strong) MCAdvertiserAssistant *assistant;

/** 當(dāng)前連接到的設(shè)備 */
@property (nonatomic, strong) MCPeerID *peerId;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // 初始化 會話
    // 獲取設(shè)備的名字
    NSString *displayName = [UIDevice currentDevice].name;
    // 設(shè)備的id
    MCPeerID *perrID = [[MCPeerID alloc]initWithDisplayName:displayName];
    self.m_session = [[MCSession alloc]initWithPeer:perrID];
    self.m_session.delegate = self;
}

// click events
- (IBAction)connect:(id)sender {
    MCBrowserViewController *browser = [[MCBrowserViewController alloc]initWithServiceType:SERVICE_TYPE session:self.m_session];
    browser.delegate = self;
    [self presentViewController:browser animated:YES completion:nil];
    
}
- (IBAction)selecte:(id)sender {
    UIImagePickerController *imgPicker = [[UIImagePickerController alloc]init];
    imgPicker.delegate = self;
    imgPicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    [self presentViewController:imgPicker animated:YES completion:nil];
    
}
- (IBAction)sendImage:(id)sender {
    if (!self.showImg.image)   return;
    
    // 發(fā)送數(shù)據(jù)
    [self.m_session sendData:UIImagePNGRepresentation(self.showImg.image) toPeers:@[self.peerId] withMode:MCSessionSendDataUnreliable error:nil];
    
    NSLog(@"===%@" ,self.m_session);
    
}
// 設(shè)置可被發(fā)現(xiàn)
- (IBAction)found:(id)sender {
    UISwitch *s = (UISwitch *)sender;
    if (s.isOn) {
        // 注冊廣告  可能一個app 發(fā)送了多個廣告,  所以需要給光綁定唯一標(biāo)示
        self.assistant = [[MCAdvertiserAssistant alloc]initWithServiceType:SERVICE_TYPE discoveryInfo:nil session:self.m_session];
        
        [self.assistant start];
    }
}

#pragma mark - 會話的代理方法
// 接收到的數(shù)據(jù)
- (void)session:(MCSession *)session didReceiveData:(NSData *)data fromPeer:(MCPeerID *)peerID
{
    dispatch_async(dispatch_get_main_queue(), ^{
        self.showImg.image = [UIImage imageWithData:data];
    });
}

- (void)session:(MCSession *)session peer:(MCPeerID *)peerID didChangeState:(MCSessionState)state
{
    
}

#pragma mark - 掃描設(shè)備的代理
// 連接成功
- (void)browserViewControllerDidFinish:(MCBrowserViewController *)browserViewController
{
    NSLog(@"%s  %d",__func__,__LINE__);
    [browserViewController dismissViewControllerAnimated:YES completion:nil];
}

// 退出連接
- (void)browserViewControllerWasCancelled:(MCBrowserViewController *)browserViewController
{
    
}

// 連接哪個設(shè)備
- (BOOL)browserViewController:(MCBrowserViewController *)browserViewController
      shouldPresentNearbyPeer:(MCPeerID *)peerID
            withDiscoveryInfo:(nullable NSDictionary<NSString *, NSString *> *)info
{
    NSLog(@"%s  %d",__func__,__LINE__);
    self.peerId = peerID;
    return YES;
}


#pragma mark - imageDelegate
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info
{
    self.showImg.image = info[UIImagePickerControllerOriginalImage];
    [picker dismissViewControllerAnimated:YES completion:nil];
}
@end

3.CoreBlueTooth

  • 可用于第三方藍(lán)牙設(shè)備交互,設(shè)備必須支持藍(lán)牙4.0
  • iPhone的設(shè)備必須是4S或者更新
  • iPad設(shè)備必須是iPad mini或者更新
  • iOS的系統(tǒng)必須是iOS 6或者更新
  • 藍(lán)牙4.0以低功耗著稱,所以一般被稱為BLE(bluetooth low energy)
  • 使用模擬器調(diào)試
    • Xcode 4.6
    • iOS 6.1
  • 應(yīng)用場景
    • 運動手環(huán)
    • 智能家居
    • 拉卡拉藍(lán)牙刷卡器

核心概念

  • CBCentralManager:中心設(shè)備(用來連接到外部設(shè)備的管家)
  • CBPeripheralManager:外部設(shè)備(第三方的藍(lán)牙4.0設(shè)備)
#import "ViewController.h"
#import <CoreBluetooth/CoreBluetooth.h>
@interface ViewController ()<CBCentralManagerDelegate,CBPeripheralDelegate>

@property(nonatomic,strong)NSMutableArray *peripherals;
@property(nonatomic,strong)CBCentralManager *cmgr;
@end

@implementation ViewController

- (NSMutableArray *)peripherals
{
    if (!_peripherals) {
        _peripherals = [NSMutableArray array];
    }
    return _peripherals;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // 1. 創(chuàng)建中心管家,并且設(shè)置代理
    self.cmgr = [[CBCentralManager alloc]initWithDelegate:self queue:nil];
    // 2. 掃描外部設(shè)備
    /**
     *  scanForPeripheralsWithServices :如果傳入指定的數(shù)組,那么就只會掃描數(shù)組中對應(yīng)ID的設(shè)備
     *                                   如果傳入nil,那么就是掃描所有可以發(fā)現(xiàn)的設(shè)備
     *  掃描完外部設(shè)備就會通知CBCentralManager的代理
     */
    if ([self.cmgr state]== CBCentralManagerStatePoweredOn) {
        [self.cmgr scanForPeripheralsWithServices:nil options:0];
    }
}

- (void)centralManagerDidUpdateState:(CBCentralManager *)central
{
    NSLog(@"%s %d",__func__,__LINE__);
}

#pragma mark - CBCentralManagerDelegate
/**
 *  發(fā)現(xiàn)外部設(shè)備莽囤,每發(fā)現(xiàn)一個就會調(diào)用這個方法
 *  所以可以使用一個數(shù)組來存儲每次掃描完成的數(shù)組
 */
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary<NSString *,id> *)advertisementData RSSI:(NSNumber *)RSSI
{
    NSLog(@"%s %d",__func__,__LINE__);
    // 有可能會導(dǎo)致重復(fù)添加掃描到的外設(shè)
    // 所以需要先判斷數(shù)組中是否包含這個外設(shè)
    if(![self.peripherals containsObject:peripheral]){
        [self.peripherals addObject:peripheral];
    }
}

/**
 *  連接外設(shè)成功調(diào)用
 */
- (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral
{
    NSLog(@"%s %d",__func__,__LINE__);
    // 查找外設(shè)服務(wù)
    [peripheral discoverServices:nil];
}

/**
 *  模擬開始連接方法
 */
- (void)start
{
    NSLog(@"%s %d",__func__,__LINE__);
    // 3. 連接外設(shè)
    for (CBPeripheral *ppl in self.peripherals) {
        // 掃描外設(shè)的服務(wù)
        // 這個操作應(yīng)該交給外設(shè)的代理方法來做
        // 設(shè)置代理
        ppl.delegate = self;
        [self.cmgr connectPeripheral:ppl options:nil];
    }
}

#pragma mark - CBPeripheralDelegate
/**
 *  發(fā)現(xiàn)服務(wù)就會調(diào)用代理方法
 *
 *  @param peripheral 外設(shè)
 */
- (void)peripheral:(CBPeripheral *)peripheral didDiscoverServices:(NSError *)error
{
    NSLog(@"%s %d",__func__,__LINE__);
    // 掃描到設(shè)備的所有服務(wù)
    NSArray *services = peripheral.services;
    // 根據(jù)服務(wù)再次掃描每個服務(wù)對應(yīng)的特征
    for (CBService *ses in services) {
        [peripheral discoverCharacteristics:nil forService:ses];
    }
}

/**
 *  發(fā)現(xiàn)服務(wù)對應(yīng)的特征
 */
- (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error
{
    NSLog(@"%s %d",__func__,__LINE__);
    // 服務(wù)對應(yīng)的特征
    NSArray *ctcs = service.characteristics;
    // 遍歷所有的特征
    for (CBCharacteristic *character in ctcs) {
        // 根據(jù)特征的唯一標(biāo)示過濾
        if ([character.UUID.UUIDString isEqualToString:@"XMG"]) {
            NSLog(@"可以吃飯了");
        }
    }
}

/**
 *  斷開連接
 */
- (void)stop
{
    NSLog(@"%s %d",__func__,__LINE__);
    // 斷開所有連接上的外設(shè)
    for (CBPeripheral *per in self.peripherals) {
        [self.cmgr cancelPeripheralConnection:per];
    }
}


@end

4.運動手環(huán)

#import "ViewController.h"
#import "XMGBandingController.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UITextField *userField;

@property (weak, nonatomic) IBOutlet UITextField *pswFeild;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (IBAction)loginClick:(id)sender {
    
    self.userField.text = @"361283017@qq.com";
    self.pswFeild.text = @"361283017xj";
    
    NSMutableDictionary *params = [NSMutableDictionary dictionary];
    [params setObject:self.userField.text forKey:@"account"];
    
    //  78:A5:04:38:53:75
    
    //#ifdef DEBUG
    //    [params setObject:@"lepao321lepao" forKey:@"password"];//測試時可以不用密碼登陸
    //#else
    [params setObject:[self.pswFeild.text md5] forKey:@"password"];
    //#endif
    
    [params setObject:[UIDevice BIData] forKey:@"deviceInfo"];
    [params setObject:@"AppStore" forKey:@"creative"];
    [params setObject:[UIDevice IPv4] forKey:@"ip"];
    
//    [TCLoadingView showWithLoadingText:@"正在加載中"];
    [[HttpManager defaultManager] getRequestToUrl:url_login params:params complete:^(BOOL successed, NSDictionary *result) {
        if (successed && [[result objectForKey:@"ret"] intValue]==1) {
            
            NSLog(@"----result = %@",result);
            XMGBandingController *bangding = [[XMGBandingController alloc]init];
            [self.navigationController pushViewController:bangding animated:YES];
        }else{
//            [KeyWindow showAlertMessage:result?result[@"msg"]:@"服務(wù)器忙,請稍后再試" callback:nil];
        }
//        [TCLoadingView removeLoadingView];
    }];
}



@end


#import "XMGBandingController.h"
#import <CoreBluetooth/CoreBluetooth.h>
#define BLE_SERVICE_UUID                            @"FEE7"
#define BLE_WIRTE_UUID                              @"FEC7"
#define BLE_READ_UUID                               @"FEC8"

@interface XMGBandingController ()<CBCentralManagerDelegate,CBPeripheralDelegate>
@property (nonatomic,strong)CBCentralManager *cmgr;
@property (nonatomic,strong)CBPeripheral *peripheral;
@end

@implementation XMGBandingController

- (void)viewDidLoad
{
    [super viewDidLoad];
    // @[@"78:A5:04:38:53:75"]
    self.view.backgroundColor = [UIColor whiteColor];
    // 建立中心管家
    self.cmgr = [[CBCentralManager alloc]initWithDelegate:self queue:dispatch_get_main_queue()];
    
    // 掃描外接設(shè)備

    
}

- (void)centralManagerDidUpdateState:(CBCentralManager *)central
{
    if ([central state] == CBCentralManagerStatePoweredOn) {
        [self.cmgr scanForPeripheralsWithServices:nil options:nil];
    }
}

- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary<NSString *,id> *)advertisementData RSSI:(NSNumber *)RSSI
{
    NSLog(@"peripheral = %@",peripheral);
    self.peripheral = peripheral;
    self.peripheral.delegate = self;
    [self.cmgr connectPeripheral:self.peripheral options:nil];
}

- (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral
{
    NSLog(@"%s %d",__func__,__LINE__);
    [self.peripheral discoverServices:nil];
}

- (void)peripheral:(CBPeripheral *)peripheral didDiscoverServices:(NSError *)error
{
    NSLog(@"=====%@",peripheral.services);
    for (CBService *service in peripheral.services) {
        if([service.UUID.UUIDString isEqualToString:@"FEE7"]){
            [service.peripheral discoverCharacteristics:nil forService:service];
        }
    }
}


- (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error
{
    NSLog(@"------%@",service.characteristics);
    
    for (CBCharacteristic *chtcs in service.characteristics) {
        [self.peripheral discoverDescriptorsForCharacteristic:chtcs];
        [self.peripheral readValueForCharacteristic:chtcs];
    }
}

- (void)peripheral:(CBPeripheral *)peripheral didDiscoverDescriptorsForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error
{
    NSLog(@"%s %d",__func__,__LINE__);
    NSLog(@"------%@",characteristic);
    for (CBDescriptor *dpr in characteristic.descriptors) {
        [self.peripheral readValueForDescriptor:dpr];
    }
}




@end

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末切距,一起剝皮案震驚了整個濱河市朽缎,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌谜悟,老刑警劉巖话肖,帶你破解...
    沈念sama閱讀 222,627評論 6 517
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異赌躺,居然都是意外死亡狼牺,警方通過查閱死者的電腦和手機羡儿,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,180評論 3 399
  • 文/潘曉璐 我一進店門礼患,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人掠归,你說我怎么就攤上這事缅叠。” “怎么了虏冻?”我有些...
    開封第一講書人閱讀 169,346評論 0 362
  • 文/不壞的土叔 我叫張陵肤粱,是天一觀的道長。 經(jīng)常有香客問我厨相,道長领曼,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 60,097評論 1 300
  • 正文 為了忘掉前任蛮穿,我火速辦了婚禮庶骄,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘践磅。我一直安慰自己单刁,他們只是感情好,可當(dāng)我...
    茶點故事閱讀 69,100評論 6 398
  • 文/花漫 我一把揭開白布府适。 她就那樣靜靜地躺著羔飞,像睡著了一般。 火紅的嫁衣襯著肌膚如雪檐春。 梳的紋絲不亂的頭發(fā)上逻淌,一...
    開封第一講書人閱讀 52,696評論 1 312
  • 那天,我揣著相機與錄音疟暖,去河邊找鬼卡儒。 笑死,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的朋贬。 我是一名探鬼主播凯楔,決...
    沈念sama閱讀 41,165評論 3 422
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼锦募!你這毒婦竟也來了摆屯?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 40,108評論 0 277
  • 序言:老撾萬榮一對情侶失蹤糠亩,失蹤者是張志新(化名)和其女友劉穎虐骑,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體赎线,經(jīng)...
    沈念sama閱讀 46,646評論 1 319
  • 正文 獨居荒郊野嶺守林人離奇死亡廷没,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,709評論 3 342
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了垂寥。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片颠黎。...
    茶點故事閱讀 40,861評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖滞项,靈堂內(nèi)的尸體忽然破棺而出狭归,到底是詐尸還是另有隱情,我是刑警寧澤文判,帶...
    沈念sama閱讀 36,527評論 5 351
  • 正文 年R本政府宣布过椎,位于F島的核電站,受9級特大地震影響戏仓,放射性物質(zhì)發(fā)生泄漏疚宇。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 42,196評論 3 336
  • 文/蒙蒙 一赏殃、第九天 我趴在偏房一處隱蔽的房頂上張望敷待。 院中可真熱鬧,春花似錦嗓奢、人聲如沸讼撒。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,698評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽根盒。三九已至,卻和暖如春物蝙,著一層夾襖步出監(jiān)牢的瞬間炎滞,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,804評論 1 274
  • 我被黑心中介騙來泰國打工诬乞, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留册赛,地道東北人钠导。 一個月前我還...
    沈念sama閱讀 49,287評論 3 379
  • 正文 我出身青樓,卻偏偏與公主長得像森瘪,于是被迫代替她去往敵國和親牡属。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,860評論 2 361

推薦閱讀更多精彩內(nèi)容

  • iOS中提供了4個框架用于實現(xiàn)藍(lán)牙連接 GameKit.framework(用法簡單)-只能用于iOS設(shè)備之間的同...
    Hyman0819閱讀 1,532評論 0 0
  • 最近因為有藍(lán)牙打印這方面的需求上身扼睬,需要用到藍(lán)牙的這個功能逮栅,所以對于這個方向進行了一系列的了解,在這里記錄一下自己...
    Zaki丶閱讀 404評論 0 4
  • what‘s the BLE 窗宇? 隨著藍(lán)牙低功耗技術(shù)BLE(Bluetooth Low Energy)的發(fā)展措伐,藍(lán)牙...
    abigfishBegonia閱讀 927評論 0 4
  • 點擊率CTR(click-through rate)和轉(zhuǎn)化率CVR(conversion rate)是衡量廣告流量...
    zy_now閱讀 9,110評論 5 12
  • 熊孩子欠揍,年輕人惡臭军俊,中年人油膩侥加,老年人無恥。生而為人粪躬,我很抱歉担败。
    失寵大雞排閱讀 279評論 1 0