iOS Question Swift Framework Library Help

walterf25

Expert
Licensed User
Longtime User
Hi all, i've been playing around trying to wrap a Charts Library, the library is written is Swift, i have downloaded the Charts.framework and added it to the xcode project, the library compiles just fine but when I try running a B4i project with the library the app just closes right away without giving me any errors.

This happens even if I don't declare a variable with the library name, just by having the library ticked in the Libraries Manager tab, if I untick the library then the project runs fine and it doesn't close.

Any hints on what to look for, i know i'm not giving much but I really can't give anything since I'm not getting any errors, maybe this link will help which explains how to run the example code in Xcode which I have tried and it works fine, this is a port from the MPCharts library in Android, I have been able to run it just fine in xcode and it would really nice if we could port this library to B4i.

Attached are also the iCharts.h and iCharts.m files where you can see that there's not much going on, i'm just simply trying to add the LineChartView as a CustomView to the Designer.

Any thoughts or suggestions that I can try to find out what's going on, as I mentioned above, the library compiles just fine, I have also copied the Charts.framework to the Libs folder in my local Mac B4iBuildserver along with the libiCharts.a file and the iCharts.h file as well.

Thanks in advance for any help you guys can provide, i'm really excited and hope that I can wrap at least some of the parts of this nice library.

Walter
 

Attachments

  • iCharts.zip
    1.4 KB · Views: 269

walterf25

Expert
Licensed User
Longtime User
The depends on line should be:

B4X:
//~dependson: Charts.framework.swift.3
That did the trick, works good now.

Thanks,
Walter
 
Upvote 0
Top