SlideShare a Scribd company logo
2015 Pebble Developer Retreat
PebbleKit iOS 3.0
Marcel Jackwerth, iOS Engineer
Outline
• Recap: What is PebbleKit?
• What is new?
• 8K App Messages
• Support for Pebble Time Round
• Isolated Sessions via Bluetooth Low Energy
• Swift 2.0, Bitcode
• What are the breaking API changes?
• How do I upgrade?
What is PebbleKit?
And when should I use it?
What’s new?
8KApp Messages
with up to 8000 bytes
in both directions
Bluetooth LE Connectivity
App Messages
• Less data splitting needed → easier to work with
• Less waiting on ACKs → reduced overhead, up to 5x faster
• Optimal size depends on your use-case
8K
Good: Check Capabilities 8K
[watch getVersionInfo:^(PBWatch *watch, PBVersionInfo *info) {
BOOL supports8k =
(info.remoteProtocolCapabilitiesFlags &
PBRemoteProtocolCapabilitiesFlagsAppMessage8kSupported) != 0;
if (supports8k) {
// …
}
} onTimeout:nil];
Avoid: Maximum Sizes 8K
const uint32_t inbound = app_message_inbox_size_maximum();
const uint32_t outbound = app_message_outbox_size_maximum();
app_message_open(inbound, outbound);
⚠
This will reduce your heap size by 16,000 bytes
if your watch app is compiled with the latest SDK
and your companion app uses the new PebbleKit!
Best: Communicate Sizes 8K
const uint32_t inbound = MIN(512, app_message_inbox_size_maximum());
const uint32_t outbound = MIN(256, app_message_outbox_size_maximum());
app_message_open(inbound, outbound);
DictionaryIterator *iter;
app_message_outbox_open(&iter);
Tuplet value = TupletInteger(KEY_INIT_INBOX_SIZE, inbound);
dict_write_tuplet(iter, &value);
app_message_outbox_send();
What’s new?
8KApp Messages
with up to 8000 bytes
in both directions
Bluetooth LE Connectivity
Bluetooth Low Energyaka
Isolated App SessionCompatibility with
Pebble Time Round
Shared App Session
Shared App Session
Pandora
iOS App
Shared
Session
Pandora
Pebble App
Shared App Session
Pandora
iOS App
Shared
Session
Pandora
Pebble App
Shared App Session
Pandora
iOS App
runkeeper
iOS App
Shared
Session
Pandora
Pebble App
runkeeper
Pebble App
Shared App Session
Pandora
iOS App
runkeeper
iOS App
Shared
Session
Pandora
Pebble App
runkeeper
Pebble App
Shared App Session
Pandora
iOS App
runkeeper
iOS App
Shared
Session
Pandora
Pebble App
runkeeper
Pebble App
Isolated App Sessions
Pandora
iOS App
Pandora
Pebble App
Isolated App Sessions
Pandora
iOS App
Pandora
Pebble App
f01d…
Isolated App Sessions
Pandora
iOS App
runkeeper
iOS App
Pandora
Pebble App
f01d…
runkeeper
Pebble App
b13a…
Launch App from Watch
Pandora
Pebble App
Requires UIBackgroundModes to contain
“bluetooth-peripheral” and “bluetooth-central”
Launch App from Watch
Pandora
Pebble App
f01d…
Requires UIBackgroundModes to contain
“bluetooth-peripheral” and “bluetooth-central”
Launch App from Watch
Pandora
iOS App
Pandora
Pebble App
f01d…
Requires UIBackgroundModes to contain
“bluetooth-peripheral” and “bluetooth-central”
Breaking API Changes
• App UUIDs are now of type NSUUID (was: NSData)
• PebbleCentral starts in a cold state
•You have to run it so that it scans for watches
•lastConnectedWatch will not contain a connected Pebble
before nor immediately after you called run (was possible
before) - wait for pebbleCentral:watchDidConnect:
after you called run.
Breaking API Changes
central.delegate = self;
uuid_t appUUIDBytes;
NSUUID *appUUID = [[NSUUID alloc] initWithUUIDString:”f00d…”];
[appUUID getUUIDBytes:appUUIDBytes];
central.appUUID = appUUIDBytes;
Before
Breaking API Changes
After
central.delegate = self;
NSUUID *appUUID = [[NSUUID alloc] initWithUUIDString:”f00d…”];
central.appUUID = appUUID;
[central run];
Bad: Run, Configure, Manual Check
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[PBPebbleCentral defaultCentral] run];
[PBPebbleCentral defaultCentral].appUUID = [NSUUID …];
PBWatch *watch = [PBPebbleCentral defaultCentral].lastConnectedWatch;
if (watch.isConnected) { … }
return YES;
}
Good: Configure, Run, React
- (BOOL)application:(UIApplication *)application
willFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[PBPebbleCentral defaultCentral].delegate = self;
[PBPebbleCentral defaultCentral].appUUID = [NSUUID …];
[[PBPebbleCentral defaultCentral] run];
}
- (void)pebbleCentral:(PBPebbleCentral *)central
watchDidConnect:(PBWatch *)watch { … }
• Nullability Annotations
• Generics
Swift 2.0
• Xcode 7.0.1 started to claim that
it isn’t (when using CocoaPods
and building an Archive)
• If you run into any issues we
recommend that you disable it
with ENABLE_BITCODE=NO
Bitcode included
$
Still necessary to be
compatible with Pebble and
Pebble Steel
MFi

