realm-swift icon indicating copy to clipboard operation
realm-swift copied to clipboard

'RealmSwiftObject' is not a member type of struct 'RealmSwift.Realm'

Open tospery opened this issue 1 year ago • 2 comments

How frequently does the bug occur?

Always

Description

When I make a ObjectMapper+Realm extension libraries, will get a compilation error

Stacktrace & log output

ObjectMapper_Realm.swiftinterface
'RealmSwiftObject' is not a member type of struct 'RealmSwift.Realm'
'RealmSwiftEmbeddedObject' is not a member type of struct 'RealmSwift.Realm'
It should be a problem with xcode, but I still don't know how to solve it. Can I solve it in my demo, thanks.
https://www.mongodb.com/community/forums/t/realm-xcframework-nested-in-another-xcframework-error/208190

Can you reproduce the bug?

Always

Reproduction Steps

run my demo

Version

10.50.0

What Atlas Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

simulator

Build environment

Xcode version: 15.3 added attachment ObjectMapper+Realm.zip

tospery avatar May 13 '24 23:05 tospery

➤ PM Bot commented:

Jira ticket: RCOCOA-2359

sync-by-unito[bot] avatar May 13 '24 23:05 sync-by-unito[bot]

i use this script, bu not working `#!/bin/bash

SEARCH_STRING1="Realm.RealmSwiftObject" REPLACE_STRING1="RealmSwift.Object"

SEARCH_STRING2="Realm.RealmSwiftEmbeddedObject" REPLACE_STRING2="RealmSwift.EmbeddedObject"

SWIFT_INTERFACE_FILES=$(find "$BUILT_PRODUCTS_DIR" -name '*.swiftinterface')

for file in $SWIFT_INTERFACE_FILES; do sed -i '' "s/$SEARCH_STRING1/$REPLACE_STRING1/g" "$file" sed -i '' "s/$SEARCH_STRING2/$REPLACE_STRING2/g" "$file" done`

tospery avatar May 14 '24 11:05 tospery