-
Notifications
You must be signed in to change notification settings - Fork 94
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 #28
Comments
I see that the fork creates a separate project which specifically targets Xamarin.Mac. As far as I know, it's not currently possible to build a project targeting Xamarin.Mac on Windows. I think that libraries targeting .NET Framework 4.5 will probably work on Xamarin.Mac. So what I'd like to try is to just compile the library for .NET Framework with the code that uses the correct path for LocalStorage, and see if it can be used from Xamarin.Mac. Would you be willing to see if this works and send a PR for it? |
I'm now getting this error with the LocalStorage on mac. Are there plans to implement a solution in the main branch and publishing an updated version? Thanks. |
So what do you think? Can we get this fixed soon? Thanks |
@Sparksteam Still using workaround ¯_(ツ)_/¯ |
@haritowa Hope not too much longer. |
@Sparksteam we have switched to native, so this doesn't make me suffer any more 😂 You can use source from this fork |
Thanks @haritowa, I may have to use that fork eventually. Did you build a binding class for OS X, or are you going native across-the-board? |
@Sparksteam fully native both for iOS & OS X |
To be able to produce a package with Mac support, I need a way to be able to build a library that can run on Xamarin.Mac on a Windows machine. Possible ways of doing this include:
|
Why would it need to run on Windows? Is there bait-and-switch going on in the NuGet? |
@Sparksteam It doesn't need to run on Windows, but I need to be able to build it on Windows. I don't own a Mac, so I can't use one to build the library for Xamarin.Mac. Even if I did, I would strongly prefer to enable everything to be built on a single machine, instead of having to build some of the files on Windows, some on a Mac, and then copying them together and creating a NuGet package out of them. |
@Sparksteam And yes, PCL Storage is a canonical example of bait-and-switch. The NuGet package contains a portable "reference assembly" that PCLs can compile against, and then implementations compiled for each platform supported. |
Yeah Daniel, it is somewhat cumbersome. And expensive to buy a MAC. I’d be more than happy to build binaries for you and upload them somewhere. Allan From: Daniel Plaisted [mailto:[email protected]] @Sparksteam https://github.com/Sparksteam It doesn't need to run on Windows, but I need to be able to build it on Windows. I don't own a Mac, so I can't use one to build the library for Xamarin.Mac. Even if I did, I would strongly prefer to enable everything to be built on a single machine, instead of having to build some of the files on Windows, some on a Mac, and then copying them together and creating a NuGet package out of them. — |
@haritowa - Is this only change you had to make to the master code, in DesktopFileSystem.LocalStorage? #elif MAC and adding the necessary MAC preprocessor symbol, of course. Thanks |
@Sparksteam unfortunately, i can't remember all details, i just remove all #IF sections for other platforms :) |
PCLStorage.Mac.zip |
Thanks @haritowa . I diff'd the files with the current master and although there were some differences, it doesn't look like any of them contain any MAC specific changes. The one change I referenced last week in your DesktopFileSystem.LocalStorage might be all that's required. I will give that a try and let you know. |
@haritowa - I worked around this problem in my code by simply implementing my own GetStorageFolder with this code; IFolder storageFolder; #if _MAC @dsplaisted - My offer still stands if you'd like me to build some binaries for you. The fix seems simple enough, but you will need that MAC project. Thanks guys. |
@Sparksteam Can you send a PR to add support for building on the Mac? Once we have that merged then you can build the Mac DLL and send it to me. Thanks, |
Ok Daniel - PR #38 with the changes I think are required. I'm not sure how to go about testing it though. I have all the release binaries for PCLStorage.OSX. Let me know how you would like me to get them to you. If you build and publish a pre-release NuGet package with these changes I would be more than happy to test it for you. Thanks, Allan |
ITNOA Is there any update? |
Is it working? |
Xamarin.Mac version doesn't work proper way(for example, LocalStorage returns ~/../Library, which incorrect by definition). Here you can find fork, which repairs Mac compatibility
The text was updated successfully, but these errors were encountered: