iOS Compile errorSee original GitHub issue
Hello, thanks for your great package.
Android works fine for me.
But I experience some issues with ios.
Pod install error When I did
pod installit gave me this error. -
[!] Pods written in Swift can only be integrated as frameworks; adduse_frameworks!
to your Podfile or target to opt into using it. The Swift Pod being used is: react-native-agoraSo I added
use_frameworks!to Podfile and it resolved pod install error.
Compile error After pod install was successful I tried to build it and it gave me following errors.
Swift Compiler Error /myproject/node_modules/react-native-agora/ios/RCTAgora/React/PromiseCallback.swift:14:26: Use of undeclared type 'RCTPromiseResolveBlock' /myproject/node_modules/react-native-agora/ios/RCTAgora/React/PromiseCallback.swift:15:25: Use of undeclared type 'RCTPromiseRejectBlock' ... ... /myproject/node_modules/react-native-agora/ios/RCTAgora/React/RCTAgoraRtcChannelModule.swift:25:25: Method does not override any method from its superclass ... ... /myproject/node_modules/react-native-agora/ios/RCTAgora/React/RCTAgoraRtcChannelModule.swift:13:33: Use of undeclared type 'RCTEventEmitter' ... ... /myproject/node_modules/react-native-agora/ios/RCTAgora/React/RCTAgoraRtcChannelModule.swift:12:2: Only classes that inherit from NSObject can be declared @objc ... ... /myproject/node_modules/react-native-agora/ios/RCTAgora/React/RCTAgoraRtcSurfaceViewManager.swift:14:19: Method does not override any method from its superclass ... ... /myproject/node_modules/react-native-agora/ios/RCTAgora/React/RCTAgoraRtcSurfaceViewManager.swift:13:38: Use of undeclared type 'RCTViewManager' /myproject/node_modules/react-native-agora/ios/RCTAgora/React/RCTAgoraRtcSurfaceViewManager.swift:30:17: Use of unresolved identifier 'bridge' /myproject/node_modules/react-native-agora/ios/RCTAgora/React/RCTAgoraRtcSurfaceViewManager.swift:34:17: Use of unresolved identifier 'bridge' /myproject/node_modules/react-native-agora/ios/RCTAgora/React/RCTAgoraRtcEngineModule.swift:63:13: Use of unresolved identifier 'sendEvent' /myproject/node_modules/react-native-agora/ios/RCTAgora/React/RCTAgoraRtcEngineModule.swift:12:2: Only classes that inherit from NSObject can be declared @objc
Any solution for this swift compiler error?
- Created 3 years ago
Top GitHub Comments
@LichKing-2234 Yes, upgrading cocoapods version worked for me. Thank you!
it is too old, you can upgrade it and try again.