AnsweredAssumed Answered

I am applying applyEdits function on featureTable, but I am not getting any response. What may be the reasons for it?

Question asked by asim.k@whitesnow.com on Sep 27, 2018
Latest reply on Sep 28, 2018 by NFurness-esristaff

Below is my code. I am not getting any response, neither success nor any failure.  URL for FeatureServer is my organisations's FeatureServer Url.

 

 

      self.pointFeatureTable = AGSServiceFeatureTable(url: URL(string: url)!)

        let point:AGSPoint = AGSPoint(clLocationCoordinate2D: CLLocationCoordinate2D(latitude: 32.7157, longitude: 117.1611))

        

        self.pointFeatureTable.credential = MyAGSHelper.sharedInstance().getCredentials();

        self.pointFeatureTable.load { (error:Error?) in

            if let error = error {

                print(error.localizedDescription)

            }

            else{

                let feature:AGSFeature = self.pointFeatureTable.createFeature(attributes: ["test":"test"], geometry: point)

                self.pointFeatureTable.add(feature) { (error: Error?) -> Void in

                    if let error = error {

                        print("Error while adding feature :: \(error.localizedDescription)")

                        return

                    }

                    else{

                        self.pointFeatureTable.applyEdits { (result, error) in

                            if let error = error {

                                print("Error while adding feature :: \(error.localizedDescription)")

                                return

                            }

                            else{

                                print(result!)

                            }

                        }

                    }

                    

                }

            }

        }

 

 

Please help and let me know it there is any mistake. !

Outcomes