Using UUIDGenerator causes Linker Error (‘CoreAudioTypes' not found)
nayooti opened this issue · 1 comments
Description
Not sure if this belongs here or is a TCA issue.
Im getting a Linker-Error framework (‘CoreAudioTypes' not found) when importing a framework that uses UUIDGenerator via:
@Dependency(\.uuid) var uuid
Here is a barebones demo project to demonstrate this issue:
https://github.com/nayooti/TCADemo/blob/main/DemoFramework/DemoFramework/DemoView.swift
Summery:
- DemoApp uses DemoFramework
- DemoFeature does compile
- DemoFramework is a TCA module with a
DemoFeature: Reducer
- DemoFeature uses
@Dependency(\.uuid) var uuid
- When building DemoApp I get this error:
Link DemoFramework (arm64):
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
Dependencies.Dependency.wrappedValue.getter : A, referenced from:
DemoFramework.DemoFeature.uuid.getter : Dependencies.UUIDGenerator in DemoView.o
Observations:
- Obviously I am not using CoreAudioTypes anywhere in the project
- When commenting out
@Dependency(\.uuid) var uuid
DemoApp builds without any errors - Also happens to any other framework that uses DemoFramework
Checklist
- I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
- If possible, I've reproduced the issue using the
main
branch of this package. - This issue hasn't been addressed in an existing GitHub issue or discussion.
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Dependencies version information
No response
Destination operating system
No response
Xcode version information
Xcode 15.0
Swift Compiler version information
No response
Hi @nayooti, the project you provided does not have all of the files necessary to compile. It looks like it is missing two projects:
Can you double check that everything is pushed?
Also, I'm quite certain this problem has nothing to do with this library or TCA. There is a similar issue mentioned in Apple's forums here. Most likely you have a linking problem somewhere in your project, and the complaint about "CoreAudioTypes" is just a red herring.
Since I don't think this is an issue with the library I am going to convert it to a discussion. Feel free to follow up with more information.