Just My Life & My Work

Posts tagged ‘bluetooth’

[iOS] 系統藍芽綁定

最近在搞藍芽裝置,它是IoT相關的硬體裝置,只要搞定藍芽連線部分,就能實現許多智慧家庭的應用。現在我想要在iOS連結藍芽裝置,照理說綁定藍芽裝置沒什麼稀奇,直到自己進入開發模式,才發現有許多眉眉角角要去深入瞭解,以老闆之前做藍芽眼罩的經驗來看,他說這就是為什麼IoT還無法普及的原因之一,因為光是藍芽連線,就有許多問題要去克服。「連線」是最基本的門檻,很多應用到死在這條線上⋯⋯

ios oserio 藍芽體脂計

註:物聯網(英語:Internet of Things,縮寫IoT)。

(繼續閱讀…)

廣告

寄送藍芽裝置給Apple測試

開發單純的iOS App沒什麼難度,可是送審後的議題總會出其不意。原以為可以只拍攝影片給審核人員看,如何連結我們的產品(藍芽裝置)來操作App,可惜我們沒能逃過高人的「法眼」,於是請老闆將一個貴重的藍芽裝置寄送給Apple測試。約莫一週左右,App總算順利上架啦⋯⋯我也順理成章去環島九天:D~

bluetooth peripheral service characteristics

以下就是在iTunes Connect被reject的原因與描述:

From Apple

  • 2. 1 Performance: App Completeness

Guideline 2.1 – Information Needed

We have started the review of your app, but we are not able to continue because we need the associated hardware to fully assess your app features.

Next Steps

To help us proceed with the review of your app, please send the necessary hardware/accessory to the address below.

NOTE: Please include your app name and app ID in the shipment; failure to provide this information can delay the review process.

Additionally, it may take several business days for us to receive the hardware once it has been delivered to Apple.

Apple, Inc.
1 Infinite Loop, M/S: 124-2APP
Cupertino, CA 95014
USA

ATTN: Marcus East
App Name: 快樂健康+
App ID: 1317204377

Once you’ve shipped the hardware, please reply to this message with the shipping carrier and tracking information. Once we have received the hardware, we will continue your app’s review.

IMPORTANT: for non-US Developers

To avoid delays with US Customs, please provide the following information with your shipment (required for all radio-frequency devices imported in the US):

– Description of the equipment
– Quantity
– Device Model/Type Name or Number
– FCC ID
– Original Manufacturer’s Name and Address

Please use FCC form 740 for details on how to provide this information.

Remember:

* A separate FCC Form 740 must be used for each different radio-frequency device or component in the shipment; however, a form is not required for subassemblies, parts, or components of radio-frequency devices.

* The form may be completed by the shipper or recipient, but if the form is not sent with the original shipping documents by the shipper, the shipment may be delayed in customs.

* Ensure all serial and ID numbers are available as well as the name and address of the original manufacturer.

以上問題,2017年11月的時光都耗在這裡啦⋯⋯

之後送審更新版,都不到一天就審核通過!

話說,Apple拿到藍芽裝置且測試過後,不會寄送回來給開發者呢⋯⋯

參考:

[C/C++] 4 bytes轉成integer (Convert 4 Bytes to Integer)

最近要讀取藍牙裝置回傳的資料來解析,需要將4 bytes轉成integer,才能知道訊號強度相對值。太久沒搞底層東東,有些生疏,好在嘗試一下就得到正確結果!

bluetooth Central Peripheral

(繼續閱讀…)

[iOS] 設定藍芽 (Setting Bluetooth)

有時候我們需要開啟藍芽來連結裝置,像是BeaconApple Watch小米手環。那麼如果使用者沒有打開權限怎麼辦?請他/她到設定藍芽 (Setting Bluetooth)去打開囉~

iOS 設定藍芽 (Setting Bluetooth).PNG

