Created
March 23, 2014 17:47
-
-
Save troystribling/42ec640f10317267139f to your computer and use it in GitHub Desktop.
BlueCap Characteristic Profile Xcode Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[serviceProfile createCharacteristicWithUUID:<#UUID#> | |
name:<#name#> | |
andProfile:^(BlueCapCharacteristicProfile* characteristicProfile) { | |
characteristicProfile.properties = CBCharacteristicPropertyRead | CBCharacteristicPropertyWrite; | |
[characteristicProfile serializeObject:^NSData*(id data) { | |
return nil; | |
}]; | |
[characteristicProfile afterDiscovered:^(BlueCapCharacteristic* chararacteristic) { | |
}]; | |
[characteristicProfile deserializeData:^NSDictionary*(NSData* data) { | |
return @{}; | |
}]; | |
[characteristicProfile stringValue:^NSDictionary*(NSDictionary* data) { | |
return @{}; | |
}]; | |
[characteristicProfile serializeString:^NSData*(NSDictionary* data) { | |
return nil; | |
}]; | |
characteristicProfile.initialValue = [characteristicProfile valueFromString:@{}]; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment