Pre loader

SCIChart iOS - Requires Swift Runtimes?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

I didn’t see anything in any docs, so I am just wanting to verify this info…

Is this correct that you have to link in and ship the libSwiftCore (+ other swift libs) with an app using SciCharts on iOS? When I added the chart library to my app; the app crashed at startup with missing dynamic load of libSwiftCore.dylib on a real device (emulators run fine).

Enabling ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES in the build settings fixed this issue. But this surprised me that the SciChart library would actually require Swift.

Was this intentional; or did the library somehow pickup an unintentional reference somewhere….

Version
3.0.0.5098
  • You must to post comments
0
0

Hello Nathanael,

For the sake of the other users, going to post this here as well.

Regarding this Swift ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES. I thought that intention of his question was about that you are forced to use ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES, so what I did was look into our Examples App (written mostly in Obj-C), and made sure, that we don’t use that. That’s it.

It actual fact, we deploy SciChartDemo app from our public GitHub repo with included framework from CocoaPod, and we have this ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO (which Is default one).

So as per Swift itself, you are right, we are using bunch of “swiftification” things:
– NS_REFINED_FOR_SWIFT
– NS_SWIFT_NAME
– NS_SWIFT_UNAVAILABLE
But those are from Obj-C runtime, not libSwiftCore (or any other swift lib)

What is from swift, and might cause the framework grab the libSwiftCore, is the actual extensions for swift, to make sure our API is more swift friendly, like using swift comparable, arrays, primitives etc… B ut again, if you don’t use swift, those symbols will be stripped out eventually.

Anyways, there were different ways to make our framework more Swift friendly, and I’m not going to dig into details here why we choose the one we use\implement, just wanted to share this information here.

Best Regards,
Nazar Rudnyk
Lead SciChart iOS Developer

// SciChart News
// SciChart has won the Queens Award For Enterprise in the Innovation category! – https://www.scichart.com/queens-award-innovation
// SciChart receives Highly Commended in National Business Awards! – https://www.scichart.com/lloyds-innovation-award
// SciChart Mobile SDK v3 / WPF SDK v6 released! – https://www.scichart.com/scichart-mobile-sdk-v3-0-0-released
// Over 320 SciChart Reviews! – https://www.reviews.co.uk/company-reviews/store/scichart-com

  • You must to post comments
0
0

Hi Nazar,

Unfortunately your demo app link doesn’t tell me either way because it isn’t that easy to just get the raw app and look inside to see what is included, it really proves nothing as the later versions of iOS have swift embedded in them.

However, here is what happened:
1. I added the item via cocoapods; on a emulator everything worked fine (because swift is always available to the emulators). When I went to test on a real device it started throwing on startup that Dylib file libSwiftCore.dylib is missing and crashed on startup.
2. Removing the SciChart specific cocoapad; the error went away and the app ran perfectly (w/o a chart obviously).
3. Re-adding the cocoapod back in, the error returned.

So then I tested with the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES and that fixed the error and allowed me to have the chart.

Finally just to do a final verification if you use a HexEditor to actual see the raw binary on the SciChart.framework/SciChart library file; you will see this (See attached picture):

As you can see the SciChart library is referencing three different Swift related libraries…

So basically you really need to ask the actual developers: “Was this intentional and does SciChart really require Swift; or did the library somehow pickup unintentional references somewhere….”

Images
  • You must to post comments
0
0

Hello Nathanael,

It shouldn’t be the case, at lease we don’t know about that. We are publishing our examples app to the App Store, and it doesn’t use mentioned property, you can see it from our repo here – https://github.com/ABTSoftware/SciChart.iOS.Examples.

Linking AppStore link for reference here as well – https://apps.apple.com/us/app/scichart-examples/id1485200499?ls=1

I don’t think I can be more of help here. But if you will find anything we can help you with – feel free to contact us.

Best Regards,
Nazar Rudnyk
Lead SciChart iOS Developer

// SciChart News
// SciChart has won the Queens Award For Enterprise in the Innovation category! – https://www.scichart.com/queens-award-innovation
// SciChart receives Highly Commended in National Business Awards! – https://www.scichart.com/lloyds-innovation-award
// SciChart Mobile SDK v3 / WPF SDK v6 released! – https://www.scichart.com/scichart-mobile-sdk-v3-0-0-released
// Over 320 SciChart Reviews! – https://www.reviews.co.uk/company-reviews/store/scichart-com

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies