Due to an unresolved Cocoapod issue, I'm manually embedding the Alamofire framework into my app using these instructions. So, my steps were:
- Adding Alamofire as a git submodule to my app
- Adding the Alamofire.xcodeproj to my app's workspace
- Adding the iOS Alamofire.framework as an Embedded Binary to my project
Despite this, I am still running into "Use of unidentified type" errors:
import Foundation
import Alamofire
// Retry a request every x seconds
class AutoRetrier: RequestRetrier{
//MARK: Properties
private var maxRetries: Int
private var timeInterval: TimeInterval
init(times maxRetries:Int, interval:TimeInterval){
self.maxRetries = maxRetries
self.timeInterval = interval
}
//MARK: RequestRetrier
func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) {
// We're basically ignoring what type of error it is, and just retrying a number of times
if request.retryCount <= UInt(maxRetries){
completion(true, timeInterval)
} else{
completion(false, 0.0)
}
}
}
How would I resolve this issue?