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

No such module 'RealmSwift' - Error on Sonoma (14.2.1) - Xcode 15.1 #8449

Closed
Madhivanan opened this issue Jan 4, 2024 · 4 comments
Closed

Comments

@Madhivanan
Copy link

Madhivanan commented Jan 4, 2024

How frequently does the bug occur?

Always

Description

I added dependencies using the package manager for RealmSwift. then, when I import "RealmSwift," a compiler error message such as "No such module 'RealmSwift'" appears.

Xcode version - 15.1
Mac - 14.2.1

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

10.45.2

What Atlas Services are you using?

Both Atlas Device Sync and Atlas App Services

Are you using encryption?

No

Platform OS and version(s)

iOS

Build environment

Xcode version: 15.1
Dependency manager and version: ...

@Madhivanan Madhivanan changed the title iOS - No such module 'RealmSwift' - SPM No such module 'Realm' - Error on Sonoma (14.2.1) - Xcode 15.1 Jan 4, 2024
@Madhivanan Madhivanan changed the title No such module 'Realm' - Error on Sonoma (14.2.1) - Xcode 15.1 No such module 'RealmSwift' - Error on Sonoma (14.2.1) - Xcode 15.1 Jan 4, 2024
@Jaycyn
Copy link

Jaycyn commented Jan 4, 2024

I am running the exact same configuration and it worked for me with no issues.

Don't forget then when using SPM, there are two libraries that need to be added: Realm and RealmSwift which will be found at this repository https://github.com/realm/realm-swift.git when you are searching for packages

Also be sure to set the Dependency Rules to Up to Next Major Version and in the first field use the current version 10.45.2

@Madhivanan
Copy link
Author

But my end this problem is occur
Screenshot 2024-01-05 at 3 00 55 PM

@bahrulhalimi
Copy link

Any other solution for this problem? Problem occur but case closed(?)

@Jaycyn
Copy link

Jaycyn commented Feb 27, 2024

@bahrulhalimi

I just now created a new iOS Project, selected Swift and Storyboard and then followed the exact instructions here Install the SDK for iOS, macOS, tvOS, and watchOS. Then built the project (Command-B)

It worked perfectly. I am on macOS Sonoma 14.2.1 and XCode 15.2

The only difference I see in your setup is the packages shown in your screen shot are older. (10.45 vs my 10.47). That may indicate you didn't do this part

Specify Options
In the options for the realm-swift package, we recommend setting the Dependency Rule to Up to Next Major Version, and enter the current Realm Swift SDK version. Then, click Add Package.

Realm_Install

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants