App rejection due to JSON parsing

We have uploaded an app to app store, it got rejected 5/6 times as during review they can not interact with API calls, it shows “Network Error”. We have verified the test-flight app & found that it is working fine


Only at the time of App store review I got the error “JSON could not be serialized because of error:nThe data couldn’t be read because it isn’t in the correct format.”


I am using Alamofire for API call.


Here is the request parameter which

“requestParameter”: {“device_token”: “cBXIAfxpEpk:APA91bH8AZYHqMniP5oGNuHT7czD-wHm_ioE-th1_LkN3_w5w_KUa5grT6Ff73D8j9Kn-xONeK4ytT8ZSfVssG9mf4KwJzhY7WdoSxUHxLKNxyGMI0g9ieyuyF25Pi3KwFXDIQmawmow”, “time_zone”: “America/Los_Angeles”, “device_type”: “ios”, “username”: “demo”, “password”: “password”, “location”: “37.452728,-121.940140”}




We have checked with backend API log but there is no log fired at that time , So its unable to communicate from mobile with API


Here is my API method

func serviceCall(withPath path:String, withData param:[String:Any], withCompletionHandler completion:@escaping (AnyObject?) -> Void){
    let requestURL = String(format: "%@%@", BaseURL, path)
    let manager = Alamofire.SessionManager.default

    manager.session.configuration.timeoutIntervalForRequest = 40

    manager.request(requestURL, method: .post, parameters: param, encoding: URLEncoding.methodDependent, headers: nil).responseJSON { (responseJson) in
        print("Response 10: (responseJson)")

        if ((responseJson.result.value != nil)){
           // store details to firebase

        } else {
           // store details to firebase



please help me out already rejected by app store for many times



Thank you in advance !!

Powered by WPeMatico

You may also like...

Comments are closed.