How to Update
pod “PebbleKit”, “~> 3.0.0”
Or just replace the PebbleKit.framework
with its new version manually, available here:
https://github.com/pebble/pebble-ios-sdk/releases
Podfile
CHMultiDictionary CHMutableDictionary
DDASLLogger DDFileLogger DDLog DDTTYLogger
NSJSONSerialization+ObjectWithNString
NSJSONSerialization+PBJSONHelpers
NSString+HexData
UIDevice-Hardware
You can remove it from your project if you don’t use any of the
classes or methods that it contained:
PebbleVendor.framework
Recap
• Why?
•8K App Messages, Better Background Experience
•Support Pebble Time Round and be ready when other
Pebble models switch to Bluetooth Low Energy
• How?
•Get the new PebbleKit.framework
•Set appUUID, then [central run]
Questions?
Licenses & Attribution
• Isolation Icon by Griffin Mullins
%

More Related Content

What's hot

Yatoto-technical
Yatoto-technicalYatoto-technical
Yatoto-technical
Ivailo Bardarov
 
Mobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 AndroidMobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 Android
Mohammad Shaker
 
Google i o & android q changes 2019
Google i o & android q changes 2019Google i o & android q changes 2019
Google i o & android q changes 2019
Vitali Pekelis
 
Android Q 2019
Android Q 2019Android Q 2019
Android Q 2019
Vitali Pekelis
 
Multi screenlab
Multi screenlabMulti screenlab
Multi screenlab
Ran Nachmany
 
Activity
ActivityActivity
Activity
Michael Pan
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture Components
Kai Koenig
 
All your family secrets belong to us—Worrisome security issues in tracker apps
All your family secrets belong to us—Worrisome security issues in tracker appsAll your family secrets belong to us—Worrisome security issues in tracker apps
All your family secrets belong to us—Worrisome security issues in tracker apps
Priyanka Aash
 
Manipulating Android tasks and back stack
Manipulating Android tasks and back stackManipulating Android tasks and back stack
Manipulating Android tasks and back stack
Ran Nachmany
 
First Steps in iOS Development
First Steps in iOS DevelopmentFirst Steps in iOS Development
First Steps in iOS Development
Sasha Goldshtein
 
Splunk bangalore user group 2020 09 01
Splunk bangalore user group 2020 09 01Splunk bangalore user group 2020 09 01
Splunk bangalore user group 2020 09 01
NiketNilay
 
LaunchKit
LaunchKitLaunchKit
LaunchKit
cocominap
 
Trends and Transformations in iOS Development
Trends and Transformations in iOS DevelopmentTrends and Transformations in iOS Development
Trends and Transformations in iOS Development
Sarath C
 
Meteor Framework Introduction
Meteor Framework IntroductionMeteor Framework Introduction
Meteor Framework Introduction
Riza Fahmi
 
Advanced android app lifecycle + Patterns
Advanced android app lifecycle + PatternsAdvanced android app lifecycle + Patterns
Advanced android app lifecycle + Patterns
bryan costanich
 
Appium
AppiumAppium
Appium
Janu Jahnavi
 
Continuous Delivery for Mobile
Continuous Delivery for MobileContinuous Delivery for Mobile
Continuous Delivery for Mobile
Sweta Vajjhala
 

What's hot (17)

Yatoto-technical
Yatoto-technicalYatoto-technical
Yatoto-technical
 
Mobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 AndroidMobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 Android
 
Google i o & android q changes 2019
Google i o & android q changes 2019Google i o & android q changes 2019
Google i o & android q changes 2019
 
Android Q 2019
Android Q 2019Android Q 2019
Android Q 2019
 
Multi screenlab
Multi screenlabMulti screenlab
Multi screenlab
 
Activity
ActivityActivity
Activity
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture Components
 
All your family secrets belong to us—Worrisome security issues in tracker apps
All your family secrets belong to us—Worrisome security issues in tracker appsAll your family secrets belong to us—Worrisome security issues in tracker apps
All your family secrets belong to us—Worrisome security issues in tracker apps
 
Manipulating Android tasks and back stack
Manipulating Android tasks and back stackManipulating Android tasks and back stack
Manipulating Android tasks and back stack
 
First Steps in iOS Development
First Steps in iOS DevelopmentFirst Steps in iOS Development
First Steps in iOS Development
 
Splunk bangalore user group 2020 09 01
Splunk bangalore user group 2020 09 01Splunk bangalore user group 2020 09 01
Splunk bangalore user group 2020 09 01
 
LaunchKit
LaunchKitLaunchKit
LaunchKit
 
Trends and Transformations in iOS Development
Trends and Transformations in iOS DevelopmentTrends and Transformations in iOS Development
Trends and Transformations in iOS Development
 
Meteor Framework Introduction
Meteor Framework IntroductionMeteor Framework Introduction
Meteor Framework Introduction
 
Advanced android app lifecycle + Patterns
Advanced android app lifecycle + PatternsAdvanced android app lifecycle + Patterns
Advanced android app lifecycle + Patterns
 
Appium
AppiumAppium
Appium
 
Continuous Delivery for Mobile
Continuous Delivery for MobileContinuous Delivery for Mobile
Continuous Delivery for Mobile
 

Viewers also liked

#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
Pebble Technology
 
Advanced Techniques: Size | Pebble Developer Retreat 2014
Advanced Techniques: Size | Pebble Developer Retreat 2014Advanced Techniques: Size | Pebble Developer Retreat 2014
Advanced Techniques: Size | Pebble Developer Retreat 2014
Pebble Technology
 
#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App
Pebble Technology
 
#PDR15 - Voice API
#PDR15 - Voice API#PDR15 - Voice API
#PDR15 - Voice API
Pebble Technology
 
#PDR15 - Awesome Appstore Assets
#PDR15 - Awesome Appstore Assets#PDR15 - Awesome Appstore Assets
#PDR15 - Awesome Appstore Assets
Pebble Technology
 
Advanced Techniques: Graphics | Pebble Developer Retreat 2014
Advanced Techniques: Graphics | Pebble Developer Retreat 2014Advanced Techniques: Graphics | Pebble Developer Retreat 2014
Advanced Techniques: Graphics | Pebble Developer Retreat 2014
Pebble Technology
 
#PDR15 - Smartstrap Workshop
#PDR15 - Smartstrap Workshop#PDR15 - Smartstrap Workshop
#PDR15 - Smartstrap Workshop
Pebble Technology
 
#PDR15 - Designing for Pebble
#PDR15 - Designing for Pebble#PDR15 - Designing for Pebble
#PDR15 - Designing for Pebble
Pebble Technology
 
Battery Life | Pebble Developer Retreat 2014
Battery Life | Pebble Developer Retreat 2014Battery Life | Pebble Developer Retreat 2014
Battery Life | Pebble Developer Retreat 2014
Pebble Technology
 
#PDR15 - Developing for Round
#PDR15 - Developing for Round#PDR15 - Developing for Round
#PDR15 - Developing for Round
Pebble Technology
 
Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0
Cherie Williams
 
#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics
Pebble Technology
 
Announcing Pebble SDK 2.0
Announcing Pebble SDK 2.0Announcing Pebble SDK 2.0
Announcing Pebble SDK 2.0
Pebble Technology
 
Overlay Technique | Pebble Developer Retreat 2014
Overlay Technique | Pebble Developer Retreat 2014Overlay Technique | Pebble Developer Retreat 2014
Overlay Technique | Pebble Developer Retreat 2014
Pebble Technology
 
#PDR15 - Best Use Cases For Timeline
#PDR15 - Best Use Cases For Timeline#PDR15 - Best Use Cases For Timeline
#PDR15 - Best Use Cases For Timeline
Pebble Technology
 

