Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode keep using old framework version

From the beginning of my project, I use a custom framework, let's call it "custom.framework". But there was a bug in this framework and now I want to use another version of the "custom.framework".

At first, I simply removed the "custom.framework" file from my project and added the new one. But nothing changed, the bug was still there.

After multiple tries and hours, I understood that Xcode add the old version in memory and used this one instead of the new version. I know it because in the new version I added a method and when I cmd+click the class I've add the method into, it's not there and the file's path is unavailable.

Searching through the web, I tried to change some version parameters to my framework projects: Compatibility version, Curent Library version, Framework version. But this didn't change anything to Xcode which keeps using the old version.

I also tried to make the framework's project as a sub-project and add resulting framework as a dependency to my target. It worked well, but as the framework's project is on a separated remote git repository, I don't think this is an acceptable solution.

So my last try was to build a "custom2.framework", to force Xcode to use the real file and not some cached version. But again, it doesn't work and when building I get errors telling me that all my classes in custom2.framework are duplicated symbols of its cached version of "custom.framework".

So my question is simple: how can I finally tell Xcode to deleted its cached old version and let me use the file I gave him? I already tried to delete my project's derivedData but it seems cached frameworks aren't there.... I'm so desperate :(

Edit: Here are 2 screenshots to illustrate the issue

First screenshot is the path as shown by Xcode when I opened the file from the .framework object in the project navigator. From project navigator

Second screenshot is the path as shown by Xcode when I opened the file from a cmd+click to a "DCEquipmentManager" in code. enter image description here

As you can see, the framework linked with the code is not the framework in the project.

like image 913
Imotep Avatar asked Mar 17 '26 23:03

Imotep


1 Answers

it seems problem with binding in new framework, your project still linked with old framework files. try to remove all files and folder related to your "custom.framework and also remove path for that framework from project setting--> build setting --> search Path

Then after Drag and Drop Your "custom.framework" files in project.

it works for me.hope it resolve your problem.

like image 97
sp309 Avatar answered Mar 20 '26 12:03

sp309



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!