This project shows a sample to share code between Android application and iOS application with [J2ObjC] (https://github.com/google/j2objc) which is translation tool from Google.
See LICENSE.
And this project uses below projects with modifications, you can find software license in each projects
- android-DisplayingBitmaps
- CollectionView-Simple
And this project links JRE emulation which is built with J2ObjC, see https://github.com/google/j2objc.
- J2ObjC 1.0.0 (https://github.com/google/j2objc)
- Xcode 7.2
- Build and install J2ObjC, see https://github.com/google/j2objc. Just do 'make dist'.
- Open project 'ios/CollectionView.xcodeproj' with Xcode
- Set 'j2ojc_distribution' variable.
- Open project 'CollectionView'
- Select 'Build Settings'
- Find 'j2ojc_distribution'
- Set 'j2ojc_distribution' as your J2ObjC distribution path.
- Push the 'build and run' button of Xcode
Translated codes are already included in this project. But you can try translation from Java to Objective-C with below steps.
$ cd android
$ git submodule init
Submodule 'android' (git@github.com:sfuku7/android-DisplayingBitmaps.git) registered for path '../android'
$ git submodule update
$ cd ../
$ J2OBJC_DISTRIBUTION=/path/to/j2objc/dist make