Closed ukushu closed 5 months ago
➤ PM Bot commented:
Jira ticket: RCOCOA-2371
That's an odd error. I attempted to duplicate the issue by following the steps outlined in the question.
- create "Library" project and add package RealmSwift
- create app for macOS and add library from prev step to this app
We followed the Realm Installation instructions for SPM, ensuring we selected the correct package dependences when adding the Realm libraries.
Changed in version 10.49.3: Instead of adding both, only add one package.
Select either RealmSwift or Realm, then click Add Package.
If you use Swift or Swift and Objective-C APIs, add RealmSwift.
If you use only Objective-C APIs, add Realm.
Then, following the steps:
1) Create a Library project and added a package - we did this twice, one adding Realm Dependency (Objc) an one with RealmSwift Dependency
2) Created a macOS app and added the library from step 1 (we tried both Swift and ObjC)
We could not replicate that error in any of the cases we tried.
I am pretty sure there's nothing in Realm that references CoreAudioTypes
The error is due possibly to an import
in your project, or even a podfile. My guess though it's part of or accessed via another library - for example: AsyncNinja
FileBo
and I seem to remember this popping up with Unity
. If you're manually including the CoreAudioTypes
framework - there was a known issue with XCode 15 on that one
Because CoreAudioTypes is default Framework for iOS, so you don't need import it into your project.
So any other library that has not been updated to NOT include it may be the culprit.
This may be caused by the automatic schema discoverability functionality that Realm has. Can you try to explicitly specify the objectTypes
on the configuration you use to open the Realm with?
At the moment no,
maybe in few days I will try to reproduce the issue with environment that I will have ability to give you :)
I've seen this in our codebase and thought nothing of it, but while trying to diagnose an issue with the 10.50.1 upgrade, I get this output.
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_RLMNotificationToken", referenced from:
in RealmListExtensions.o
"_OBJC_CLASS_$_RLMObjectBase", referenced from:
in Assessments.o
"_OBJC_CLASS_$_RealmSwiftEmbeddedObject", referenced from:
full type metadata for App.Permissions in Permission.o
full type metadata for App.ListEntryCollection in ListEntryCollection.o
full type metadata for App.ListEntryValue in ListEntryCollection.o
full type metadata for App.ListEntryMedication in ListEntryCollection.o
full type metadata for App.ListEntryState in ListEntryCollection.o
full type metadata for App.ListEntryLocation in ListEntryCollection.o
full type metadata for App.ListEntryMetadata in ListEntryCollection.o
...
"_OBJC_CLASS_$_RealmSwiftObject", referenced from:
full type metadata for App.PermissionsRecord in Permission.o
full type metadata for App.PersistableSettings in PersistableSettings.o
full type metadata for App.PersistableUser in PersistableUser.o
full type metadata for App.PersistableConfigBundle in PersistableConfigBundle.o
full type metadata for App.Record in Record.o
full type metadata for App.PersistableCreateRecordResponse in Record.o
full type metadata for App.VitalEntry in VitalEntry.o
...
"_OBJC_METACLASS_$_RealmSwiftEmbeddedObject", referenced from:
_OBJC_METACLASS_$__TtC3EHR11Permissions in Permission.o
_OBJC_METACLASS_$__TtC3EHR19ListEntryCollection in ListEntryCollection.o
_OBJC_METACLASS_$__TtC3EHR14ListEntryValue in ListEntryCollection.o
_OBJC_METACLASS_$__TtC3EHR19ListEntryMedication in ListEntryCollection.o
_OBJC_METACLASS_$__TtC3EHR14ListEntryState in ListEntryCollection.o
_OBJC_METACLASS_$__TtC3EHR17ListEntryLocation in ListEntryCollection.o
_OBJC_METACLASS_$__TtC3EHR17ListEntryMetadata in ListEntryCollection.o
...
"_OBJC_METACLASS_$_RealmSwiftObject", referenced from:
_OBJC_METACLASS_$__TtC3EHR17PermissionsRecord in Permission.o
_OBJC_METACLASS_$__TtC3EHR19PersistableSettings in PersistableSettings.o
_OBJC_METACLASS_$__TtC3EHR15PersistableUser in PersistableUser.o
_OBJC_METACLASS_$__TtC3EHR23PersistableConfigBundle in PersistableConfigBundle.o
_OBJC_METACLASS_$__TtC3EHR6Record in Record.o
_OBJC_METACLASS_$__TtC3EHR31PersistableCreateRecordResponse in Record.o
_OBJC_METACLASS_$__TtC3EHR10VitalEntry in VitalEntry.o
...
"_RLMRealmPathForFile", referenced from:
default argument 0 of RealmSwift.Realm.Configuration.init(fileURL: Foundation.URL?, inMemoryIdentifier: Swift.String?, syncConfiguration: RealmSwift.SyncConfiguration?, encryptionKey: Foundation.Data?, readOnly: Swift.Bool, schemaVersion: Swift.UInt64, migrationBlock: ((__C.RLMMigration, Swift.UInt64) -> ())?, deleteRealmIfMigrationNeeded: Swift.Bool, shouldCompactOnLaunch: ((Swift.Int, Swift.Int) -> Swift.Bool)?, objectTypes: [__C.RLMObjectBase.Type]?, seedFilePath: Foundation.URL?) -> RealmSwift.Realm.Configuration in RealmProvider.o
ld: symbol(s) not found for architecture arm64
I can't get a sample project together easily at the moment to help with this, but I expect our project setup is to blame for why adopting anything new since Realm enabled dynamic frameworks.
Ah wait, that CoreAudioTypes seems to be a red herring - that's just a warning that appears above the actual error. Are you both of you using SPM to import Realm? Also, @ukushu's error seems to happen on 10.42, which was before we switched to dynamic linking, while @kelvinharron reports this happens with 10.50.1.
That's right @nirinchev , SPM based with Tuist building a project for us. I did see it previously on 10.47.0. Sounds like an issue we can ignore then? as its the timing of when the error is output as part of linking the app target makes it seem realm related.
So the core audio thing seems to be a warning and could be ignored, but the rest of the logs seem to point to a legitimate error. From what I've seen on the internet, those are configuration issues, but there's no obvious common cause and different reports have had different resolutions. I'd recommend either trying to reproduce it so we can take a look or trying to see if any of the solutions reported on SO/other github projects are applicable for you.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
@ukushu did you finde a workaround we have the same issue with Tuist ? For us it stopped to work after 10.46.0 release
@ukushu did you finde a workaround we have the same issue with Tuist ? For us it stopped to work after 10.46.0 release
I am also using Tuist and the problem was solved by connecting realm as .staticFramework
I am using Tuist V4. Realm 10.45.2 works fine for me. V10.52.2 is throwing the same error for me.
For Tuist users: I am using Tuist 4.24.0 and Realm version 10.52.3.
I added both RealmSwift
and Realm
as dependency and use product type .framework
, then the error is gone for me.
How frequently does the bug occur?
Always
Description
Steps to reproduce:
Error: "Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found" error shown.
Reason shown: CoreAudioTypes is default Framework for iOS
Why you even attached AUDIO framework to Realm? Is it so necessary?
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
10.42.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
macOS
Build environment
Xcode version: Version 15.1 (15C65)