I have trouble compiling My app (Xcode app project) when my framework (Xcode framework project) is linked and files are added to the framework (not used in the app).
What I did:
- Create folder MyProject
- Create Xcode single view project (MyApp project) -> output of this is a folder MyApp inside MyProject folder containing all the data
- Create Xcode framework project (MyFramework project) -> output of this is a folder MyFramework inside MyProject folder containing all the data
- Create workspace and import both projects into the workspace -> output of this is file .xcworkspace in the folder MyProject
So, after this I have hierarchy:
->MyProject
--->MyApp
--->MyFramework
--->MyWorkspace.xcworkspace
Then in General tab of MyApp project I've added in Embedded Binaries my framework. This linked my framework with my app and when I compiled it my app started fine on the phone.
After that I've added one Objective-C .h/.m pair of classes to the framework, added them to the framework target (compiled sources has .m file, header file is selected as public).
When I try to compile and run the app one more time on the device, I get the error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_UNIRest", referenced from:
objc-class-ref in TMSCommunicationManager.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)