3 ms·
How about running a background service to synchronize a local folder of content with a remote server? Making sure the background service is launched correctly u
by dmitrybrant 7y ago
How about running a background service to synchronize a local folder of content with a remote server? Making sure the background service is launched correctly upon startup? Integrating with the OS's native sharing features with other apps? And so on.
In my experience, using a "cross-platform" framework means that you'll write the code not once, but three times: once for the cross-platform framework, and once per platform (Android / iOS) given all the quirks and unavoidable customizations that will need to be made to make your app function correctly.
- wsc981 7y agoFor platform specific stuff it's easy to write a wrapper. Most of the time Xamarin is very closely up to date with Apple's SDK, due to some automated tooling that generates the C# classes, interfaces and such. So you should be able to either use the C# wrappers for platform specific functionality, or alternatively can quite easily create your own binding using the Sharpie tool [0]. The last 2 apps I've been working on were Xamarin apps and I'd guess the first app probably shares 80% - 85% of the code base and the second app 95%. The first app less, because the client wanted a specialised camera module, which required me to create bindings for the Fotoapparat [1] library on the Android platform. Both apps used Xamarin Forms. The platform specific code, all things considered, is really small. I should note I've also done a lot of Swift & Objective-C development in the past and a little bit of Java. I also tried Xamarin around 2013 and back then the experience wasn't as good as it's right now. My major gripes with Xamarin currently are: - The IDE becomes slow sometimes (fixed with a restart) - The IDE sometimes has issues connecting to the Android emulator for debugging (often restarting the computer fixes this). I should also note that if I were to write an iOS only app, I'd definitely use Swift (I love working in Swift, more than C#, Objective-C, Java, …). But for multi-platform apps, currently my tool of choice is Xamarin. --- [0]: https://docs.microsoft.com/en-us/xamarin/cross-platform/macios/binding/objective-sharpie/ https://docs.microsoft.com/en-us/xamarin/cross-platform/maci... [1]: https://github.com/RedApparat/Fotoapparat https://github.com/RedApparat/Fotoapparat
- vlozko 7y agoI wonder how well Xamarin will work with Swift-only frameworks, like the upcoming SwiftUI and Combine frameworks. They make heavy use of Swift generics. It’s been a long time since I’ve touched Xamarin so it’s a genuine curiosity.
- wsc981 7y agoI've used Sharpie Bind with a private (internal use) Swift Framework and it worked fine for me. But the Swift stuff is currently not officially supported. I've used these instructions: https://medium.com/@Flash3001/binding-swift-libraries-xamarin-ios-ff32adbc7c76 https://medium.com/@Flash3001/binding-swift-libraries-xamari... I did have to make some adjustments to the library, so I guess it could be tricky to use Sharpie Bind with Swift frameworks, if you're not in control of the Framework yourself.