diff --git a/PebbleKit.framework/Versions/A/Headers/NSJSONSerialization+ObjectWithNString.h b/PebbleKit.framework/Versions/A/Headers/NSJSONSerialization+ObjectWithNString.h new file mode 100644 index 0000000..8cc1f06 --- /dev/null +++ b/PebbleKit.framework/Versions/A/Headers/NSJSONSerialization+ObjectWithNString.h @@ -0,0 +1,14 @@ +// +// NSJSONSerialization+ObjectWithNString.h +// Ejecta +// +// Created by matth on 7/19/13. +// +// + +#import + +@interface NSJSONSerialization (ObjectWithNString) ++ (id)JSONObjectWithString:(NSString *)string options:(NSJSONReadingOptions)opt error:(NSError **)error; ++ (NSString*)stringWithNSDictionary:(NSDictionary*)dictionary; +@end diff --git a/PebbleKit.framework/Versions/A/Headers/PBWatch+Version.h b/PebbleKit.framework/Versions/A/Headers/PBWatch+Version.h index ac4bb36..b3d2dd5 100644 --- a/PebbleKit.framework/Versions/A/Headers/PBWatch+Version.h +++ b/PebbleKit.framework/Versions/A/Headers/PBWatch+Version.h @@ -83,11 +83,16 @@ - (NSComparisonResult)compare:(PBFirmwareVersion *)aVersion; /** - * Convenience wrapper around -compare: + * Convenience wrappers around -compare: */ - (BOOL)isEqualOrNewer:(PBFirmwareVersion *)other; +- (BOOL)isNewer:(PBFirmwareVersion *)other; +- (BOOL)isEqualVersionOnly:(PBFirmwareVersion *)other; + @end + + /** * Values specifying the Pebble hardware platform variant. */ diff --git a/PebbleKit.framework/Versions/A/PebbleKit b/PebbleKit.framework/Versions/A/PebbleKit index 08f5757..c220a31 100644 Binary files a/PebbleKit.framework/Versions/A/PebbleKit and b/PebbleKit.framework/Versions/A/PebbleKit differ diff --git a/PebbleKit.podspec b/PebbleKit.podspec index 7a1e0a0..c682cf7 100644 --- a/PebbleKit.podspec +++ b/PebbleKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "PebbleKit" - s.version = "2.0.0.beta5" + s.version = "2.0.0.beta6" s.summary = "Embed PebbleKit iOS into your app to communicate with Pebble" s.homepage = "http://developer.getpebble.com" s.license = { @@ -10,7 +10,7 @@ Pod::Spec.new do |s| LICENSE } s.author = { "Pebble Technology Corp." => "devsupport@getpebble.com" } - s.source = { :git => "https://github.com/HBehrens/PebbleKit.git", :tag => "2.0.0.beta5" } + s.source = { :git => "https://github.com/HBehrens/PebbleKit.git", :tag => "2.0.0.beta6" } s.platform = :ios, '5.0' s.preserve_paths = "PebbleKit.framework", "PebbleVendor.framework" diff --git a/PebbleVendor.framework/Versions/A/PebbleVendor b/PebbleVendor.framework/Versions/A/PebbleVendor index bc25640..1a21fe6 100644 Binary files a/PebbleVendor.framework/Versions/A/PebbleVendor and b/PebbleVendor.framework/Versions/A/PebbleVendor differ diff --git a/PebbleVendor/NSJSONSerialization+ObjectWithNString.h b/PebbleVendor/NSJSONSerialization+ObjectWithNString.h new file mode 100644 index 0000000..8cc1f06 --- /dev/null +++ b/PebbleVendor/NSJSONSerialization+ObjectWithNString.h @@ -0,0 +1,14 @@ +// +// NSJSONSerialization+ObjectWithNString.h +// Ejecta +// +// Created by matth on 7/19/13. +// +// + +#import + +@interface NSJSONSerialization (ObjectWithNString) ++ (id)JSONObjectWithString:(NSString *)string options:(NSJSONReadingOptions)opt error:(NSError **)error; ++ (NSString*)stringWithNSDictionary:(NSDictionary*)dictionary; +@end diff --git a/PebbleVendor/NSJSONSerialization+ObjectWithNString.m b/PebbleVendor/NSJSONSerialization+ObjectWithNString.m new file mode 100644 index 0000000..0405cb3 --- /dev/null +++ b/PebbleVendor/NSJSONSerialization+ObjectWithNString.m @@ -0,0 +1,34 @@ +// +// NSJSONSerialization+ObjectWithNString.m +// Ejecta +// +// Created by matth on 7/19/13. +// +// + +#import "NSJSONSerialization+ObjectWithNString.h" + +@implementation NSJSONSerialization (ObjectWithNString) + ++ (id)JSONObjectWithString:(NSString *)jsonString options:(NSJSONReadingOptions)opt error:(NSError **)error +{ + NSData *jsonData = [jsonString dataUsingEncoding:NSUnicodeStringEncoding allowLossyConversion:YES]; + + return [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:error]; +} + ++ (NSString*)stringWithNSDictionary:(NSDictionary*)dictionary { + NSError *error; + + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionary + options:0 + error:&error]; + + if (!jsonData) { + return nil; + } + + return [[NSString alloc]initWithBytes:[jsonData bytes] length:[jsonData length] encoding:NSUTF8StringEncoding]; +} + +@end