Skip to content

Commit

Permalink
added TOC and Sources section
Browse files Browse the repository at this point in the history
  • Loading branch information
aesilevich committed Feb 23, 2024
1 parent 03d25e9 commit 99e8a3b
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions docs/getStarted.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@
<p id="navbar__list">
<a href="#prerequisites" class="menu-items tree-items current"><span class="current-dot"></span>Prerequisites</a><br>
<a href="#install" class="menu-items tree-items"><span class="current-dot"></span>Install</a><br>
<a href="#helloWorld" class="menu-items tree-items"><span class="current-dot"></span>Hello World</a><br>
<a href="#goFurther" class="menu-items tree-items"><span class="current-dot"></span>Go Further</a><br>
<a href="#android-project" class="menu-items tree-items"><span class="current-dot"></span>Android Project</a><br>
<a href="#spm-project" class="menu-items tree-items"><span class="current-dot"></span>SPM Project</a><br>
<a href="#configure-gradle" class="menu-items tree-items"><span class="current-dot"></span>Configure Gradle</a><br>
<a href="#initialize-swift" class="menu-items tree-items"><span class="current-dot"></span>Initialize Swift</a><br>
<a href="#declare-native-methods" class="menu-items tree-items"><span class="current-dot"></span>Declare JNI</a><br>
<a href="#implement-native-methods" class="menu-items tree-items"><span class="current-dot"></span>Implement JNI</a><br>
<a href="#run-app" class="menu-items tree-items"><span class="current-dot"></span>Run App</a><br>
<a href="#sources" class="menu-items tree-items"><span class="current-dot"></span>Sources</a><br>
<a href="#articles" class="menu-items tree-items"><span class="current-dot"></span>Articles</a><br>
</p>
</div>
</div>
Expand Down Expand Up @@ -83,7 +90,7 @@ <h4>For Linux</h4>
<p>Currently Swift for Android is available for macOS only. It will be available for Linux very soon.</p>
</div>

<div id="helloWorld" class="sec">
<div id="android-project" class="sec">
<h3>Create new Android project</h3>
<ol class="dots no-padding-list">
<li class="inter-regular">Open Android Studio.</li>
Expand All @@ -100,7 +107,9 @@ <h3>Create new Android project</h3>
<li class="inter-regular">Provide project details such as name (e.g., <code>SwiftAndroidExample</code>) and package name (e.g., <code>com.example.swiftandroidexample</code>).</li>
<li class="inter-regular">Click "Next" to proceed.</li>
</ol>
</div>

<div id="spm-project" class="sec">
<h3>Create Swift Package Manager (SPM) Project</h3>

<ol class="dots no-padding-list">
Expand Down Expand Up @@ -149,7 +158,9 @@ <h3>Create Swift Package Manager (SPM) Project</h3>


<img src="img/code_example.jpg" alt="">
</div>

<div id="configure-gradle" class="sec">
<h3>Configure Swift SPM project in build.gradle</h3>

<p>
Expand Down Expand Up @@ -212,7 +223,9 @@ <h3>Configure Swift SPM project in build.gradle</h3>
</div>
</li>
</ol>
</div>

<div id="initialize-swift" class="sec">
<h3>Initialize Swift Runtime and Load Swift Library</h3>

<p>
Expand Down Expand Up @@ -242,7 +255,9 @@ <h3>Initialize Swift Runtime and Load Swift Library</h3>
}
</code></pre>
</div>
</div>

<div id="declare-native-methods" class="sec">
<h3>Declare and call native Swift methods in Java</h3>

<ol class="dots no-padding-list">
Expand Down Expand Up @@ -297,7 +312,9 @@ <h3>Declare and call native Swift methods in Java</h3>

</li>
</ol>
</div>

<div id="implement-native-methods" class="sec">
<h3>Implement native Java methods in Swift</h3>
<p>
Add the following code in the <code>SwiftAndroidExample.swift</code> source
Expand Down Expand Up @@ -327,7 +344,9 @@ <h3>Implement native Java methods in Swift</h3>
attribute to set correct name for the method implementation. It creates a new Java
string containing the message <code>"Swift Hello World!"</code> and returns it to the caller.
</p>
</div>

<div id="run-app" class="sec">
<h3>Run the SwiftAndroidExample application</h3>

<p>
Expand All @@ -338,13 +357,29 @@ <h3>Run the SwiftAndroidExample application</h3>


<img src="img/mobile-code-example.png" alt="" class="mobile-code-example">
</div>

<div id="sources" class="sec">
<h3>Sources</h3>

<p class="bottom-border null-margin">Source Code: Please find the source code of Hello World App(Swift for Android) <a href="https://github.com/scade-platform/FusionExamples/tree/main/swift-for-android-hello-world-main">here</a></p>
<ol type="1" class="no-padding-list">
<li>
Complete source code of the example application:<br>
<a href="https://github.com/scade-platform/FusionExamples/tree/main/swift-for-android-hello-world-main">https://github.com/scade-platform/FusionExamples/tree/main/swift-for-android-hello-world-main</a>
</li>
<li>
Github repository with all Swift Android Toolchain releases:<br>
<a href="https://github.com/scade-platform/swift-android-toolchain/releases">https://github.com/scade-platform/swift-android-toolchain/releases</a>
</li>
<li>
Detailed article about using Swift on Android:<br>
<a href="https://medium.com/@SCADE/using-swift-pm-libraries-in-the-android-studio-projects-7cef47c300bf">https://medium.com/@SCADE/using-swift-pm-libraries-in-the-android-studio-projects-7cef47c300bf</a>
</li>
</ol>
</div>

<div id="goFurther" class="sec">
<!-- <div id="goFurther" class="content-div">-->
<h2>Go Further</h2>
<div id="articles" class="sec">
<h3>Additional Articles</h3>
<p>Ready to dive deeper? Here are some hand-picked resources covering various Swift features.</p>

<div class="container">
Expand Down

0 comments on commit 99e8a3b

Please sign in to comment.