简体   繁体   中英

Method does not override any method from its superclass , Alamofire

I am trying to create a XCFramework from Alamofire source code. I was able to create frameworks for iOS and iOS-Simulator, I tested both frameworks in a test code worked fine. I added this to XCFramework, it was successful, added the XCFramework to rest code but now I receive following error

Method does not override any method from its superclass

Above error is for method cleanup() , I think the swift interface generated has some issue.

I created the frameworks using following commands

xcodebuild archive -workspace Alamofire.xcworkspace -scheme "Alamofire iOS" -sdk iphoneos OBJROOT=build/iOS
xcodebuild archive -workspace Alamofire.xcworkspace -scheme "Alamofire iOS" -sdk iphonesimulator OBJROOT=build/simulator  
xcodebuild -create-xcframework -framework ios_fr/Alamofire.framework -framework ios_sim_fr/Alamofire.framework -output build/Alamofire.xcframework

Everything goes well but it failed in loading framework with above error.

Any help in this direction is appreciated.

I am facing the same problem. So i reviewed the code that causes this problem:

// Superclass "Request"
func cleanup() 

// problem area: Child Class "UploadRequest"
public func cleanup()

internal (default) has been override as public i think this is a mistake.

Make Request 's instance method cleanup to public to fix this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM