Skip to content

Unable to use Swift function that returns String on Java side #216

Open
@dieter115

Description

@dieter115

I'm using jextract-swift to create Java Classes for the Sources/MySwiftLibrary/SwiftKitSamleApp for the sample SwiftKitSampleApp.

I created the following function just to test something in HelloJava2Swift.swift

public func retrieveToken() -> String {
  return "test"
}

But when I try to do the following in MySwiftLibraryTest.java

@Test
    void call_retrieveToken() {
        MySwiftLibrary.retrieveToken();
        assertNotNull(MySwiftLibrary.retrieveToken$address());
    }

It gives the following error

Image

I'm probably forgetting something important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions