Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
/ java-ios Public archive

Compile native executables for iOS using GraalVM's native-image

License

Notifications You must be signed in to change notification settings

Oct4Pie/java-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

java-ios

Compile native executables for iOS using GraalVM's native-image

Setup

You need to have brew installed: https://brew.sh

  • Download graalvm-ce-java11-darwin-amd64-20.2.0-dev.tar.gz, the developer version of graalvm's SDK, from https://github.com/graalvm/graalvm-ce-dev-builds/releases

    tar -C /usr/local/opt/ -xvf /path/to/graalvm-ce-java11-darwin-amd64-20.2.0-dev.tar.gz

  • Install libimobiledevice, native iOS libraries:

    brew install --HEAD libimobiledevice

Compiling the sample

  • export GRAALVM_HOME=/usr/local/opt/graalvm-ce-java11-20.2.0-dev/Contents/Home

  • export JAVA_HOME=$GRAALVM_HOME

  • git clone https://github.com/m3hdi652/java-ios.git && cd java-ios/HelloJava

  • Using Maven:

    mvn client:build

  • If the compilation is successful, HelloJava will appear in dist folder

  • You can fake-sign the binary by using ldid:

    brew install ldid
    ldid -S HelloJava

  • You also can codesign the binary, if you have a free or paid developer account:

    Get your identity by security find-identity -p codesigning -v
    e.g:

    1. 2CD708151B6469F3D4B0F05F48338B81F1809C82 "Apple Development: [email protected] (5J8I29WF1D)"
      1 valid identities found

    codesign -fs "Apple Development: [email protected] (5J8I29WF1D)" /path/to/binary

Credits/Sources

Read LICENSE

https://github.com/graalvm/graalvm-ce-dev-builds
https://github.com/gluonhq
https://github.com/gluonhq/client-samples
https://github.com/gluonhq/substrate

Releases

No releases published

Packages

No packages published

Languages