Reputation: 3711
The error that Im running into is Undefined symbols for architecture arm64:
. Below I have provided more in-depth screenshots. The source of the error according to Xcode is within the watchKit extension within the interfaceController. The Class is referenced from a dynamic library. If I actually CMD+Click the framework that Im importing Im taken to the framework in Swift thats fully ported over to Swift, it is originally written in Objective-C. The second image shows my import statement for the class, and the 3rd image shows how I have setup the import statements within the .h of the framework file.
Upvotes: 4
Views: 1217
Reputation: 7553
On the right sidebar when those files are selected, under Target Membership
, is your app (with the little pencil icon) checked as a Target Membership?
That should fix your problem.
Upvotes: 5
Reputation: 2897
It's look like dynamic library doesn't have arm64 architecture is it. In order to verify please use following command against the static library of your dynamic library.
lipo -info <libraryName>.a
Please make sure that library is added into extension target.
If your library is not static library, and it is framework like .framework, please follow following step. 1. Go to framework using cd command
cd /Users/<User>/<Path>/<Library_Name>.framework
2. Use ls command and list out all the files within framework file. You will see three files named as "Library_Name, Headers and Versions". 3. Use following command to display all architecture that library has.
lipo -info <Library_Name>
4. You can see list of all architecture that library was build for.
Upvotes: 1