- Xcode build
- Archive
- Provisioning Profile: Developer, Distribution
- TestFlight
- Privacy Policy
- App Id
This file contains 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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
This file contains 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
// Date extension | |
extension Date { | |
static func getStringFromDate(date: Date) -> String { | |
let dateFormatter = DateFormatter() | |
dateFormatter.dateFormat = "EEEE, MMM d, yyyy" | |
let dateString = dateFormatter.string(from: date) | |
return dateString | |
} | |
static func getDateFromString(dateString: String) -> Date? { | |
let formatter = ISO8601DateFormatter() |
This file contains 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
extension Bundle { | |
enum BundleError: Error { | |
case noResource(String) | |
case noContents(String) | |
case decodingError(Error) | |
} | |
func parseJSONData<T: Decodable>(_ name: String, ext: String = "json") throws -> T { | |
guard let path = Bundle.main.path(forResource: name, ofType: ext) else { | |
throw BundleError.noResource(name) |
Delegates: You use delegates to interact with Cocoa objects that inform you of events in an app.
Apple docs - delegation
// Object A
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
This file contains 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 UIKit | |
final class DetailView: UIView { | |
// setting up a scroll view | |
// 1. add scrollview | |
// 2. add content view | |
// 3. add subviews to content view | |
// Note: must set high priority of content view to low, default is 1000 | |
- Firebase pods are installed
- Firebase Storage is configured on your Firebase console.
- Media has been uploaded to Firebase Storage.
- You have already downloaded the Google-Info.plist file and added it to Xcode.
- Firebase has been configured in the AppDelegate.
- Firebase Authentication is configured or Firebase Storage read access is set to public i.e read: true;
This file contains 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
// Making sections for a 2D array to be used in a CollectionView or TableView. [Fellow] => [[Fellow]] | |
import Foundation | |
struct Fellow { | |
let name: String | |
let cohort: String | |
static func allFellows() -> [Fellow] { | |
return [ |
OlderNewer