Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined symbol error when accessing proxy classes in Swift #538

Open
asdafa3 opened this issue May 17, 2023 · 1 comment
Open

Undefined symbol error when accessing proxy classes in Swift #538

asdafa3 opened this issue May 17, 2023 · 1 comment

Comments

@asdafa3
Copy link

asdafa3 commented May 17, 2023

Description

We added support for the Mapsforge binary file format to the Carto SDK and implemented it successfully. Initially, we integrated the implementation in the core project for testing purposes. Now, we are in the process of moving the codebase to a fork of the libs-carto repository. We would ultimately like to contribute the changes to the CartoMobileSDK repository.

We are building the SDK as xcframework and framework using Xcode 14.3, and it builds without any issues. The build script and CMakeLists.txt are identical to the latest master, with the exception of the necessary changes to include the library, which is also built correctly.

However, when using the Objective-C proxy classes in Swift, we encounter errors like the following:

Undefined symbol: carto::Way::getTags() const

These errors occur only when we actually access the proxy classes. Importing the CartoMobileSDK alone builds the test app successfully.

We assume that the swig interface we created broke, although there shouldn't be any changes cause compared to the previous working version only the path of the header files has changed because of the outsourcing to the library.

Do you have any guess where the root of the issue could be or any tips to debug it?

Additional Information

  • Carto SDK version: latest master
  • Xcode version: 14.3
  • Build script and CMakeLists.txt: Identical to the latest master, with necessary changes to include the library
  • The CartoMobileSDK is successfully imported and builds the test app without errors when imported alone.

Please let me know if you need any further information to address this issue.

@mtehver
Copy link
Contributor

mtehver commented May 20, 2023

Hi. Sounds interesting. I remember I briefly looked into Mapsforge vector tiles a while ago and it seemed pretty different from Mapbox approach. I guess the implementation is far from trivial.

Regarding the issue, I suggest to check that:

  1. wrappers definitions are added under 'all/modules'
  2. references to generated classes are included in 'ios/objc/CartoMobileSDK.h'

If you have successfully built your library for Android and the issue is related to iOS only, then I think the second one is highly likely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants