Skip to content

Commit

Permalink
Merge pull request #2 from muhammaddadu/TIMOB-18092
Browse files Browse the repository at this point in the history
[TIMOB-18092] added 64bit support for iOS ti.charts
  • Loading branch information
muhammaddadu committed Dec 8, 2014
2 parents c1fc386 + 60ab6fa commit 96ecea4
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ios/Classes/TiChartsLinePlotProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ios/Classes/TiChartsPiePlotProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions ios/Classes/TiChartsPlotProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}

Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/TiChartsScatterPlotProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
63 changes: 23 additions & 40 deletions ios/charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objectVersion = 46;
objects = {

/* Begin PBXAggregateTarget section */
Expand Down Expand Up @@ -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 = (
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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)\"",
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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",
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
};
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.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
Expand Down
7 changes: 4 additions & 3 deletions ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 1.4.1
version: 1.5.0
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
name: charts
moduleid: ti.charts
guid: cdfd00f4-1e90-4fe8-91a4-a163a947f338
platform: iphone
minsdk: 2.1.3.GA
minsdk: 3.4.1.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.4.1.GA

COREPLOT_HEADERS = "CorePlot/CorePlotHeaders"
//
Expand Down

0 comments on commit 96ecea4

Please sign in to comment.