Viewers also liked (15)

#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
 
Advanced Techniques: Size | Pebble Developer Retreat 2014
Advanced Techniques: Size | Pebble Developer Retreat 2014Advanced Techniques: Size | Pebble Developer Retreat 2014
Advanced Techniques: Size | Pebble Developer Retreat 2014
 
#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App
 
#PDR15 - Voice API
#PDR15 - Voice API#PDR15 - Voice API
#PDR15 - Voice API
 
#PDR15 - Awesome Appstore Assets
#PDR15 - Awesome Appstore Assets#PDR15 - Awesome Appstore Assets
#PDR15 - Awesome Appstore Assets
 
Advanced Techniques: Graphics | Pebble Developer Retreat 2014
Advanced Techniques: Graphics | Pebble Developer Retreat 2014Advanced Techniques: Graphics | Pebble Developer Retreat 2014
Advanced Techniques: Graphics | Pebble Developer Retreat 2014
 
#PDR15 - Smartstrap Workshop
#PDR15 - Smartstrap Workshop#PDR15 - Smartstrap Workshop
#PDR15 - Smartstrap Workshop
 
#PDR15 - Designing for Pebble
#PDR15 - Designing for Pebble#PDR15 - Designing for Pebble
#PDR15 - Designing for Pebble
 
Battery Life | Pebble Developer Retreat 2014
Battery Life | Pebble Developer Retreat 2014Battery Life | Pebble Developer Retreat 2014
Battery Life | Pebble Developer Retreat 2014
 
#PDR15 - Developing for Round
#PDR15 - Developing for Round#PDR15 - Developing for Round
#PDR15 - Developing for Round
 
Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0
 
#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics
 
Announcing Pebble SDK 2.0
Announcing Pebble SDK 2.0Announcing Pebble SDK 2.0
Announcing Pebble SDK 2.0
 
Overlay Technique | Pebble Developer Retreat 2014
Overlay Technique | Pebble Developer Retreat 2014Overlay Technique | Pebble Developer Retreat 2014
Overlay Technique | Pebble Developer Retreat 2014
 
#PDR15 - Best Use Cases For Timeline
#PDR15 - Best Use Cases For Timeline#PDR15 - Best Use Cases For Timeline
#PDR15 - Best Use Cases For Timeline
 

Similar to #PDR15 - PebbleKit iOS 3.0

FIWARE IoT Proposal & Community
FIWARE IoT Proposal & CommunityFIWARE IoT Proposal & Community
FIWARE IoT Proposal & Community
FIWARE
 
Webinar Registration Getting Started with Building Your First IoT App
Webinar Registration Getting Started with Building Your First IoT AppWebinar Registration Getting Started with Building Your First IoT App
Webinar Registration Getting Started with Building Your First IoT App
InfluxData
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGI
Mike Pittaro
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
CocoaHeads France
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure Functions
Aleksandar Bozinovski
 
Unity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginUnity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 plugin
David Douglas
 
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud PlatformBackend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
Alvaro Viebrantz
 
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud PlatformBackend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
DevMT
 
Fiware io t_ul20_cpbr8
Fiware io t_ul20_cpbr8Fiware io t_ul20_cpbr8
Fiware io t_ul20_cpbr8
FIWARE
 
Build A Cloud Day London - Introduction
Build A Cloud Day London - IntroductionBuild A Cloud Day London - Introduction
Build A Cloud Day London - Introduction
ShapeBlue
 
Quick Start to iOS Development
Quick Start to iOS DevelopmentQuick Start to iOS Development
Quick Start to iOS Development
Jussi Pohjolainen
 
IoT on Azure
IoT on AzureIoT on Azure
IoT on Azure
Vinoth Rajagopalan
 
Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2
FIWARE
 
2013-05-15 threads. why and how
2013-05-15 threads. why and how2013-05-15 threads. why and how
2013-05-15 threads. why and how
CocoaHeads Tricity
 
El nodo
El nodoEl nodo
citus™ iot ecosystem
citus™ iot ecosystemcitus™ iot ecosystem
citus™ iot ecosystem
DUONG Dinh Cuong
 
