Skip to content

Commit 4d81a1b

Browse files
ktosomadsodgaard
andauthored
Apply suggestions from code review
Co-authored-by: Mads Odgaard <mads@madsodgaard.com>
1 parent 165b447 commit 4d81a1b

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

hello-swift-java/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,21 @@ We encourage exploring `swift-java` by writing Swift code to the file `hello-swi
9595

9696
Once the `hashing-app` build completes, the newly generated Java code will be available to use in the Android project.
9797

98-
While exploring, some errors might occur. Following is a list of errors and how to troubleshoot them.
99-
>⚠️⚠️ These are temporary and will not be required once the gradle plugin is automated ⚠️⚠️
98+
## Troubleshooting
99+
100+
> Most of these issues are temporary and will be resolved in the future as the swift-java project matures and automates more of the build steps.
101+
100102

101103
___
102-
### Swift/Java not available for use once Android build completes:
104+
### New Swift Code is not available in Java once Android build completes:
103105
If after adding new code to `SwiftHashing.swift` the same is not available on Android after a build, please delete the swift `.build` folder located at `hello-swift-java/hashing-lib/.build` (Attention to the dot before the folder name `.build`)
104106

105-
Build the Android `hashing-app` target again and the code should be avilable.
107+
Build the Android `hashing-app` target again and the Swift API should be available in Java.
108+
If the code is still not available, the `swift-java` project might not support the specific Swift code. Please make sure the feature is listed as supported in the [Supported Features](https://swiftpackageindex.com/swiftlang/swift-java/main/documentation/swiftjavadocumentation/supportedfeatures#JExtract-calling-Swift-from-Java) documentation.
106109

107110
---
108-
### Crash: Library not found
109-
If the code added to `SwiftHashing.swift` introduces a new library dependency, and the app is crashing with the following error:\
111+
#### Crash: Library not found
112+
If the code added to `SwiftHashing.swift` introduces a new library dependency, forexample `import Observation`, and the app crashes with the following error:\
110113
`Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libswiftObservation.so" not found`
111114
1. Locate the file `build.gradle (Module :hello-swift-java-hashing-lib`
112115
2. Locate the defined list of libraries `def swiftRuntimeLibs`

0 commit comments

Comments
 (0)