After trying nearly every response on the subject, I\'ve come up without a working answer to my problem.
The problem: So I\'ve implemented the uploading portion of m
Got it! So, turns out, unknowingly, although my API was returning valid JSON, matter examining the header response logged on the Xcode side of things (thru NSLog(@"Error: %@", error);), it was actually returning text/HTML because it wasn't actually hitting the correct file, it was getting re-routed by a header somewhere. After explicitly stating the API path to be /API/index.php and not just /API, it started returning the valid JSON! Next, after making sure the response was properly JSON serialized (using requestManager.responseSerializer = [AFJSONResponseSerializer serializer];), the app worked!
Hopefully this helps someone who was having the same issue :)
You can set the AFHTTPSessionManager
to accept any MIME Type:
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];