Symbol not found linker error unless project is cleaned first

I'm using the official Dropbox Objective C framework within an Xcode Objective C iOS project. If I clean and rebuild the project, I have no problems running the app. If I then rebuild and run, I get a linker error:

dyld[12193]: Symbol not found: _OBJC_CLASS_$_DBScopeRequest
  Referenced from: <A3ABDE7A-6441-3771-9061-F2CC46FEEBF3> /private/var/containers/Bundle/Application/30EC2350-4AE3-4194-9F0C-B5087FEDB042/AppName.app/AppName
  Expected in:     <163AA2D6-A97B-396E-8300-E44FA89645D8> /private/var/containers/Bundle/Application/30EC2350-4AE3-4194-9F0C-B5087FEDB042/AppName.app/Frameworks/ObjectiveDropboxOfficial.framework/ObjectiveDropboxOfficial

I can then clean and build and run again successfully. So it sort of works, but having to clean and build every single time is very inefficient.

It doesn't seem to be a problem inherent to the Dropbox framework. I've tried the usual debugging steps such as deleting the derived data folder, restarting Xcode, etc.

I'm not sure what the problem was, but I eliminated it by reverting to an older project file, making my recent changes again, and using a .framework and not .xcframework. I'm not sure if the last one was necessary or not.

Symbol not found linker error unless project is cleaned first
 
 
Q