I was trying to migrate my project from swift 3 to swift 5. I (think) converted all the codes successfully and error free. However, when I try to run the project on Simulator (and device too), the app immediately crashes with the following error -
objc[85390]: Swift class extensions and categories on Swift classes are not allowed to have +load methods
I'm not sure what this error means, and how could I solve it. I surfed through many similar questions on stackoverflow but nothing helped.
I tried searching for the pods that include +load method (I searched for +(BOOL)), and set their swift version from 5 to 4.2, as described in one of the other questions asked. But I'm still getting the error.
Here is my podfile -
# Uncomment the next line to define a global platform for your project
# platform :ios, '10.0'
target 'abc' do
use_frameworks!
pod 'Alamofire'
pod 'AlamofireImage'
pod 'AlamofireObjectMapper'
pod 'Eureka'
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/RemoteConfig'
pod 'IQKeyboardManagerSwift'
pod 'SideMenuController'
pod 'SnapKit'
pod 'Fabric'
pod 'Crashlytics'
pod 'MGSwipeTableCell'
pod 'SSZipArchive'
pod 'RealmSwift'
pod 'Realm'
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'DevSupport',
'RCTText',
'CxxBridge',
'RCTNetwork',
'RCTImage',
'RCTAnimation',
'RCTLinkingIOS',
# 'RCTWebSocket', # needed for debugging
# Add any other subspecs you want to use in your project
]
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
# Explicitly include Yoga if you are using RN >= 0.42.0
pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
end