Using Codable with object under single root key

While using codable we come across situations when our object keys are not at the root level //Final code /* JSON data { “dog”: { “id”: 1, “task”: “bow wow” } }*/ struct Dog: Codable { let id: Int let task: String } let decoder = JSONDecoder() let userDictionary = try decoder.decode([String: Dog].self, from: jsonData) let … Read more

Using PromiseKit and Alamofire For Clean API Layer

Promise kit and Alamofire when used together create a very powerful and flexible API Layer Every App interacting with web services contains an API layer which separates API handling from the rest of the application logic. Usually, the API layer is implemented using delegates or escaping closures. Escaping closures and delegates are neat but we can achieve … Read more

Unable to verify xcode and simulator installation

When running npm run ios some time an error comes $ react-native-scripts ios Starting packager… Starting simulator… Unable to check Xcode version: Error: Process exited with non-zero code: 1 Failed to start simulator: Unable to verify Xcode and Simulator installation. Exiting… The error can come if you don’t have any command line tool selected in xcode … Read more

Xcode 9.3 download

Apple has released a new beta of Xcode 9.3. The new beta release includes Swift 4 and SDKs with latest innovations and cutting edge features to enable you to build awesome apps.You can Download the new Beat from here Download Xcode 9.3 SWIFT INTERVIEW QUESTIONS  AWESOME JSON PARSING JUST ONE LINE