Simply put: What is the most effective way to share / reuse code between iPhone and Android builds?
The two most common scenarios I think would be:
- Blank slate new project, knowing ahead of time there is a large chunk of reusable logic that needs to run on each device.
- Existing iPhone code base, porting of C, C++ and Objective-C to the Android NDK or otherwise.
Yes of course in a perfect world all apps would just plug into the magical cloud and all the reusable logic would be up in Google App Engine or some web services, but that is not the spirit of this question. After experiencing a port of iPhone to Android with no code reuse at all second-hand and seeing the pain that person had to endure, I'd like to know how other people are avoiding it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…