Undefined symbol: _OBJC_CLASS_$_CMMotionManager

需要导入CoreMotion.framework 框架 在这里插入图片描述

在这里插入图片描述

我的相关博客:
iOS百度地图:手动导入百度步骑行导航的时候,不断报出下面的错误

参考博客:
【IOS问题解决方法】 Showing All Messages 👎 Undefined symbol: OBJC_CLASS$_CMMotionManager

经验教训:
遇到错误要先想想,是你刚才进行了什么操作,加了什么代码导致的,先停下来。为什么从success变成了failed。不要下折腾,导致越弄越多问题

能用cocoapods,就绝不手动导入第三方库

已标记关键词 清除标记
<div><h2>Environment</h2> <p>System: OS: macOS 10.15.6 CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz Memory: 2.05 GB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.4.0 - /usr/local/bin/node Yarn: Not Found npm: 6.14.4 - /usr/local/bin/npm Watchman: Not Found Managers: CocoaPods: 1.9.3 - /Users/username/Software/ruby/bin/pod SDKs: iOS SDK: Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: Not Found IDEs: Android Studio: 4.0 AI-193.6911.18.40.6514223 Xcode: 11.6/11E708 - /usr/bin/xcodebuild Languages: Java: 14.0.1 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: -native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2 npmGlobalPackages: <em>react-native</em>: Not Found</p> <h2>Upgrading version</h2> <p>0.62.2 -> 0.63.2</p> <h2>Description</h2> <p>I recently upgraded from 0.61.5 to 0.62.2 and followed https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.2 and https://github.com/react-native-community/upgrade-support/issues/13 Having multiple targets inside Podfile I found that i have to add a custom configuration to Flipper pods as presented here: https://github.com/react-native-community/upgrade-support/issues/30#issuecomment-608495255</p> <p>After that the whole build started to work flawless.</p> <p>Now I wanted to upgrade to 0.63.2 and now the React native and Flipper pods were moved to '../node_modules/react-native/scripts/react_native_pods' without any possibility to specify: :configuration => ['Debug-dev', 'Release-dev'] and now i get the same error: <code>Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FlipperKitNetworkPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_SKIOSNetworkAdapter", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FlipperKitReactPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FKUserDefaultsPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FlipperKitLayoutPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_SKDescriptorMapper", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FlipperClient", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)</code></p> <h2>Reproducible demo</h2> <p>n/a</p><p>该提问来源于开源项目:react-native-community/upgrade-support</p></div>
<div><h2>Environment</h2> <pre><code> System: OS: macOS 10.15.4 CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Memory: 682.91 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 13.12.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: Not Found IDEs: Android Studio: 3.6 AI-192.7142.36.36.6308749 Xcode: 11.4/11E146 - /usr/bin/xcodebuild Languages: Python: 2.7.16 - /usr/bin/python npmPackages: -native-community/cli: ^4.5.1 => 4.5.1 react: 16.13.1 => 16.13.1 react-native: 0.62.0 => 0.62.0 npmGlobalPackages: *react-native*: Not Found </code></pre> <h2>Upgrading version</h2> <p>0.61.5 -> 0.62</p> <h2>Description</h2> <p>After following <a href="https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.0">upgrade-helper</a> and #13 , I have this error in xcode. I also found this very similare issue in flipper repo, and tryied what they said, but it didn't help: https://github.com/facebook/flipper/issues/816</p> <p><code>Undefined symbol: _OBJC_CLASS_$_FlipperKitNetworkPlugin</code> <code>Undefined symbol: _OBJC_CLASS_$_SKIOSNetworkAdapter</code> <code>Undefined symbol: _OBJC_CLASS_$_FlipperKitReactPlugin</code> <code>Undefined symbol: _OBJC_CLASS_$_FKUserDefaultsPlugin</code> <code>Undefined symbol: _OBJC_CLASS_$_FlipperKitLayoutPlugin</code> <code>Undefined symbol: _OBJC_CLASS_$_SKDescriptorMapper</code> <code>Undefined symbol: _OBJC_CLASS_$_FlipperClient</code></p> <p>Transcript of first one:</p> <pre><code> Showing Recent Issues Build target gotobridge of project GotoBridge with configuration Debug-dev Ld /Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Goto\ Bridge\ Dev.app/Goto\ Bridge\ Dev normal arm64 (in target 'gotobridge' from project 'GotoBridge') cd /Users/arnaud/Sites/gotobridge/ios /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphoneos -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/BVLinearGradient -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/CocoaAsyncSocket -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/DoubleConversion -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/FBReactNativeSpec -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Flipper -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Flipper-DoubleConversion -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Flipper-Folly -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Flipper-Glog -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Flipper-PeerTalk -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Flipper-RSocket -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Folly -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/RCTTypeSafety -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/RNCAsyncStorage -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/RNDeviceInfo -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-Core -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-CoreModules -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-RCTAnimation -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-RCTBlob -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-RCTImage -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-RCTLinking -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-RCTNetwork -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-RCTSettings -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-RCTText -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-RCTVibration -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-cxxreact -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-jsi -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-jsiexecutor -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/React-jsinspector -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/ReactCommon -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/ReactNativeAudioToolkit -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Yoga -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/YogaKit -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/glog -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/react-native-argine -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/react-native-blur -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/react-native-slider -L/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/react-native-webview -L/Users/arnaud/Sites/gotobridge/ios/Pods/CocoaLibEvent/lib -L/Users/arnaud/Sites/gotobridge/ios/Pods/OpenSSL-Universal/ios/lib -F/Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos -filelist /Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Intermediates.noindex/GotoBridge.build/Debug-dev-iphoneos/gotobridge.build/Objects-normal/arm64/Goto\ Bridge\ Dev.LinkFileList -Xlinker -rpath -Xlinker /Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Intermediates.noindex/GotoBridge.build/Debug-dev-iphoneos/gotobridge.build/Objects-normal/arm64/Goto\ Bridge\ Dev_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -lBVLinearGradient -lCocoaAsyncSocket -lDoubleConversion -lFBReactNativeSpec -lFlipper -lFlipper-DoubleConversion -lFlipper-Folly -lFlipper-Glog -lFlipper-PeerTalk -lFlipper-RSocket -lFolly -lRCTTypeSafety -lRNCAsyncStorage -lRNDeviceInfo -lReact-Core -lReact-CoreModules -lReact-RCTAnimation -lReact-RCTBlob -lReact-RCTImage -lReact-RCTLinking -lReact-RCTNetwork -lReact-RCTSettings -lReact-RCTText -lReact-RCTVibration -lReact-cxxreact -lReact-jsi -lReact-jsiexecutor -lReact-jsinspector -lReactCommon -lReactNativeAudioToolkit -lYoga -lYogaKit -lcrypto -levent -levent_core -levent_extra -levent_pthreads -lglog -lreact-native-argine -lreact-native-blur -lreact-native-slider -lreact-native-webview -lssl -lstdc++ -framework AudioToolbox -framework CFNetwork -framework Foundation -framework JavaScriptCore -framework MobileCoreServices -framework QuartzCore -framework Security -framework UIKit -ObjC -lc++ -lPods-gotobridge -framework AudioToolbox -Xlinker -dependency_info -Xlinker /Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Intermediates.noindex/GotoBridge.build/Debug-dev-iphoneos/gotobridge.build/Objects-normal/arm64/Goto\ Bridge\ Dev_dependency_info.dat -o /Users/arnaud/Library/Developer/Xcode/DerivedData/gotobridge-fsxpbshuzkjajbfxyztldgpsuqee/Build/Products/Debug-dev-iphoneos/Goto\ Bridge\ Dev.app/Goto\ Bridge\ Dev Undefined symbols for architecture arm64: "_OBJC_CLASS_$_FlipperKitNetworkPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_SKIOSNetworkAdapter", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FlipperKitReactPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FKUserDefaultsPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FlipperKitLayoutPlugin", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_SKDescriptorMapper", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FlipperClient", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) </code></pre> <h2>Reproducible demo</h2> <p>n/a</p><p>该提问来源于开源项目:react-native-community/upgrade-support</p></div>
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页