From 56242766f19c735d0a02a54b7fac23966ea3c59b Mon Sep 17 00:00:00 2001 From: Stephen Feather Date: Fri, 28 Nov 2014 11:45:38 -0500 Subject: [PATCH 1/4] TIMOB-18092 added 64bit support for iOS ti.charts --- .travis.yml | 2 +- ios/charts.xcodeproj/project.pbxproj | 63 ++++++++++------------------ ios/manifest | 7 ++-- ios/titanium.xcconfig | 2 +- 4 files changed, 29 insertions(+), 45 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d2b28c..00880c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ before_install: install: - cd $MODULE_ROOT - curl -o install.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/install.sh - - source install.sh -s 2.1.3.GA + - source install.sh script: - curl -o script.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/script.sh - source script.sh diff --git a/ios/charts.xcodeproj/project.pbxproj b/ios/charts.xcodeproj/project.pbxproj index 07291e5..7a2d738 100644 --- a/ios/charts.xcodeproj/project.pbxproj +++ b/ios/charts.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXAggregateTarget section */ @@ -219,8 +219,11 @@ /* Begin PBXProject section */ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0610; + }; buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "charts" */; - compatibilityVersion = "Xcode 3.1"; + compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( @@ -290,15 +293,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { - ARCHS = ( - armv6, - armv7, - ); - "ARCHS[sdk=iphoneos*]" = ( - armv6, - armv7, - ); - "ARCHS[sdk=iphonesimulator*]" = i386; + "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; + "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DSTROOT = /tmp/TiCharts.dst; @@ -307,6 +303,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = TiCharts_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = "TI_VERSION=$(TI_VERSION)"; + GCC_THUMB_SUPPORT = NO; GCC_TREAT_WARNINGS_AS_ERRORS = NO; GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = NO; @@ -342,21 +339,15 @@ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - armv6, - armv7, - ); - "ARCHS[sdk=iphoneos*]" = ( - armv6, - armv7, - ); - "ARCHS[sdk=iphonesimulator*]" = i386; + "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; + "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; DSTROOT = /tmp/TiCharts.dst; GCC_C_LANGUAGE_STANDARD = c99; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = TiCharts_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = "TI_VERSION=$(TI_VERSION)"; + GCC_THUMB_SUPPORT = NO; GCC_TREAT_WARNINGS_AS_ERRORS = NO; GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = NO; @@ -368,7 +359,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; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)\"", @@ -387,15 +378,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { - ARCHS = ( - armv6, - armv7, - ); - "ARCHS[sdk=iphoneos*]" = ( - armv6, - armv7, - ); - "ARCHS[sdk=iphonesimulator*]" = i386; + "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; + "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DSTROOT = /tmp/TiCharts.dst; @@ -404,6 +388,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = TiCharts_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = "TI_VERSION=$(TI_VERSION)"; + GCC_THUMB_SUPPORT = NO; GCC_TREAT_WARNINGS_AS_ERRORS = NO; GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = NO; @@ -415,6 +400,8 @@ GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = NO; INSTALL_PATH = /usr/local/lib; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-DDEBUG", "-DTI_POST_1_2", @@ -434,21 +421,15 @@ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - armv6, - armv7, - ); - "ARCHS[sdk=iphoneos*]" = ( - armv6, - armv7, - ); - "ARCHS[sdk=iphonesimulator*]" = i386; + "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; + "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; DSTROOT = /tmp/TiCharts.dst; GCC_C_LANGUAGE_STANDARD = c99; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = TiCharts_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = "TI_VERSION=$(TI_VERSION)"; + GCC_THUMB_SUPPORT = NO; GCC_TREAT_WARNINGS_AS_ERRORS = NO; GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = NO; @@ -460,7 +441,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 = TiCharts; @@ -477,6 +458,7 @@ COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; + GCC_THUMB_SUPPORT = NO; PRODUCT_NAME = "Build & test"; }; name = Debug; @@ -488,6 +470,7 @@ COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_THUMB_SUPPORT = NO; PRODUCT_NAME = "Build & test"; ZERO_LINK = NO; }; diff --git a/ios/manifest b/ios/manifest index 44f4b8c..95f9a4f 100644 --- a/ios/manifest +++ b/ios/manifest @@ -2,12 +2,13 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 1.4.1 +version: 1.4.2 apiversion: 2 +architectures: armv7 i386 x86_64 arm64 description: Chart Module author: Jeff English license: Apache License, Version 2.0 -copyright: Copyright (c) 2011-2013 by Appcelerator, Inc. +copyright: Copyright (c) 2011-2014 by Appcelerator, Inc. # these should not be edited @@ -15,4 +16,4 @@ name: charts moduleid: ti.charts guid: cdfd00f4-1e90-4fe8-91a4-a163a947f338 platform: iphone -minsdk: 2.1.3.GA +minsdk: 3.4.1.GA diff --git a/ios/titanium.xcconfig b/ios/titanium.xcconfig index 1b9f20c..e904ea5 100644 --- a/ios/titanium.xcconfig +++ b/ios/titanium.xcconfig @@ -4,7 +4,7 @@ // OF YOUR TITANIUM SDK YOU'RE BUILDING FOR // // -TITANIUM_SDK_VERSION = 2.1.3.GA +TITANIUM_SDK_VERSION = 3.4.1.GA COREPLOT_HEADERS = "CorePlot/CorePlotHeaders" // From 7d20849825f668530aed4585ef44f1180b5b7331 Mon Sep 17 00:00:00 2001 From: Stephen Feather Date: Mon, 1 Dec 2014 20:02:26 -0500 Subject: [PATCH 2/4] bumping minor version instead of patch --- ios/manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/manifest b/ios/manifest index 95f9a4f..dfa0fb9 100644 --- a/ios/manifest +++ b/ios/manifest @@ -2,7 +2,7 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 1.4.2 +version: 1.5.0 apiversion: 2 architectures: armv7 i386 x86_64 arm64 description: Chart Module From 7990afe72a766e2ec4458128c1c0fa8887b4a665 Mon Sep 17 00:00:00 2001 From: Stephen Feather Date: Mon, 1 Dec 2014 20:39:41 -0500 Subject: [PATCH 3/4] updating changelog --- ios/documentation/changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/documentation/changelog.md b/ios/documentation/changelog.md index b6e2143..35b2de0 100644 --- a/ios/documentation/changelog.md +++ b/ios/documentation/changelog.md @@ -1,5 +1,7 @@ # Change Log
+v1.5.0  [TIMOB-18092] Updated to build for 64bit
+
 v1.4.1  [MOD-1120] Building with 2.1.3.GA and open sourcing
 	
 v1.4    [MOD-557] Removed 'all_load' from module.xcconfig for compatibility with Titanium SDK 2.0.0

From 60ab6fae335bc6be92d394ea2d969d86d1fdb55a Mon Sep 17 00:00:00 2001
From: Muhammad Dadu 
Date: Mon, 8 Dec 2014 11:06:29 -0800
Subject: [PATCH 4/4] [TIMOB-18092] Updated casting of values

---
 ios/Classes/TiChartsLinePlotProxy.m    | 4 ++--
 ios/Classes/TiChartsPiePlotProxy.m     | 4 ++--
 ios/Classes/TiChartsPlotProxy.m        | 8 ++++----
 ios/Classes/TiChartsScatterPlotProxy.m | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ios/Classes/TiChartsLinePlotProxy.m b/ios/Classes/TiChartsLinePlotProxy.m
index a3d34ed..cd6e196 100644
--- a/ios/Classes/TiChartsLinePlotProxy.m
+++ b/ios/Classes/TiChartsLinePlotProxy.m
@@ -88,12 +88,12 @@ -(void)scatterPlot:(CPTScatterPlot*)plot plotSymbolWasSelectedAtRecordIndex:(NSU
 
 -(NSNumber*)numberForPlot:(CPTPlot*)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index
 {
-    return [self numberForPlot:index forCoordinate:fieldEnum];
+    return [self numberForPlot:index forCoordinate:(CPTCoordinate)fieldEnum];
 }
 
 -(NSNumber*)highlightIndex
 {
-    return NUMINT(highlightSymbolIndex);
+    return [NSNumber numberWithUnsignedInteger:highlightSymbolIndex];
 }
 
 -(void)setHighlightIndex:(id)value
diff --git a/ios/Classes/TiChartsPiePlotProxy.m b/ios/Classes/TiChartsPiePlotProxy.m
index 4dcfbb4..9994c26 100644
--- a/ios/Classes/TiChartsPiePlotProxy.m
+++ b/ios/Classes/TiChartsPiePlotProxy.m
@@ -78,7 +78,7 @@ -(NSNumber*)numberForPlot:(CPTPlot*)plot field:(NSUInteger)fieldEnum recordIndex
 	if (fieldEnum == CPTPieChartFieldSliceWidth) {
 		num = [self numberForPlot:index];
 	} else { 
-		num = [NSNumber numberWithInt:index];
+		num = [NSNumber numberWithUnsignedInteger:index];
 	}
 	
 	return num;
@@ -103,7 +103,7 @@ -(CPTLayer*)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)index
 
 -(CGFloat)radialOffsetForPieChart:(CPTPieChart *)pieChart recordIndex:(NSUInteger)index
 {
-	if ([explodeSet containsObject:[NSNumber numberWithInt:index]]) {
+	if ([explodeSet containsObject:[NSNumber numberWithUnsignedInteger:index]]) {
 		float amt = (float)[TiUtils floatValue:[self valueForUndefinedKey:@"explodeOffset"] def:0.0];
 		return amt;
 	}
diff --git a/ios/Classes/TiChartsPlotProxy.m b/ios/Classes/TiChartsPlotProxy.m
index 582545c..2c70555 100644
--- a/ios/Classes/TiChartsPlotProxy.m
+++ b/ios/Classes/TiChartsPlotProxy.m
@@ -96,7 +96,7 @@ -(NSNumber*)numberForPlot:(NSUInteger)index forCoordinate:(CPTCoordinate)coordin
         } else if (coordinate == CPTScatterPlotFieldY) {
             return val;
         } else {
-            return [NSDecimalNumber numberWithUnsignedInt:index];
+            return [NSDecimalNumber numberWithUnsignedInteger:index];
         }
     }
     
@@ -154,7 +154,7 @@ -(void)triggerReconfigure
 	[self performSelectorOnMainThread:@selector(reconfigurePlot) withObject:nil waitUntilDone:NO];
 }
 
--(void)addData:(NSArray*)values startingAtIndex:(int)index
+-(void)addData:(NSArray*)values startingAtIndex:(NSUInteger)index
 {
 	if (values != nil) {
 		Class dictionaryClass = [NSDictionary class];
@@ -268,7 +268,7 @@ -(void)notifyOfDataClickedEvent:(NSUInteger)index
 {
 	if ([self _hasListeners:@"dataClicked"]) {
 		NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:
-                               NUMINT(index),@"index",
+                               [NSNumber numberWithUnsignedInteger:index],@"index",
                                [self numberForPlot:index],@"value",
                                plot.identifier,@"name",                                
                                nil
@@ -293,7 +293,7 @@ -(void)notifyOfDataClickedEvent:(NSUInteger)index atPlotPoint:(CGPoint)plotPoint
 
 	if ([self _hasListeners:@"dataClicked"]) {
 		NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:
-								  NUMINT(index),@"index",
+								  [NSNumber numberWithUnsignedInteger:index],@"index",
 							      [self numberForPlot:index],@"value",
 							      self.plot.identifier,@"name",
                                   NUMINT(viewPoint.x),@"x",
diff --git a/ios/Classes/TiChartsScatterPlotProxy.m b/ios/Classes/TiChartsScatterPlotProxy.m
index d3ba2dd..bf3e3a9 100644
--- a/ios/Classes/TiChartsScatterPlotProxy.m
+++ b/ios/Classes/TiChartsScatterPlotProxy.m
@@ -85,7 +85,7 @@ -(NSNumber*)indexFromViewPoint:(id)args
 
 -(NSDictionary*)dataPointFromIndex:(id)args
 {
-    ENSURE_ARG_COUNT(args,1)
+    ENSURE_ARG_COUNT(args, 1);
     int index = [TiUtils intValue:[args objectAtIndex:0] def:0];
 
     double pts[2];