Skip to content

Commit

Permalink
Merge pull request #1 from muhammaddadu/TIMOB-18092
Browse files Browse the repository at this point in the history
[TIMOB-18092] Rebuild modules for 64-bit architectures
  • Loading branch information
jonalter committed Dec 10, 2014
2 parents e8b013f + e29aa5a commit 3860b75
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 48 deletions.
14 changes: 7 additions & 7 deletions ios/Classes/TiCryptoCryptorProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ -(NSNumber*)getOutputLength:(id)args
}

BOOL final = [TiUtils boolValue:[args objectAtIndex:kArgFinal] def:NO];
return NUMINT(CCCryptorGetOutputLength(cryptor, (size_t)length, final));
return [NSNumber numberWithUnsignedInteger: CCCryptorGetOutputLength(cryptor, (size_t)length, final)];
}

return NUMINT(0);
Expand Down Expand Up @@ -221,13 +221,13 @@ -(NSNumber*)update:(id)args

if (result == kCCSuccess) {
if (resizeBuffer) {
[cryptData.dataOutBuffer setLength:NUMINT(numBytesMoved)];
[cryptData.dataOutBuffer setLength:[NSNumber numberWithUnsignedInteger: numBytesMoved]];
}
} else {
NSLog(@"[ERROR] Error during crypt operation - %d", result);
}

return (result == kCCSuccess) ? NUMINT(numBytesMoved) : NUMINT(result);
return (result == kCCSuccess) ? [NSNumber numberWithUnsignedInteger: numBytesMoved] : NUMINT(result);
}

return NUMINT(kCCError);
Expand Down Expand Up @@ -259,13 +259,13 @@ -(NSNumber*)finish:(id)args

if (result == kCCSuccess) {
if (resizeBuffer) {
[cryptData.dataOutBuffer setLength:NUMINT(numBytesMoved)];
[cryptData.dataOutBuffer setLength:[NSNumber numberWithUnsignedInteger: numBytesMoved]];
}
} else {
NSLog(@"[ERROR] Error during final operation - %d", result);
}

return (result == kCCSuccess) ? NUMINT(numBytesMoved) : NUMINT(result);
return (result == kCCSuccess) ? [NSNumber numberWithUnsignedInteger: numBytesMoved] : NUMINT(result);
}

return NUMINT(kCCError);
Expand Down Expand Up @@ -367,14 +367,14 @@ -(NSNumber*)crypt:(CCOperation)operation args:(id)args

if (result == kCCSuccess) {
if (resizeBuffer) {
[cryptData.dataOutBuffer setLength:NUMINT(numBytesMoved)];
[cryptData.dataOutBuffer setLength:[NSNumber numberWithUnsignedInteger: numBytesMoved]];
}
//NSLog(@"DataOut: %@", [cryptData.dataOutBuffer data]);
} else {
NSLog(@"[ERROR] Error during crypt operation - %d", result);
}

return (result == kCCSuccess) ? NUMINT(numBytesMoved) : NUMINT(result);
return (result == kCCSuccess) ? [NSNumber numberWithUnsignedInteger: numBytesMoved] : NUMINT(result);
}

-(NSNumber*)encrypt:(id)args
Expand Down
46 changes: 8 additions & 38 deletions ios/crypto.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
};
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "crypto" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
Expand Down Expand Up @@ -234,15 +236,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
buildSettings = {
ARCHS = (
armv6,
armv7,
);
"ARCHS[sdk=iphoneos*]" = (
armv6,
armv7,
);
"ARCHS[sdk=iphonesimulator*]" = i386;
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DSTROOT = /tmp/TiCrypto.dst;
Expand Down Expand Up @@ -281,15 +275,7 @@
baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = (
armv6,
armv7,
);
"ARCHS[sdk=iphoneos*]" = (
armv6,
armv7,
);
"ARCHS[sdk=iphonesimulator*]" = i386;
ARCHS = "$(ARCHS_STANDARD)";
DSTROOT = /tmp/TiCrypto.dst;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_MODEL_TUNING = G5;
Expand All @@ -307,7 +293,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
OTHER_CFLAGS = "-DTI_POST_1_2";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = TiCrypto;
Expand All @@ -321,15 +307,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
buildSettings = {
ARCHS = (
armv6,
armv7,
);
"ARCHS[sdk=iphoneos*]" = (
armv6,
armv7,
);
"ARCHS[sdk=iphonesimulator*]" = i386;
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DSTROOT = /tmp/TiCrypto.dst;
Expand Down Expand Up @@ -368,15 +346,7 @@
baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = (
armv6,
armv7,
);
"ARCHS[sdk=iphoneos*]" = (
armv6,
armv7,
);
"ARCHS[sdk=iphonesimulator*]" = i386;
ARCHS = "$(ARCHS_STANDARD)";
DSTROOT = /tmp/TiCrypto.dst;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_MODEL_TUNING = G5;
Expand All @@ -394,7 +364,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
OTHER_CFLAGS = "-DTI_POST_1_2";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = TiCrypto;
Expand Down
2 changes: 2 additions & 0 deletions ios/documentation/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change Log
<pre>
v1.3.0 Rebuild modules for 64-bit architectures [TIMOB-18092]

v1.2.1 Added attribution [MOD-1087]

v1.2.0 Fixed issue with using module with TiSDK 3.x -- namespace issue [MOD-1000]
Expand Down
5 changes: 3 additions & 2 deletions ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 1.2.1
version: 1.3.0
architectures: armv7 i386 x86_64 arm64
description: This module provides access to various encryption and decryption algorithms, and string encodings.
author: Jeff English
license: Appcelerator Commercial License
Expand All @@ -14,4 +15,4 @@ name: crypto
moduleid: ti.crypto
guid: 5041eaca-a895-4229-a44b-de2f582c9133
platform: iphone
minsdk: 2.1.3.GA
minsdk: 3.3.0.GA
2 changes: 1 addition & 1 deletion ios/titanium.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
TITANIUM_SDK_VERSION = 2.1.3.GA
TITANIUM_SDK_VERSION = 3.3.0.GA


//
Expand Down

0 comments on commit 3860b75

Please sign in to comment.