alamofire

Lipo: input file must be a fat file

99封情书 提交于 2021-02-09 12:10:26
问题 I'm getting following error: Extracting arm64 from Alamofire fatal error: lipo: input file (../myApp.app/Frameworks/Alamofire.framework/Alamofire) must be a fat file when the -extract option is specified always when I want to run the app. It doesn't show up when I clean before, but it takes super long time. This => Lipo Error!! can't open input file is not my case and it doesn't work for me. Any ideas, Thank you 回答1: In target -> Build Phases -> Run script I had some incompatible script. I

Lipo: input file must be a fat file

梦想与她 提交于 2021-02-09 12:09:09
问题 I'm getting following error: Extracting arm64 from Alamofire fatal error: lipo: input file (../myApp.app/Frameworks/Alamofire.framework/Alamofire) must be a fat file when the -extract option is specified always when I want to run the app. It doesn't show up when I clean before, but it takes super long time. This => Lipo Error!! can't open input file is not my case and it doesn't work for me. Any ideas, Thank you 回答1: In target -> Build Phases -> Run script I had some incompatible script. I

Lipo: input file must be a fat file

旧街凉风 提交于 2021-02-09 12:08:26
问题 I'm getting following error: Extracting arm64 from Alamofire fatal error: lipo: input file (../myApp.app/Frameworks/Alamofire.framework/Alamofire) must be a fat file when the -extract option is specified always when I want to run the app. It doesn't show up when I clean before, but it takes super long time. This => Lipo Error!! can't open input file is not my case and it doesn't work for me. Any ideas, Thank you 回答1: In target -> Build Phases -> Run script I had some incompatible script. I

How to upload a run to a Strava athlete's profile using Alamofire

蓝咒 提交于 2021-02-08 05:38:16
问题 I'm trying to add functionality into an app that would allow a user to upload runs to their Strava profile. Currently the runs are stored in the Documents directory of the app as gpx files, and although I know how to access them, I'm having trouble with the syntax of the Alamofire request. My code looks like this: func getDocumentsDirectory() -> URL { let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask) let documentsDirectory = paths[0] do { let fileURLs = try

How to convert CURL request to Swift using Alamofire?

穿精又带淫゛_ 提交于 2021-02-08 03:12:41
问题 I am using Alamofire and I have a curl command like this: curl "https://abc.mywebsite.com/obp/v3.1.0/my/page/accounts/myaccount1/account" -H 'Authorization: DirectLogin token="eyJhbGciOiJIUzI1NiIsInR5cCI6wkpeVeCJr.eyIiOiIifQ.MV-E150zMCrk6VrWv"' -H 'Content-Type: application/json' This command works fine on command line and I receive a response successfully. For Swift I have found very little help online which didn't work for me, and so posting a question here, how can I make this call using

How to convert CURL request to Swift using Alamofire?

百般思念 提交于 2021-02-08 03:00:31
问题 I am using Alamofire and I have a curl command like this: curl "https://abc.mywebsite.com/obp/v3.1.0/my/page/accounts/myaccount1/account" -H 'Authorization: DirectLogin token="eyJhbGciOiJIUzI1NiIsInR5cCI6wkpeVeCJr.eyIiOiIifQ.MV-E150zMCrk6VrWv"' -H 'Content-Type: application/json' This command works fine on command line and I receive a response successfully. For Swift I have found very little help online which didn't work for me, and so posting a question here, how can I make this call using

Error: “Pattern cannot match values of type 'URLRequest'” in swift

旧街凉风 提交于 2021-02-05 11:38:23
问题 My code was working perfectly in before.. recently i have installed Alamofire in other project now below error throwing. Pattern cannot match values of type 'URLRequest' got error in Alamofire in this line: case .Success(let upload, _, _): \\........here getting error code with error: func postImageRequestWithURL(withUrl strURL: String,withParam postParam: Dictionary<String, Any>,withImages imageArray:NSMutableArray,completion:@escaping (_ isSuccess: Bool, _ response:NSDictionary) -> Void) {

Initializer for conditional binding must have Optional type, not '[String : Any]'

社会主义新天地 提交于 2021-02-05 10:53:45
问题 Can anyone tell me how to fix this? Im just trying to receive signals from thing speak. `self.title = "Home" print("Requesting data...") Alamofire.request( "https://api.thingspeak.com/channels/290427/feeds.json", parameters: ["results": "1", "location": "false"]) // Gets the latest info from ThingSpeak .responseJSON { response in print("Data downloaded: \(response.result)") if let json = response.result.value as! [String:Any] { print(json) //see full data if let feeds = json["feeds"] as?

Alamofire: FAILURE responseSerializationFailed

血红的双手。 提交于 2021-01-29 05:57:35
问题 I'm trying to get the JSON from a URL to download using Alamofire . Alamofire.request(requrl, method: .get, encoding: JSONEncoding.default) .responseJSON { response in print(response.result) print(response.value) debugPrint(response) } However the value of response.value is nil, and the request result status is FAILURE. The following is in the logs: >[Data]: 919 bytes [Result]: FAILURE: responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.jsonSerializationFailed

NSURLSession with background configuration and app killed by user

时间秒杀一切 提交于 2021-01-29 02:35:57
问题 This is the scenario: NSURLSession with background Configuration Download or upload task start with Bad or No Internet Connection. User close the App. If iOS get Internet Connection will star session task. However, With task still waiting for Internet. User kills the App System cancel all pending tasks The Question It is possible to know when the user opens the app again that the tasks were cancelled? If yes, where? This Answer says yes, it is possible, but I can not get any callback