| Inherits from | NSObject |
| Declared in | PBPebbleCentral.h |
Other Methods
connectedWatches
The watches that are currently connected. Do not cache the array because it can change over time.
@property (nonatomic, readonly, copy) NSArray<PBWatch*> *connectedWatchesDeclared In
PBPebbleCentral.h
registeredWatches
The watches that are stored in the user preferences of the application.
@property (nonatomic, readonly, copy) NSArray<PBWatch*> *registeredWatchesDeclared In
PBPebbleCentral.h
delegate
The central’s delegate.
@property (nonatomic, readwrite, weak) id<PBPebbleCentralDelegate> __nullable delegateDeclared In
PBPebbleCentral.h
appUUID
Identifier of the watch application this companion app communicates with.
@property (nonatomic, copy) NSUUID *appUUIDDiscussion
The identifier is used to make sure that app message and data logging communications arrive to the right companion watch app in the watch (and not to another app).
For most app message methods there is are two variants: one that does not take an UUID parameter and one that does (for example, -appMessagesAddReceiveUpdateHandler: vs -appMessagesAddReceiveUpdateHandler:withUUID:). The methods that do not take an UUID, will use the UUID as set prior to this property.
Note: The UUID needs to be set before using either app message or data logging.
Declared In
PBPebbleCentral.h
appUUIDs
The list of App-UUIDs this PebbleCentral wants to talk to.
@property (nonatomic, copy) NSSet<NSUUID*> *appUUIDsSee Also
Declared In
PBPebbleCentral.h
– addAppUUID:
Registers a new App-UUID with appUUIDs.
- (void)addAppUUID:(NSUUID *)appUUIDParameters
- appUUID
- The app UUID to register.
See Also
Declared In
PBPebbleCentral.h
– run
Registers and announces internal Bluetooth services. Might cause a dialog to allow this app to talk to other devices.
- (void)runDeclared In
PBPebbleCentral.h
– isMobileAppInstalled
Determines if the Pebble iOS app is installed in the device.
- (BOOL)isMobileAppInstalledReturn Value
YES if the Pebble iOS app is installed, NO if it is not installed.
Discussion
Note: Since iOS 9.0 you have to add “pebble” to LSApplicationQueriesSchemes
in your application Info.plist or this method will return NO all the
time.
Declared In
PBPebbleCentral.h
– installMobileApp
Redirects to Pebble in the App Store, so the user can install the app.
- (void)installMobileAppDeclared In
PBPebbleCentral.h
– unregisterAllWatches
Wipes out the data associated with the registered watches, that is stored on the phone.
- (void)unregisterAllWatchesDeclared In
PBPebbleCentral.h
– lastConnectedWatch
Returns the most recently connected watch from the registeredWatches array.
- (PBWatch *__nullable)lastConnectedWatchDeclared In
PBPebbleCentral.h
– dataLoggingServiceForAppUUID:
Returns the DataLoggingService for a (previously registered) appUUID
- (PBDataLoggingService *__nullable)dataLoggingServiceForAppUUID:(NSUUID *)appUUIDParameters
- appUUID
- The app UUID to recover the data logging service.
Declared In
PBPebbleCentral.h
DefaultCentral Methods
Legacy Methods
– hasValidAppUUID
Indicates if the central has been correctly configured with an app UUID. (Deprecated: Use appUUID != nil instead.)
- (BOOL)hasValidAppUUIDDeclared In
PBPebbleCentral+Legacy.h
+ setDebugLogsEnabled:
Enables or disables debug logging for PebbleKit. (Deprecated: Use +[PBPebbleKitLogging setLogLevel:] instead.)
+ (void)setDebugLogsEnabled:(BOOL)logsEnabledParameters
- logsEnabled
- Whether logging should be enabled or not.
Declared In
PBPebbleCentral+Legacy.h
+ setLogLevel:
Configures which events should be logged. (Deprecated: Use +[PBPebbleKitLogging setLogLevel:] instead.)
+ (void)setLogLevel:(PBPebbleKitLogLevel)logLevelParameters
- logLevel
- One of the values in PBPebbleKitLogLevel, which will be the maximum level that will be logged. You can use PBPebbleKitLogLevelOff to disable all logging.
Declared In
PBPebbleCentral+Legacy.h
dataLoggingService
Use dataLoggingServiceForAppUUID: instead. (Deprecated: Use dataLoggingServiceForAppUUID: instead.)
@property (nonatomic, readonly) PBDataLoggingService *dataLoggingServiceDeclared In
PBPebbleCentral+Legacy.h