Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS / Swift: Imported .framework is incomplete or showing wrong classes

Tags:

xcode

ios

swift

This is a really odd problem so I will try to explain the best I can. I have a .framework which I added to my project as an "Embedded Binary" in Xcode:

enter image description here

Then I import it in my Controller like this:

import FrameworkName

This works fine when I import it in a new project. I can access all it's classes and functions. For some reason, when I import it in an existing project I'm working on, it only shows the first 16 lines of code in the header file and I cannot access any of the functions in it. Is there any configuration in Xcode that might be blocking this .framework?

I hope this question made sense. Please let me know if you need me to post anything else regarding my project. I really appreciate your help.

like image 255
MVZ Avatar asked Aug 30 '15 04:08

MVZ


1 Answers

Well it appears that the answers is pretty simple. The FrameworkName.framework has to be named differently that your project.

For example: if the app is named StackOverflow and you try to import a StackOverflow.framework, your project is going to ignore the later. I had to go back to the framework's project and rename the entire thing in order for it to work. Vice versa should work also.

like image 136
MVZ Avatar answered Oct 05 '22 23:10

MVZ