Hi All,
I am building an iOs app in Xcode using Swift. I am trying to split it into independent modules, so that some of them will be shared in the future OSX and WatchKit versions of my app. So let’s say my most basic reusable Swift component is called MyModel, contains only business logic and has absolutely no dependence on UI or data access or Networking or CoreData, etc. Just the business logic.
Next, I come across Silver Beta, and I think to myself, hmm, maybe in the future I can make an Android app using Swift, neat! And I will use reusable MyModel source files - how convenient!
And then I notice that all my classes in MyModel are actually descendants of NSObject and use some features of the apple’s Foundation framework.
So my BIG question is: in order to reuse my code for a Silver-based Android app in the future should I rewrite all my modules so they DONT user Foundation anymore? Android project will NOT understand it, right?
As well, I’d appreciate any other hints related to creating shareable components, thanks! Did anyone try doing this yet? How much of your architecture can you really make reusable? (Obviously, nothing UI-related, but what else)