OpenStack at NTT Resonant: Lessons Learned in Web Infrastructure
OpenStack at NTT Resonant: Lessons Learned in Web InfrastructureOpenStack at NTT Resonant: Lessons Learned in Web Infrastructure
OpenStack at NTT Resonant: Lessons Learned in Web Infrastructure
Tomoya Hashimoto
 
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry MeetupIntro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Josh Ghiloni
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
Junda Ong
 
StackStorm on AWS EKS demo
StackStorm on AWS EKS demoStackStorm on AWS EKS demo
StackStorm on AWS EKS demo
Shu Sugimoto
 

Similar to #PDR15 - PebbleKit iOS 3.0 (20)

FIWARE IoT Proposal & Community
FIWARE IoT Proposal & CommunityFIWARE IoT Proposal & Community
FIWARE IoT Proposal & Community
 
Webinar Registration Getting Started with Building Your First IoT App
Webinar Registration Getting Started with Building Your First IoT AppWebinar Registration Getting Started with Building Your First IoT App
Webinar Registration Getting Started with Building Your First IoT App
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGI
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure Functions
 
Unity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginUnity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 plugin
 
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud PlatformBackend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
 
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud PlatformBackend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
 
Fiware io t_ul20_cpbr8
Fiware io t_ul20_cpbr8Fiware io t_ul20_cpbr8
Fiware io t_ul20_cpbr8
 
Build A Cloud Day London - Introduction
Build A Cloud Day London - IntroductionBuild A Cloud Day London - Introduction
Build A Cloud Day London - Introduction
 
Quick Start to iOS Development
Quick Start to iOS DevelopmentQuick Start to iOS Development
Quick Start to iOS Development
 
IoT on Azure
IoT on AzureIoT on Azure
IoT on Azure
 
Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2
 
2013-05-15 threads. why and how
2013-05-15 threads. why and how2013-05-15 threads. why and how
2013-05-15 threads. why and how
 
El nodo
El nodoEl nodo
El nodo
 
citus™ iot ecosystem
citus™ iot ecosystemcitus™ iot ecosystem
citus™ iot ecosystem
 
OpenStack at NTT Resonant: Lessons Learned in Web Infrastructure
OpenStack at NTT Resonant: Lessons Learned in Web InfrastructureOpenStack at NTT Resonant: Lessons Learned in Web Infrastructure
OpenStack at NTT Resonant: Lessons Learned in Web Infrastructure
 
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry MeetupIntro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
StackStorm on AWS EKS demo
StackStorm on AWS EKS demoStackStorm on AWS EKS demo
StackStorm on AWS EKS demo
 

Recently uploaded

Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 

Recently uploaded (20)

Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 

#PDR15 - PebbleKit iOS 3.0

  • 1. 2015 Pebble Developer Retreat PebbleKit iOS 3.0 Marcel Jackwerth, iOS Engineer
  • 2. Outline • Recap: What is PebbleKit? • What is new? • 8K App Messages • Support for Pebble Time Round • Isolated Sessions via Bluetooth Low Energy • Swift 2.0, Bitcode • What are the breaking API changes? • How do I upgrade?
  • 3. What is PebbleKit? And when should I use it?
  • 4.
  • 5. What’s new? 8KApp Messages with up to 8000 bytes in both directions Bluetooth LE Connectivity
  • 6. App Messages • Less data splitting needed → easier to work with • Less waiting on ACKs → reduced overhead, up to 5x faster • Optimal size depends on your use-case 8K
  • 7. Good: Check Capabilities 8K [watch getVersionInfo:^(PBWatch *watch, PBVersionInfo *info) { BOOL supports8k = (info.remoteProtocolCapabilitiesFlags & PBRemoteProtocolCapabilitiesFlagsAppMessage8kSupported) != 0; if (supports8k) { // … } } onTimeout:nil];
  • 8. Avoid: Maximum Sizes 8K const uint32_t inbound = app_message_inbox_size_maximum(); const uint32_t outbound = app_message_outbox_size_maximum(); app_message_open(inbound, outbound); ⚠ This will reduce your heap size by 16,000 bytes if your watch app is compiled with the latest SDK and your companion app uses the new PebbleKit!
  • 9. Best: Communicate Sizes 8K const uint32_t inbound = MIN(512, app_message_inbox_size_maximum()); const uint32_t outbound = MIN(256, app_message_outbox_size_maximum()); app_message_open(inbound, outbound); DictionaryIterator *iter; app_message_outbox_open(&iter); Tuplet value = TupletInteger(KEY_INIT_INBOX_SIZE, inbound); dict_write_tuplet(iter, &value); app_message_outbox_send();
  • 10. What’s new? 8KApp Messages with up to 8000 bytes in both directions Bluetooth LE Connectivity
  • 11. Bluetooth Low Energyaka Isolated App SessionCompatibility with Pebble Time Round
  • 13. Shared App Session Pandora iOS App Shared Session Pandora Pebble App
  • 14. Shared App Session Pandora iOS App Shared Session Pandora Pebble App
  • 15. Shared App Session Pandora iOS App runkeeper iOS App Shared Session Pandora Pebble App runkeeper Pebble App
  • 16. Shared App Session Pandora iOS App runkeeper iOS App Shared Session Pandora Pebble App runkeeper Pebble App
  • 17. Shared App Session Pandora iOS App runkeeper iOS App Shared Session Pandora Pebble App runkeeper Pebble App
  • 18. Isolated App Sessions Pandora iOS App Pandora Pebble App
  • 19. Isolated App Sessions Pandora iOS App Pandora Pebble App f01d…
  • 20. Isolated App Sessions Pandora iOS App runkeeper iOS App Pandora Pebble App f01d… runkeeper Pebble App b13a…
  • 21. Launch App from Watch Pandora Pebble App Requires UIBackgroundModes to contain “bluetooth-peripheral” and “bluetooth-central”
  • 22. Launch App from Watch Pandora Pebble App f01d… Requires UIBackgroundModes to contain “bluetooth-peripheral” and “bluetooth-central”
  • 23. Launch App from Watch Pandora iOS App Pandora Pebble App f01d… Requires UIBackgroundModes to contain “bluetooth-peripheral” and “bluetooth-central”
  • 24. Breaking API Changes • App UUIDs are now of type NSUUID (was: NSData) • PebbleCentral starts in a cold state •You have to run it so that it scans for watches •lastConnectedWatch will not contain a connected Pebble before nor immediately after you called run (was possible before) - wait for pebbleCentral:watchDidConnect: after you called run.
  • 25. Breaking API Changes central.delegate = self; uuid_t appUUIDBytes; NSUUID *appUUID = [[NSUUID alloc] initWithUUIDString:”f00d…”]; [appUUID getUUIDBytes:appUUIDBytes]; central.appUUID = appUUIDBytes; Before
  • 26. Breaking API Changes After central.delegate = self; NSUUID *appUUID = [[NSUUID alloc] initWithUUIDString:”f00d…”]; central.appUUID = appUUID; [central run];
  • 27. Bad: Run, Configure, Manual Check - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[PBPebbleCentral defaultCentral] run]; [PBPebbleCentral defaultCentral].appUUID = [NSUUID …]; PBWatch *watch = [PBPebbleCentral defaultCentral].lastConnectedWatch; if (watch.isConnected) { … } return YES; }
  • 28. Good: Configure, Run, React - (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [PBPebbleCentral defaultCentral].delegate = self; [PBPebbleCentral defaultCentral].appUUID = [NSUUID …]; [[PBPebbleCentral defaultCentral] run]; } - (void)pebbleCentral:(PBPebbleCentral *)central watchDidConnect:(PBWatch *)watch { … }
  • 29. • Nullability Annotations • Generics Swift 2.0
  • 30. • Xcode 7.0.1 started to claim that it isn’t (when using CocoaPods and building an Archive) • If you run into any issues we recommend that you disable it with ENABLE_BITCODE=NO Bitcode included $
  • 31. Still necessary to be compatible with Pebble and Pebble Steel MFi 
  • 32. How to Update pod “PebbleKit”, “~> 3.0.0” Or just replace the PebbleKit.framework with its new version manually, available here: https://github.com/pebble/pebble-ios-sdk/releases Podfile
  • 33. CHMultiDictionary CHMutableDictionary DDASLLogger DDFileLogger DDLog DDTTYLogger NSJSONSerialization+ObjectWithNString NSJSONSerialization+PBJSONHelpers NSString+HexData UIDevice-Hardware You can remove it from your project if you don’t use any of the classes or methods that it contained: PebbleVendor.framework
  • 34. Recap • Why? •8K App Messages, Better Background Experience •Support Pebble Time Round and be ready when other Pebble models switch to Bluetooth Low Energy • How? •Get the new PebbleKit.framework •Set appUUID, then [central run]
  • 36. Licenses & Attribution • Isolation Icon by Griffin Mullins %