我的 Swift 应用中的链接器命令失败,退出代码为 1

Linker command failed with exit code 1 on my Swift app

想不通。尝试制作一个全新的项目,但仍然无法正常工作。这个应用程序使用谷歌地图。错误如下:

Undefined symbols for architecture i386:
"_CBAdvertisementDataManufacturerDataKey", referenced from: -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o) "_CBAdvertisementDataServiceDataKey", referenced from: -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o)
"_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from: -[GMSx_PEBeaconScanner scanIfAppropriate] in GoogleMaps(PEBeaconScanner.o) "_OBJC_CLASS_$_CBCentralManager", referenced from: objc-class-ref in GoogleMaps(PEBeaconScanner.o) "_OBJC_CLASS_$_CBUUID", referenced from: objc-class-ref in GoogleMaps(PEBeacon.o) objc-class-ref in GoogleMaps(PEBeaconScanner.o) "_vImageBoxConvolve_Planar8", referenced from: (anonymous namespace)::CreateBlurredImage(CGImage*, float, float) in GoogleMaps(GLWaterGroup.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

尝试导入 CoreBluetooth.framework 和 Accelerate.framework。在 "Other Linker Flags".

下也使用“-ObjC”代替“-all_load”

可以参考colink在GoogleMapsSDK : Undefined symbols for architecture x86_64

中的回复