Realm-cocoa: Support Xcode 9 beta 3

Created on 10 Jul 2017  Â·  7Comments  Â·  Source: realm/realm-cocoa

A project with a RealmSwift 2.8.3 dependency won't compile in Xcode 9 Beta 3

Goals

Compile a project containing RealmSwift

Expected Results

Succesful compilation

Actual Results

Compilation fails

Steps to Reproduce

Create a new project.
Install Realm via CocoPods
Build

Code Sample

No code needed. An empty project containing only Realm and RealmSwift versions 2.8.3, won't compile because line 226 of RealmConfiguration.swift returns an error "Generic Parameter 'U' could not be inferred"

Version of Realm and Tooling

Realm framework version: ? 2.8.3

Realm Object Server version: ?

Xcode version: ? 9 beta 3

iOS/OSX version: ? iOS 11

Dependency manager + version: ? CocaPods 1.2.1

T-Enhancement

Most helpful comment

Addressed in #5107 and #5109.

All 7 comments

Can confirm this is a problem when building with Swift 4 and Xcode 9 beta 3 and using CocoaPods.

Thanks for your patience as we update Realm Objective-C and Realm Swift to support Xcode 9 beta 3, released this morning.

No worries. It’s a beta. Just wanted you to be aware.

On Mon, Jul 10, 2017 at 1:09 PM JP Simard notifications@github.com wrote:

Thanks for your patience as we update Realm Objective-C and Realm Swift to
support Xcode 9 beta 3, released this morning.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/realm/realm-cocoa/issues/5105#issuecomment-314221583,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AER0TDeSAEcI3bB3c7kpWg3ob34hfP5Sks5sMoUQgaJpZM4OTQXi
.

Addressed in #5107 and #5109.

Well that error went away, however, now getting a few others ones.

// LinkingObjects.swift:109:16: Use of unresolved identifier 'RLMDescriptionWithMaxDepth'
return RLMDescriptionWithMaxDepth("LinkingObjects<\(rlmResults.objectClassName)>", rlmResults, RLMDescriptionMaxDepth)

// RealmSwift/List.swift:35:16: Use of unresolved identifier 'RLMDescriptionWithMaxDepth'
return RLMDescriptionWithMaxDepth("List<\(_rlmArray.objectClassName)>", _rlmArray, depth)

// RealmSwift/Object.swift:101:43: Type 'RLMSchema' has no member 'partialPrivateShared'
super.init(value: value, schema: .partialPrivateShared())

// RealmSwift/Results.swift:84:16: Use of unresolved identifier 'RLMDescriptionWithMaxDepth'
return RLMDescriptionWithMaxDepth("Results<\(rlmResults.objectClassName)>", rlmResults, RLMDescriptionMaxDepth)

// RealmSwift/Sync.swift:128:16: Value of type 'NSError' has no member '__rlmSync_deleteRealmBlock'
return _nsError.__rlmSync_deleteRealmBlock()

Wasn't sure if I should open a new issue or just update this one, just wanted you guys to be aware of this.

Are you using CocoaPods, and are you pointing both the Realm and RealmSwift pods to master? Looks like your Realm pod is out of date but you're using the latest RealmSwift pod...

You were correct, my mistake!

I hadn't added the Realm pod to my podfile after pointing RealmSwift to master

Adding Realm as a pod fixed it

  pod 'Realm',      :git => "https://github.com/realm/realm-cocoa.git", 
                    :branch => "master", 
                    :submodules => true
Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheHmmka picture TheHmmka  Â·  3Comments

dennisgec picture dennisgec  Â·  3Comments

dmorrow picture dmorrow  Â·  3Comments

jpsim picture jpsim  Â·  3Comments

menhui222 picture menhui222  Â·  3Comments