Questions tagged [afnetworking]

AFNetworking is a networking library for iOS and macOS available on GitHub and CocoaPods.

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

Replicate bug: The certificate for this server is invalid

Some of my users have been experiencing the following error: The certificate for this server is invalid. You might be connecting to a server that is pretending to be "DOMAIN NAME" which ...
Calamitosis's user avatar
0 votes
0 answers
37 views

getting error while generating iOS app archive for AFNetworkActivityLogger . rsync error shown in the output logs of archive

Showing Recent Issues rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- ...
Roshni Satyarthi's user avatar
0 votes
1 answer
125 views

Why AFNetWork crashes in URLSession:dataTask:didReceiveResponse:completionHandler

My app crashes at line 4 in URLSession:dataTask:didReceiveResponse:completionHandler of AFURLSessionManager.m,it seems like the self object is released, the Func is where we add the callback: - (void) ...
Berte Colin's user avatar
0 votes
1 answer
34 views

How do I properly use a getter as a selector in Objective-C? Getting deprecation warnings in modern Xcode

I'm using an old version of AFNetworking in an app, it works fine except I'm getting on deprecation warning from Xcode from this line in an initWithCoder method: self.queryStringSerializationStyle = (...
Doug Smith's user avatar
  • 29.8k
0 votes
0 answers
32 views

iOS Server self-signed certificate expiration detection

I want to detect iOS Server self-signed certificate expiration I use AFNetworking lib,I use this method certificate validation - (void)setSessionDidReceiveAuthenticationChallengeBlock:(...
user9785981's user avatar
-1 votes
1 answer
44 views

AFHTTPSessionManager attemptsToRecreateUploadTasksForBackgroundSessions property equivalent in Alamofire 5

Previously I used AFNetworking and set attemptsToRecreateUploadTasksForBackgroundSessions to YES for some custom sessions. I'm trying to migrate to Alamofire 5 and I can't find any equivalent of this ...
VyacheslavBakinkskiy's user avatar
-1 votes
1 answer
309 views

How to get current tasks for custom Session in Alamofire 5

Previously I used AFNetworking and could easily get all the tasks for current session by tasks property. I'm trying to migrate to Alamofire 5 and I can't find the same property or way how to get all ...
VyacheslavBakinkskiy's user avatar
0 votes
0 answers
54 views

How to upload videos as a file directly to server using Alamofire 5?

I wish to upload a video file stored on the mobile device on which the app is downloaded, to a folder within my server (ran with PHP). I am trying to use Alamofire to do this, and it said in their ...
Emil Ryd's user avatar
0 votes
1 answer
265 views

ios react-native AFNetwoking client certificate authenification

Be gladfull about any info about how to add client p12 certificate validation to this ssl pinning code. This is part of ssl pinning module for react-native. #import "RNSslPinning.h" #import &...
Vladimir's user avatar
0 votes
0 answers
192 views

AFNetworking.h file not found in latest xcode

AFNetworking.h file not found issue occurred when build preparing in latest xCode.
Prateek Upadhyay's user avatar
0 votes
0 answers
90 views

Unable to build the app after upgrading the AFNetworking and it failed with Mopub framework

I have updated the AFNetworking from 2.3.5 to 4.0.1. Here while migrating I am getting the error as below mentioned frameworks file is not available. Note: Here I did not remove the mopub framework. ...
sejn's user avatar
  • 2,156
0 votes
0 answers
76 views

AFNetworking upload PDF file

I'm trying to upload a pdf file with AFNetworking 3.0 to a server, My pdf file was send in NSData in the formData but it's returning me this error : NSError * domain: @"com.alamofire.error....
user1887842's user avatar
2 votes
0 answers
383 views

AFNetworking shows the Undefined symbol: _OBJC_CLASS_$_AFHTTPSessionManager

I am trying to update the AFNetworking package from version 2 to the latest version 4. While updating I am getting the below error. Note: I am trying to update version 2 to version 4. Here I am using ...
sejn's user avatar
  • 2,156
-1 votes
1 answer
36 views

Cannot upload a PIC using AFNetworking

I can upload PIC in Postman, and in swagger. I need to set @{@"Content-Type": @"multipart/form-data"} in Header. But in OC programm, it's some errors. Help!! NSString *urlString =...
Cp Jiang's user avatar
1 vote
1 answer
619 views

Objective-C header file not found (AFNetworking.h) [duplicate]

#import <AFNetworking/AFNetworking.h> I imported AFNetworking.h file to .m file but an error occurred like this: 'AFNetworking/AFNetworking.h' file not found I deleted pods folder and Podfile....
jin's user avatar
  • 21
1 vote
1 answer
59 views

AFNetworking upload data too long

I'm using AFNetworking 3.0 and I try to send files to my server, my code work perfectly but it's very long to send the file especially when I try to send a video. I compress the video quality and it's ...
user1887842's user avatar
0 votes
0 answers
129 views

Use an API without ssl in objective c

Here is my code AFHTTPRequestOperationManager *opManager = [AFHTTPRequestOperationManager manager]; opManager.responseSerializer = [AFJSONResponseSerializer serializer]; [opManager.requestSerializer ...
Test's user avatar
  • 131
1 vote
0 answers
79 views

AFNetworking: `setImageWithURLRequest:request` method didn't use cached image(disk cache) when the app is reopened

First time to use AFNetworking. When I use it to download/reload image for my collectionView with setImageWithURLRequest:request method, I found the images could be downloaded, but never load from the ...
Zhou Haibo's user avatar
  • 1,724
0 votes
0 answers
258 views

How to parse mixed type of json array in Swift

I have a json array that contains different type of object. I don't have any chance to change the end point. I am using the AFNetworking. I want to display product detail according to the Product.type ...
uzman's user avatar
  • 51
0 votes
1 answer
559 views

Localization: Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: not found (404)

Recently I have added two languages to localise the app, when I changed the app to new language to test. I can successfully see the all text changes, few rest API's are not working to new language. I ...
Raju Abe's user avatar
  • 763
0 votes
1 answer
289 views

How to implement Codable with AFNetworking

I am working on a mix project of Swift and Objc, AFNetworking is implemented in it for network calls. I created swift file where I want to implement Codable model, but since AFNetworking is responding ...
Subso's user avatar
  • 1,433
2 votes
0 answers
76 views

AFNetworking 4 - Upload Progress Issue

I have a fairly new project I am working on in Swift 5, and AFNetworking 4.0.1. I am having issues with tracking progress of an upload to an API endpoint. I am building a POST command using ...
child0tk's user avatar
0 votes
0 answers
45 views

File download sometimes restart from the beginning when network has changed(AFURLSessionManager)

I'm having trouble with file download. My app is using AFURLSessionManager and make NSURLDownloadSessionTask by (NSURLSessionDownloadTask *)downloadTaskWithRequest:progress:destination:...
Justin.Shim's user avatar
0 votes
0 answers
276 views

attempt to insert nil object from objects[1]'

I would like to show ChatViewController via a tab bar controller. The current initial view for the app is a NavigationController that loads the ChatViewController. When the ChatViewController is ...
programcode's user avatar
0 votes
0 answers
33 views

pod AF Networking text/html ContentTypes issue

We are using cocoapods in our project pod 'AFNetworking', '~> 4.0.1' AFURLResponseSerialization has the below acceptableContentTypes - (instancetype)init { self = [super init]; if (!self) ...
Maneesh Aucharla's user avatar
0 votes
0 answers
272 views

Rest API post call is failing when app in background

I'm using AWS Transfer Utility to upload media to the S3 bucket and it's working fine in the background but after the media upload, I have to call a REST API (POST) call to my server which is failing ...
Rahul Vyas's user avatar
  • 28.4k
0 votes
1 answer
2k views

iOS - Error message "no space left on device"

We suddenly experience a problem that somehow seems to be related to iOS 14 as we haven't had those errors in prior versions. At app start, we do quite a lot of network requests to different ...
Oliver Schobel's user avatar
0 votes
1 answer
313 views

AFNetworking read json response as text/html

I have 2 projects one for user and the other one for provider. I use the same code and sam api for an activity, and it works fine in provider but it does not work for user!! I used this code ...
hawra's user avatar
  • 1
0 votes
0 answers
308 views

Error Domain=NSURLErrorDomain Code=-1005 "The network > connection was lost." - AFNetworking formdata video upload in iOS

I am uploading a video to the server using AFNetworking formdata but I am getting a failure response as follows Error: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost.&...
Khadija Daruwala's user avatar
0 votes
2 answers
296 views

AFnetworking 3 or 4 GET ResponseObject how to have responseString and ResponseData

Hello I would like to know how it's possible to have responseString and responseObject with the new version of AFNetworking. When I made GET operation I have success response with NSURLSessionDataTask ...
Davy GRACIA's user avatar
0 votes
0 answers
137 views

iOS - Objective-C: application crash on iOS 10 after libraries upgrade

I have an older Objective-C application that I upgraded recently in order to add new functionalities. I'm using now AFNetworking version 4.0. All is working now even in the newest version of iOS ...
Ne AS's user avatar
  • 1,510
0 votes
1 answer
436 views

SSL Pinning with AFNetworking doesn't work

I'm trying to add SSL pinning to my app, with a self-signed certificate, but I can't seem to get it to work. I have tried everything I could find on the internet with no success, and not being an ...
Clément Casu's user avatar
0 votes
1 answer
74 views

Sending array of dictionary with afnetworking 2.0

I've a big problem, I'm trying to send an array of dictionary with afnetworking, that's my code: checkDeliveryParams = @{@"cart_total":@(cart_total),@"shipping":@{@"address&...
Michele Schillaci's user avatar
1 vote
0 answers
227 views

How to upload UIImage to Server in Objective-C?

What my project does is takes pictures with a custom camera and adds them to an NSMutableArray. Then, I grab those images and submit them to my API that accepts images. I have tried almost every ...
Daniel Leal's user avatar
0 votes
0 answers
218 views

[NSProgress cancel]_block_invoke crash, maybe in AFNetworking

I got 118 crash reports (from a single user) via Firebase: EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000010 Crashed: com.apple.root.background-qos 0 Foundation 0x18287a4b4 ...
Kenny Wyland's user avatar
2 votes
2 answers
4k views

App transport Security load Error even after adding it

Even after adding App Transport Security Settings and Allow Arbitrary Loads under it I'm still getting the same error - "App Transport Security has blocked a cleartext HTTP (http://) resource ...
2apreety18's user avatar
0 votes
1 answer
234 views

How to read http status code for HEAD request

I'm requesting an API with AFNetworking 4.3.1 and Http method GET and HEAD. It could return different http status code (100, 200, 402, ..) My get function request working fine. -(void) getApiV2:(...
europrimus's user avatar
2 votes
0 answers
491 views

AFNetworking 3 or 4.01 migration

I was on AFnetworging 2.0.6 and I would like to migrate to 3 or 4.0.1. I have problem with this part of code I know AFHTTPRequestOperation it's not reuse on version 3 or 4. and I have some error here. ...
Davy GRACIA's user avatar
7 votes
2 answers
5k views

Swift NWListener listen, cancel, and relisten successfully?

I have an app where I an supposed to have a websocket that listens only when the app is in the foreground I have tapped into the lifecycle notifications and call start() and stop accordingly. The app ...
user9170's user avatar
  • 970
0 votes
1 answer
282 views

No visible @interface for 'AFHTTPSessionManager' declares the selector 'GET:parameters:progress:success:failure:'

I am getting this error after the installing of pod AFNetworking 4.0.1 ,Below is the code: - (NSURLSessionDataTask *)GET:(NSString *)URLString parameters:(id)param progress:(NECBProgress)progress ...
Rasmita's user avatar
2 votes
0 answers
129 views

When using a web server, what is the correct path for a folder that is meant to store photos from a php function?

When an iOS app connects to a json based php web api using afnetworking, what is the correct path to use to store photos for this php function? When trying to call the upload php function from api.php ...
john smith's user avatar
0 votes
1 answer
653 views

Objective c AFNetworking rejected on apple because of UIWebView

Objective c AFNetworking rejected on apple because of UIWebView. Tried all suggestion. Can't upgrade the library due to it's old app. Latest version can install for AFNetworking is like 3.2.1 ...
Dan Navarez's user avatar
1 vote
0 answers
164 views

After updating AFNetworking to 4.0 in pod file. Facing problem in implementation of AFOAuth2Manager and AFNetworkActivityLogger

After updating pod to AFNetworking 4.0, I noticed that AFOAuth2Manager and AFNetworkActivityLogger are not available with this release. I am using authenticateUsingOAuthWithURLString() method to ...
Tushar Mohod's user avatar
0 votes
0 answers
40 views

How to connect to MAMP remotely using AFNetworking?

I used to be able to connect to a local apache server via MAMP and the following AFNetworking configuration #define kAPIHost @"http://192.168.0.70:8888" #define kAPIPath @"iReporter/&...
Aaron Navies's user avatar
  • 1,223
0 votes
1 answer
1k views

Error installing AFNetworkActivityLogger with AFNetworking 4.0 - Cocoapods

I get this message after submitting my app to App Store Connect. ITMS-90809: Deprecated API Usage — Apple will stop accepting submissions of apps that use UIWebView APIs When upload myApp It ...
dbenitobaldeon's user avatar
0 votes
1 answer
310 views

how to handle "too many http redirects" error in objective c

i'm currently working on an itunes search app. i'm following the iTunes API documentation (https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/) and ...
mark kevin cagandahan's user avatar
1 vote
0 answers
260 views

Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: method not allowed (405)"

I am using AFNetworking for downloading files on the server.But it gives a 405 error. Here is my code,my own encapsulated method: +(id)download:(NSString *)url progress:(void(^)(CGFloat downloadRate)...
Lucas's user avatar
  • 11
1 vote
0 answers
111 views

Pause/Resume download with AFNetworking 3.0 and NSURLSessionDownloadTask Objective-C, OSX

I have trouble with creating Pause/Resume download methods in my Objective-C osx app, I have tried some of the answers I found here but nothing seems to work. Here is my code: `-(void)pauseDownload:(...
Vladan Randjelovic's user avatar
0 votes
2 answers
1k views

How to install Pod Library by excluding SPECIFIC .h .m FILES or How to remove SPECIFIC .h .m FILES in Pod Library in iOS

In my iOS App I am using third party libraries with cocoa pods For some reason In One Third part library, I need that library but some specific files in that library are not required So that i need ...
iOS dev's user avatar
  • 2,262
0 votes
1 answer
2k views

Pod install shows the error like required a higher minimum deployment target

I would like to update pod 'AFNetworking', '~> 4.0.1' ,But my terminal shows the following error like when pod install command running Specs satisfying the `AFNetworking/NSURLSession (= 4.0.1), ...
JAK's user avatar
  • 6,345

1
2 3 4 5
76