[NSBundle bundleForClass:self.class] in framework's file returns app's bundle on Xcode 13

Hi, I have a framework (in form of cocoa pod) which calls in one if its class [NSBundle bundleForClass:self.class]. When I build & run the app locally, everything works as expected, bundle of the framework is being returned. This is not a case when I publish the app to TestFlight where app's bundle is being returned (bundle of the app that uses that framework). This started to happen only after I started using Xcode 13 for archiving, before on Xcode 12 everything worked fine (bundle of the the framework was returned). Wanted to ask if this is an expected behaviour when using Xcode 13? Why the behaviour is different for running app locally and the app archived and published on TestFlight? Thanks for your help! Robert

[NSBundle bundleForClass:self.class] in framework's file returns app's bundle on Xcode 13
 
 
Q