目前iOS SDK尚未有API可以直接改藍芽設定,要是未來Apple有開放的話請再跟我說唷!不過我想應該要等到天荒地老,非常重視用戶隱私的Apple,是不會輕易讓開發者悄悄開啟Bluetooth來進行任何動作。

剛好我們偉大的技術長有無私分享:

/**
 Theme: iOS 10 Setting Bluetooth
 IDE: Xcode 8
 Language: Objective C
 Date: 106/03/07
 Author: HappyMan
 Blog: https://cg2010studio.wordpress.com/
 */
-(void)openBLESetting
{
    NSURL *bluetoothURLOS8 = [NSURL URLWithString:@"prefs:root=General&path=Bluetooth"];
    NSURL *bluetoothURLOS9 = [NSURL URLWithString:@"prefs:root=Bluetooth"];
    NSURL *bluetoothURLOS10 = [NSURL URLWithString:@"App-Prefs:root=Bluetooth"];
    if ([[[UIDevice currentDevice] systemVersion] intValue] >= 10) {
        [[UIApplication sharedApplication] openURL:bluetoothURLOS10];
    }
    else if ([[[UIDevice currentDevice] systemVersion] intValue] >= 9) {
        [[UIApplication sharedApplication] openURL:bluetoothURLOS9];
    }
    else {
        [[UIApplication sharedApplication] openURL:bluetoothURLOS8];
    }
}

這種沒啥邏輯純粹定義的玩意兒,抄,就對了XD~

參考:opening iOS BLE setting from app

[iOS] iBeacon 測試

睽違一年半之久,總算要來開發iBeacon,看來越來越多應用持續出現中!因為最近要出國,所以想到可以將iBeacon放進行李廂,進入範圍或離開範圍時,手機會跳出提示,如此就不用眼睛一直盯著行李箱:)~

iOS iBeacon 測試.jpg

一年半前參加「Retail Battle Hackathon 創新零售駭客松活動」,KKLabs給參賽者每人一顆Spot Beacon當作禮物,直到最近我才真正拿出來用XD~

可以先參考之前的文章:初探 IBEACON 技術

(繼續閱讀…)

用筆電接聽電話

自從我的MacBook Air升級到Yosemite Mac OS後,就開始會用筆電接聽電話,因為配合iPhone 6iOS 8,由於兩個作業系統都有做到Handoff技術,所以可以在不同裝置中無縫做同樣的事情!

用筆電聽電話

每次媽媽打電話給我,我就在等平板電腦和筆記電腦同時響起:)~

此外,去年12月底買的小米智慧手環,可以設定幾秒後來電震動提醒,上週去看十分瀑布,跟教會朋友分散差點漏接電話,好在小米手環透過藍芽接收到手機有來電,我發覺後才接聽起來呢~

Apple是透過iCloud帳號做到「無縫接軌」,所以我用同一個帳號登入我所有Apple設備,並且在同一個WiFi訊號底下,就能輕鬆自在地工作囉~

Handoff

開始可以想像,未來的許多穿戴裝置都能夠互相「掩護」了!

[寫真] 小米智慧手環 (Smart Bracelet)

兩年前我就在觀察Jawbone智慧手環,可是它太過昂貴高達5000元,而且身邊的朋友使用後故障機率高,後來就作罷⋯⋯

兩年後的今天,我現在都會戴著小米智慧手環,它出乎意料地便宜,僅395元!而且質感跟Apple產品給我的感覺很相似。我的超慢跑團員聽到這個價格,還以為我少說一個0呢~有兩人當下就叫我幫他們訂購:D~

阿誠,曾經我是他的課程助教,也是曾是我公司的實習生,他為了不付運費,就買了兩支。去年12月初他問我要不要?那時還沒出iOS App,所以就沒跟他買,等他從成功嶺出來,終於拿到夢寐以求的產品!接下來開箱~

開箱 小米手環 Smart Bracelet01 (繼續閱讀…)

標籤雲

%d 位部落客按了讚: