func callApi (){ let sessionConfig = URLSessionConfiguration . default let sessionUrl = URLSession ( configuration : sessionConfig) let url = URL ( string : "URL" )! let request: URLRequest = URLRequest ( url :url) let task = sessionUrl. dataTask ( with : request){ (data, response, error) in if error != nil { print (error!. localizedDescription ) } else { do { if let json = try ! JSONSerialization . jsonObject ( with : data!, options : . allowFragments ) as ? [ Any ] { /*for item in json { if let object = item as? [String: Any]{ print(object) } }*/ if let result = json as ? NSArray { for dict in result { if let respDict = dict as
iOS Developer Live - iPhone & iPad App Development Services
Mobile apps Development iOS (iphone ipad ) for objective and Swift programming