CPTestApp-iPhone

26 views
Skip to first unread message

LV

unread,
Jul 12, 2009, 10:11:59 PM7/12/09
to coreplot-discuss
Using mercurial, I cloned the latest tonight. I opened the example
project and it builds and runs fine in the simulator. However, on
device running 3.0 (iPhone, 16gb) I get the following error.....

2009-07-12 20:08:58.847 CPTestApp-iPhone[1952:207] *** -
[NSDecimalNumber isGreaterThanOrEqualTo:]: unrecognized selector sent
to instance 0x101650
2009-07-12 20:08:58.862 CPTestApp-iPhone[1952:207] *** Terminating app
due to uncaught exception 'NSInvalidArgumentException', reason: '*** -
[NSDecimalNumber isGreaterThanOrEqualTo:]: unrecognized selector sent
to instance 0x101650'

any thoughts?

Drew McCormack

unread,
Jul 13, 2009, 10:46:28 AM7/13/09
to coreplot...@googlegroups.com
This was a bug some time ago, but should be fixed now. Did you clone
the latest google code repository, or the bitbucket one? Bitbucket was
used during WWDC, but is no longer current.

Drew

The Mental Faculty

LV

unread,
Jul 14, 2009, 12:12:11 AM7/14/09
to coreplot-discuss
Using google code. Can anyone else with a 3g repeat this error?

On Jul 13, 8:46 am, Drew McCormack <drewmccorm...@mac.com> wrote:
> This was a bug some time ago, but should be fixed now. Did you clone  
> the latest google code repository, or the bitbucket one? Bitbucket was  
> used during WWDC, but is no longer current.
>
> Drew
>
> The Mental Faculty
>

LV

unread,
Jul 14, 2009, 1:10:51 PM7/14/09
to coreplot-discuss
i am a newb, so i am not sure if this is relevant, but when i build
the app for the device, i get an error saying the bundle contains an
illegal character "_" (the underscore). So i go into my build target
and delete the PROJECT_NAME off the end of the com.blah line. I hope
this makes sense. I am typing this from memory as I am away from my
mac. The point is, could the build settings have anything to do with
this? Has anyone else built this demo app on their iphone.

My next step is to take the demo app, remove the files one at a time
and put them into a new project without an underscore in the name and
see if that helps.

Again, I am a newb so I understand if you dont have time to hold my
hand. I am more interested in knowing if there is a known issue with
the demo app building on device.

Thanks,
LV

Brad Larson

unread,
Jul 14, 2009, 11:38:09 PM7/14/09
to coreplot...@googlegroups.com
OK, I think I know what's going on with the first problem, but I'm not
sure how to fix it. The static library is not linking in categories,
and isGreaterThanOrEqualTo: is defined in the NSComparisonMethods
protocol within Foundation. According to this:

http://developer.apple.com/qa/qa2006/qa1490.html

That's what adding the other linker flag -ObjC should fix.
Unfortunately, when I add this to both the static library and the
application itself, I'm still getting the same runtime exceptions.
Examining the build logs shows this in the output:

"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: -
dynamic not specified the following flags are invalid: -ObjC
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool:
file: /Users/larson/Development/core-plot/framework/build/CorePlot-
CocoaTouch.build/Release-iphoneos/CorePlot-CocoaTouch.build/Objects-
normal/armv6/CPPlatformSpecificDefines.o has no symbols"

It looks like the -ObjC flag is being ignored by the linker for a non-
dynamic library. This runs counter to what Apple advises above, so I
have no idea how to fix this. I'll tinker with it for a bit more, but
maybe someone else can find something I'm missing.

The second issue you describe is due to a dash being in the
application's name. You simply should be able to edit the Info.plist
of the application to replace the boilerplate "Bundle identifier" with
something like "org.CorePlot.CPTestApp".

______________________
Brad Larson, Ph.D.
Sunset Lake Software
http://www.sunsetlakesoftware.com

Drew McCormack

unread,
Jul 15, 2009, 2:44:51 AM7/15/09
to coreplot...@googlegroups.com
I remember using the -all_load option at some point in the past for
this type of problem. Could that be a work around?

Drew

Brad Larson

unread,
Jul 15, 2009, 10:39:53 PM7/15/09
to coreplot...@googlegroups.com
Bingo. It appears that the -ObjC option is not working properly for
iPhone OS 3.0, according to the comments here:

http://stackoverflow.com/questions/932856/calling-method-in-uiview-category-included-from-iphone-static-library-causes-nsin

You need to add -all_load to your application's "Other linker flags",
and then it will load properly. I've committed a fix for this in the
test application, so it should work on the device now. Also, I've
updated the wiki application integration instructions.

LV

unread,
Jul 16, 2009, 1:40:18 AM7/16/09
to coreplot-discuss
You gentlemen, are amazing. Thank you so much. I thought I was going
crazy because I couldn't even get the demo to build. Now my app,
which relies heavily on the demo for the graphing, works like a
champ. Thank you again!
Reply all
Reply to author
Forward
0 new messages