# How to build ## Minimum Requirements - Xcode 10.1 (Swift 4.2.1) - JDK 1.8 (never use higher jdk versions) Initially, please uncomment `':frontend:ioscombined'` in settings.gradle ``` ':frontend:ioscombined', ``` You need to run the commands below. ``` cd frontend/ios # Install carthage if you haven't installed it yet. # e.g. brew install carthage # Please make sure ruby and bundler are available make init ``` *If you haven't installed Android SDK, then you need to get it. Please visit https://developer.android.com/studio/ and download it. The easist way to install Android Sdk is to install AndroidStudio.* Please make sure `./gradlew :frontend:ioscombined:packForXCode -PXCODE_CONFIGURATION=Debug` is successfuly run. After that, you can open `DroidKaigi 2019.xcworkspace` in Xcode. ## on every checkout Other committer will add/modify/remove dependencies from Gemfile, Podfile and/or Cartfile. Please run the command below to get the latest dependencies of this project. ``` make post_checkout ``` ## Trouble shooting ## The error shows *SDK location not found.* You need to tell Gradle the Android sdk location by the environment vairable *ANDROID_HOME* or *local.properties* file. We strongly recommend you to open the root project on AndroidStudio once. AndroidStudio will generate the suitable local.properties automatically. > *local.properties* is automatically generated by AndroidStudio but its format may be changed in future. So we should not create/modify *local.properties* manually. AndroidStudio might edit it so your build environment would be broken suddenly. If you would like to select the *ANDROID_HOME* variable way, you may be able to use `$HOME/Library/Android/sdk` as the sdk location. It is the default location of Android SDK if you manage sdk by AndroidStudio. Otherwise, it depends on your environment. ## No such module xxxxxxx Please open `DroidKaigi 2019.xcworkspace` instead of `DroidKaigi 2019.xcodeproj` in Xcode. ## java.lang.UnsupportedClassVersionError: org/jetbrains/kotlin/lexer/KotlinLexer Maybe you use an older version of JDK. [Update JDK](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) on your computer and try building again. ## Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory() If you get errors like below when running gradle stuff, please try to switch jdk to 1.8. This bug may be based on Java 10 or higher. e.g. Run `export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)` ``` * What went wrong: Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory(). > Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy(). ```