This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol KeyValueStore | |
| { | |
| func valueForKey(key: String) -> String | |
| func setValue(value: String, forKey key: String) | |
| func removeValueForKey(key: String) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Switch xcrun to leverage Xcode 7 | |
| # Note: This won't be needed once Xcode 7 is released | |
| # and becomes the primary Xcode in use. | |
| export DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer/ | |
| # Export Archive | |
| xcrun xcodebuild -exportArchive -exportOptionsPlist exportPlist.plist -archivePath /path/to/app.xcarchive -exportPath /path/to/app.ipa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import UIKit | |
| class ItemSizeCollectionViewcontroller : UICollectionViewController | |
| { | |
| // MARK: Outlets | |
| @IBOutlet weak var flowLayout: UICollectionViewFlowLayout! | |
| // MARK: Properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func animateChanges() | |
| { | |
| tableView.moveRowAtIndexPath(NSIndexPath(forRow: 2, inSection: 0), toIndexPath: NSIndexPath(forRow: 0, inSection: 0)) | |
| tableView.reloadRowsAtIndexPaths([NSIndexPath(forRow: 0, inSection: 0)], withRowAnimation: .Automatic) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import plistlib | |
| # Read Plists | |
| myAppInfoPlist = plistlib.readPlist(“MyApp/Info.plist”) | |
| watchKitExtensionInfoPlist = plistlib.readPlist(“WatchKitExtension/Info.plist”) | |
| watchKitAppInfoPlist = plistlib.readPlist(“WatchKitApp/Info.plist”) | |
| # Update Watch Kit Extension Plist | |
| watchKitExtensionInfoPlist[“NSExtension”][“NSExtensionAttributes”][“WKAppBundleIdentifier”] = watchKitAppInfoPlist[“CFBundleIdentifier”] | |
| watchKitExtensionInfoPlist[“CFBundleVersion”] = myAppInfoPlist[“CFBundleVersion”] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://stackoverflow.com/questions/20211990/sending-data-curl-json-in-python | |
| import requests #pip install requests | |
| import simplejson as json #pip install simplejson | |
| url = "http://<ip-address>:3030" | |
| widget = "welcome" | |
| data = { "auth_token": "YOUR_AUTH_TOKEN", "text": "Python Greetings!!" } | |
| fullUrl = "%s/widgets/%s" % (url, widget) |