Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charts framework not usable in a Swift class added to an Objective C project #1545

Closed
indieshack opened this issue Sep 23, 2016 · 2 comments
Closed

Comments

@indieshack
Copy link

I've at Last managed to install the Charts Framework into my Objective C project with no compile issues, but it does NOT work correctly when the Charts API is used from a SWIFT class that's been added to the Objective C project. Any ideas for how to fix this?

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SwiftValue yMax]: unrecognized selector sent to instance 0x618000246000'
*** First throw call stack:
(
0 CoreFoundation 0x0000000100c5b34b exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000104aed21e objc_exception_throw + 48
2 CoreFoundation 0x0000000100ccaf34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x0000000100be0c15 ___forwarding
+ 1013
4 CoreFoundation 0x0000000100be0798 CF_forwarding_prep_0 + 120
5 Charts 0x000000010199e76f TFC6Charts9ChartData10calcMinMaxfT7dataSetPS_13IChartDataSet__T + 79
6 Charts 0x000000010199d2e3 TFC6Charts9ChartData10calcMinMaxfT_T + 451
7 Charts 0x000000010199cf7f TFC6Charts9ChartData17notifyDataChangedfT_T + 31
8 Charts 0x000000010199ceea TFC6Charts9ChartData10initializefT8dataSetsGSaPS_13IChartDataSet___T + 42
9 Charts 0x000000010199cbe2 TFC6Charts9ChartDatacfT8dataSetsGSqGSaPS_13IChartDataSet____S0 + 370
10 Charts 0x00000001018565b8 TFC6Charts35BarLineScatterCandleBubbleChartDatacfT8dataSetsGSqGSaPS_13IChartDataSet____S0 + 56
11 Charts 0x000000010196cdd5 TFC6Charts12BarChartDatacfT8dataSetsGSqGSaPS_13IChartDataSet____S0 + 69
12 Charts 0x000000010196ce54 TFC6Charts12BarChartDataCfT8dataSetsGSqGSaPS_13IChartDataSet____S0 + 52
13 QCM_Test 0x0000000100388671 TFC8QCM_Test9GraphView12setDataCountfT5countSi5rangeSd_T + 3729
14 QCM_Test 0x0000000100387747 TFC8QCM_Test9GraphView12sqlDidFinishfT10controllerCS_9SQLServer7resultsCSo7NSArray_T + 583
15 QCM_Test 0x000000010038bf06 TTWC8QCM_Test9GraphViewS_17SQLServerDelegateS_FS1_12sqlDidFinishfT10controllerCS_9SQLServer7resultsCSo7NSArray_T + 86
16 QCM_Test 0x0000000100385a56 TFFFC8QCM_Test9SQLServer7getDataFT2mcSS_SSU_FSbT_U_FP_T + 454
17 QCM_Test 0x00000001003847b3 TTRXFo_iP___XFo_oGSqGSaP
___ + 51
18 QCM_Test 0x00000001003847d7 TTRXFo_oGSqGSaP_____XFo_iGSqGSaP____iT_ + 23
19 QCM_Test 0x00000001003863c1 TPA__TTRXFo_oGSqGSaP_____XFo_iGSqGSaP____iT_ + 81
20 QCM_Test 0x0000000100384810 TTRXFo_iGSqGSaP____iT__XFo_oGSqGSaP____ + 32
21 QCM_Test 0x0000000100384895 TTRXFo_oGSqGSaP_____XFdCb_dGSqCSo7NSArray__ + 117
22 QCM_Test 0x00000001002347c7 38-[SQLClient executionSuccess:results:]_block_invoke + 55
23 Foundation 0x00000001045542cd __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK
+ 7
24 Foundation 0x0000000104553faf -[NSBlockOperation main] + 101
25 Foundation 0x00000001045526ac -[NSOperationInternal _start:] + 672
26 Foundation 0x000000010454e5ef __NSOQSchedule_f + 201
27 libdispatch.dylib 0x00000001061a50cd _dispatch_client_callout + 8
28 libdispatch.dylib 0x00000001061858d6 _dispatch_main_queue_callback_4CF + 406
29 CoreFoundation 0x0000000100c1f4f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
+ 9
30 CoreFoundation 0x0000000100be4f8d __CFRunLoopRun + 2205
31 CoreFoundation 0x0000000100be4494 CFRunLoopRunSpecific + 420
32 GraphicsServices 0x00000001075b4a6f GSEventRunModal + 161
33 UIKit 0x0000000102cc9f34 UIApplicationMain + 159
34 QCM_Test 0x000000010018e7bf main + 111
35 libdyld.dylib 0x00000001061f168d start + 1
36 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

@pmairoldi
Copy link
Collaborator

Hmm. No idea. Ill look into it. Do you happen to have an example Xcode project I could look at before I try it myself.

@pmairoldi
Copy link
Collaborator

I just tried this and it works. My guess is that you are passing the wrong types of data to the chart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants