From 9893951d9f0665d936933f5c81be07eb9c28932c Mon Sep 17 00:00:00 2001 From: SvyatoslavScherbina Date: Wed, 6 Dec 2017 16:49:11 +0300 Subject: [PATCH] Add README.md to 'calculator' sample (#1115) --- samples/calculator/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 samples/calculator/README.md diff --git a/samples/calculator/README.md b/samples/calculator/README.md new file mode 100644 index 00000000000..10310d9444d --- /dev/null +++ b/samples/calculator/README.md @@ -0,0 +1,27 @@ +# iOS calculator sample + +This example shows how to use Kotlin library compiled to framework from +an existing iOS project (e.g. written in Swift or Objective-C). + +To build and run the sample do the following: + +1. Open `samples/calculator/calculator.xcodeproj` with Xcode. +2. Open the project's target through project navigator, go to tab 'General'. + In 'Identity' section change the bundle ID to the unique string in + reverse-DNS format. Then select the team in 'Signing' section. + + See the + [Xcode documentation](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html#//apple_ref/doc/uid/TP40012582-CH28-SW2) + for more info. +3. Now build and run the application on a connected iPhone with Xcode. + +The sample consists of: + +1. Xcode iOS application project, written in Swift. It uses Kotlin library to + parse simple arithmetic expressions. +2. Kotlin library source code and build script. It is built into Objective-C + framework by invoking Gradle from custom "Run Script" build phase, and this + framework is imported into the Xcode project. + + The library can also be compiled to a `.jar` by Kotlin/JVM compiler with + Gradle.