-
Notifications
You must be signed in to change notification settings - Fork 86
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
Xamarin.mac support #97
Comments
A quick update, this is working on master now. However, iOS and MacOS apps are not supported.
Are you Ok if I do a pull request to add an InfoPlistConfiguration? On iOS and MacOS Info.plist is the analog to AssemblyInfo in some respects.
This code would need to be refactored to abstract the AssemblyAccessor out. |
Yes, you'd be welcome to open a PR. A few things, though:
If you're working on it, why don't you do an Edit: Also, believe it or not, |
Thanks for the recommendation, but maintaining native bindings has its own set of issues, and it can be very time consuming. I'd like to explore what supporting Xamarin (Mac, Android, iOS) apps might look like. Using sharpie to generate ApiDefintions is very tedious.
I can do this, but in order to read the Info.plist at runtime, I would need to add Xamarin.Mac as a dependency in order to call
I doubt you want Xamarin as a project dependency, is there a way to pass this in somehow. I didn't see anything obvious in code. JSONConfiguration is not public so I can't access that in the main project - but also it reeds from the file system. In Xamarin apps you'd want to use app preferences or Is there a way to allow a developer manually create something to pass in the constructor like an |
Understood.
You can set var sparkle = new SparkleUpdater(...)
{
Configuration = new MyConfig()
}; Just don't call the default constructor in the subclass for now. Hm...regarding Info.plist: I don't see yet why we couldn't just read that in as XML. We don't really need a lib for reading that file, do we? Regarding (I have to apologize, here: normally I'd do a bit more research on my end, but life is very busy right now, and I don't have a lot of time during the work week for extra things. I've not used Xamarin before, so I am depending on your experience here.) |
I think that would work. I thought in the past I saw binary data in the info.plist once compiled, but looking around I don't see it. I think parsing the info.plist as xml works, but if you add a new project it could all be done with native calls. I would propose this, a new project named:
It would hold OS specific implications for iOS and MacOS to start, with Android added a little later as I find time. In the main project I think there would be compiler directive to do this:
Thoughts? |
|
Posted this in PR #98 too, but for historical reference regarding referencing Xamarin in VS:
|
I was able to add a Xamarin project to the solution from Visual Studio for macOS. Visual Studio on Windows is complaining on my end, but no big deal. I had to run a manual Once things are working, a new GitHub action can be set up to build and deploy that package to NuGet. So, I would actually recommend a few things.
|
Given that all Xamarin support is ending on May 1, 2024 (https://dotnet.microsoft.com/en-us/platform/support/policy/xamarin), and no one else has asked for this nor helped to contribute code to this, I don't see the point of adding this to the NetSparkle library at this time. :) |
Running a Xamarin.mac app that uses NetSparkle crashes on instantiation of NetSparkle with version 2.0 with the exception:
Attribute of type System.Reflection.AssemblyProductAttribute
Supporting NetSparkle on Xamarin.mac would be a great addition. I noticed the core package has some windows specific references like
Microsoft.Win32.Registry
. If that was moved from the core package and into the Windows specific UI implementation it would allow NetSparkle to be used on Linux, Mac, Windows and maybe even iOS/Android (In-app dialogs about new versions).Thanks.
The text was updated successfully, but these errors were encountered: