gujjula / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

CorePlot 0.4 cannot compile for device but compiles/runs on Simulator #311

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Integrated CorePlot 0.4 into my project
2. Compiles and runs fine and simulator
3. Connect iPhone and compiles gives error - Imcompatible type assignment - 
CPTScatterPlot may not respond to contentsScale in CPTScatterPlot.m "scale = 
[self contentsScale];" line in renderAsVectorInContext:(CGContextRef)theContext;

What is the expected output? What do you see instead?
It compiles for Simulator but doesn't for device

What version of the product are you using? On what operating system?
CorePlot 0.4. XCode 4, Mac OS X Snow Leopard 10.6.8, iPhone iOS 4.2.1, 
Deployment target 

Please provide any additional information below.

It fails in two places with same code in class CPTScatterPlot.m
Method -(void)renderAsVectorInContext:(CGContextRef)theContext
and -(void)drawSwatchForLegend:(CPTLegend *)legend atIndex:(NSUInteger)index 
inRect:(CGRect)rect inContext:(CGContextRef)context

                CGFloat scale = 1.0;
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
                    if ( [self respondsToSelector:@selector(contentsScale)] ) {
                        scale = [self contentsScale]; //fails to compile here (not a warning) with
//Incompatible types in assignment. CPTScatterPlot may not repond to 
contentsScale
                    }
#endif

Original issue reported on code.google.com by hyarlaga...@gmail.com on 29 Jul 2011 at 11:09

GoogleCodeExporter commented 9 years ago
I was having this problem until I set my application's build target, build 
settings, built active architecture only to debug yes.  

Original comment by pli...@gmail.com on 30 Jul 2011 at 3:05

GoogleCodeExporter commented 9 years ago
I was able to find BUILD ACTIVE ARCHITECTURE ONLY in build setting and set it 
to debug YES.
But where are the others.
Is the BUILD TARGET inside the "Manage schema"? 
Also what inside BUILD SETTINGS ?

With just the BUILD ACTIVE ARCHITECTURE ONLY set o debug YES it still cannot 
compile.

Original comment by hyarlaga...@gmail.com on 30 Jul 2011 at 5:53

GoogleCodeExporter commented 9 years ago
I have a iPhone 3 running iOS 4.2.1

Original comment by hyarlaga...@gmail.com on 30 Jul 2011 at 6:01

GoogleCodeExporter commented 9 years ago
Check the build settings for the Core Plot project and make sure it's still 
using "Latest iOS" for the Base SDK in both Debug and Release builds. 
-contentsScale is an iOS 4.0 and later method.

Original comment by eskr...@mac.com on 31 Jul 2011 at 8:14

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 830407056c6f.

Original comment by eskr...@mac.com on 31 Jul 2011 at 10:37

GoogleCodeExporter commented 9 years ago
Changing my project target os version to iOS 4.0 fixed the issue.

Original comment by hyarlaga...@gmail.com on 1 Aug 2011 at 12:31