Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Commit

Permalink
Support 64-bit builds
Browse files Browse the repository at this point in the history
  • Loading branch information
tobym committed Mar 7, 2014
1 parent 38ad14b commit f1a00d1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
23 changes: 21 additions & 2 deletions Tapestry/Tapestry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = TA;
LastUpgradeCheck = 0460;
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = Tapad;
};
buildConfigurationList = 2F180B6A17A1C3F900EC3F5F /* Build configuration list for PBXProject "Tapestry" */;
Expand Down Expand Up @@ -420,6 +420,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
Expand All @@ -441,7 +442,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
ONLY_ACTIVE_ARCH = YES;
ONLY_ACTIVE_ARCH = NO;
PRIVATE_HEADERS_FOLDER_PATH = "$(PUBLIC_HEADERS_FOLDER_PATH)/Private";
PUBLIC_HEADERS_FOLDER_PATH = include/Headers/Tapestry;
SDKROOT = iphoneos;
Expand All @@ -452,6 +453,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
Expand All @@ -466,6 +468,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
ONLY_ACTIVE_ARCH = NO;
PRIVATE_HEADERS_FOLDER_PATH = "$(PUBLIC_HEADERS_FOLDER_PATH)/Private";
PUBLIC_HEADERS_FOLDER_PATH = include/Headers/Tapestry;
SDKROOT = iphoneos;
Expand All @@ -476,9 +479,15 @@
2F180B9517A1C3F900EC3F5F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
DSTROOT = /tmp/Tapestry.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Tapestry/TATapestry-Prefix.pch";
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_PEDANTIC = NO;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "-ObjC";
PRIVATE_HEADERS_FOLDER_PATH = "include/${PRODUCT_NAME}-Private";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -489,9 +498,15 @@
2F180B9617A1C3F900EC3F5F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
DSTROOT = /tmp/Tapestry.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Tapestry/TATapestry-Prefix.pch";
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_PEDANTIC = NO;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "-ObjC";
PRIVATE_HEADERS_FOLDER_PATH = "include/${PRODUCT_NAME}-Private";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -502,13 +517,15 @@
2F180B9817A1C3F900EC3F5F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks\"",
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Tapestry/TATapestry-Prefix.pch";
INFOPLIST_FILE = "TapestryTests/TapestryTests-Info.plist";
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
Expand All @@ -518,13 +535,15 @@
2F180B9917A1C3F900EC3F5F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks\"",
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Tapestry/TATapestry-Prefix.pch";
INFOPLIST_FILE = "TapestryTests/TapestryTests-Info.plist";
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
Expand Down
4 changes: 2 additions & 2 deletions Tapestry/Tapestry/NSString+MD5.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ - (NSString*)ta_MD5 {
unsigned char md5Buffer[CC_MD5_DIGEST_LENGTH];

// Create 16 byte MD5 hash value, store in buffer
CC_MD5(ptr, strlen(ptr), md5Buffer);
CC_MD5(ptr, (CC_LONG)strlen(ptr), md5Buffer);

// Convert MD5 value in the buffer to NSString of hex values
NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
Expand All @@ -44,7 +44,7 @@ - (NSString*)ta_SHA1 {
unsigned char sha1Buffer[CC_SHA1_DIGEST_LENGTH];

// Create 20 byte SHA1 hash value, store in buffer
CC_SHA1(ptr, strlen(ptr), sha1Buffer);
CC_SHA1(ptr, (CC_LONG)strlen(ptr), sha1Buffer);

// Convert SHA1 value in the buffer to NSString of hex values
NSMutableString *output = [NSMutableString stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2];
Expand Down
4 changes: 2 additions & 2 deletions Tapestry/Tapestry/TATapestryRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ - (void)getDevices

- (void)setDepth:(NSInteger)depth
{
[self addValue:[NSString stringWithFormat:@"%d", depth] forParameter:@"ta_depth"];
[self addValue:[NSString stringWithFormat:@"%ld", (long)depth] forParameter:@"ta_depth"];
}

- (void)setPartnerId:(NSString*)partnerId
Expand All @@ -154,7 +154,7 @@ - (void)addUserId:(NSString*)userId forSource:(NSString*)source

- (void)setStrength:(NSInteger)strength
{
[self addValue:[NSString stringWithFormat:@"%d", strength] forParameter:@"ta_strength"];
[self addValue:[NSString stringWithFormat:@"%ld", (long)strength] forParameter:@"ta_strength"];
}

- (void)addTypedId:(NSString*)typedId forSource:(NSString*)source
Expand Down
6 changes: 3 additions & 3 deletions Tapestry/Tapestry/Vendors/OpenUDID/TAOpenUDID.m
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,17 @@ + (NSString*) _generateFreshOpenUDID {
CFStringRef cfstring = CFUUIDCreateString(kCFAllocatorDefault, uuid);
const char *cStr = CFStringGetCStringPtr(cfstring,CFStringGetFastestEncoding(cfstring));
unsigned char result[16];
CC_MD5( cStr, strlen(cStr), result );
CC_MD5( cStr, (CC_LONG)strlen(cStr), result );
CFRelease(uuid);
CFRelease(cfstring);

_openUDID = [NSString stringWithFormat:
@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%08x",
@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%08lx",
result[0], result[1], result[2], result[3],
result[4], result[5], result[6], result[7],
result[8], result[9], result[10], result[11],
result[12], result[13], result[14], result[15],
(NSUInteger)(arc4random() % NSUIntegerMax)];
(unsigned long)(arc4random() % NSUIntegerMax)];
}

// Call to other developers in the Open Source community:
Expand Down

0 comments on commit f1a00d1

Please sign in to comment.