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?

It appears that, starting in April, Apple will require that Xcode 14.2 be used. I shifted down to 14.0 to avoid the problem above, but today I went back to Xcode 14.2 and using the master branch for RealmSwift. I am still having the undefined symbols problem. Does this problem still exist?

And I don’t understand what this has to do with fbsymbols.

(later) I had been using the default Xcode package specification, but it gets me 10.28. for Realm. I’m now specifying 10.37.0 explicitly and so far it is going better. It did upload to the App Store without error, though I haven’t done any real testing of my app yet.

So is that the solution? And, if so, why did I need to specify it explicitly to Xcode? Should I have specified it some other way to Xcode packages?