Xamarin iOS Shinobi Chart Build Error


#1

I’m having build issues with the latest Shinobi Charts dll and Visual Studio 2017 for Windows.

VS for Windows: 15.7.4
Xamarin iOS: 11.12.0.4
Shinobi.Charts.dll: 2.9.8 (trial version)

Here’s the error:

Native linking failed for ‘/Users/spatenaude/Library/Caches/Xamarin/mtbs/builds/Distech.X50.UI.iOS/ef7420986945f15fe719e6f02484a31c/obj/iPhone/Debug/mtouch-cache/arm64/libShinobi.Charts.dll.dylib’. Please file a bug report at http://bugzilla.xamarin.com

Here’s also an excerpt of the error stack:

14> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -framework Security -framework QuartzCore -framework OpenGLES -framework CoreText -framework Foundation -framework UIKit -weak_framework CFNetwork -Xlinker -rpath -Xlinker @executable_path /Users/spatenaude/Library/Caches/Xamarin/mtbs/builds/Distech.X50.UI.iOS/ef7420986945f15fe719e6f02484a31c/obj/iPhone/Debug/mtouch-cache/arm64/Shinobi.Charts.dll.o /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonosgen-2.0.dylib /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libxamarin-debug.dylib -force_load /Users/spatenaude/Library/Caches/Xamarin/mtbs/builds/Distech.X50.UI.iOS/ef7420986945f15fe719e6f02484a31c/obj/iPhone/Debug/mtouch-cache/ShinobiCharts.a -lc++ -lz -liconv -gdwarf-2 -std=c99 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -Qunused-arguments -miphoneos-version-min=8.0 -arch arm64 -shared -read_only_relocs suppress -install_name @rpath/libShinobi.Charts.dll.dylib -fapplication-extension -o /Users/spatenaude/Library/Caches/Xamarin/mtbs/builds/Distech.X50.UI.iOS/ef7420986945f15fe719e6f02484a31c/obj/iPhone/Debug/mtouch-cache/arm64/libShinobi.Charts.dll.dylib -DDEBUG -u ‘OBJC_CLASS$_SChartAnimation’ -u ‘OBJC_CLASS$_SChartAnimationTracker’ -u ‘OBJC_CLASS$_SChartAnnotation’ -u ‘OBJC_CLASS$_SChartAnnotationZooming’ -u ‘OBJC_CLASS$_SChartAxis’ -u ‘OBJC_CLASS$_SChartAxisStyle’ -u ‘OBJC_CLASS$_SChartAxisTitleStyle’ -u _SChartBandKeyHigh -u _SChartBandKeyLow -u ‘OBJC_CLASS$_SChartBandSeries’ -u ‘OBJC_CLASS$_SChartBandSeriesStyle’ -u ‘OBJC_CLASS$_SChartBarColumnSeries’ -u ‘OBJC_CLASS$_SChartBarColumnSeriesStyle’ -u ‘OBJC_CLASS$_SChartBarSeries’ -u ‘OBJC_CLASS$_SChartBarSeriesStyle’ -u ‘OBJC_CLASS$_SChartBaselinePointStyle’ -u ‘OBJC_CLASS$_SChartBasePointStyle’ -u ‘OBJC_CLASS$_SChartBounceAnimationCurve’ -u ‘OBJC_CLASS$_SChartBounceDelayAnimationCurve’ -u ‘OBJC_CLASS$_SChartBoxGestureStyle’ -u ‘OBJC_CLASS$_SChartBubbleDataPoint’ -u ‘OBJC_CLASS$_SChartBubblePointStyle’ -u _SChartBubbleKeyArea -u ‘OBJC_CLASS$_SChartBubbleSeries’ -u ‘OBJC_CLASS$_SChartBubbleSeriesStyle’ -u _SChartCandlestickKeyClose -u _SChartCandlestickKeyHigh -u _SChartCandlestickKeyLow -u _SChartCandlestickKeyOpen -u ‘OBJC_CLASS$_SChartCandlestickSeries’ -u ‘OBJC_CLASS$_SChartCandlestickSeriesStyle’ -u ‘OBJC_CLASS$_SChartCanvas’ -u ‘OBJC_CLASS$_SChartCanvasOverlay’ -u ‘OBJC_CLASS$_SChartCanvasUnderlay’ -u ‘OBJC_CLASS$_SChartCartesianSeries’ -u ‘OBJC_CLASS$_SChartCategoryAxis’ -u ‘OBJC_CLASS$_SChartColumnSeries’ -u ‘OBJC_CLASS$_SChartColumnSeriesStyle’ -u ‘OBJC_CLASS$_SChartCrosshair’ -u ‘OBJC_CLASS$_SChartCrosshairMultiValueTooltip’ -u ‘OBJC_CLASS$_SChartCrosshairStyle’ -u ‘OBJC_CLASS$_SChartCrosshairTooltip’ -u ‘OBJC_CLASS$_SChartDarkTheme’ -u ‘OBJC_CLASS$_SChartDataPoint’ -u ‘OBJC_CLASS$_SChartDataPointLabel’ -u ‘OBJC_CLASS$_SChartDataPointLabelStyle’ -u ‘OBJC_CLASS$_SChartDataSeries’ -u ‘OBJC_CLASS$_SChartDateFrequency’ -u ‘OBJC_CLASS$_SChartDateRange’ -u ‘OBJC_CLASS$_SChartDateTimeAxis’ -u ‘OBJC_CLASS$_SChartDelayBounceAnimationCurve’ -u ‘OBJC_CLASS$_SChartDelayBounceWithMinimumAnimationCurve’ -u ‘OBJC_CLASS$_SChartDiscontinuousDateTimeAxis’ -u ‘OBJC_CLASS$_SChartDiscontinuousNumberAxis’ -u ‘OBJC_CLASS$_SChartDonutSeries’ -u ‘OBJC_CLASS$_SChartDonutSeriesStyle’ -u ‘OBJC_CLASS$_SChartEaseInAnimationCurve’ -u ‘OBJC_CLASS$_SChartEaseInOutAnimationCurve’ -u ‘OBJC_CLASS$_SChartEaseOutAnimationCurve’ -u ‘OBJC_CLASS$_SChartFlatAnimationCurve’ -u ‘OBJC_CLASS$_SChartGestureManager’ -u ‘OBJC_CLASS$_SChartGridStripeStyle’ -u ‘OBJC_CLASS$_SChartiOS7Theme’ -u ‘OBJC_CLASS$_SChartLegend’ -u ‘OBJC_CLASS$_SChartLegendStyle’ -u ‘OBJC_CLASS$_SChartLegendSymbol’ -u ‘OBJC_CLASS$_SChartLegendSymbolBandSeries’ -u ‘OBJC_CLASS$_SChartLegendSymbolBarSeries’ -u ‘OBJC_CLASS$_SChartLegendSymbolBlock’ -u ‘OBJC_CLASS$_SChartLegendSymbolBlockSplit’ -u ‘OBJC_CLASS$_SChartLegendSymbolCandlestickSeries’ -u ‘OBJC_CLASS$_SChartLegendSymbolColumnSeries’ -u ‘OBJC_CLASS$_SChartLegendSymbolDonutSeries’ -u ‘OBJC_CLASS$_SChartLegendSymbolLineSeries’ -u ‘OBJC_CLASS$_SChartLegendSymbolOHLCSeries’ -u ‘OBJC_CLASS$_SChartLegendSymbolPieSeries’ -u ‘OBJC_CLASS$_SChartLegendSymbolPointSeries’ -u ‘OBJC_CLASS$_SChartLegendSymbolScatterSeries’ -u ‘OBJC_CLASS$_SChartLightTheme’ -u ‘OBJC_CLASS$_SChartLinearAnimationCurve’ -u ‘OBJC_CLASS$_SChartLineSeries’ -u ‘OBJC_CLASS$_SChartLineSeriesBaseStyle’ -u ‘OBJC_CLASS$_SChartLineSeriesStyle’ -u ‘OBJC_CLASS$_SChartLogarithmicAxis’ -u ‘OBJC_CLASS$_SChartMainTitleStyle’ -u ‘OBJC_CLASS$_SChartMajorGridlineStyle’ -u ‘OBJC_CLASS$_SChartMappedSeries’ -u ‘OBJC_CLASS$_SChartMultiValueDataPoint’ -u ‘OBJC_CLASS$_SChartMultiXDataPoint’ -u ‘OBJC_CLASS$_SChartMultiYDataPoint’ -u ‘OBJC_CLASS$_SChartNumberAxis’ -u ‘OBJC_CLASS$_SChartNumberRange’ -u _SChartOHLCKeyClose -u _SChartOHLCKeyHigh -u _SChartOHLCKeyLow -u _SChartOHLCKeyOpen -u ‘OBJC_CLASS$_SChartOHLCSeries’ -u ‘OBJC_CLASS$_SChartOHLCSeriesStyle’ -u ‘OBJC_CLASS$_SChartPieSeries’ -u ‘OBJC_CLASS$_SChartPieSeriesStyle’ -u ‘OBJC_CLASS$_SChartPixelToPointMapper’ -u ‘OBJC_CLASS$_SChartPixelToPointMapping’ -u ‘OBJC_CLASS$_SChartPointSeries’ -u ‘OBJC_CLASS$_SChartPointSeriesStyle’ -u ‘OBJC_CLASS$_SChartPointStyle’ -u ‘OBJC_CLASS$_SChartRadialDataPoint’ -u ‘OBJC_CLASS$_SChartRadialLineSeries’ -u ‘OBJC_CLASS$_SChartRadialLineSeriesStyle’ -u ‘OBJC_CLASS$_SChartRadialSeries’ -u ‘OBJC_CLASS$_SChartRange’ -u ‘OBJC_CLASS$_SChartRedrawCalculatorFeedbackLoop’ -u ‘OBJC_CLASS$_SChartRepeatedTimePeriod’ -u ‘OBJC_CLASS$_SChartScatterSeries’ -u ‘OBJC_CLASS$_SChartScatterSeriesStyle’ -u ‘OBJC_CLASS$_SChartSeries’ -u ‘OBJC_CLASS$_SChartSeriesCrosshair’ -u ‘OBJC_CLASS$_SChartSeriesCrosshairTooltip’ -u ‘OBJC_CLASS$_SChartSeriesCrosshairTooltipDrawer’ -u ‘OBJC_CLASS$_SChartSeriesCrosshairTooltipPositioner’ -u ‘OBJC_CLASS$_SChartSeriesCrosshairTooltipStyler’ -u ‘OBJC_CLASS$_SChartSeriesStyle’ -u ‘OBJC_CLASS$_SChartSimpleDatasource’ -u ‘OBJC_CLASS$_SChartSpokeStyle’ -u ‘OBJC_CLASS$_SChartStepLineSeries’ -u ‘OBJC_CLASS$_SChartStyle’ -u ‘OBJC_CLASS$_SChartTargetLineDrawer’ -u ‘OBJC_CLASS$_SChartTheme’ -u ‘OBJC_CLASS$_SChartTickLabelFormatter’ -u ‘OBJC_CLASS$_SChartTickLabelRefreshRateDeviceBased’ -u ‘OBJC_CLASS$_SChartTickMark’ -u ‘OBJC_CLASS$_SChartTickStyle’ -u ‘OBJC_CLASS$_SChartTimePeriod’ -u ‘OBJC_CLASS$_SChartTimeProgressCalculator’ -u ‘OBJC_CLASS$_SChartTitle’ -u ‘OBJC_CLASS$_SChartTitleStyle’ -u ‘OBJC_CLASS$_ShinobiChart’ -u ‘OBJC_CLASS$_ShinobiChartLog’ -u ‘OBJC_CLASS$_ShinobiCharts’
14> Undefined symbols for architecture arm64:
14> “_CGAffineTransformIdentity”, referenced from:
14> -[SChartSeriesCrosshairTooltipDrawer newDrawLeftRightTooltip:withCurrentTrackedPoint:onChart:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartSeriesCrosshairTooltipDrawer newDrawAboveBelowTooltip:withCurrentTrackedPoint:onChart:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartGLView(PointChartSeries) createTextureFromUIImage:textureId:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartRadialTickManager updateGridLineViewForTickMark:glFrame:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGAffineTransformIsIdentity”, referenced from:
14> -[SChartGLView(PointChartSeries) createTextureFromUIImage:textureId:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGAffineTransformMakeRotation”, referenced from:
14> -[SChartAxis rotateLabel:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartAxis configureTitle] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartDataPointLabelManager rotateLabel:orientation:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartRadialTickManager updateTickMarkViewForTickMark:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGAffineTransformMakeScale”, referenced from:
14> -[SChartAnnotationZooming updateViewWithCanvas:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartCanvas initWithFrame:usingChart:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartCanvas layoutSubviews] in ShinobiCharts.a(ShinobiCharts)
14> “_CGAffineTransformRotate”, referenced from:
14> -[SChartSeriesCrosshairTooltipDrawer newDrawLeftRightTooltip:withCurrentTrackedPoint:onChart:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartSeriesCrosshairTooltipDrawer newDrawAboveBelowTooltip:withCurrentTrackedPoint:onChart:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartRadialTickManager updateGridLineViewForTickMark:glFrame:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGAffineTransformScale”, referenced from:
14> -[SChartGLView(PointChartSeries) createTextureFromUIImage:textureId:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGAffineTransformTranslate”, referenced from:
14> -[SChartSeriesCrosshairTooltipDrawer newDrawLeftRightTooltip:withCurrentTrackedPoint:onChart:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartSeriesCrosshairTooltipDrawer newDrawAboveBelowTooltip:withCurrentTrackedPoint:onChart:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGBitmapContextCreate”, referenced from:
14> -[SChartGLView(PointChartSeries) createTextureFromUIImage:textureId:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGColorGetColorSpace”, referenced from:
14> -[SChartRadialAxisPolarView drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGColorGetComponents”, referenced from:
14> -[SChartLegendSymbolBandSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolLineSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartCandlestickSeries drawBin:withDrawer:withGLBaseline:andGLTranslation:currentRenderIndexDict:] in ShinobiCharts.a(ShinobiCharts)
14> SChartGL::translateColor(UIColor*, bool) in ShinobiCharts.a(ShinobiCharts)
14> +[CGColorUtils getColorComponents:fromCGColor:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolPointSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGColorGetNumberOfComponents”, referenced from:
14> -[SChartCandlestickSeries drawBin:withDrawer:withGLBaseline:andGLTranslation:currentRenderIndexDict:] in ShinobiCharts.a(ShinobiCharts)
14> SChartGL::translateColor(UIColor*, bool) in ShinobiCharts.a(ShinobiCharts)
14> +[CGColorUtils getColorComponents:fromCGColor:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGColorSpaceCreateDeviceRGB”, referenced from:
14> -[SChartGradientView drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolBandSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolLineSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartGLView(PointChartSeries) createTextureFromUIImage:textureId:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartDonutSeries drawSlice:ofTotal:fromAngle:toAngle:fromCentre:withInnerRadius:andOuterRadius:asSelected:inFrame:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolPointSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGColorSpaceRelease”, referenced from:
14> -[SChartGradientView drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolBandSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolLineSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartGLView(PointChartSeries) createTextureFromUIImage:textureId:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolPointSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGContextAddArc”, referenced from:
14> -[SChartRadialAxisRadialView addCircularLineWithContext:center:radius:startAngle:endAngle:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGContextAddEllipseInRect”, referenced from:
14> -[SChartSpokesView drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> “_CGContextAddLineToPoint”, referenced from:
14> -[SChartLegendSymbolBandSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolBarSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolColumnSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartLegendSymbolLineSeries drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartSpokesView drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartRadialAxisPolarView drawRect:] in ShinobiCharts.a(ShinobiCharts)
14> -[SChartRadialAxisRadialView addLinearSectionWithContext:center:radius:startAngle:endAngle:] in ShinobiCharts.a(ShinobiCharts)


#2

Hi spatenaude,

I’ve checked the 2.9.8 release with the latest VS for Mac and Xamarin.iOS 11.12.0.4, and it seems to be working OK from there. Given you’re working with VS for Windows, please could you confirm which versions of Xcode and Visual Studio for Mac are running on the paired Mac you’re using for builds?

Thanks,

Alison


#3

Visual Studio for Mac: 7.5.3
XCode: 9.4.1


#4

Also wanted to add that on an iOS simulator (iPhone X - 11.4), it builds fine but crashes at runtime when trying to show a screen with charts.


#5

Thanks. Are you seeing any error messages with the crash on simulator? (It could just be that you haven’t added your trial key?)

We’ll carry on investigating the issue with the native build on VS for Windows.


#6

You’re right, I haven’t added the trial key yet. How do I proceed for that? Is there a how-to procedure that I can look up?


#7

Hi spatenaude,

There’s a quick start guide for Xamarin.iOS at https://www.shinobicontrols.com/docs/ios/shinobicharts/latest/quickstart-Xamarin.iOS.html which includes details of how to add your trial key.

Alison


#8

Hi Alison,

I added the trial key and it looks like it’s working. However, we jumped from version 2.8.1 directly to the latest (2.9.8) and I had to make some code changes to make our code compile (namespace change, etc.). At the time, we had calls such as

toto = SChartAnnotation.GetVerticalBand(null, rangeMin, m_Chart.XAxis, m_Chart.YAxis, color.ColorWithAlpha(0.3f));

and it worked fine with version 2.8.1. Now with version 2.9.8, I get a System.ArgumentNullException at runtime. I’m not sure what to replace the null with in the function call above to keep the same expected behavior. Is there some kind of default value that we can pass?

Also, regarding the build on a real iOS phone, have you encountered the same build issue that I have on my side with a VS for Windows environment?

Regards,
Sylvain


#9

Also, it looks like it’s related to a breaking change since Xamarin.iOS 11.10 (Breaking Change 3832):
https://developer.xamarin.com/releases/ios/xamarin.ios_11/xamarin.ios_11.10/#Breaking_Changes


#10

Hi spatenaude,

I’ve sent you a PM about the build issue on VS for Windows.

The GetVerticalBand method’s signature looks like this:

SChartAnnotationZooming GetVerticalBand (NSObject minX, NSObject maxX, SChartAxis xAxis, SChartAxis yAxis, UIColor color);

I’m a bit confused by you using a min value as the second parameter; please could you clarify what behaviour you previously got with the null parameter, that you’re trying to replicate? A screenshot would be helpful.

Many thanks,

Alison


#11

Hi Alison,

Since I’m not familiar with the code of our project (I only did small modifications to it), I can’t say with certainty why the parameters passed seem inverted, but I assume for now that it was done on purpose. My goal is to port the app to a version (more recent) of shinobi.charts that builds and works well at runtime (from the 2.8.1 version that we had before), so I ideally want to do the least amount of changes possible.

That said, we have those 2 calls where we have null parameters and other parameters that seem inverted:

toto1 = SChartAnnotation.GetVerticalBand(null, rangeMin, …);
toto2 = SChartAnnotation.GetVerticalBand(rangeMax, null, …);

It used to work before (I assume that method accepted null parameters on the 2.8.1 version), but now it throws ArgumentNullException as stated above. Since I don’t really know what this GetVerticalBand function does, I’m having a hard time trying to determine what should replace those null parameters there.

I guess I’ll try some values and see what happens at runtime.

Thanks,
Sylvain


#12

Hi Sylvain,

I’m not sure what behaviour you might have expected with the nulls - do you have a working version (e.g. app store version) of the app so you know where the bands should appear? If you can tell us that we should be able to help you out.

Kind regards,

Alison


#13

Hi Alison,

I think we found a way. Those 2 calls were to get “shading” bands outside of the selected range (one to the left and one to the right, so the parameters make sense. Basically, we replaced the nulls with something like this:

toto1 = SChartAnnotation.GetVerticalBand(m_Chart.XAxis.DataRange.Minimum, rangeMin, …);
toto2 = SChartAnnotation.GetVerticalBand(rangeMax, m_Chart.XAxis.DataRange.Maximum, …);

Doing other tests to make sure everything jives.

Best regards,
Sylvain


#14

Hi Sylvain,

I’m glad you’ve found the answer. I suspect that the previous code, using nulls, was undocumented behaviour, which was probably removed when we added support for Swift nullability.

I’ll also add for the benefit of anyone else reading this, following our PM conversation, that your previous build issues were down to changes needed in the project config, which you solved by comparing it with the config of the latest versions of our samples.

Alison