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
| # Concept No. 1: Functions | |
| print("Print is a function.") | |
| print("Functions are commands that instruct the computer to do things.") | |
| print("Although, sometimes they are used to return values as well.") | |
| # Concept No. 2: Variables | |
| my_variable = "Variables are simply containers which hold values."\ | |
| # Concept No. 3: Lists | |
| my_list = [] |
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 | |
| var timestamp: Int = Int(NSDate().timeIntervalSince1970) | |
| var timestampPrecise: Double = NSDate().timeIntervalSince1970 | |
| print("Timestamp Cast as Integer (not precise): " + String(timestamp)) | |
| print("Timestamp left as Double (precise): " + String(timestampPrecise)) |
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
| // | |
| // InterfaceController.swift | |
| // Yo WatchKit Extension | |
| // | |
| // Created by Christopher Pedersen on 11/7/18. | |
| // Copyright © 2018 Christopher Pedersen. All rights reserved. | |
| // | |
| import WatchKit | |
| import Foundation |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>This is Jack's Wish List</title> | |
| </head> | |
| <body> | |
| <h1>Jack's List</h1> |
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
| // Source Code by Nick Hanan @ codingexplorer.com | |
| // https://www.codingexplorer.com/watch-connectivity-swift-application-context/ | |
| // Additional Code from Stack Overflow User 'Gati' | |
| // https://stackoverflow.com/questions/48131924/watchkit-extension-interfacecontroller-does-not-implement-delegate-method | |
| // | |
| // ViewController.swift | |
| // Yo3 |
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
| // | |
| // ViewController.swift | |
| // WatchPingPhone | |
| // | |
| // Created by Christopher Pedersen on 11/12/18. | |
| // Copyright © 2018 Christopher Pedersen. All rights reserved. | |
| // | |
| import Foundation | |
| import UIKit |
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
| // Example code demonstrating how to make a simple http post request with form data in swift on iOS. | |
| // Swift source code from the blog NewFiveFour.com (https://newfivefour.com/swift-ios-formurlencoded-post.html) | |
| // XML work around for using HTTP instead of HTTPS from the public domain | |
| // NOTE: You must include the work around if you would like to use HTTP instead of HTTPS | |
| // | |
| // ViewController.swift | |
| // PostMaphone2 | |
| // | |
| // Created by Christopher Pedersen on 11/18/18. |
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
| Oregon Trail Swift Edition (Build #36) | |
| https://drive.google.com/open?id=1bHM6eiQIRR1EHUGi02cIXgOuV38Ekxy1 |
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
| @UIApplicationMain | |
| final class AppDelegate: UIResponder, UIApplicationDelegate { | |
| let healthKitManager = HealthKitManager() | |
| func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
| if onboardingComplete { | |
| healthKitManager.requestAccessWithCompletion() { success, error in | |
| if success { print("HealthKit access granted") } | |
| else { print("Error requesting access to HealthKit: \(error)") } | |
| } |