This is a sequel to question : dyld: Library not loaded: @rpath/SwiftyJSON.framework/SwiftyJSON
After rebuilding the project from scratch (new project, new podfile, new files but in each file copy-paste the source code from the original project) the…
I have a json which is array of dictionary
response.text = [{
"id": "4635465675",
"name": "Arts",
"pluralName": "Arts",
"shortName": null
}]
json = JSON((response.text)?.data(using: .utf8))
How can i check is value for key "shortName" null or not,…
I received the following response from server
"transactionInfo": {
"currencyCode": "MYR",
"total": 472.23,
"roomCurrencyCode": "MYR",
"roomTotal": 472.23
}
but when I am trying to convert using SwiftyJson and map using below…
We are upgrading to SwiftyJSON Swift 3 with CocoaPods config pod 'SwiftyJSON', '3.1.0'.
We are getting this error:
/Users/xxx/Documents/iOS/xxx/Pods/SwiftyJSON/Source/SwiftyJSON.swift:866:33:
Cannot convert return expression of type 'Int32?'…
I recently upgraded my Swift iOS application from Xcode7 to Xcode8 and deployment platform from iOS 9.3 to iOS 10. My application started breaking with errors like this:
Module file was created by an older version of the compiler: rebuild
…
Project files:
https://jumpshare.com/v/Otai3BBXYwfvyz8jb53k
(Would be wise to view these to see structure of project)
Problem:
Ok, so i'm following a tutorial that creates a UITableView with headers and then cell content.
The code worked and runs…
My head is going to explode :) - I've been trying to get a JSON String from my server to a Dictionary Value, and I can't get it to work.
I'm trying to get (from my Server - this is dynamic and I want my app to be able to pull new data from the…
I have a use case where I have an array of dictionaries and I need them as a json object:
var data = [Dictionary]()
//append items
var bytes = NSJSONSerialization.dataWithJSONObject(data, options: NSJSONWritingOptions.allZeros,…
I have an array of dictionaries that I am trying to post to Alamofire with the help of SwiftyJSON.
The api is set to take:
[
{
"imageUrl": "someimage3.jpg"
},
{
"imageUrl": "someimage4.jpg"
}
]
My array with image…
I have a project where I'm sending .GET requests to get data from the server and for this I'm using Alamofire & SwiftyJSON.
For example:
I have file "Links", "Requests" and my ViewController.
Links.swift
var getAllData: String {
return…
This line has always been working fine for me for making Alamofire Requests and getting the JSON response.
Alamofire.request(req).responseJSON() {
(request, response, data, error) in
// ....
}
After upgrading to XCode 7 and converting…
I've been using the simulator to test my app. Today I decided to test it using other devices in the simulator and to my surprise it crashes on startup on some devices, on others it works perfectly
My app builds an runs on :
iPad Air
resizable…
I have a swiftyJSON object that looks like for example:
[{
"location" : "http://...",
"img" : "http://...",
"commentCount" : 0,
"timestamp" : 1432460217550,
}]
I want to be able to append another swiftyJSON object to it so that it looks…
So I currently have the following:
class ViewController: UIViewController {
class Identity{
let baseUrl = "superSecretURL"
var _username: String = ""
var _password: String = ""
var _apiKey: String = ""
init(){
}
…