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

iOS build fails #3

Closed
ln-12 opened this issue Sep 29, 2020 · 2 comments
Closed

iOS build fails #3

ln-12 opened this issue Sep 29, 2020 · 2 comments
Assignees

Comments

@ln-12
Copy link

ln-12 commented Sep 29, 2020

First of all I wanna state out that the idea behind KMM is awesome! Unfortunately I ran into an issue when trying it out.

Using the final branch, I cannot build the iOS app. After building the project in Android Studio 4.1 RC 3, switching to XCode 12.0 and hitting Product -> Build, I get the error No such module 'shared' inside ContentView.swift. When doing the same on a newly generated KMM application, this works fine. I noticed, that Android Studio does not generate the xcode-frameworks folder, so it's no surprise that XCode can't find it.

Moreover, I cannot run the iOS simulator from Android Studio. The build fails with:

ld: warning: ignoring file /Users/****/kmm/shared/build/xcode-frameworks/shared.framework/shared, building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SharedGreeting", referenced from:
      objc-class-ref in ContentView.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED ** 

Am I missing something?

@rasheedsulayman
Copy link

I am experiencing the same issue.

@KaterinaPetrova
Copy link
Collaborator

Hey, @ln-12! Thanks for reporting the issue. Are you sure that you are using the final branch? This problem may appear on the master branch because on the first step there is no code in iOS source set, so there is no generated .framework file.

And also have you tried to clean the Xcode project or delete the build folder of the KMM shared module? (kmm-networking-and-data-storage/shared/build)?

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

3 participants