@available(iOS 10.0, *)
import UserNotifications
NSUserNotification API Reference
UNNotificationSound API Reference
UNUserNotificationCenter API Reference
| { | |
| "491289025" : "ijinshan-kappmarket://", | |
| "301521403" : "fb103361823069955://", | |
| "492178411" : "ils492178411://", | |
| "346142396" : "fb234434003713://", | |
| "310633997" : "whatsapp://", | |
| "370614765" : "com.condenet.newyorker://", | |
| "325058491" : "rnmddisco://", | |
| "382952264" : "epichttp://", | |
| "477048487" : "predictwind://", |
| // Swift Standard Librray - String | |
| // Keith Harrison http://useyourloaf.com | |
| // Import Foundation if you want to bridge to NSString | |
| import Foundation | |
| // ==== | |
| // Initializing a String | |
| // ==== |
| The MIT License (MIT) | |
| Copyright (c) 2016 Zev Eisenberg | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| this software and associated documentation files (the "Software"), to deal in | |
| the Software without restriction, including without limitation the rights to | |
| use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
| the Software, and to permit persons to whom the Software is furnished to do so, | |
| subject to the following conditions: |
| <?php | |
| // Constants | |
| $KEY_ID = 'YOUR_KEY_ID'; | |
| $CONTAINER = 'YOUR_CONTAINER'; | |
| $PRIVATE_PEM_LOCATION = 'eckey.pem'; // Store this file outside the public folder! | |
| // Config | |
| $url = 'https://api.apple-cloudkit.com/database/1/' . $CONTAINER . '/development/public/records/query'; | |
| $body = '{"query":{"recordType":"Articles"}}'; |
| /** | |
| * Demonstrates how to use Apple's CloudKit server-to-server authentication | |
| * | |
| * Create private key with: `openssl ecparam -name prime256v1 -genkey -noout -out eckey.pem` | |
| * Generate the public key to register at the CloudKit dashboard: `openssl ec -in eckey.pem -pubout` | |
| * | |
| * @see https://developer.apple.com/library/prerelease/ios/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/SettingUpWebServices/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW6 | |
| * | |
| * @author @spllr | |
| */ |
| import UIKit | |
| // If you enjoyed this talk (video link will be up soon), then you might also enjoy our book Advanced Swift: http://www.objc.io/books/advanced-swift | |
| struct Person { | |
| let name: String | |
| let city: String | |
| } | |
| let people = [ |
| /// | |
| // AppDelegate.swift | |
| // ZeroToApp | |
| // | |
| import UIKit | |
| import Firebase | |
| import FBSDKCoreKit | |
| @UIApplicationMain |
@available(iOS 10.0, *)
import UserNotifications
NSUserNotification API Reference
UNNotificationSound API Reference
UNUserNotificationCenter API Reference
| // | |
| // UserInfoCell.swift | |
| // | |
| // Created by Mathias Claassen on 30/8/16. | |
| // Copyright © 2016 Xmartlabs. All rights reserved. | |
| // | |
| import Foundation | |
| import Eureka |
| call in viewDidLoad | |
| setUpNavBar(bottomBorderColor: .white, opacity: 0.4, height: 1) | |
| func setUpNavBar(bottomBorderColor:UIColor,opacity:Float,height:CGFloat){ | |
| self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) | |
| let navLabel = UILabel(frame: CGRect.zero) | |
| navLabel.backgroundColor = UIColor.clear | |
| navLabel.font = UIFont.systemFont(ofSize: 18) | |
| navLabel.textAlignment = NSTextAlignment.center |