Skip to content

Instantly share code, notes, and snippets.

@cristainlika
cristainlika / gist:7133295e71c24bf3161bd4f8b58f3efc
Last active March 30, 2017 13:09
object model for Json parse
struct Contact {
let user : User
let address : Address
let deliveryInstruction : String
let deliveryMethod : String
init(dictionary: [String: Any]) {
import UIKit
class DisplayAsOptionViewController: UIViewController {
fileprivate let cartHeaderCell = "cartHeaderCell"
let optionCell = "optionCell"
@cristainlika
cristainlika / gist:f23a44ff0b4a11d4dfd3de883a6e21ef
Last active January 27, 2017 10:46
ios remote push notification (production environment ) not working ios9 where it is full working ios10 . what can i do ?
Note : also i am testing by apn tester both ios9 and io10 it is working fine .. my project in swift 2 .
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
//ask for user to permited push notification
registerForPushNotifications(application)
//crate notification with sound alert, Badge , and sound
let notificationTypes: UIUserNotificationType = [UIUserNotificationType.Alert, UIUserNotificationType.Badge, UIUserNotificationType.Sound]