I have a library with .a format in my objective-c project. and I want to run it in my swift project that already installed cocoapods. my plan is I want to use that .a library and then convert my code to swift in my swift project and if that not possible I will use objective-c again along with swift code in other class. so my problem is I already copy my .a library in Frameworks folder in that generated by pods. but when I build it, it says library not found. maybe because I not declare it in podsfile. but it not pods library, it external library from what I understand. is that any solution of this? because my library is must not available in cocoapods. really appreciate for the answer
CodePudding user response:
Don't put it in the frameworks folder generated by cocoapods. Make a new folder (e.g. libs/) and put it there.
Then:
- Click on your project in the file navigator
- In the main section, click on your target
- Click on the "Build Phases" tab
- In the "Link Binary with Libraries" section, add your
.a
file