Questions tagged [swift3]

Please use this specific tag for inquiries specifically pertaining to updates in version 3 of Apple's Swift programming language. For general language questions, utilize the [swift] tag instead. If your question is related to developing on Apple platforms like iOS, Cocoa, or Apple Watch, please tag accordingly.

Is there a way to showcase multiple TableViews from a Json File using Swift?

I am looking to populate a TableView in Xcode (Swift) with information from a Json file. To illustrate, here is what I aim to achieve: My goal is to extract json data regarding countries, cities, and additional city details. On the initial screen, I want ...

Convert JSON information into an array and map it in Swift

I am currently facing a certain challenge. My approach involves using Alamofire request to retrieve a JSON response. Alamofire.request(url, method: .get).responseJSON { response in if response.result.isSuccess { print ...

Having trouble with missing quotes in Swift when making a REST POST request

Struggling with a seemingly simple REST call that has left me completely stuck. I have a node-based restful service that requires an array of strings as input. However, every time I make the call with what seems like a valid parameter, the server throws an ...

Is there a way to update JSON data in Swift 3 when the save button is clicked?

After logging in, I saved my user JSON data on the key "user". How can I update this value when I press the save button? For example, changing the value of "crew_preferred_name" to "Xiao Pang". UserDefaults.standard.set(json, forKey: "json") user = UserDe ...

Issue with Object Mapper retrieving values from nested Arrays

I have come across this JSON data and I am using ObjectMapper to work with it: Access Api Snippet of Response { "data": [ { "CategoryName": "רוגע", "CategoryID": "63", "CategoryDate": "2016-08-26 02:12:05", "CategoryIma ...

Tips for extracting the data from a JSON response using Swift 3

This JSON data is the server's response to my request, but I'm struggling to extract and parse the values correctly. {"items": [{"item": { "id":824, "company_id":31, "config_id":45, "imagesmall":null, "im ...

Exploring the process of saving JSON data into a Swift 3 label

Within a view controller class, the following code resides: import UIKit class orderStatusVC: UIViewController { //================ Segue Initializers ================// var orderNumber: String = "" //================ Member Variables ===== ...

Dealing with Array Problem in iOS Swift 3 when converting Object to JSON

public class LessonAssignment { private var title : String? private var category : String? private var week : Int? private var day : Int? //Title public func getTitle() -> String { return title! } public func ...

Obtain a JSON data structure within the Swift Socket.IO Client

How do I go about receiving a JSON object within the Swift Socket.IO client? Node.js When using socket.io on Node.js, I emit a JSON object like in this simple example: socket.emit('welcome', { text : 'Hello, World!' }); Swift In an ...

Using Alamofire and SwiftyJSON subscripts in Swift 3

For some reason, my code isn't working as expected and the result is always nil. I have incorporated Alamofire and SwiftyJSON into my code. Here is a snippet: let urlString = "myurl" let params: Parameters = [ "accessProvider": AccessProvider, ...