Firebase Authentication gives us backend services to authenticate users with your app. It provides SDKs and ready-made UI libraries. It supports authentication using passwords, and other providers like Google, Facebook and Twitter, Github, and more.
iTuts
How to create a wrapper for Alamofire and SwiftyJSON? Swift – iOS
This blogpost updated with Swift 3 – Xcode 8 – iOS 10 – Alamofire 4.0
I have posted a basic tutorial about Alamofire and SwiftyJSON How to use Alamofire and SwiftyJSON with Swift?
And some day before we have learned about Use of Blocks(Closures) or Completion Handlers with Function in Swift – iOS
Let’s combine both the topics to make a WRAPPER of Alamofire and SwiftyJSON.
How to use Alamofire and SwiftyJSON with Swift? – Swift 3 – iOS 10 – Xcode 8
Alamofire is an HTTP networking library written in Swift.
SwiftyJSON makes it easy to deal with JSON data in Swift.
How to work with WatchKit in Swift Language – iOS 8 #Tutorial #CounterWithWatch
Apple Watch represents a new chapter in the relationship people have with technology. Now you can deliver innovative new experiences to your customers on their wrist. And by adding WatchKit, you can take your apps even further by extending and enhancing their functionality on Apple Watch.
Lets learn how to work with WatchKit by an Counter Example.
Create New Project in XCode with Swift Language
Add Apple Watch Target in your Application
Select Apple Watch Target
Select Options for Target
Storyborad of watch
By adding target you will find the InterfaceController.swift and Interface.storyboard
Design watch with the controls
Design and reposition the controls with the properties of controls.
Now Time to do some code and connect the outlets
Code:
[code language=”obj-c”]
// InterfaceController.swift
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBOutlet weak var lblCounter: WKInterfaceLabel!
var counter:Int = 0
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
// Configure interface objects here.
}
override func willActivate() {
// This method is called when watch view controller is about to be visible to user
super.willActivate()
}
override func didDeactivate() {
// This method is called when watch view controller is no longer visible
super.didDeactivate()
}
@IBAction func upButtonPressed() {
counter = counter + 1
lblCounter.setText("\(counter)")
}
@IBAction func downButtonPressed() {
counter = counter – 1
lblCounter.setText("\(counter)")
}
}
[/code]
Download project with this stuff AppleWatchCounterDemo.zip
Thanks!
Happy Coding 😀