aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AddressBook/GTMABAddressBook.h41
-rw-r--r--AddressBook/GTMABAddressBookTest.m230
-rwxr-xr-xBuildScripts/BuildAllSDKs.sh33
-rw-r--r--Foundation/GTMLightweightProxyTest.m29
-rw-r--r--GTM.xcodeproj/project.pbxproj96
-rw-r--r--GTMDefines.h44
-rw-r--r--GTMiPhone.xcodeproj/project.pbxproj400
-rw-r--r--XcodeConfig/Project/DebugiPhone40.xcconfig37
-rw-r--r--XcodeConfig/Project/ReleaseiPhone40.xcconfig37
-rw-r--r--XcodeConfig/subconfig/iPhone40.xcconfig21
10 files changed, 794 insertions, 174 deletions
diff --git a/AddressBook/GTMABAddressBook.h b/AddressBook/GTMABAddressBook.h
index a14146d..4e704dc 100644
--- a/AddressBook/GTMABAddressBook.h
+++ b/AddressBook/GTMABAddressBook.h
@@ -6,9 +6,9 @@
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
-//
+//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -22,11 +22,11 @@
// the APIs that they wrap. These wrappers also protect you from a number
// of issues in the AddressBook API (as of iPhone SDK 2.0/2.1)
//
-// Note that there is a strings file that you may want to localize
+// Note that there is a strings file that you may want to localize
// (GTMABAddressBook.strings).
//
// If things seem strange, it may be due to one of the following radars:
-// 6240394 AddressBook framework constants not initialized until
+// 6240394 AddressBook framework constants not initialized until
// ABCreateAddressBook called
// -- CLOSED as designed
// 6208390 Integer and real values don't work in ABMultiValueRefs
@@ -34,9 +34,9 @@
// either)
// 6207605 RecordIDs for people and groups are not unique in AddressBook
// -- CLOSED as designed
-// 6204021 kABGroupNameProperty and kABPersonFirstNameProperty have the same
+// 6204021 kABGroupNameProperty and kABPersonFirstNameProperty have the same
// value
-// 6203982 ABPersonCopyLocalizedPropertyName returns name for
+// 6203982 ABPersonCopyLocalizedPropertyName returns name for
// kABGroupNameProperty
// 6203961 ABPersonGetTypeOfProperty returns a type for kABGroupNameProperty
// 6203854 ABMultiValues hash to their address
@@ -48,7 +48,7 @@
// -- CLOSED behaves correctly
// 6202827 Passing nil info ABMultiValueAddValueAndLabel causes crash
// -- CLOSED behaves correctly
-// 6202807 ABMultiValueInsertValueAndLabelAtIndex allows you to insert values
+// 6202807 ABMultiValueInsertValueAndLabelAtIndex allows you to insert values
// past end
// 6201276 Removing a NULL record using ABAddressBookRemoveRecord crashes
// -- CLOSED behaves correctly
@@ -58,9 +58,10 @@
// value
// 6201005 ABRecordRemoveValue returns true for value that aren't in the record
// -- CLOSED behaves correctly
-// 6200703 ABAddressBookAddRecord doesn't add an item to the people array until
+// 6200703 ABAddressBookAddRecord doesn't add an item to the people array until
// it's saved
// 6200638 ABAddressBookHasUnsavedChanges doesn't work
+// -- CLOSED fixed in iOS 3.2
#import "GTMDefines.h"
#import <Foundation/Foundation.h>
@@ -191,7 +192,7 @@ extern NSString* const kABGroupRecordType;
// As of iPhone 2.1, this does not work, and will always return NO.
// Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work
- (BOOL)hasUnsavedChanges;
-
+
// Returns a GTMABPerson matching an ID
// Returns nil if the record could not be found
- (GTMABPerson *)personForId:(GTMABRecordID)uniqueId;
@@ -221,12 +222,12 @@ extern NSString* const kABGroupRecordType;
// until it's saved
- (NSArray *)groups;
-// Performs a prefix search on the composite names of people in an address book
+// Performs a prefix search on the composite names of people in an address book
// and returns an array of persons that match the search criteria.
// Ignores case.
- (NSArray *)peopleWithCompositeNameWithPrefix:(NSString *)prefix;
-// Performs a prefix search on the composite names of groups in an address book
+// Performs a prefix search on the composite names of groups in an address book
// and returns an array of groups that match the search criteria.
// Ignores case.
- (NSArray *)groupsWithCompositeNameWithPrefix:(NSString *)prefix;
@@ -244,7 +245,7 @@ extern NSString* const kABGroupRecordType;
ABRecordRef record_;
}
-// Create a record with a recordRef.
+// Create a record with a recordRef.
// Since GTMABRecord is an abstract base class, attempting to create one
// of these directly will throw an exception. Use with one of the concrete
// subclasses.
@@ -262,11 +263,11 @@ extern NSString* const kABGroupRecordType;
// Return the recordID for the record
- (GTMABRecordID)recordID;
-// Returns the value of a given property.
+// Returns the value of a given property.
// The type of the value depends on the property type.
- (id)valueForProperty:(GTMABPropertyID)property;
-// Set the value of a given property.
+// Set the value of a given property.
// The type of the value must match the property type.
// Returns YES if value set properly
- (BOOL)setValue:(id)value forProperty:(GTMABPropertyID)property;
@@ -289,7 +290,7 @@ extern NSString* const kABGroupRecordType;
@interface GTMABPerson : GTMABRecord
// Creates a person with a first name and a last name.
-+ (GTMABPerson *)personWithFirstName:(NSString *)first
++ (GTMABPerson *)personWithFirstName:(NSString *)first
lastName:(NSString *)last;
// Sets image data for a person. Data must be to a block of data that
@@ -384,7 +385,7 @@ extern NSString* const kABGroupRecordType;
@private
// Use unsigned long here instead of NSUInteger because that's what
// NSFastEnumeration Protocol wants currently (iPhone 2.1)
- unsigned long mutations_;
+ unsigned long mutations_;
}
// Create a new mutable multivalue with a given type
@@ -397,16 +398,16 @@ extern NSString* const kABGroupRecordType;
- (id)initWithMutableMultiValue:(ABMutableMultiValueRef)multiValue;
// Adds a value with its label
-// Returns the identifier if successful, kABMultiValueInvalidIdentifier
+// Returns the identifier if successful, kABMultiValueInvalidIdentifier
// otherwise.
- (GTMABMultiValueIdentifier)addValue:(id)value withLabel:(CFStringRef)label;
// Insert a value/label pair at a given index
-// Returns the identifier if successful. kABMultiValueInvalidIdentifier
+// Returns the identifier if successful. kABMultiValueInvalidIdentifier
// otherwise
// If index is out of bounds, returns kABMultiValueInvalidIdentifier.
-- (GTMABMultiValueIdentifier)insertValue:(id)value
- withLabel:(CFStringRef)label
+- (GTMABMultiValueIdentifier)insertValue:(id)value
+ withLabel:(CFStringRef)label
atIndex:(NSUInteger)index;
// Removes a value/label pair at a given index
diff --git a/AddressBook/GTMABAddressBookTest.m b/AddressBook/GTMABAddressBookTest.m
index bd6e224..4a7b0ce 100644
--- a/AddressBook/GTMABAddressBookTest.m
+++ b/AddressBook/GTMABAddressBookTest.m
@@ -6,9 +6,9 @@
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
-//
+//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -46,13 +46,13 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
book_ = [[GTMABAddressBook addressBook] retain];
[pool release];
STAssertNotNil(book_, nil);
- NSArray *people
+ NSArray *people
= [book_ peopleWithCompositeNameWithPrefix:kGTMABTestFirstName];
GTMABPerson *person;
GTM_FOREACH_OBJECT(person, people) {
[book_ removeRecord:person];
}
- NSArray *groups
+ NSArray *groups
= [book_ groupsWithCompositeNameWithPrefix:kGTMABTestGroupName];
GTMABGroup *group;
GTM_FOREACH_OBJECT(group, groups) {
@@ -66,23 +66,23 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
}
- (void)testGenericAddressBook {
- STAssertEqualObjects([GTMABAddressBook localizedLabel:(NSString *)kABHomeLabel],
- @"home",
+ STAssertEqualObjects([GTMABAddressBook localizedLabel:(NSString *)kABHomeLabel],
+ @"home",
nil);
STAssertThrows([GTMABRecord recordWithRecord:nil], nil);
}
- (void)testAddingAndRemovingPerson {
// Create a person
- GTMABPerson *person = [GTMABPerson personWithFirstName:kGTMABTestFirstName
+ GTMABPerson *person = [GTMABPerson personWithFirstName:kGTMABTestFirstName
lastName:kGTMABTestLastName];
STAssertNotNil(person, nil);
-
+
// Add person
NSArray *people = [book_ people];
STAssertFalse([people containsObject:person], nil);
STAssertTrue([book_ addRecord:person], nil);
-#if GTM_IPHONE_SDK
+#if GTM_IPHONE_SDK && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2)
// Normally this next line would be STAssertTrue, however due to
// Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work
// We will check to make sure it stays broken ;-)
@@ -95,14 +95,14 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
STAssertNotNil(people, nil);
#if GTM_IPHONE_SDK
// Normally this next line would be STAssertTrue, however due to
- // Radar 6200703: ABAddressBookAddRecord doesn't add an item to the people
+ // Radar 6200703: ABAddressBookAddRecord doesn't add an item to the people
// array until it's saved
// We will check to make sure it stays broken ;-)
STAssertFalse([people containsObject:person], nil);
#else // GTM_IPHONE_SDK
STAssertTrue([people containsObject:person], nil);
#endif // GTM_IPHONE_SDK
-
+
// Save book_
STAssertTrue([book_ save], nil);
people = [book_ people];
@@ -113,16 +113,16 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
GTMABRecordID recordID = [person recordID];
STAssertNotEquals(recordID, kGTMABRecordInvalidID, nil);
-
+
GTMABRecord *record = [book_ personForId:recordID];
STAssertEqualObjects(record, person, nil);
-
+
// Remove person
STAssertTrue([book_ removeRecord:person], nil);
people = [book_ peopleWithCompositeNameWithPrefix:kGTMABTestFirstName];
STAssertEquals([people count], (NSUInteger)0, nil);
-
-#if GTM_IPHONE_SDK
+
+#if GTM_IPHONE_SDK && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2)
// Normally this next line would be STAssertTrue, however due to
// Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work
// We will check to make sure it stays broken ;-)
@@ -132,33 +132,33 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
#endif // GTM_IPHONE_SDK
people = [book_ people];
STAssertFalse([people containsObject:person], nil);
-
+
// Save Book
STAssertTrue([book_ save], nil);
people = [book_ people];
STAssertFalse([book_ hasUnsavedChanges], nil);
- STAssertFalse([people containsObject:person], nil);
+ STAssertFalse([people containsObject:person], nil);
record = [book_ personForId:recordID];
STAssertNil(record, nil);
-
+
// Bogus data
STAssertFalse([book_ addRecord:nil], nil);
STAssertFalse([book_ removeRecord:nil], nil);
-
+
STAssertNotNULL([book_ addressBookRef], nil);
-
+
}
- (void)testAddingAndRemovingGroup {
// Create a group
GTMABGroup *group = [GTMABGroup groupNamed:kGTMABTestGroupName];
STAssertNotNil(group, nil);
-
+
// Add group
NSArray *groups = [book_ groups];
STAssertFalse([groups containsObject:group], nil);
STAssertTrue([book_ addRecord:group], nil);
-#if GTM_IPHONE_SDK
+#if GTM_IPHONE_SDK && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2)
// Normally this next line would be STAssertTrue, however due to
// Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work
// We will check to make sure it stays broken ;-)
@@ -166,19 +166,19 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
#else // GTM_IPHONE_SDK
STAssertTrue([book_ hasUnsavedChanges], nil);
#endif // GTM_IPHONE_SDK
-
+
groups = [book_ groups];
STAssertNotNil(groups, nil);
#if GTM_IPHONE_SDK
// Normally this next line would be STAssertTrue, however due to
- // Radar 6200703: ABAddressBookAddRecord doesn't add an item to the groups
+ // Radar 6200703: ABAddressBookAddRecord doesn't add an item to the groups
// array until it's saved
// We will check to make sure it stays broken ;-)
STAssertFalse([groups containsObject:group], nil);
#else // GTM_IPHONE_SDK
STAssertTrue([groups containsObject:group], nil);
#endif // GTM_IPHONE_SDK
-
+
// Save book_
STAssertTrue([book_ save], nil);
groups = [book_ groups];
@@ -189,14 +189,14 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
GTMABRecordID recordID = [group recordID];
STAssertNotEquals(recordID, kGTMABRecordInvalidID, nil);
-
+
GTMABRecord *record = [book_ groupForId:recordID];
STAssertEqualObjects(record, group, nil);
-
+
// Remove group
STAssertTrue([book_ removeRecord:group], nil);
-
-#if GTM_IPHONE_SDK
+
+#if GTM_IPHONE_SDK && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2)
// Normally this next line would be STAssertTrue, however due to
// Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work
// We will check to make sure it stays broken ;-)
@@ -206,12 +206,12 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
#endif // GTM_IPHONE_SDK
groups = [book_ groups];
STAssertFalse([groups containsObject:group], nil);
-
+
// Save Book
STAssertTrue([book_ save], nil);
groups = [book_ groups];
STAssertFalse([book_ hasUnsavedChanges], nil);
- STAssertFalse([groups containsObject:group], nil);
+ STAssertFalse([groups containsObject:group], nil);
groups = [book_ groupsWithCompositeNameWithPrefix:kGTMABTestGroupName];
STAssertEquals([groups count], (NSUInteger)0, nil);
record = [book_ groupForId:recordID];
@@ -235,17 +235,17 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
STAssertFalse([person setValue:nil forProperty:kGTMABPersonFirstNameProperty], nil);
STAssertFalse([person setValue:[NSNumber numberWithInt:1]
forProperty:kGTMABPersonFirstNameProperty], nil);
- STAssertFalse([person setValue:@"Bart"
+ STAssertFalse([person setValue:@"Bart"
forProperty:kGTMABPersonBirthdayProperty], nil);
-
- GTMABPropertyType property
+
+ GTMABPropertyType property
= [GTMABPerson typeOfProperty:kGTMABPersonLastNameProperty];
STAssertEquals(property, (GTMABPropertyType)kGTMABStringPropertyType, nil);
-
- NSString *string
+
+ NSString *string
= [GTMABPerson localizedPropertyName:kGTMABPersonLastNameProperty];
STAssertEqualObjects(string, @"Last", nil);
-
+
string = [GTMABPerson localizedPropertyName:kGTMABRecordInvalidID];
#ifdef GTM_IPHONE_SDK
STAssertEqualObjects(string, kGTMABUnknownPropertyName, nil);
@@ -254,11 +254,11 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
#endif // GTM_IPHONE_SDK
string = [person description];
STAssertNotNil(string, nil);
-
+
GTMABPersonCompositeNameFormat format = [GTMABPerson compositeNameFormat];
STAssertTrue(format == kABPersonCompositeNameFormatFirstNameFirst ||
format == kABPersonCompositeNameFormatLastNameFirst, nil);
-
+
NSData *data = [person imageData];
STAssertNil(data, nil);
STAssertTrue([person setImageData:nil], nil);
@@ -280,8 +280,8 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
STAssertEqualObjects(data, data2, nil);
STAssertTrue([person setImageData:nil], nil);
data = [person imageData];
- STAssertNil(data, nil);
-
+ STAssertNil(data, nil);
+
STAssertTrue([person setImage:image], nil);
GTMABImage *image2 = [person image];
STAssertNotNil(image2, nil);
@@ -292,23 +292,23 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
STAssertEqualObjects([image TIFFRepresentation],
[image2 TIFFRepresentation], nil);
#endif // GTM_IPHONE_SDK
-
+
person = [GTMABPerson personWithFirstName:kGTMABTestFirstName
lastName:kGTMABTestLastName];
data = [NSData dataWithBytes:"a" length:1];
STAssertFalse([person setImageData:data], nil);
-
- GTMABMutableMultiValue *value
+
+ GTMABMutableMultiValue *value
= [GTMABMutableMultiValue valueWithPropertyType:kGTMABStringPropertyType];
STAssertNotNil(value, nil);
- STAssertNotEquals([value addValue:@"222-222-2222"
- withLabel:(CFStringRef)kABHomeLabel],
+ STAssertNotEquals([value addValue:@"222-222-2222"
+ withLabel:(CFStringRef)kABHomeLabel],
kGTMABMultiValueInvalidIdentifier, nil);
- STAssertNotEquals([value addValue:@"333-333-3333"
- withLabel:(CFStringRef)kABWorkLabel],
+ STAssertNotEquals([value addValue:@"333-333-3333"
+ withLabel:(CFStringRef)kABWorkLabel],
kGTMABMultiValueInvalidIdentifier, nil);
- STAssertTrue([person setValue:value
+ STAssertTrue([person setValue:value
forProperty:kGTMABPersonPhoneProperty], nil);
id value2 = [person valueForProperty:kGTMABPersonPhoneProperty];
STAssertNotNil(value2, nil);
@@ -333,37 +333,37 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
STAssertFalse([group setValue:nil forProperty:kABGroupNameProperty], nil);
STAssertFalse([group setValue:[NSNumber numberWithInt:1]
forProperty:kABGroupNameProperty], nil);
- STAssertFalse([group setValue:@"Bart"
- forProperty:kGTMABPersonBirthdayProperty], nil);
-
+ STAssertFalse([group setValue:@"Bart"
+ forProperty:kGTMABPersonBirthdayProperty], nil);
+
ABPropertyType property = [GTMABGroup typeOfProperty:kABGroupNameProperty];
STAssertEquals(property, (ABPropertyType)kGTMABStringPropertyType, nil);
-
+
property = [GTMABGroup typeOfProperty:kGTMABPersonLastNameProperty];
STAssertEquals(property, (ABPropertyType)kGTMABInvalidPropertyType, nil);
-
+
NSString *string = [GTMABGroup localizedPropertyName:kABGroupNameProperty];
STAssertEqualObjects(string, @"Name", nil);
-
+
string = [GTMABGroup localizedPropertyName:kGTMABPersonLastNameProperty];
STAssertEqualObjects(string, kGTMABUnknownPropertyName, nil);
-
+
string = [GTMABGroup localizedPropertyName:kGTMABRecordInvalidID];
STAssertEqualObjects(string, kGTMABUnknownPropertyName, nil);
string = [group description];
STAssertNotNil(string, nil);
-
+
// Adding and removing members
group = [GTMABGroup groupNamed:kGTMABTestGroupName];
NSArray *members = [group members];
STAssertEquals([members count], (NSUInteger)0, @"Members: %@", members);
-
+
STAssertFalse([group addMember:nil], nil);
-
+
members = [group members];
STAssertEquals([members count], (NSUInteger)0, @"Members: %@", members);
-
+
GTMABPerson *person = [GTMABPerson personWithFirstName:kGTMABTestFirstName
lastName:kGTMABTestLastName];
STAssertNotNil(person, nil);
@@ -389,14 +389,14 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
STAssertThrows([[GTMABMutableMultiValue alloc] init], nil);
GTMABMultiValue *value = [[GTMABMultiValue alloc] initWithMultiValue:nil];
STAssertNil(value, nil);
- GTMABMutableMultiValue *mutValue
+ GTMABMutableMultiValue *mutValue
= [GTMABMutableMultiValue valueWithPropertyType:kGTMABInvalidPropertyType];
STAssertNil(mutValue, nil);
- mutValue
+ mutValue
= [[[GTMABMutableMultiValue alloc]
initWithMutableMultiValue:nil] autorelease];
STAssertNil(mutValue, nil);
- mutValue
+ mutValue
= [[[GTMABMutableMultiValue alloc]
initWithMultiValue:nil] autorelease];
STAssertNil(mutValue, nil);
@@ -423,11 +423,11 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
// and apparently you get back basically the same thing. However if you
// ask a type that you created with kABMultiFooPropertyType for it's type
// it returns just kABFooPropertyType.
- STAssertEquals([mutValue propertyType],
+ STAssertEquals([mutValue propertyType],
(GTMABPropertyType)(types[i] & ~kABMultiValueMask), nil);
}
#endif // GTM_IPHONE_SDK
- mutValue
+ mutValue
= [GTMABMutableMultiValue valueWithPropertyType:kGTMABStringPropertyType];
STAssertNotNil(mutValue, nil);
value = [[mutValue copy] autorelease];
@@ -438,30 +438,30 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
STAssertNil([mutValue valueAtIndex:0], nil);
STAssertNil([mutValue labelAtIndex:0], nil);
#if GTM_IPHONE_SDK
- STAssertEquals([mutValue identifierAtIndex:0],
+ STAssertEquals([mutValue identifierAtIndex:0],
kGTMABMultiValueInvalidIdentifier, nil);
- STAssertEquals([mutValue propertyType],
+ STAssertEquals([mutValue propertyType],
(GTMABPropertyType)kGTMABStringPropertyType, nil);
#else // GTM_IPHONE_SDK
- STAssertEqualObjects([mutValue identifierAtIndex:0],
+ STAssertEqualObjects([mutValue identifierAtIndex:0],
kGTMABMultiValueInvalidIdentifier, nil);
#endif // GTM_IPHONE_SDK
- GTMABMultiValueIdentifier ident
+ GTMABMultiValueIdentifier ident
= [mutValue addValue:nil withLabel:(CFStringRef)kABHomeLabel];
#if GTM_IPHONE_SDK
STAssertEquals(ident, kGTMABMultiValueInvalidIdentifier, nil);
#else // GTM_IPHONE_SDK
STAssertEqualObjects(ident, kGTMABMultiValueInvalidIdentifier, nil);
#endif // GTM_IPHONE_SDK
-
- ident = [mutValue addValue:@"val1"
+
+ ident = [mutValue addValue:@"val1"
withLabel:nil];
#if GTM_IPHONE_SDK
STAssertEquals(ident, kGTMABMultiValueInvalidIdentifier, nil);
#else // GTM_IPHONE_SDK
STAssertEqualObjects(ident, kGTMABMultiValueInvalidIdentifier, nil);
#endif // GTM_IPHONE_SDK
- ident = [mutValue insertValue:@"val1"
+ ident = [mutValue insertValue:@"val1"
withLabel:nil
atIndex:0];
#if GTM_IPHONE_SDK
@@ -477,7 +477,7 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
#else // GTM_IPHONE_SDK
STAssertEqualObjects(ident, kGTMABMultiValueInvalidIdentifier, nil);
#endif // GTM_IPHONE_SDK
- ident = [mutValue addValue:@"val1"
+ ident = [mutValue addValue:@"val1"
withLabel:(CFStringRef)kABHomeLabel];
#if GTM_IPHONE_SDK
STAssertNotEquals(ident, kGTMABMultiValueInvalidIdentifier, nil);
@@ -500,19 +500,19 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
withValue:@"newVal1"], nil);
STAssertFalse([mutValue replaceValueAtIndex:10
withValue:@"newVal1"], nil);
-
+
STAssertEqualObjects([mutValue valueForIdentifier:ident], @"newVal1", nil);
- STAssertEqualObjects([mutValue labelForIdentifier:ident],
+ STAssertEqualObjects([mutValue labelForIdentifier:ident],
(NSString *)kABWorkLabel, nil);
-
- GTMABMultiValueIdentifier ident2
- = [mutValue insertValue:@"val2"
- withLabel:(CFStringRef)kABOtherLabel
+
+ GTMABMultiValueIdentifier ident2
+ = [mutValue insertValue:@"val2"
+ withLabel:(CFStringRef)kABOtherLabel
atIndex:0];
STAssertNotEquals(ident2, kGTMABMultiValueInvalidIdentifier, nil);
STAssertNotEquals(ident2, ident, nil);
- GTMABMultiValueIdentifier ident3
- = [mutValue insertValue:@"val3"
+ GTMABMultiValueIdentifier ident3
+ = [mutValue insertValue:@"val3"
withLabel:(CFStringRef)kGTMABPersonPhoneMainLabel
atIndex:10];
#if GTM_IPHONE_SDK
@@ -524,21 +524,21 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
STAssertEquals(idx3, (NSUInteger)NSNotFound, nil);
STAssertTrue([mutValue removeValueAndLabelAtIndex:1], nil);
STAssertFalse([mutValue removeValueAndLabelAtIndex:1], nil);
-
- NSUInteger idx4
+
+ NSUInteger idx4
= [mutValue indexForIdentifier:kGTMABMultiValueInvalidIdentifier];
STAssertEquals(idx4, (NSUInteger)NSNotFound, nil);
-
+
STAssertNotNULL([mutValue multiValueRef], nil);
-
+
// Enumerator test
- mutValue
+ mutValue
= [GTMABMutableMultiValue valueWithPropertyType:kGTMABIntegerPropertyType];
STAssertNotNil(mutValue, nil);
for (int i = 0; i < 100; i++) {
NSString *label = [NSString stringWithFormat:@"label %d", i];
NSNumber *val = [NSNumber numberWithInt:i];
- STAssertNotEquals([mutValue addValue:val
+ STAssertNotEquals([mutValue addValue:val
withLabel:(CFStringRef)label],
kGTMABMultiValueInvalidIdentifier, nil);
}
@@ -554,7 +554,7 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
GTM_FOREACH_ENUMEREE(val, [value valueEnumerator]) {
STAssertEqualObjects(val, [NSNumber numberWithInt:count++], nil);
}
-
+
// Test messing with the values while we're enumerating them
NSEnumerator *labelEnum = [mutValue labelEnumerator];
NSEnumerator *valueEnum = [mutValue valueEnumerator];
@@ -565,7 +565,7 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
STAssertTrue([mutValue removeValueAndLabelAtIndex:0], nil);
STAssertThrows([labelEnum nextObject], nil);
STAssertThrows([valueEnum nextObject], nil);
-
+
// Test messing with the values while we're fast enumerating them
// Should throw an exception on the second access.
BOOL exceptionThrown = NO;
@@ -579,17 +579,17 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
}
} @catch(NSException *e) {
STAssertEqualObjects([e name], NSGenericException, @"Got %@ instead", e);
- STAssertEquals(count, 2,
+ STAssertEquals(count, 2,
@"Should have caught it on the second access");
exceptionThrown = YES;
} // COV_NF_LINE - because we always catch, this brace doesn't get exec'd
STAssertTrue(exceptionThrown, @"We should have thrown an exception"
@" because the values under the enumerator were modified");
-
+
}
#if GTM_IPHONE_SDK
-- (void)testRadar6208390 {
+- (void)testRadar6208390 {
GTMABPropertyType types[] = {
kGTMABStringPropertyType,
kGTMABIntegerPropertyType,
@@ -612,55 +612,55 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
val = [[NSDictionary alloc] initWithObjectsAndKeys:@"1", @"1", nil];
} else if (type == kGTMABStringPropertyType) {
val = [[NSString alloc] initWithFormat:@"value %d"];
- } else if (type == kGTMABIntegerPropertyType
+ } else if (type == kGTMABIntegerPropertyType
|| type == kGTMABRealPropertyType ) {
val = [[NSNumber alloc] initWithInt:143];
} else if (type == kGTMABDateTimePropertyType) {
val = [[NSDate alloc] init];
}
- STAssertNotNil(val,
+ STAssertNotNil(val,
@"Testing type %d, %@", type, val);
NSUInteger firstRetainCount = [val retainCount];
- STAssertNotEquals(firstRetainCount,
- (NSUInteger)0,
+ STAssertNotEquals(firstRetainCount,
+ (NSUInteger)0,
@"Testing type %d, %@", type, val);
-
+
GTMABMultiValueIdentifier identifier;
- STAssertTrue(ABMultiValueAddValueAndLabel(ref,
- val,
- (CFStringRef)label,
- &identifier),
- @"Testing type %d, %@", type, val);
+ STAssertTrue(ABMultiValueAddValueAndLabel(ref,
+ val,
+ (CFStringRef)label,
+ &identifier),
+ @"Testing type %d, %@", type, val);
NSUInteger secondRetainCount = [val retainCount];
- STAssertEquals(firstRetainCount + 1,
+ STAssertEquals(firstRetainCount + 1,
secondRetainCount,
@"Testing type %d, %@", type, val);
[label release];
[val release];
NSUInteger thirdRetainCount = [val retainCount];
- STAssertEquals(firstRetainCount,
- thirdRetainCount,
+ STAssertEquals(firstRetainCount,
+ thirdRetainCount,
@"Testing type %d, %@", type, val);
-
+
id oldVal = val;
val = (id)ABMultiValueCopyValueAtIndex(ref, 0);
NSUInteger fourthRetainCount = [val retainCount];
-
+
// kABDictionaryPropertyTypes appear to do an actual copy, so the retain
// count checking trick won't work. We only check the retain count if
// we didn't get a new version.
if (val == oldVal) {
- if (type == kGTMABIntegerPropertyType
+ if (type == kGTMABIntegerPropertyType
|| type == kGTMABRealPropertyType) {
// We are verifying that yes indeed 6208390 is still broken
- STAssertEquals(fourthRetainCount,
- thirdRetainCount,
+ STAssertEquals(fourthRetainCount,
+ thirdRetainCount,
@"Testing type %d, %@. If you see this error it may "
- @"be time to update the code to change retain behaviors"
+ @"be time to update the code to change retain behaviors"
@"with this os version", type, val);
} else {
- STAssertEquals(fourthRetainCount,
- thirdRetainCount + 1,
+ STAssertEquals(fourthRetainCount,
+ thirdRetainCount + 1,
@"Testing type %d, %@", type, val);
[val release];
}
@@ -682,12 +682,12 @@ void __attribute__((constructor))SetUpIDForTestRadar6240394(void) {
}
- (void)testRadar6240394 {
- // As of iPhone SDK 2.1, the property IDs aren't initialized until
+ // As of iPhone SDK 2.1, the property IDs aren't initialized until
// ABAddressBookCreate is actually called. They will return zero until
// then. Logged as radar 6240394.
STAssertEquals(gGTMTestID, 0, @"If this isn't zero, Apple has fixed 6240394");
(void)ABAddressBookCreate();
- STAssertEquals(*gGTMTestIDPtr, kGTMABPersonLastNameProperty,
+ STAssertEquals(*gGTMTestIDPtr, kGTMABPersonLastNameProperty,
@"If this doesn't work, something else has broken");
}
diff --git a/BuildScripts/BuildAllSDKs.sh b/BuildScripts/BuildAllSDKs.sh
index fe75165..81710b0 100755
--- a/BuildScripts/BuildAllSDKs.sh
+++ b/BuildScripts/BuildAllSDKs.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# BuildAllSDKs.sh
#
-# This script builds the Tiger, Leopard, SnowLeopard and iPhone versions of the
+# This script builds the Tiger, Leopard, SnowLeopard and iPhone versions of the
# requested target in the current basic config (debug, release, debug-gcov).
#
# Copyright 2006-2009 Google Inc.
@@ -39,15 +39,17 @@ fi
AVAILABLE_MACOS_SDKS=`eval ls ${DEVELOPER_SDK_DIR}`
AVAILABLE_PLATFORMS=`eval ls ${DEVELOPER_DIR}/Platforms`
-# build up our GTMiPhone parts
GTMIPHONE_OPEN_EXTRAS=""
GTMIPHONE_BUILD_EXTRAS=""
+GTM_OPEN_EXTRAS=""
+GTM_BUILD_EXTRAS=""
+
+# build up our GTMiPhone parts
if [ "${GTMIPHONE_PROJECT_TARGET}" != "" ]; then
AVAILABLE_IPHONE_SDKS=`eval ls ${DEVELOPER_DIR}/Platforms/iPhoneSimulator.platform/Developer/SDKs`
GTMIPHONE_OPEN_EXTRAS="
if \"${AVAILABLE_PLATFORMS}\" contains \"iPhoneSimulator.platform\" then
-- make sure both project files are open
- open posix file \"${SRCROOT}/GTM.xcodeproj\"
open posix file \"${SRCROOT}/GTMiPhone.xcodeproj\"
end if"
GTMIPHONE_BUILD_EXTRAS="
@@ -142,11 +144,13 @@ if [ "${GTMIPHONE_PROJECT_TARGET}" != "" ]; then
end if"
fi
-# build up our GTM AppleScript
-OUR_BUILD_SCRIPT="on run
- tell application \"Xcode\"
- activate
- ${GTMIPHONE_OPEN_EXTRAS}
+# build up our GTMiPhone parts
+if [ "${GTM_PROJECT_TARGET}" != "" ]; then
+ GTM_OPEN_EXTRAS="
+ if \"${AVAILABLE_PLATFORMS}\" contains \"MacOSX.platform\" then
+ open posix file \"${SRCROOT}/GTM.xcodeproj\"
+ end if"
+ GTM_BUILD_EXTRAS="
if \"${AVAILABLE_PLATFORMS}\" contains \"MacOSX.platform\" then
tell project \"GTM\"
-- wait for stub build to finish before kicking off the real builds.
@@ -187,8 +191,17 @@ OUR_BUILD_SCRIPT="on run
end if
end timeout
end tell
- end if
+ end if"
+fi
+
+# build up our GTM AppleScript
+OUR_BUILD_SCRIPT="on run
+ tell application \"Xcode\"
+ activate
+ ${GTMIPHONE_OPEN_EXTRAS}
+ ${GTM_OPEN_EXTRAS}
${GTMIPHONE_BUILD_EXTRAS}
+ ${GTM_BUILD_EXTRAS}
end tell
end run"
@@ -198,5 +211,5 @@ end run"
# open to invoke it, there by escaping our little sandbox.
# xcode defeats this: ( echo "${OUR_BUILD_SCRIPT}" | osascript - & )
rm -rf "${SCRIPT_APP}"
-echo "${OUR_BUILD_SCRIPT}" | osacompile -o "${SCRIPT_APP}" -x
+echo "${OUR_BUILD_SCRIPT}" | osacompile -o "${SCRIPT_APP}" -x
open "${SCRIPT_APP}"
diff --git a/Foundation/GTMLightweightProxyTest.m b/Foundation/GTMLightweightProxyTest.m
index 01a1bb2..3309484 100644
--- a/Foundation/GTMLightweightProxyTest.m
+++ b/Foundation/GTMLightweightProxyTest.m
@@ -6,9 +6,9 @@
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
-//
+//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -31,10 +31,10 @@
@implementation GTMLightweightProxyTest
- (void)testInit {
- id proxy = [[[GTMLightweightProxy alloc]
+ id proxy = [[[GTMLightweightProxy alloc]
initWithRepresentedObject:self] autorelease];
STAssertNotNil(proxy, nil);
-
+
proxy = [[[GTMLightweightProxy alloc] init] autorelease];
STAssertNotNil(proxy, nil);
}
@@ -44,13 +44,13 @@
= [[[GTMLightweightProxy alloc] initWithRepresentedObject:self] autorelease];
STAssertEqualObjects(self, [proxy representedObject],
@"Represented object setup failed");
-
+
// Check that it identifies itself as a proxy.
STAssertTrue([proxy isProxy], @"Should identify as a proxy");
// Check that it passes class requests on
STAssertTrue([proxy isMemberOfClass:[self class]],
@"Should pass class requests through");
-
+
// Check that it claims to respond to its selectors.
STAssertTrue([proxy respondsToSelector:@selector(initWithRepresentedObject:)],
@"Claims not to respond to initWithRepresentedObject:");
@@ -62,13 +62,18 @@
STAssertTrue([proxy respondsToSelector:@selector(returnYes)],
@"Claims not to respond to returnYes");
// ... but not to made up selectors.
+#if !(__IPHONE_OS_VERSION_MIN_REQUIRED == __IPHONE_3_2 || __IPHONE_OS_VERSION_MIN_REQUIRED == __IPHONE_4_0)
+ // Exceptions thrown by - (void)doesNotRecognizeSelector:(SEL)aSelector
+ // does not get caught on iOS 3.2 and greater.
+ // http://openradar.appspot.com/radar?id=420401
STAssertThrows([proxy someMadeUpMethod],
@"Calling a bogus method should throw");
-
+#endif
+
// Check that callthrough works.
STAssertTrue([proxy returnYes],
@"Calling through to the represented object failed");
-
+
// Check that nilling out the represented object works.
[proxy setRepresentedObject:nil];
STAssertTrue([proxy respondsToSelector:@selector(setRepresentedObject:)],
@@ -81,9 +86,17 @@
STAssertNoThrow([proxy returnYes],
@"Calling through without a represented object should fail"
@" silently");
+
// ... even when they are made up.
+#if !(__IPHONE_OS_VERSION_MIN_REQUIRED == __IPHONE_3_2 || __IPHONE_OS_VERSION_MIN_REQUIRED == __IPHONE_4_0)
+ // Exceptions thrown by - (void)doesNotRecognizeSelector:(SEL)aSelector
+ // does not get caught on iOS 3.2 and greater.
+ // http://openradar.appspot.com/radar?id=420401
+
STAssertNoThrow([proxy someMadeUpMethod],
@"Calling a bogus method on a nilled proxy should not throw");
+#endif
+
}
// Simple method to test calling through the proxy.
diff --git a/GTM.xcodeproj/project.pbxproj b/GTM.xcodeproj/project.pbxproj
index 4d814d2..52c865b 100644
--- a/GTM.xcodeproj/project.pbxproj
+++ b/GTM.xcodeproj/project.pbxproj
@@ -1670,6 +1670,20 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXLegacyTarget section */
+ 8B4514A011BEC29100A9EE64 /* All UnitTests All SDKs All Platforms */ = {
+ isa = PBXLegacyTarget;
+ buildArgumentsString = "\"All UnitTests\" \"All UnitTests\"";
+ buildConfigurationList = 8B4514A111BEC29100A9EE64 /* Build configuration list for PBXLegacyTarget "All UnitTests All SDKs All Platforms" */;
+ buildPhases = (
+ );
+ buildToolPath = BuildScripts/BuildAllSDKs.sh;
+ buildWorkingDirectory = "$(SRCROOT)";
+ dependencies = (
+ );
+ name = "All UnitTests All SDKs All Platforms";
+ passBuildSettingsInEnvironment = 1;
+ productName = "All UnitTests All SDKs";
+ };
F41A6EE00E02DB4F00788A6C /* Build GTM All SDKs */ = {
isa = PBXLegacyTarget;
buildArgumentsString = GTM;
@@ -1686,7 +1700,7 @@
};
F41A6EF80E02DCFC00788A6C /* All UnitTests All SDKs */ = {
isa = PBXLegacyTarget;
- buildArgumentsString = "\"All UnitTests\" \"All UnitTests\"";
+ buildArgumentsString = "\"All UnitTests\" \"\"";
buildConfigurationList = F41A6F070E02DD1500788A6C /* Build configuration list for PBXLegacyTarget "All UnitTests All SDKs" */;
buildPhases = (
);
@@ -1864,6 +1878,7 @@
8B45A2890DA49B99001148C5 /* UIUnitTestingHarness */,
F41A6EE00E02DB4F00788A6C /* Build GTM All SDKs */,
F41A6EF80E02DCFC00788A6C /* All UnitTests All SDKs */,
+ 8B4514A011BEC29100A9EE64 /* All UnitTests All SDKs All Platforms */,
);
};
/* End PBXProject section */
@@ -2757,6 +2772,69 @@
};
name = "SnowLeopardOrLater-Release";
};
+ 8B4514A211BEC29100A9EE64 /* TigerOrLater-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs";
+ };
+ name = "TigerOrLater-Debug";
+ };
+ 8B4514A311BEC29100A9EE64 /* TigerOrLater-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs";
+ };
+ name = "TigerOrLater-Debug-gcov";
+ };
+ 8B4514A411BEC29100A9EE64 /* TigerOrLater-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs";
+ };
+ name = "TigerOrLater-Release";
+ };
+ 8B4514A511BEC29100A9EE64 /* LeopardOrLater-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs";
+ };
+ name = "LeopardOrLater-Debug";
+ };
+ 8B4514A611BEC29100A9EE64 /* LeopardOrLater-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs";
+ };
+ name = "LeopardOrLater-Debug-gcov";
+ };
+ 8B4514A711BEC29100A9EE64 /* LeopardOrLater-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs";
+ };
+ name = "LeopardOrLater-Release";
+ };
+ 8B4514A811BEC29100A9EE64 /* SnowLeopardOrLater-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs All Platforms";
+ };
+ name = "SnowLeopardOrLater-Debug";
+ };
+ 8B4514A911BEC29100A9EE64 /* SnowLeopardOrLater-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs";
+ };
+ name = "SnowLeopardOrLater-Debug-gcov";
+ };
+ 8B4514AA11BEC29100A9EE64 /* SnowLeopardOrLater-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs";
+ };
+ name = "SnowLeopardOrLater-Release";
+ };
8B45A02A0DA4696D001148C5 /* TigerOrLater-Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F48FE2420D197F9A009257D2 /* DebugUnittest.xcconfig */;
@@ -3488,6 +3566,22 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "TigerOrLater-Release";
};
+ 8B4514A111BEC29100A9EE64 /* Build configuration list for PBXLegacyTarget "All UnitTests All SDKs All Platforms" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 8B4514A211BEC29100A9EE64 /* TigerOrLater-Debug */,
+ 8B4514A311BEC29100A9EE64 /* TigerOrLater-Debug-gcov */,
+ 8B4514A411BEC29100A9EE64 /* TigerOrLater-Release */,
+ 8B4514A511BEC29100A9EE64 /* LeopardOrLater-Debug */,
+ 8B4514A611BEC29100A9EE64 /* LeopardOrLater-Debug-gcov */,
+ 8B4514A711BEC29100A9EE64 /* LeopardOrLater-Release */,
+ 8B4514A811BEC29100A9EE64 /* SnowLeopardOrLater-Debug */,
+ 8B4514A911BEC29100A9EE64 /* SnowLeopardOrLater-Debug-gcov */,
+ 8B4514AA11BEC29100A9EE64 /* SnowLeopardOrLater-Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = "TigerOrLater-Release";
+ };
8B45A02D0DA4696D001148C5 /* Build configuration list for PBXNativeTarget "UnitTest - UnitTesting" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/GTMDefines.h b/GTMDefines.h
index d10a26c..687f2a7 100644
--- a/GTMDefines.h
+++ b/GTMDefines.h
@@ -1,4 +1,4 @@
-//
+//
// GTMDefines.h
//
// Copyright 2008 Google Inc.
@@ -6,21 +6,25 @@
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
-//
+//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
//
-
+
// ============================================================================
#include <AvailabilityMacros.h>
#include <TargetConditionals.h>
+#if TARGET_OS_IPHONE
+#include <Availability.h>
+#endif // TARGET_OS_IPHONE
+
// Not all MAC_OS_X_VERSION_10_X macros defined in past SDKs
#ifndef MAC_OS_X_VERSION_10_5
#define MAC_OS_X_VERSION_10_5 1050
@@ -29,13 +33,33 @@
#define MAC_OS_X_VERSION_10_6 1060
#endif
+// Not all __IPHONE_X macros defined in past SDKs
+#ifndef __IPHONE_2_1
+ #define __IPHONE_2_1 20100
+#endif
+#ifndef __IPHONE_2_2
+ #define __IPHONE_2_2 20200
+#endif
+#ifndef __IPHONE_3_0
+ #define __IPHONE_3_0 30000
+#endif
+#ifndef __IPHONE_3_1
+ #define __IPHONE_3_1 30100
+#endif
+#ifndef __IPHONE_3_2
+ #define __IPHONE_3_2 30200
+#endif
+#ifndef __IPHONE_4_0
+ #define __IPHONE_4_0 40000
+#endif
+
// ----------------------------------------------------------------------------
// CPP symbols that can be overridden in a prefix to control how the toolbox
// is compiled.
// ----------------------------------------------------------------------------
-// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and
+// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and
// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens
// when a validation fails. If you implement your own validators, you may want
// to control their internals using the same macros for consistency.
@@ -82,12 +106,12 @@
// _GTMDevLog log some error/problem in debug builds
// _GTMDevAssert assert if conditon isn't met w/in a method/function
// in all builds.
-//
+//
// To replace this system, just provide different macro definitions in your
// prefix header. Remember, any implementation you provide *must* be thread
// safe since this could be called by anything in what ever situtation it has
// been placed in.
-//
+//
// We only define the simple macros if nothing else has defined this.
#ifndef _GTMDevLog
@@ -203,10 +227,10 @@ GTM_EXTERN void _GTMUnitTestDevLog(NSString *format, ...);
#if GTM_MACOS_SDK
#define GTM_AVAILABLE_ONLY_ON_IPHONE UNAVAILABLE_ATTRIBUTE
#define GTM_AVAILABLE_ONLY_ON_MACOS
-#else
+#else
#define GTM_AVAILABLE_ONLY_ON_IPHONE
#define GTM_AVAILABLE_ONLY_ON_MACOS UNAVAILABLE_ATTRIBUTE
-#endif
+#endif
// Provide a symbol to include/exclude extra code for GC support. (This mainly
// just controls the inclusion of finalize methods).
@@ -296,7 +320,7 @@ GTM_EXTERN void _GTMUnitTestDevLog(NSString *format, ...);
#define GTM_NONNULL(x) __attribute__((nonnull(x)))
#endif
-// To simplify support for both Leopard and Snow Leopard we declare
+// To simplify support for both Leopard and Snow Leopard we declare
// the Snow Leopard protocols that we need here.
#if !(MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
@protocol NSConnectionDelegate
diff --git a/GTMiPhone.xcodeproj/project.pbxproj b/GTMiPhone.xcodeproj/project.pbxproj
index f9b508c..f2984d5 100644
--- a/GTMiPhone.xcodeproj/project.pbxproj
+++ b/GTMiPhone.xcodeproj/project.pbxproj
@@ -69,7 +69,6 @@
8B5547CB0DB3BBF20014CC1C /* GTMUIKit+UnitTestingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B5547C90DB3BBF20014CC1C /* GTMUIKit+UnitTestingTest.m */; };
8B5A9E200E71CB6C005DA441 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B5A9E1F0E71CB6C005DA441 /* AddressBook.framework */; };
8B6C18740F3769D200E51E5D /* GTMNSObject+KeyValueObserving.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6C18720F3769D200E51E5D /* GTMNSObject+KeyValueObserving.m */; };
- 8B6C18750F3769D200E51E5D /* GTMNSObject+KeyValueObservingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6C18730F3769D200E51E5D /* GTMNSObject+KeyValueObservingTest.m */; };
8B7DCEAA0DFF4C760017E983 /* GTMDevLogUnitTestingBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCEA90DFF4C760017E983 /* GTMDevLogUnitTestingBridge.m */; };
8B7DCEAD0DFF4CA60017E983 /* GTMUnitTestDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7DCEAC0DFF4CA60017E983 /* GTMUnitTestDevLog.m */; };
8BB78FA911B94D9500AB31AF /* GTMGoogleSearch.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BB78FA711B94D9500AB31AF /* GTMGoogleSearch.m */; };
@@ -98,7 +97,6 @@
8BC04A720DAF144700C2D1CA /* GTMSystemVersionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BC04A710DAF144700C2D1CA /* GTMSystemVersionTest.m */; };
8BC04A750DAF145200C2D1CA /* GTMSystemVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BC04A740DAF145200C2D1CA /* GTMSystemVersion.m */; };
8BC04D480DB0088500C2D1CA /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BC04D470DB0088500C2D1CA /* libz.dylib */; };
- 8BC04DE80DB023D400C2D1CA /* ReleaseNotes.txt in Resources */ = {isa = PBXBuildFile; fileRef = 8BC04DE70DB023D400C2D1CA /* ReleaseNotes.txt */; };
8BCB5AB111C02D7D009B6C40 /* GTMNSScanner+Unsigned.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BCB5AAF11C02D7D009B6C40 /* GTMNSScanner+Unsigned.m */; };
8BCB5AB211C02D7D009B6C40 /* GTMNSScanner+UnsignedTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BCB5AB011C02D7D009B6C40 /* GTMNSScanner+UnsignedTest.m */; };
8BD35C920FB234E1009058F5 /* GTMNSScanner+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BD35C900FB234E1009058F5 /* GTMNSScanner+JSON.m */; };
@@ -111,6 +109,7 @@
8BFE15C70FB0F764001BE894 /* GTMABAddressBook.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8BFE15C20FB0F764001BE894 /* GTMABAddressBook.strings */; };
8BFE15C80FB0F764001BE894 /* GTMABAddressBookTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BFE15C30FB0F764001BE894 /* GTMABAddressBookTest.m */; };
8BFE15C90FB0F764001BE894 /* phone.png in Resources */ = {isa = PBXBuildFile; fileRef = 8BFE15C50FB0F764001BE894 /* phone.png */; };
+ 8BFFCD7811C1934900E45777 /* GTMNSObject+KeyValueObservingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6C18730F3769D200E51E5D /* GTMNSObject+KeyValueObservingTest.m */; };
F417115A0ECDFF0400B9B276 /* GTMLightweightProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = F41711580ECDFF0400B9B276 /* GTMLightweightProxy.m */; };
F417115B0ECDFF0400B9B276 /* GTMLightweightProxyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F41711590ECDFF0400B9B276 /* GTMLightweightProxyTest.m */; };
F418AF990E7558EC004FB565 /* GTMExceptionalInlines.m in Sources */ = {isa = PBXBuildFile; fileRef = F418AF940E7558DC004FB565 /* GTMExceptionalInlines.m */; };
@@ -189,6 +188,8 @@
64D0F5DD0FD3E68400506CC7 /* GTMUIImage+Resize_100x100_to_50x50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "GTMUIImage+Resize_100x100_to_50x50.png"; path = "TestData/GTMUIImage+Resize_100x100_to_50x50.png"; sourceTree = "<group>"; };
67A7820A0E00927400EBF506 /* GTMIPhoneUnitTestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMIPhoneUnitTestDelegate.h; sourceTree = "<group>"; };
67A7820B0E00927400EBF506 /* GTMIPhoneUnitTestDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMIPhoneUnitTestDelegate.m; sourceTree = "<group>"; };
+ 8B23010811C180E2001FA319 /* DebugiPhone40.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugiPhone40.xcconfig; sourceTree = "<group>"; };
+ 8B23010911C180E2001FA319 /* ReleaseiPhone40.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ReleaseiPhone40.xcconfig; sourceTree = "<group>"; };
8B30806F1056BDCE006C4C7A /* GTMNSNumber+64Bit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSNumber+64Bit.h"; sourceTree = "<group>"; };
8B3080701056BDCE006C4C7A /* GTMNSNumber+64Bit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSNumber+64Bit.m"; sourceTree = "<group>"; };
8B3080711056BDCE006C4C7A /* GTMNSNumber+64BitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSNumber+64BitTest.m"; sourceTree = "<group>"; };
@@ -619,6 +620,8 @@
F4E426B710B70DFB00F28A35 /* ReleaseiPhone312.xcconfig */,
CAD23A771174AE7800EA94E5 /* ReleaseiPhone313.xcconfig */,
CAD23A761174AE7800EA94E5 /* ReleaseiPhone32.xcconfig */,
+ 8B23010811C180E2001FA319 /* DebugiPhone40.xcconfig */,
+ 8B23010911C180E2001FA319 /* ReleaseiPhone40.xcconfig */,
);
path = Project;
sourceTree = "<group>";
@@ -654,17 +657,31 @@
/* End PBXGroup section */
/* Begin PBXLegacyTarget section */
- F4B541440E7F022B004738EC /* All UnitTests all SDKs */ = {
+ 8B4514EB11BEC38900A9EE64 /* All UnitTests All SDKs All Platforms */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "\"All UnitTests\" \"All UnitTests\"";
- buildConfigurationList = F4B5414A0E7F025F004738EC /* Build configuration list for PBXLegacyTarget "All UnitTests all SDKs" */;
+ buildConfigurationList = 8B4514EC11BEC38900A9EE64 /* Build configuration list for PBXLegacyTarget "All UnitTests All SDKs All Platforms" */;
buildPhases = (
);
buildToolPath = BuildScripts/BuildAllSDKs.sh;
buildWorkingDirectory = "$(SRCROOT)";
dependencies = (
);
- name = "All UnitTests all SDKs";
+ name = "All UnitTests All SDKs All Platforms";
+ passBuildSettingsInEnvironment = 1;
+ productName = "All UnitTests all SDKs";
+ };
+ F4B541440E7F022B004738EC /* All UnitTests All SDKs */ = {
+ isa = PBXLegacyTarget;
+ buildArgumentsString = "\"\" \"All UnitTests\"";
+ buildConfigurationList = F4B5414A0E7F025F004738EC /* Build configuration list for PBXLegacyTarget "All UnitTests All SDKs" */;
+ buildPhases = (
+ );
+ buildToolPath = BuildScripts/BuildAllSDKs.sh;
+ buildWorkingDirectory = "$(SRCROOT)";
+ dependencies = (
+ );
+ name = "All UnitTests All SDKs";
passBuildSettingsInEnvironment = 1;
productName = "All UnitTests all SDKs";
};
@@ -703,7 +720,8 @@
targets = (
F4C7F9BF0DC62EC8009BEE5B /* All UnitTests */,
1D6058900D05DD3D006BFB54 /* GTMiPhoneUnitTesting */,
- F4B541440E7F022B004738EC /* All UnitTests all SDKs */,
+ F4B541440E7F022B004738EC /* All UnitTests All SDKs */,
+ 8B4514EB11BEC38900A9EE64 /* All UnitTests All SDKs All Platforms */,
);
};
/* End PBXProject section */
@@ -715,7 +733,6 @@
files = (
8BC0486B0DAE928A00C2D1CA /* GTMUIViewUnitTestingTest.gtmUTState in Resources */,
8BC0486C0DAE928A00C2D1CA /* GTMUIViewUnitTestingTest.png in Resources */,
- 8BC04DE80DB023D400C2D1CA /* ReleaseNotes.txt in Resources */,
8BFE15C70FB0F764001BE894 /* GTMABAddressBook.strings in Resources */,
8BFE15C90FB0F764001BE894 /* phone.png in Resources */,
64D0F5DE0FD3E68400506CC7 /* GTMUIImage+Resize_100x100_to_60x40.png in Resources */,
@@ -823,7 +840,6 @@
6294461C0EDE178D009295EA /* GTMNSArray+MergeTest.m in Sources */,
6294461D0EDE17A0009295EA /* GTMNSArray+Merge.m in Sources */,
8B6C18740F3769D200E51E5D /* GTMNSObject+KeyValueObserving.m in Sources */,
- 8B6C18750F3769D200E51E5D /* GTMNSObject+KeyValueObservingTest.m in Sources */,
8BFE15C60FB0F764001BE894 /* GTMABAddressBook.m in Sources */,
8BFE15C80FB0F764001BE894 /* GTMABAddressBookTest.m in Sources */,
8BD35C920FB234E1009058F5 /* GTMNSScanner+JSON.m in Sources */,
@@ -842,6 +858,7 @@
8BB78FAA11B94D9500AB31AF /* GTMGoogleSearchTest.m in Sources */,
8BCB5AB111C02D7D009B6C40 /* GTMNSScanner+Unsigned.m in Sources */,
8BCB5AB211C02D7D009B6C40 /* GTMNSScanner+UnsignedTest.m in Sources */,
+ 8BFFCD7811C1934900E45777 /* GTMNSObject+KeyValueObservingTest.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -856,6 +873,320 @@
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
+ 8B23011211C1810E001FA319 /* iPhone4.0-Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 8B23010811C180E2001FA319 /* DebugiPhone40.xcconfig */;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = GTM_Prefix.pch;
+ GCC_WARN_SHADOW = YES;
+ GTM_EXTRA_WARNING_OVERRIDE_CFLAGS = "-Wno-unused-parameter";
+ };
+ name = "iPhone4.0-Debug";
+ };
+ 8B23011311C1810E001FA319 /* iPhone4.0-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 8B23010811C180E2001FA319 /* DebugiPhone40.xcconfig */;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = GTM_Prefix.pch;
+ GCC_WARN_SHADOW = YES;
+ GTM_EXTRA_WARNING_OVERRIDE_CFLAGS = "-Wno-unused-parameter";
+ LIBRARY_SEARCH_PATHS = SnowLeopardGcov;
+ };
+ name = "iPhone4.0-Debug-gcov";
+ };
+ 8B23011411C1810E001FA319 /* iPhone4.0-Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 8B23010911C180E2001FA319 /* ReleaseiPhone40.xcconfig */;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = GTM_Prefix.pch;
+ GCC_WARN_SHADOW = YES;
+ GTM_EXTRA_WARNING_OVERRIDE_CFLAGS = "-Wno-unused-parameter";
+ };
+ name = "iPhone4.0-Release";
+ };
+ 8B23011511C1810E001FA319 /* iPhone4.0-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests";
+ };
+ name = "iPhone4.0-Debug";
+ };
+ 8B23011611C1810E001FA319 /* iPhone4.0-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests";
+ };
+ name = "iPhone4.0-Debug-gcov";
+ };
+ 8B23011711C1810E001FA319 /* iPhone4.0-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests";
+ };
+ name = "iPhone4.0-Release";
+ };
+ 8B23011811C1810E001FA319 /* iPhone4.0-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ INFOPLIST_FILE = "GTMiPhone-Info.plist";
+ PRODUCT_NAME = GTMiPhoneTest;
+ SDKROOT = iphonesimulator3.2;
+ };
+ name = "iPhone4.0-Debug";
+ };
+ 8B23011911C1810E001FA319 /* iPhone4.0-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 8BC0498F0DAEC59100C2D1CA /* CodeCoverage.xcconfig */;
+ buildSettings = {
+ INFOPLIST_FILE = "GTMiPhone-Info.plist";
+ PRODUCT_NAME = GTMiPhoneTest;
+ SDKROOT = iphonesimulator3.2;
+ };
+ name = "iPhone4.0-Debug-gcov";
+ };
+ 8B23011A11C1810E001FA319 /* iPhone4.0-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ INFOPLIST_FILE = "GTMiPhone-Info.plist";
+ PRODUCT_NAME = GTMiPhoneTest;
+ SDKROOT = iphonesimulator3.2;
+ };
+ name = "iPhone4.0-Release";
+ };
+ 8B23011B11C1810E001FA319 /* iPhone4.0-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone4.0-Debug";
+ };
+ 8B23011C11C1810E001FA319 /* iPhone4.0-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone4.0-Debug-gcov";
+ };
+ 8B23011D11C1810E001FA319 /* iPhone4.0-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone4.0-Release";
+ };
+ 8B23011E11C1810E001FA319 /* iPhone4.0-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone4.0-Debug";
+ };
+ 8B23011F11C1810E001FA319 /* iPhone4.0-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone4.0-Debug-gcov";
+ };
+ 8B23012011C1810E001FA319 /* iPhone4.0-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone4.0-Release";
+ };
+ 8B4514ED11BEC38900A9EE64 /* iPhone2.0-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests All SDKs All Platforms";
+ };
+ name = "iPhone2.0-Debug";
+ };
+ 8B4514EE11BEC38900A9EE64 /* iPhone2.0-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.0-Debug-gcov";
+ };
+ 8B4514EF11BEC38900A9EE64 /* iPhone2.0-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.0-Release";
+ };
+ 8B4514F011BEC38900A9EE64 /* iPhone2.1-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.1-Debug";
+ };
+ 8B4514F111BEC38900A9EE64 /* iPhone2.1-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.1-Debug-gcov";
+ };
+ 8B4514F211BEC38900A9EE64 /* iPhone2.1-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.1-Release";
+ };
+ 8B4514F311BEC38900A9EE64 /* iPhone2.2-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.2-Debug";
+ };
+ 8B4514F411BEC38900A9EE64 /* iPhone2.2-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.2-Debug-gcov";
+ };
+ 8B4514F511BEC38900A9EE64 /* iPhone2.2-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.2-Release";
+ };
+ 8B4514F611BEC38900A9EE64 /* iPhone2.2.1-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.2.1-Debug";
+ };
+ 8B4514F711BEC38900A9EE64 /* iPhone2.2.1-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.2.1-Debug-gcov";
+ };
+ 8B4514F811BEC38900A9EE64 /* iPhone2.2.1-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone2.2.1-Release";
+ };
+ 8B4514F911BEC38900A9EE64 /* iPhone3.0-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.0-Debug";
+ };
+ 8B4514FA11BEC38900A9EE64 /* iPhone3.0-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.0-Debug-gcov";
+ };
+ 8B4514FB11BEC38900A9EE64 /* iPhone3.0-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.0-Release";
+ };
+ 8B4514FC11BEC38900A9EE64 /* iPhone3.1-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.1-Debug";
+ };
+ 8B4514FD11BEC38900A9EE64 /* iPhone3.1-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.1-Debug-gcov";
+ };
+ 8B4514FE11BEC38900A9EE64 /* iPhone3.1-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.1-Release";
+ };
+ 8B4514FF11BEC38900A9EE64 /* iPhone3.1.2-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.1.2-Debug";
+ };
+ 8B45150011BEC38900A9EE64 /* iPhone3.1.2-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.1.2-Debug-gcov";
+ };
+ 8B45150111BEC38900A9EE64 /* iPhone3.1.2-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.1.2-Release";
+ };
+ 8B45150211BEC38900A9EE64 /* iPhone3.1.3-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.1.3-Debug";
+ };
+ 8B45150311BEC38900A9EE64 /* iPhone3.1.3-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.1.3-Debug-gcov";
+ };
+ 8B45150411BEC38900A9EE64 /* iPhone3.1.3-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.1.3-Release";
+ };
+ 8B45150511BEC38900A9EE64 /* iPhone3.2-Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.2-Debug";
+ };
+ 8B45150611BEC38900A9EE64 /* iPhone3.2-Debug-gcov */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.2-Debug-gcov";
+ };
+ 8B45150711BEC38900A9EE64 /* iPhone3.2-Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "All UnitTests all SDKs";
+ };
+ name = "iPhone3.2-Release";
+ };
CAD23A781174AE9F00EA94E5 /* iPhone3.1.3-Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CAD23A751174AE7800EA94E5 /* DebugiPhone313.xcconfig */;
@@ -1150,7 +1481,7 @@
F4E4263F10B70C4F00F28A35 /* iPhone2.0-Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- PRODUCT_NAME = "All UnitTests all SDKs";
+ PRODUCT_NAME = "All UnitTests All SDKs";
};
name = "iPhone2.0-Debug";
};
@@ -1825,6 +2156,46 @@
CAD23A8A1174AF2400EA94E5 /* iPhone3.2-Debug */,
CAD23A8B1174AF2400EA94E5 /* iPhone3.2-Debug-gcov */,
CAD23A8C1174AF2400EA94E5 /* iPhone3.2-Release */,
+ 8B23011811C1810E001FA319 /* iPhone4.0-Debug */,
+ 8B23011911C1810E001FA319 /* iPhone4.0-Debug-gcov */,
+ 8B23011A11C1810E001FA319 /* iPhone4.0-Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = "iPhone3.1.2-Debug";
+ };
+ 8B4514EC11BEC38900A9EE64 /* Build configuration list for PBXLegacyTarget "All UnitTests All SDKs All Platforms" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 8B4514ED11BEC38900A9EE64 /* iPhone2.0-Debug */,
+ 8B4514EE11BEC38900A9EE64 /* iPhone2.0-Debug-gcov */,
+ 8B4514EF11BEC38900A9EE64 /* iPhone2.0-Release */,
+ 8B4514F011BEC38900A9EE64 /* iPhone2.1-Debug */,
+ 8B4514F111BEC38900A9EE64 /* iPhone2.1-Debug-gcov */,
+ 8B4514F211BEC38900A9EE64 /* iPhone2.1-Release */,
+ 8B4514F311BEC38900A9EE64 /* iPhone2.2-Debug */,
+ 8B4514F411BEC38900A9EE64 /* iPhone2.2-Debug-gcov */,
+ 8B4514F511BEC38900A9EE64 /* iPhone2.2-Release */,
+ 8B4514F611BEC38900A9EE64 /* iPhone2.2.1-Debug */,
+ 8B4514F711BEC38900A9EE64 /* iPhone2.2.1-Debug-gcov */,
+ 8B4514F811BEC38900A9EE64 /* iPhone2.2.1-Release */,
+ 8B4514F911BEC38900A9EE64 /* iPhone3.0-Debug */,
+ 8B4514FA11BEC38900A9EE64 /* iPhone3.0-Debug-gcov */,
+ 8B4514FB11BEC38900A9EE64 /* iPhone3.0-Release */,
+ 8B4514FC11BEC38900A9EE64 /* iPhone3.1-Debug */,
+ 8B4514FD11BEC38900A9EE64 /* iPhone3.1-Debug-gcov */,
+ 8B4514FE11BEC38900A9EE64 /* iPhone3.1-Release */,
+ 8B4514FF11BEC38900A9EE64 /* iPhone3.1.2-Debug */,
+ 8B45150011BEC38900A9EE64 /* iPhone3.1.2-Debug-gcov */,
+ 8B45150111BEC38900A9EE64 /* iPhone3.1.2-Release */,
+ 8B45150211BEC38900A9EE64 /* iPhone3.1.3-Debug */,
+ 8B45150311BEC38900A9EE64 /* iPhone3.1.3-Debug-gcov */,
+ 8B45150411BEC38900A9EE64 /* iPhone3.1.3-Release */,
+ 8B45150511BEC38900A9EE64 /* iPhone3.2-Debug */,
+ 8B45150611BEC38900A9EE64 /* iPhone3.2-Debug-gcov */,
+ 8B45150711BEC38900A9EE64 /* iPhone3.2-Release */,
+ 8B23011E11C1810E001FA319 /* iPhone4.0-Debug */,
+ 8B23011F11C1810E001FA319 /* iPhone4.0-Debug-gcov */,
+ 8B23012011C1810E001FA319 /* iPhone4.0-Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "iPhone3.1.2-Debug";
@@ -1859,11 +2230,14 @@
CAD23A841174AF2400EA94E5 /* iPhone3.2-Debug */,
CAD23A851174AF2400EA94E5 /* iPhone3.2-Debug-gcov */,
CAD23A861174AF2400EA94E5 /* iPhone3.2-Release */,
+ 8B23011211C1810E001FA319 /* iPhone4.0-Debug */,
+ 8B23011311C1810E001FA319 /* iPhone4.0-Debug-gcov */,
+ 8B23011411C1810E001FA319 /* iPhone4.0-Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "iPhone3.1.2-Debug";
};
- F4B5414A0E7F025F004738EC /* Build configuration list for PBXLegacyTarget "All UnitTests all SDKs" */ = {
+ F4B5414A0E7F025F004738EC /* Build configuration list for PBXLegacyTarget "All UnitTests All SDKs" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F4E4263F10B70C4F00F28A35 /* iPhone2.0-Debug */,
@@ -1893,6 +2267,9 @@
CAD23A8D1174AF2400EA94E5 /* iPhone3.2-Debug */,
CAD23A8E1174AF2400EA94E5 /* iPhone3.2-Debug-gcov */,
CAD23A8F1174AF2400EA94E5 /* iPhone3.2-Release */,
+ 8B23011B11C1810E001FA319 /* iPhone4.0-Debug */,
+ 8B23011C11C1810E001FA319 /* iPhone4.0-Debug-gcov */,
+ 8B23011D11C1810E001FA319 /* iPhone4.0-Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "iPhone3.1.2-Debug";
@@ -1927,6 +2304,9 @@
CAD23A871174AF2400EA94E5 /* iPhone3.2-Debug */,
CAD23A881174AF2400EA94E5 /* iPhone3.2-Debug-gcov */,
CAD23A891174AF2400EA94E5 /* iPhone3.2-Release */,
+ 8B23011511C1810E001FA319 /* iPhone4.0-Debug */,
+ 8B23011611C1810E001FA319 /* iPhone4.0-Debug-gcov */,
+ 8B23011711C1810E001FA319 /* iPhone4.0-Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "iPhone3.1.2-Debug";
diff --git a/XcodeConfig/Project/DebugiPhone40.xcconfig b/XcodeConfig/Project/DebugiPhone40.xcconfig
new file mode 100644
index 0000000..5db1ae8
--- /dev/null
+++ b/XcodeConfig/Project/DebugiPhone40.xcconfig
@@ -0,0 +1,37 @@
+//
+// DebugiPhone40.xcconfig
+//
+// Xcode configuration file for building a Debug configuration of a project
+// for iOS 4.0.
+//
+// Copyright 2010 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy
+// of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+//
+// This is a _Configuration_ Xcode config file for use in the "Based on" popup
+// of the project configuration editor. Do _not_ use this as the config base
+// and individual Xcode target, there are other configuration files for that
+// purpose.
+
+// Pull in the general settings
+#include "../subconfig/General.xcconfig"
+
+// iPhone settings.
+#include "../subconfig/iPhone40.xcconfig"
+
+// Debug settings
+#include "../subconfig/Debug.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/ReleaseiPhone40.xcconfig b/XcodeConfig/Project/ReleaseiPhone40.xcconfig
new file mode 100644
index 0000000..7da0aa3
--- /dev/null
+++ b/XcodeConfig/Project/ReleaseiPhone40.xcconfig
@@ -0,0 +1,37 @@
+//
+// ReleaseiPhone40.xcconfig
+//
+// Xcode configuration file for building a Release configuration of a project
+// for iOS 4.0.
+//
+// Copyright 2010 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy
+// of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+//
+// This is a _Configuration_ Xcode config file for use in the "Based on" popup
+// of the project configuration editor. Do _not_ use this as the config base
+// and individual Xcode target, there are other configuration files for that
+// purpose.
+
+// Pull in the general settings
+#include "../subconfig/General.xcconfig"
+
+// iPhone settings.
+#include "../subconfig/iPhone40.xcconfig"
+
+// Release settings
+#include "../subconfig/Release.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/subconfig/iPhone40.xcconfig b/XcodeConfig/subconfig/iPhone40.xcconfig
new file mode 100644
index 0000000..5eeb0b4
--- /dev/null
+++ b/XcodeConfig/subconfig/iPhone40.xcconfig
@@ -0,0 +1,21 @@
+//
+// iPhone40.xcconfig
+//
+// Xcode configuration file for building a Debug target on iOS 4.0.
+//
+// Copyright 2010 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy
+// of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+// Set default SDK.
+SDKROOT = iphoneos4.0