Permalink
Browse files

Merge pull request #18 from crashlytics/release/1.1.1

Release/1.1.1
  • Loading branch information...
Matt Massicotte
Matt Massicotte committed Aug 21, 2012
2 parents 4ee75d2 + 2a24a55 commit e57510cb081191f6af4efd9bb48c05e558339402
Showing with 17 additions and 11 deletions.
  1. +6 −0 README.md
  2. +1 −1 SecureUDID.h
  3. +8 −8 SecureUDID.m
  4. +2 −2 SecureUDID.xcodeproj/project.pbxproj
View
@@ -49,6 +49,12 @@ Fork the crashlytics/secureudid project on GitHub, file issues, implement fixes,
#####Version History
+May 1, 2012 - 1.1.1
+- Corrected use of availability macros
+- Removed an incorrect use of ARC qualifier in SUUIDHash
+- Lowered the minimum SDK target in the Xcode project to 3.1
+- Added some safer explicit casting after object deserialization
+
March 30, 2012 - 1.1
- Greatly improved robustness to backing store corruption/correctness
View
@@ -58,7 +58,7 @@
}];
*/
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000
+ (void)retrieveUDIDForDomain:(NSString *)domain usingKey:(NSString *)key completion:(void (^)(NSString* identifier))completion;
#endif
View
@@ -166,7 +166,7 @@ + (NSString *)UDIDForDomain:(NSString *)domain usingKey:(NSString *)key {
return identifier;
}
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000
+ (void)retrieveUDIDForDomain:(NSString *)domain usingKey:(NSString *)key completion:(void (^)(NSString* identifier))completion {
// retreive the identifier on a low-priority thread
@@ -221,7 +221,7 @@ Applies the operation (encrypt or decrypt) to the NSData value with the provided
&numBytes);
if (cryptStatus == kCCSuccess) {
- return [[[NSData alloc] initWithBytes:output.bytes length:numBytes] autorelease];
+ return [NSData dataWithBytes:output.bytes length:numBytes];
}
return nil;
@@ -245,7 +245,7 @@ Applies the operation (encrypt or decrypt) to the NSData value with the provided
/*
Compute a SHA1 of the input.
*/
-NSData *SUUIDHash(NSData __unsafe_unretained * data) {
+NSData *SUUIDHash(NSData *data) {
uint8_t digest[CC_SHA1_DIGEST_LENGTH] = {0};
CC_SHA1(data.bytes, data.length, digest);
@@ -620,21 +620,21 @@ BOOL SUUIDValidTopLevelObject(id object) {
// - SUUIDTimeStampKey + SUUIDOwnerKey + at least one additional key that is not SUUIDOptOutKey
// - SUUIDTimeStampKey + SUUIDOwnerKey + SUUIDOptOutKey
- if ([object objectForKey:SUUIDTimeStampKey] && [object objectForKey:SUUIDOwnerKey]) {
+ if ([(NSDictionary *)object objectForKey:SUUIDTimeStampKey] && [(NSDictionary *)object objectForKey:SUUIDOwnerKey]) {
NSMutableDictionary* ownersOnlyDictionary;
NSData* ownerField;
- if ([object objectForKey:SUUIDOptOutKey]) {
+ if ([(NSDictionary *)object objectForKey:SUUIDOptOutKey]) {
return YES;
}
// We have to trust future schema versions. Note that the lack of a schema version key will
// always fail this check, since the first schema version was 1.
- if ([[object objectForKey:SUUIDSchemaVersionKey] intValue] > SUUID_SCHEMA_VERSION) {
+ if ([[(NSDictionary *)object objectForKey:SUUIDSchemaVersionKey] intValue] > SUUID_SCHEMA_VERSION) {
return YES;
}
- ownerField = [object objectForKey:SUUIDOwnerKey];
+ ownerField = [(NSDictionary *)object objectForKey:SUUIDOwnerKey];
if (![ownerField isKindOfClass:[NSData class]]) {
return NO;
}
@@ -666,7 +666,7 @@ BOOL SUUIDValidTopLevelObject(id object) {
}
// Maybe just the SUUIDOptOutKey, on its own
- if ([[object objectForKey:SUUIDOptOutKey] boolValue] == YES) {
+ if ([[(NSDictionary *)object objectForKey:SUUIDOptOutKey] boolValue] == YES) {
return YES;
}
@@ -254,7 +254,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SecureUDID-Prefix.pch";
INFOPLIST_FILE = "SecureUDIDTests/SecureUDIDTests-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.1;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
WRAPPER_EXTENSION = octest;
@@ -271,7 +271,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SecureUDID-Prefix.pch";
INFOPLIST_FILE = "SecureUDIDTests/SecureUDIDTests-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.1;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
WRAPPER_EXTENSION = octest;

0 comments on commit e57510c

Please sign in to comment.