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

Include Realm Swift binaries built with Swift 3.0.1 #4255

Closed
sangmin opened this issue Oct 25, 2016 · 17 comments
Closed

Include Realm Swift binaries built with Swift 3.0.1 #4255

sangmin opened this issue Oct 25, 2016 · 17 comments
Assignees

Comments

@sangmin
Copy link

sangmin commented Oct 25, 2016

I have installed Xcode 8.1 GM seed (as 8.0 couldn't install an app on iOS 10.1). Then build fails with the error: Module compiled with Swift 3.0 cannot be imported in Swift 3.0.1

The realm-swift version is 2.0.2. Hope the issue is fixed soon.

We LOVE to help with any issues or bugs you have!

Questions: If you have questions about how to use Realm, ask on
StackOverflow.
We monitor the realm tag.

Feature Request: Just fill in the first two sections below.

Bugs: To help you as fast as possible with an issue please describe your issue
and the steps you have taken to reproduce it in as many details as possible.

Thanks for helping us help you! :-)

Please remove this line and all above before submitting.

Goals

What do you want to achieve?

Expected Results

What did you expected to happen?

Actual Results

What did happened instead?
e.g. the stack trace of a crash

Steps to Reproduce

What are steps we can follow to reproduce this issue?

Code Sample

Provide a code sample or test case that highlights the issue.
If relevant, include your model definitions.
For larger code samples, links to external gists/repositories are preferred.
Alternatively share confidentially via mail to help@realm.io.
Full Xcode projects that we can compile ourselves are ideal!

Version of Realm and Tooling

In the CONTRIBUTING guidelines, you will find a script,
which will help determining these versions.

Realm version: ?

Xcode version: ?

iOS/OSX version: ?

Dependency manager + version: ?

@nixzhu
Copy link

nixzhu commented Oct 25, 2016

Yes, we need a new release.

@ThomasGoujon
Copy link

Hi,
I'm using Carthage and I also had this error. But I make a carthage update and it's works fine.
Maybe it can help.

@bmalbuck
Copy link

Any ETA on a new release to support Xcode 8.1 GM seed and Swift 3.0.1?

@sangmin
Copy link
Author

sangmin commented Oct 25, 2016

@ThomasGoujon I tried Carthage update and now this issue pops up:
:0: error: opening import file for module 'Realm': Permission denied

Do you use Xcode 10.1 GM seed?

@jpsim
Copy link
Contributor

jpsim commented Oct 25, 2016

Hi all, as you may know, Swift's binary compatibility constraints require that all Swift dependencies be compiled with the same version of the Swift compiler, which means that you can't take a binary release we built with Xcode 7.3.1 and Xcode 8.0 from a few weeks ago with a newer version of Xcode (e.g. '8.0 GM').

To avoid needing to wait for us to update our infrastructure to build with fresh releases of Xcode (usually takes a few days), I encourage you to build from source using CocoaPods, Carthage or Xcode subprojects.

That being said, we're in the process of upgrading our infrastructure to build with Xcode 8.1 GM as we speak and should have a release out in the next few days with binaries built with Swift 2.2, 2.3, 3.0 and 3.0.1.

@jpsim jpsim changed the title Swift 3.0.1 issue Include Realm Swift binaries built with Swift 3.0.1 Oct 25, 2016
@jpsim jpsim self-assigned this Oct 25, 2016
@sangmin
Copy link
Author

sangmin commented Oct 25, 2016

Thanks for the update. Meanwhile, I could build realm-cocoa after cloning it and doing these:
git submodule update --init
sh build.sh build

The framework files now work fine.

@bmalbuck
Copy link

Thanks @jpsim @sangmin. I was able to fetch project and run "./build.sh ios-swift". Compiled frameworks Realm.framework and RealmSwift.framework under build/ios/swift-3.0.1 fat binaries. Copied these into my project as embedded frameworks. All good.

@ThomasGoujon
Copy link

ThomasGoujon commented Oct 26, 2016

@sangmin I use Xcode 8.1 GM (Version 8.1 (8T61a))
And try with this Carthage cmd: "carthage update --platform iOS --no-use-binaries"

@AliThink
Copy link

AliThink commented Oct 27, 2016

+1 following

@ghost
Copy link

ghost commented Oct 28, 2016

1+ following

@DavidLari
Copy link

It's out now. 2.0.3.

@jpsim
Copy link
Contributor

jpsim commented Oct 28, 2016

Correct

@cliftonlabrum
Copy link

I've tried doing carthage update --platform iOS --no-use-binaries and have confirmed that my Carthage folder has version 2.0.3 but I still get the error in Xcode. I have also tried replacing it with the pre-built Carthage Realm package. I've tried cleaning the project and restarting Xcode without any luck.

Is there anything else I can try?

@jpsim
Copy link
Contributor

jpsim commented Nov 1, 2016

If you're building Realm with Carthage, make sure you're using the same version of Xcode that's xcode-selected as the GUI version of Xcode you're building your project with.

If you're using Carthage with binaries (carthage update), those binaries were built with Xcode 8.1 GM, so they're only compatible with that version of Xcode.

@sangmin
Copy link
Author

sangmin commented Nov 1, 2016

@cliftonlabrum Just cloning and building realm worked for me.
git submodule update --init
sh build.sh build

@cliftonlabrum
Copy link

@jpsim Thanks. I wonder if the App Store version of Xcode 8.1 (which I have) is different from the 8.1 GM that Realm was built with.
xcode

@DavidLari
Copy link

I have the GM which is also 8B62. What worked for me, per the Realm docs was deleting derived data. From terminal:

rm -rf ~/Library/Developer/Xcode/DerivedData

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 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

8 participants