Trouble archiving because of undefined Realm/RealmSwift symbols

I hadn’t archived my RealmSwift project in a few months, but now I need to do it to make a TestFlight version. Usually this goes smoothly, but this time at the end of the archive operation it finds two symbols referenced in several of my files. I’ve tried on both an M1 Mac and and Intel Mac, since one reference on Stack Overflow said it could be an M1 issue. The problem looks like this:

Undefined symbols for architecture arm64:
  "_$s10RealmSwift0A14CollectionImplPAAE12makeIteratorAA11RLMIteratorVy7ElementQzGyF", referenced from:
      _$s4SAMI24SingleSelectionViewModelC8makeRowsyyF in SingleSelectionView.o
      _$s4SAMI8ThingExpC10dumpStatusyS2SFZTf4nd_n in ThingExp.o
      _$s4SAMI12LeadSheet0DBC12lookupByNameySayACGSSFZTf4nd_n in LeadSheet0DB.o
      _$s4SAMI10SongTextDBC12lookupByNameySayACGSSFZTf4nd_n in SongTextDB.o
      _$s4SAMI20PerformanceViewModelC12makeRowInfos6parentSayAA0bF4InfoVGAC_tFTf4dd_n in PerformanceView.o
      _$s4SAMI32RhythmPlayerFabricationViewModelC8makeRowsyyAA0bC4TypeOF in RhythmPlayerFabricationView.o
      _$s4SAMI25LinearLocalThingViewModelC12makeRowInfos6parentSayAA0bdH4InfoVGAC_tFTf4dn_n in LinearLocalThingView.o
      ...
  "_$s10RealmSwift7ResultsVyxGAA0A14CollectionImplAAMc", referenced from:
      _$s4SAMI24SingleSelectionViewModelC8makeRowsyyF in SingleSelectionView.o
      _$s4SAMI8ThingExpC10dumpStatusyS2SFZTf4nd_n in ThingExp.o
      _$s4SAMI12LeadSheet0DBC12lookupByNameySayACGSSFZTf4nd_n in LeadSheet0DB.o
      _$s4SAMI10SongTextDBC12lookupByNameySayACGSSFZTf4nd_n in SongTextDB.o
      _$s4SAMI20PerformanceViewModelC12makeRowInfos6parentSayAA0bF4InfoVGAC_tFTf4dd_n in PerformanceView.o
      _$s4SAMI32RhythmPlayerFabricationViewModelC8makeRowsyyAA0bC4TypeOF in RhythmPlayerFabricationView.o
      _$s4SAMI25LinearLocalThingViewModelC12makeRowInfos6parentSayAA0bdH4InfoVGAC_tFTf4dn_n in LinearLocalThingView.o
      ...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks,
Bruce

Some place on StackOverflow, someone said they had got around this problem by reverting to the 14.0.1 Xcode. I had been using Xcode 14.2, but this solution worked for me. In the long run, I suppose either Realm or Apple has something to fix.

So now I’m having the problem with the unsupported authentication call “authenticationDid…”, but that’s covered elsewhere, so I don’t mean to be worrying about it here. Even with that error, I’m getting a build that is at least good enough for TestFlight and that’s all I need at the moment.

Can I use fbsymbols instead of this code?

I have read article on it, you can get better guidance.