Giter VIP home page Giter VIP logo

Comments (7)

EugeneUr avatar EugeneUr commented on August 22, 2024

After doing some testing and experimenting i was able to convert iOCharts for a version fit for MacOS. Thanks for all the helpful guides you left along the way.

from ioscharts.xamarin.

Flash3001 avatar Flash3001 commented on August 22, 2024

Hey @EugeneUr,

Glad to read you've managed to do it. Last time I've checked the Charts library has a project target ready when you compile using Xcode. I'm not sure but most of the iOS ApiDefinition binding version can be reused. The SwiftLibrary will also need some work as it is not the same for iOS Devices, iOS Simulators and macOS.

Let me know if I can help with anything.

from ioscharts.xamarin.

EugeneUr avatar EugeneUr commented on August 22, 2024

Hey @Flash3001 ,

For posterity, i had to:

  1. Compile all the Swift4 projects with Xamarin.Mac and the mac .dylib. I also had to add a few more projects
  2. Compile Charts to Mac (the package packing is completely different than for iOS).
    Note: this was very straight forward since its a single architecture type and you don't need to run it through lipo.
  3. Modify the ApiDefinitions.cs file to switch over to the supported classes for Mac
    Note: it appears that VisualStudio for Mac changed its behavior a bit when it comes to linking .framework, all those configs go into the .csproj now.
  4. Added this custom afterBuild command so that the .framework can find the .dylibs in the DLL.
    <command>install_name_tool ${TargetDir}/ChartsTest.app/Contents/MacOS/ChartsTest -add_rpath @loader_path/../Resources/Frameworks</command> <workingdir>${TargetDir}</workingdir>

Let me know if you want me to merge my changes with yours somehow. I think it makes sense for me to push the Swift4 change upstream to your repo, so that the NuGets are comprehensive as possible. However, i am not sure about the MacCharts, i think it should be its own repo since Charts.framework structure is completely different than iOS.

from ioscharts.xamarin.

EugeneUr avatar EugeneUr commented on August 22, 2024

Hey @Flash3001 ,

One thing that would be extremely helpful is if you could please send me (or add to this project) the charts xcode project that you used to generate the ApiDefinitions.cs and Structs.cs. It appears like a bunch of folks have contributed in the recent few months so it is causing a serious headache to try and make it work for MacOS.

Thank you!

from ioscharts.xamarin.

Flash3001 avatar Flash3001 commented on August 22, 2024

@EugeneUr I believe this is the one I used: https://1drv.ms/u/s!AnlSxFnqK6ttkuVxVs0rPoMAAnf-9g (uploaded as a Zip to OneDrive).

I agree with you. It makes sense to share the same repo for Swift4, but the Nuget packages need to be separated because of the target on Nuget and the script to move files around because of the difference on Simulator and Device.

from ioscharts.xamarin.

EugeneUr avatar EugeneUr commented on August 22, 2024

Thank you so much @Flash3001, it worked perfectly! Love it when i can reuse all my iOS charts code for MacOS :)

I will work on contributing back to both project with all my finding by the end of the week so that it will super comprehensive.

from ioscharts.xamarin.

sushihangover avatar sushihangover commented on August 22, 2024

@EugeneUr Do you have a repo that you can share with your macOS version? TIA, Sushi

from ioscharts.xamarin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.