├── .gitignore ├── .gitmodules ├── Design ├── WWDC ATV Icon Small.sketch ├── WWDC ATV Icon.sketch ├── WWDC ATV LaunchImage.sketch ├── WWDC ATV TopShelf.sketch └── export │ ├── wwdc-atv-background.png │ ├── wwdc-atv-front.png │ ├── wwdc-atv-launchimage.png │ ├── wwdc-atv-middle.png │ ├── wwdc-atv-small-background.png │ ├── wwdc-atv-small-front.png │ ├── wwdc-atv-small-middle.png │ └── wwdc-atv-topshelf.png ├── LICENSE ├── README.md ├── WWDC Top Shelf ├── FeaturedSessionsFetcher.swift ├── Info.plist └── ServiceProvider.swift ├── WWDC.xcodeproj └── project.pbxproj ├── WWDC ├── AppDelegate.swift ├── Assets.xcassets │ ├── App Icon & Top Shelf Image.brandassets │ │ ├── App Icon - Large.imagestack │ │ │ ├── Back.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── wwdc-atv-background.png │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Front.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── wwdc-atv-front.png │ │ │ │ └── Contents.json │ │ │ └── Middle.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── wwdc-atv-middle.png │ │ │ │ └── Contents.json │ │ ├── App Icon - Small.imagestack │ │ │ ├── Back.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── wwdc-atv-small-background.png │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Front.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── wwdc-atv-small-front.png │ │ │ │ └── Contents.json │ │ │ └── Middle.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── wwdc-atv-small-middle.png │ │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── Top Shelf Image.imageset │ │ │ ├── Contents.json │ │ │ └── wwdc-atv-topshelf.png │ ├── Contents.json │ └── LaunchImage.launchimage │ │ ├── Contents.json │ │ └── wwdc-atv-launchimage.png ├── Base.lproj │ └── Main.storyboard ├── Core │ ├── LiveEventObserver.swift │ ├── Models.swift │ └── WWDCDatabase.swift ├── DetailViewController.swift ├── Info.plist ├── PlayerBuilder.swift └── VideosViewController.swift ├── screenshots ├── screenshot.png └── topshelf.png └── vendor ├── Realm.framework ├── A792C1DF-D8FC-3489-9384-E7EB44DC299A.bcsymbolmap ├── CHANGELOG.md ├── Headers │ ├── RLMArray.h │ ├── RLMCollection.h │ ├── RLMConstants.h │ ├── RLMDefines.h │ ├── RLMMigration.h │ ├── RLMObject.h │ ├── RLMObjectBase.h │ ├── RLMObjectBase_Dynamic.h │ ├── RLMObjectSchema.h │ ├── RLMPlatform.h │ ├── RLMProperty.h │ ├── RLMRealm.h │ ├── RLMRealmConfiguration.h │ ├── RLMRealm_Dynamic.h │ ├── RLMResults.h │ ├── RLMSchema.h │ └── Realm.h ├── Info.plist ├── LICENSE ├── Modules │ └── module.modulemap ├── PrivateHeaders │ ├── RLMAccessor.h │ ├── RLMArray_Private.h │ ├── RLMListBase.h │ ├── RLMMigration_Private.h │ ├── RLMObjectSchema_Private.h │ ├── RLMObjectStore.h │ ├── RLMObject_Private.h │ ├── RLMOptionalBase.h │ ├── RLMProperty_Private.h │ ├── RLMRealmConfiguration_Private.h │ ├── RLMRealmUtil.hpp │ ├── RLMRealm_Private.h │ ├── RLMResults_Private.h │ └── RLMSchema_Private.h ├── Realm ├── _CodeSignature │ └── CodeResources └── strip-frameworks.sh ├── RealmSwift.framework ├── 071A9353-A9D3-3243-91A9-BD46CD7EF709.bcsymbolmap ├── A792C1DF-D8FC-3489-9384-E7EB44DC299A.bcsymbolmap ├── Headers │ └── RealmSwift-Swift.h ├── Info.plist ├── Modules │ ├── RealmSwift.swiftmodule │ │ ├── arm64.swiftdoc │ │ ├── arm64.swiftmodule │ │ ├── x86_64.swiftdoc │ │ └── x86_64.swiftmodule │ └── module.modulemap ├── RealmSwift └── _CodeSignature │ └── CodeResources └── SwiftyJSON.swift /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | __MACOSX 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | *.xcworkspace 12 | !default.xcworkspace 13 | xcuserdata 14 | profile 15 | *.moved-aside 16 | DerivedData 17 | .idea/ 18 | Crashlytics.sh 19 | generatechangelog.sh -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendor/Alamofire"] 2 | path = vendor/Alamofire 3 | url = https://github.com/Alamofire/Alamofire.git 4 | -------------------------------------------------------------------------------- /Design/WWDC ATV Icon Small.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/WWDC ATV Icon Small.sketch -------------------------------------------------------------------------------- /Design/WWDC ATV Icon.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/WWDC ATV Icon.sketch -------------------------------------------------------------------------------- /Design/WWDC ATV LaunchImage.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/WWDC ATV LaunchImage.sketch -------------------------------------------------------------------------------- /Design/WWDC ATV TopShelf.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/WWDC ATV TopShelf.sketch -------------------------------------------------------------------------------- /Design/export/wwdc-atv-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/export/wwdc-atv-background.png -------------------------------------------------------------------------------- /Design/export/wwdc-atv-front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/export/wwdc-atv-front.png -------------------------------------------------------------------------------- /Design/export/wwdc-atv-launchimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/export/wwdc-atv-launchimage.png -------------------------------------------------------------------------------- /Design/export/wwdc-atv-middle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/export/wwdc-atv-middle.png -------------------------------------------------------------------------------- /Design/export/wwdc-atv-small-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/export/wwdc-atv-small-background.png -------------------------------------------------------------------------------- /Design/export/wwdc-atv-small-front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/export/wwdc-atv-small-front.png -------------------------------------------------------------------------------- /Design/export/wwdc-atv-small-middle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/export/wwdc-atv-small-middle.png -------------------------------------------------------------------------------- /Design/export/wwdc-atv-topshelf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/Design/export/wwdc-atv-topshelf.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Guilherme Rambo 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | - Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | - Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 17 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 20 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## IMPORTANT: this project is abandoned 2 | 3 | ***Apple released their own WWDC app for tvOS, so this app is not necessary anymore.*** 4 | 5 | ------ 6 | 7 | # WWDC app for the new Apple TV 8 | 9 | Based on [WWDC for OS X](https://github.com/insidegui/WWDC). 10 | 11 | ## Screenshots 12 | 13 | ### Main Screen 14 | 15 | ![screenshot](https://raw.githubusercontent.com/insidegui/WWDC-tvOS/master/screenshots/screenshot.png) 16 | 17 | ### Top Shelf Extension 18 | 19 | ![screenshot](https://raw.githubusercontent.com/insidegui/WWDC-tvOS/master/screenshots/topshelf.png) 20 | 21 | ## Build Instructions 22 | 23 | * Important: building requires Xcode 7.1.1 or later. 24 | 25 | * To run this on an actual Apple TV you must have a paid developer account. 26 | 27 | The only steps required before you build is to pull down the code and submodules: 28 | 29 | $ git clone --recursive https://github.com/insidegui/WWDC-tvOS.git 30 | 31 | ## AppStore? 32 | 33 | I do not intend to put this on the AppStore, Apple would probably reject It and they're probably working on an official WWDC app anyway. This is just a temporary solution for those who want to watch sessions on their new Apple TV ;) 34 | -------------------------------------------------------------------------------- /WWDC Top Shelf/FeaturedSessionsFetcher.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FeaturedSessionsFetcher.swift 3 | // WWDC 4 | // 5 | // Created by Guilherme Rambo on 23/12/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct FeaturedSession { 12 | 13 | var key = "" 14 | var title = "" 15 | var summary = "" 16 | var thumbnail = "" 17 | 18 | init(json: JSON) { 19 | if let key = json["id"].string { 20 | self.key = key 21 | } 22 | if let title = json["title"].string { 23 | self.title = title 24 | } 25 | if let summary = json["summary"].string { 26 | self.summary = summary 27 | } 28 | if let thumbnail = json["img"].string { 29 | self.thumbnail = thumbnail 30 | } 31 | } 32 | } 33 | 34 | class FeaturedSessionsFetcher { 35 | 36 | private let serviceURL = "http://wwdc.guilhermerambo.me/featured.json" 37 | private let URLSession = NSURLSession(configuration: NSURLSessionConfiguration.ephemeralSessionConfiguration()) 38 | 39 | func fetchFeaturedSessions(completionHandler: ([FeaturedSession]?) -> ()) { 40 | URLSession.dataTaskWithURL(NSURL(string: serviceURL)!) { data, response, error in 41 | guard let data = data else { 42 | print("Error fetching featured sessions for the top shelf \(error)") 43 | completionHandler(nil) 44 | return 45 | } 46 | 47 | let json = JSON(data: data) 48 | var featuredSessions = [FeaturedSession]() 49 | if let jsonSessions = json.array { 50 | for jsonSession in jsonSessions { 51 | featuredSessions.append(FeaturedSession(json: jsonSession)) 52 | } 53 | completionHandler(featuredSessions) 54 | } else { 55 | completionHandler(nil) 56 | } 57 | }.resume() 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /WWDC Top Shelf/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | WWDC Top Shelf 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | TVExtensionProtocols 30 | 31 | TVTopShelfProvider 32 | 33 | 34 | NSExtensionPointIdentifier 35 | com.apple.tv-services 36 | NSExtensionPrincipalClass 37 | $(PRODUCT_MODULE_NAME).ServiceProvider 38 | 39 | UIRequiredDeviceCapabilities 40 | 41 | arm64 42 | 43 | NSAppTransportSecurity 44 | 45 | NSAllowsArbitraryLoads 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /WWDC Top Shelf/ServiceProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ServiceProvider.swift 3 | // WWDC Top Shelf 4 | // 5 | // Created by Guilherme Rambo on 23/12/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import TVServices 11 | 12 | class ServiceProvider: NSObject, TVTopShelfProvider { 13 | 14 | let sessionFetcher = FeaturedSessionsFetcher() 15 | 16 | var featuredSessions: [FeaturedSession]? { 17 | didSet { 18 | guard featuredSessions != nil else { return } 19 | 20 | NSNotificationCenter.defaultCenter().postNotificationName(TVTopShelfItemsDidChangeNotification, object: nil) 21 | } 22 | } 23 | 24 | override init() { 25 | super.init() 26 | 27 | sessionFetcher.fetchFeaturedSessions { sessions in 28 | self.featuredSessions = sessions 29 | } 30 | } 31 | 32 | // MARK: - TVTopShelfProvider protocol 33 | 34 | var topShelfStyle: TVTopShelfContentStyle { 35 | // Return desired Top Shelf style. 36 | return .Sectioned 37 | } 38 | 39 | var topShelfItems: [TVContentItem] { 40 | guard let featuredSessions = featuredSessions else { return [] } 41 | 42 | var items = [TVContentItem]() 43 | 44 | for session in featuredSessions { 45 | let item = TVContentItem(contentIdentifier: session.contentIdentifier)! 46 | item.title = session.title 47 | item.imageURL = NSURL(string: session.thumbnail)! 48 | item.imageShape = .HDTV 49 | item.playURL = session.playURL 50 | item.displayURL = session.displayURL 51 | 52 | items.append(item) 53 | } 54 | 55 | let containerIdentifier = TVContentIdentifier(identifier: "br.com.guilhermerambo.WWDC.Featured", container: nil)! 56 | let container = TVContentItem(contentIdentifier: containerIdentifier)! 57 | container.title = "Featured Session Videos" 58 | container.topShelfItems = items 59 | 60 | return [container] 61 | } 62 | 63 | } 64 | 65 | private extension FeaturedSession { 66 | 67 | private var contentIdentifierName: String { 68 | return "br.com.guilhermerambo.\(key)-\(title)" 69 | } 70 | 71 | var contentIdentifier: TVContentIdentifier { 72 | return TVContentIdentifier(identifier: contentIdentifierName, container: nil)! 73 | } 74 | 75 | var playURL: NSURL { 76 | return NSURL(string: "wwdc://play/\(key)")! 77 | } 78 | 79 | var displayURL: NSURL { 80 | return NSURL(string: "wwdc://show/\(key)")! 81 | } 82 | 83 | } -------------------------------------------------------------------------------- /WWDC/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // WWDC 4 | // 5 | // Created by Guilherme Rambo on 19/11/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 17 | LiveEventObserver.SharedObserver().start(window!.rootViewController!) 18 | 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool { 45 | guard let components = NSURLComponents(URL: url, resolvingAgainstBaseURL: false) else { return false } 46 | 47 | if (components.scheme != "wwdc") { 48 | return false 49 | } 50 | guard let host = components.host else { return false } 51 | 52 | guard let key = url.lastPathComponent else { return false } 53 | 54 | switch host { 55 | case "play": 56 | playSessionWithKey("#\(key)") 57 | case "show": 58 | displaySessionWithKey("#\(key)") 59 | default: 60 | return false 61 | } 62 | 63 | return true 64 | } 65 | 66 | private var videosViewController: VideosViewController? { 67 | guard let navigationController = window?.rootViewController?.childViewControllers[0] as? UINavigationController else { return nil } 68 | 69 | return navigationController.childViewControllers[0] as? VideosViewController 70 | } 71 | 72 | private func displaySessionWithKey(key: String) { 73 | guard let videosVC = videosViewController else { return } 74 | videosVC.displaySession(key) 75 | } 76 | 77 | private func playSessionWithKey(key: String) { 78 | guard let videosVC = videosViewController else { return } 79 | videosVC.playSession(key) 80 | } 81 | 82 | 83 | } 84 | 85 | -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "wwdc-atv-background.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/wwdc-atv-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/wwdc-atv-background.png -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "wwdc-atv-front.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/wwdc-atv-front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/wwdc-atv-front.png -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "wwdc-atv-middle.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/wwdc-atv-middle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/wwdc-atv-middle.png -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "wwdc-atv-small-background.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/wwdc-atv-small-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/wwdc-atv-small-background.png -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "wwdc-atv-small-front.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/wwdc-atv-small-front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/wwdc-atv-small-front.png -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "wwdc-atv-small-middle.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/wwdc-atv-small-middle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/wwdc-atv-small-middle.png -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "size" : "1280x768", 5 | "idiom" : "tv", 6 | "filename" : "App Icon - Large.imagestack", 7 | "role" : "primary-app-icon" 8 | }, 9 | { 10 | "size" : "400x240", 11 | "idiom" : "tv", 12 | "filename" : "App Icon - Small.imagestack", 13 | "role" : "primary-app-icon" 14 | }, 15 | { 16 | "size" : "1920x720", 17 | "idiom" : "tv", 18 | "filename" : "Top Shelf Image.imageset", 19 | "role" : "top-shelf-image" 20 | } 21 | ], 22 | "info" : { 23 | "version" : 1, 24 | "author" : "xcode" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "wwdc-atv-topshelf.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/wwdc-atv-topshelf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/WWDC/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/wwdc-atv-topshelf.png -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "landscape", 5 | "idiom" : "tv", 6 | "filename" : "wwdc-atv-launchimage.png", 7 | "extent" : "full-screen", 8 | "minimum-system-version" : "9.0", 9 | "scale" : "1x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /WWDC/Assets.xcassets/LaunchImage.launchimage/wwdc-atv-launchimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/WWDC/Assets.xcassets/LaunchImage.launchimage/wwdc-atv-launchimage.png -------------------------------------------------------------------------------- /WWDC/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | 35 | 36 | 37 | 38 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 39 | 40 | 41 | 42 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /WWDC/Core/LiveEventObserver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LiveEventObserver.swift 3 | // WWDC 4 | // 5 | // Created by Guilherme Rambo on 16/05/15. 6 | // Copyright (c) 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AVFoundation 11 | import AVKit 12 | 13 | public let LiveEventNextInfoChangedNotification = "LiveEventNextInfoChangedNotification" 14 | public let LiveEventTitleAvailableNotification = "LiveEventTitleAvailableNotification" 15 | public let LiveEventWillStartPlayingNotification = "LiveEventWillStartPlayingNotification" 16 | private let _sharedInstance = LiveEventObserver() 17 | 18 | class LiveEventObserver: NSObject { 19 | 20 | var nextEvent: LiveSession? { 21 | didSet { 22 | NSNotificationCenter.defaultCenter().postNotificationName(LiveEventNextInfoChangedNotification, object: nil) 23 | } 24 | } 25 | private var lastEventFound: LiveSession? 26 | private var timer: NSTimer? 27 | private var liveEventPlayerController: AVPlayerViewController? 28 | 29 | class func SharedObserver() -> LiveEventObserver { 30 | return _sharedInstance 31 | } 32 | 33 | private var parentViewController: UIViewController? 34 | func start(parent: UIViewController) { 35 | parentViewController = parent 36 | 37 | timer = NSTimer.scheduledTimerWithTimeInterval(5.0, target: self, selector: "checkNow", userInfo: nil, repeats: true) 38 | checkNow() 39 | } 40 | 41 | func checkNow() { 42 | checkForLiveEvent { available, event in 43 | dispatch_async(dispatch_get_main_queue()) { 44 | if !available && self.liveEventPlayerController != nil { 45 | self.liveEventPlayerController?.dismissViewControllerAnimated(true) { 46 | self.liveEventPlayerController?.player?.pause() 47 | self.liveEventPlayerController = nil 48 | } 49 | 50 | return 51 | } 52 | 53 | // an event is available 54 | if available && event != nil { 55 | self.lastEventFound = event 56 | self.showNotification(event!) 57 | } 58 | } 59 | } 60 | 61 | fetchNextLiveEvent { available, event in 62 | dispatch_async(dispatch_get_main_queue()) { 63 | self.nextEvent = event 64 | } 65 | } 66 | } 67 | 68 | private func doPlayEvent(event: LiveSession) { 69 | // we already have a live event playing, just return 70 | if liveEventPlayerController != nil { 71 | NSNotificationCenter.defaultCenter().postNotificationName(LiveEventTitleAvailableNotification, object: event.title) 72 | return 73 | } 74 | 75 | NSNotificationCenter.defaultCenter().postNotificationName(LiveEventWillStartPlayingNotification, object: nil) 76 | 77 | liveEventPlayerController = buildPlayerViewController(event) 78 | parentViewController?.presentViewController(liveEventPlayerController!, animated: true) { 79 | self.liveEventPlayerController?.player?.play() 80 | } 81 | } 82 | 83 | // MARK: User notifications 84 | 85 | private var isShowingAlert = false 86 | private var userDecided = false 87 | 88 | func checkNowAndPlay() { 89 | if let event = lastEventFound { 90 | doPlayEvent(event) 91 | } else { 92 | checkNow() 93 | } 94 | } 95 | 96 | func showNotification(event: LiveSession) { 97 | guard !isShowingAlert && !userDecided && liveEventPlayerController == nil else { return } 98 | 99 | isShowingAlert = true 100 | 101 | let alert = UIAlertController(title: "Live session available", message: "\(event.title) is live right now. Would you like to watch It?", preferredStyle: .Alert) 102 | let yesAction = UIAlertAction(title: "Yes", style: .Default) { _ in 103 | self.userDecided = true 104 | self.isShowingAlert = true 105 | self.doPlayEvent(event) 106 | } 107 | let noAction = UIAlertAction(title: "No", style: .Cancel) { _ in 108 | self.userDecided = true 109 | self.isShowingAlert = false 110 | } 111 | 112 | alert.addAction(yesAction) 113 | alert.addAction(noAction) 114 | 115 | parentViewController?.presentViewController(alert, animated: true, completion: nil) 116 | } 117 | 118 | private let _liveServiceURL = "http://wwdc.guilhermerambo.me/live.json" 119 | private let _liveNextServiceURL = "http://wwdc.guilhermerambo.me/next.json" 120 | 121 | private var liveURL: NSURL { 122 | get { 123 | sranddev() 124 | // adds a random number as a parameter to completely prevent any caching 125 | return NSURL(string: "\(_liveServiceURL)?t=\(rand())&s=\(NSDate.timeIntervalSinceReferenceDate())")! 126 | } 127 | } 128 | 129 | private var liveNextURL: NSURL { 130 | get { 131 | sranddev() 132 | // adds a random number as a parameter to completely prevent any caching 133 | return NSURL(string: "\(_liveNextServiceURL)?t=\(rand())&s=\(NSDate.timeIntervalSinceReferenceDate())")! 134 | } 135 | } 136 | 137 | let URLSession2 = NSURLSession(configuration: NSURLSessionConfiguration.ephemeralSessionConfiguration()) 138 | 139 | func checkForLiveEvent(completionHandler: (Bool, LiveSession?) -> ()) { 140 | let task = URLSession2.dataTaskWithURL(liveURL) { data, response, error in 141 | if data == nil { 142 | completionHandler(false, nil) 143 | return 144 | } 145 | 146 | let jsonData = JSON(data: data!) 147 | let event = LiveSession(jsonObject: jsonData) 148 | 149 | if event.isLiveRightNow { 150 | completionHandler(true, event) 151 | } else { 152 | completionHandler(false, nil) 153 | } 154 | } 155 | task.resume() 156 | } 157 | 158 | func fetchNextLiveEvent(completionHandler: (Bool, LiveSession?) -> ()) { 159 | let task = URLSession2.dataTaskWithURL(liveNextURL) { data, response, error in 160 | if data == nil { 161 | completionHandler(false, nil) 162 | return 163 | } 164 | 165 | let jsonData = JSON(data: data!) 166 | let event = LiveSession(jsonObject: jsonData) 167 | 168 | if event.title != "" { 169 | completionHandler(true, event) 170 | } else { 171 | completionHandler(false, nil) 172 | } 173 | } 174 | task.resume() 175 | } 176 | 177 | } 178 | 179 | 180 | extension LiveEventObserver { 181 | func buildPlayerViewController(session: LiveSession) -> AVPlayerViewController! { 182 | let (controller, _) = PlayerBuilder.buildPlayerViewController(session.streamURL!.absoluteString, title: session.title, description: session.summary) 183 | 184 | return controller 185 | } 186 | } -------------------------------------------------------------------------------- /WWDC/Core/Models.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Schema.swift 3 | // WWDC Data Layer Rewrite 4 | // 5 | // Created by Guilherme Rambo on 01/10/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import RealmSwift 11 | 12 | class AppConfig: Object { 13 | dynamic var sessionsURL = "" 14 | dynamic var videosURL = "" 15 | dynamic var isWWDCWeek = false 16 | dynamic var videosUpdatedAt = "" 17 | 18 | convenience required init(json: JSON) { 19 | self.init() 20 | 21 | self.sessionsURL = json["sessions"].stringValue 22 | self.videosURL = json["url"].stringValue 23 | self.isWWDCWeek = json["wwdc_week"].intValue == 1; 24 | } 25 | 26 | override static func primaryKey() -> String? { 27 | return "sessionsURL" 28 | } 29 | 30 | func isEqualToConfig(config: AppConfig?) -> Bool { 31 | guard let compareConfig = config else { return false } 32 | 33 | return compareConfig.sessionsURL == self.sessionsURL && compareConfig.videosURL == self.videosURL && compareConfig.isWWDCWeek == self.isWWDCWeek 34 | } 35 | } 36 | 37 | class Session: Object { 38 | 39 | dynamic var uniqueId = "" 40 | dynamic var id = 0 41 | dynamic var year = 0 42 | dynamic var date = "" 43 | dynamic var track = "" 44 | dynamic var focus = "" 45 | dynamic var title = "" 46 | dynamic var summary = "" 47 | dynamic var videoURL = "" 48 | dynamic var hdVideoURL = "" 49 | dynamic var slidesURL = "" 50 | dynamic var shelfImageURL = "" 51 | dynamic var progress = 0.0 52 | dynamic var currentPosition: Double = 0.0 53 | dynamic var favorite = false 54 | dynamic var transcript: Transcript? 55 | dynamic var slidesPDFData = NSData() 56 | dynamic var downloaded = false 57 | 58 | convenience required init(json: JSON) { 59 | self.init() 60 | 61 | self.id = json["id"].intValue 62 | self.year = json["year"].intValue 63 | self.uniqueId = "#\(self.year)-\(self.id)" 64 | self.title = json["title"].stringValue 65 | self.summary = json["description"].stringValue 66 | self.date = json["date"].stringValue 67 | self.track = json["track"].stringValue 68 | self.videoURL = json["url"].stringValue 69 | self.hdVideoURL = json["download_hd"].stringValue 70 | self.slidesURL = json["slides"].stringValue 71 | self.track = json["track"].stringValue 72 | if let focus = json["focus"].arrayObject as? [String] { 73 | self.focus = focus.joinWithSeparator(", ") 74 | } 75 | if let images = json["images"].dictionaryObject as? [String: String] { 76 | self.shelfImageURL = images["shelf"] ?? "" 77 | } 78 | } 79 | 80 | override static func primaryKey() -> String? { 81 | return "uniqueId" 82 | } 83 | 84 | override static func indexedProperties() -> [String] { 85 | return ["title"] 86 | } 87 | 88 | var shareURL: String { 89 | get { 90 | return "wwdc://\(year)/\(id)" 91 | } 92 | } 93 | 94 | var hd_url: String? { 95 | if hdVideoURL == "" { 96 | return nil 97 | } else { 98 | return hdVideoURL 99 | } 100 | } 101 | 102 | var ATVURL: NSURL { 103 | if year > 2013 { 104 | if let url = hd_url { 105 | return NSURL(string: url)! 106 | } else { 107 | return NSURL(string: videoURL)! 108 | } 109 | } else { 110 | // for some reason, download URLs for videos from 2013 and below are not working 111 | return NSURL(string: videoURL)! 112 | } 113 | } 114 | 115 | var subtitle: String { 116 | return "\(year) | \(track) | \(focus)" 117 | } 118 | 119 | } 120 | 121 | enum SearchFilter { 122 | case Arbitrary(NSPredicate) 123 | case Year([Int]) 124 | case Track([String]) 125 | case Focus([String]) 126 | case Favorited(Bool) 127 | case Downloaded(Bool) 128 | 129 | var isEmpty: Bool { 130 | switch self { 131 | case .Arbitrary: 132 | return false 133 | case .Year(let years): 134 | return years.count == 0 135 | case .Track(let tracks): 136 | return tracks.count == 0 137 | case .Focus(let focuses): 138 | return focuses.count == 0 139 | // for boolean properties, setting them to "false" means empty because we only want to filter when true 140 | case .Favorited(let favorited): 141 | return !favorited; 142 | case .Downloaded(let downloaded): 143 | return !downloaded; 144 | } 145 | } 146 | 147 | var predicate: NSPredicate { 148 | switch self { 149 | case .Arbitrary(let predicate): 150 | return predicate 151 | case .Year(let years): 152 | return NSPredicate(format: "year IN %@", years) 153 | case .Track(let tracks): 154 | return NSPredicate(format: "track IN %@", tracks) 155 | case .Focus(let focuses): 156 | return NSPredicate(format: "focus IN %@", focuses) 157 | case .Favorited(let favorited): 158 | return NSPredicate(format: "favorite = %@", favorited) 159 | case .Downloaded(let downloaded): 160 | return NSPredicate(format: "downloaded = %@", downloaded) 161 | } 162 | } 163 | 164 | var selectedInts: [Int]? { 165 | switch self { 166 | case .Year(let years): 167 | return years 168 | default: 169 | return nil 170 | } 171 | } 172 | 173 | var selectedStrings: [String]? { 174 | switch self { 175 | case .Track(let strings): 176 | return strings 177 | case .Focus(let strings): 178 | return strings 179 | default: 180 | return nil 181 | } 182 | } 183 | 184 | static func predicatesWithFilters(filters: SearchFilters) -> [NSPredicate] { 185 | var predicates: [NSPredicate] = [] 186 | for filter in filters { 187 | predicates.append(filter.predicate) 188 | } 189 | return predicates 190 | } 191 | } 192 | typealias SearchFilters = [SearchFilter] 193 | 194 | class TranscriptLine: Object { 195 | dynamic var transcript: Transcript? 196 | dynamic var text = "" 197 | dynamic var timecode: Double = 0.0 198 | 199 | convenience required init(text: String, timecode: Double) { 200 | self.init() 201 | 202 | self.text = text 203 | self.timecode = timecode 204 | } 205 | } 206 | 207 | class Transcript: Object { 208 | dynamic var session: Session? 209 | dynamic var fullText = "" 210 | let lines = List() 211 | 212 | convenience required init(json: JSON, session: Session) { 213 | self.init() 214 | 215 | self.session = session 216 | self.fullText = json["transcript"].stringValue 217 | 218 | if let annotations = json["annotations"].arrayObject as? [String], timecodes = json["timecodes"].arrayObject as? [Double] { 219 | for annotation in annotations { 220 | guard let idx = annotations.indexOf({ $0 == annotation }) else { continue } 221 | let line = TranscriptLine(text: annotation, timecode: timecodes[idx]) 222 | line.transcript = self 223 | self.lines.append(line) 224 | } 225 | } 226 | } 227 | } 228 | 229 | class LiveSession { 230 | var id = 0 231 | var title = "" 232 | var summary = "" 233 | var startsAt: NSDate? 234 | var streamURL: NSURL? 235 | var alternateStreamURL = "" 236 | var isLiveRightNow = false 237 | 238 | private struct Keys { 239 | static let id = "id" 240 | static let title = "title" 241 | static let description = "description" 242 | static let stream = "stream" 243 | static let stream2 = "stream_elcapitan" 244 | static let startsAt = "starts_at" 245 | static let isLiveRightNow = "isLiveRightNow" 246 | } 247 | 248 | private let _dateTimezone = "GMT" 249 | private let _dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'ZZZZ" 250 | 251 | init(jsonObject: JSON) { 252 | id = jsonObject[Keys.id].intValue 253 | 254 | if let title = jsonObject[Keys.title].string { 255 | self.title = title 256 | } else { 257 | self.title = "" 258 | } 259 | 260 | if let description = jsonObject[Keys.description].string { 261 | self.summary = description 262 | } else { 263 | self.summary = "" 264 | } 265 | 266 | if let streamURL = jsonObject[Keys.stream].string { 267 | self.streamURL = NSURL(string: streamURL) 268 | } 269 | 270 | isLiveRightNow = jsonObject[Keys.isLiveRightNow].boolValue 271 | 272 | let formatter = NSDateFormatter() 273 | formatter.dateFormat = _dateFormat 274 | if let startsAtString = jsonObject[Keys.startsAt].string { 275 | let startsAtWithZone = startsAtString+_dateTimezone 276 | startsAt = formatter.dateFromString(startsAtWithZone) 277 | } 278 | } 279 | } -------------------------------------------------------------------------------- /WWDC/Core/WWDCDatabase.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SessionFetcher.swift 3 | // WWDC Data Layer Rewrite 4 | // 5 | // Created by Guilherme Rambo on 01/10/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import RealmSwift 11 | import Alamofire 12 | 13 | func mainQS(block: () -> ()) { 14 | dispatch_sync(dispatch_get_main_queue(), block) 15 | } 16 | func mainQ(block: () -> ()) { 17 | dispatch_async(dispatch_get_main_queue(), block) 18 | } 19 | 20 | private let _sharedWWDCDatabase = WWDCDatabase() 21 | 22 | typealias SessionsUpdatedCallback = () -> Void 23 | 24 | @objc class WWDCDatabase: NSObject { 25 | 26 | private struct Constants { 27 | static let internalServiceURL = "http://wwdc.guilhermerambo.me/index.json" 28 | static let asciiServiceBaseURL = "http://asciiwwdc.com/" 29 | } 30 | 31 | class var sharedDatabase: WWDCDatabase { 32 | return _sharedWWDCDatabase 33 | } 34 | 35 | private let bgThread = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0) 36 | private var transcriptIndexingQueue = NSOperationQueue() 37 | 38 | private var config: AppConfig! { 39 | didSet { 40 | guard config != nil else { return } 41 | 42 | updateSessionVideos() 43 | } 44 | } 45 | 46 | let realm = try! Realm() 47 | 48 | /// Use this to change properties of model objects **on the main thread** 49 | /// - Warning: if you try to change properties of model objects (such as Session) outside a `doChanges` block, an exception will be thrown 50 | func doChanges(block: () -> Void) { 51 | realm.beginWrite() 52 | block() 53 | try! realm.commitWrite() 54 | } 55 | 56 | /// Use this to change properties of model objects **on a background thread** 57 | /// - Note: This will not setup the thread for you, It is your responsibility to enter a background thread and then call `doBackgroundChanges` 58 | /// - Warning: if you try to change properties of model objects (such as Session) outside a `doChanges` block, an exception will be thrown 59 | /// - Warning: if you try to directly change a model fetched from another thread, an exception will be thrown. 60 | /// If you need to change a model fetched on another thread, re-fetch it using the provided realm before making the changes 61 | func doBackgroundChanges(block: (realm: Realm) -> Void) { 62 | let bgRealm = try! Realm() 63 | bgRealm.beginWrite() 64 | block(realm: bgRealm) 65 | try! bgRealm.commitWrite() 66 | } 67 | 68 | /// The progress when the transcripts are being downloaded/indexed 69 | var transcriptIndexingProgress: NSProgress? { 70 | didSet { 71 | transcriptIndexingStartedCallback?() 72 | } 73 | } 74 | /// Called when transcript downloading/indexing starts, 75 | /// use `transcriptIndexingProgress` to track progress 76 | var transcriptIndexingStartedCallback: (() -> Void)? 77 | 78 | /// A callback to execute whenever new sessions are available 79 | /// - parameter newSessionKeys: The keys (uniqueId) for the new sessions 80 | var sessionListChangedCallback: ((newSessionKeys: [String]) -> Void)? 81 | 82 | /// This is the main "sync" function 83 | /// #### The following steps are performed when `refresh()` is called: 84 | /// 1. Check to see if the URL for Apple's service has changed and update app config accordingly 85 | /// 2. Call Apple's service to get the list of session videos 86 | /// 3. Parse the results and update the local database 87 | /// 4. Fetch and index transcripts from ASCIIWWDC 88 | func refresh() { 89 | // try to find an existing AppConfig object in the database 90 | let fetchedConfig = realm.objects(AppConfig.self) 91 | if fetchedConfig.count > 0 { 92 | self.config = fetchedConfig[0] 93 | } 94 | 95 | fetchOrUpdateAppleServiceURLs() 96 | } 97 | 98 | /// Returns the list of sessions available sorted by year and session id 99 | /// - Warning: can only be used from the main thread 100 | var standardSessionList: Results { 101 | return realm.objects(Session.self).sorted(sortDescriptorsForSessionList) 102 | } 103 | 104 | /// Returns the list of sessions available, grouped by years 105 | /// - Warning: can only be used from the main thread 106 | var sessionsGroupedByYear: [Int:Results] { 107 | if _sessionsGroupedByYear != nil { 108 | if _sessionsGroupedByYear?.count > 0 { 109 | return _sessionsGroupedByYear! 110 | } 111 | } 112 | 113 | let allSessions = standardSessionList 114 | var years = [Int]() 115 | for session in allSessions { 116 | if years.indexOf(session.year) == nil { 117 | years.append(session.year) 118 | } 119 | } 120 | years.sortInPlace { $0 > $1 } 121 | 122 | _sessionsGroupedByYear = [Int:Results]() 123 | for year in years { 124 | _sessionsGroupedByYear![year] = allSessions.filter("year = %d", year) 125 | } 126 | 127 | return _sessionsGroupedByYear! 128 | } 129 | var _sessionsGroupedByYear: [Int:Results]? 130 | 131 | /// #### The best sort descriptors for the list of videos 132 | /// Orders the videos by year (descending) and session number (ascending) 133 | lazy var sortDescriptorsForSessionList: [SortDescriptor] = [SortDescriptor(property: "year", ascending: false), SortDescriptor(property: "id", ascending: true)] 134 | 135 | private func fetchOrUpdateAppleServiceURLs() { 136 | Alamofire.request(.GET, Constants.internalServiceURL).response { _, _, data, error in 137 | guard let jsonData = data else { 138 | print("No data returned from internal server!") 139 | return 140 | } 141 | 142 | let fetchedConfig = AppConfig(json: JSON(data: jsonData)) 143 | 144 | // if the fetched config from the service is equal to the config in the database, don't bother updating It 145 | guard !fetchedConfig.isEqualToConfig(self.config) else { return } 146 | 147 | print("AppConfig changed") 148 | 149 | // write the new configuration to the database so It can be fetched quickly later :) 150 | try! self.realm.write { self.realm.add(fetchedConfig, update: true) } 151 | self.config = fetchedConfig 152 | } 153 | } 154 | 155 | private func updateSessionVideos() { 156 | Alamofire.request(.GET, config.videosURL).response { _, _, data, error in 157 | dispatch_async(self.bgThread) { 158 | let backgroundRealm = try! Realm() 159 | 160 | guard let jsonData = data else { 161 | print("No data returned from Apple's (session videos) server!") 162 | return 163 | } 164 | 165 | let json = JSON(data: jsonData) 166 | 167 | var newVideosAvailable = true 168 | 169 | mainQS { 170 | // check if the videos have been updated since the last fetch 171 | if json["updated"].stringValue == self.config.videosUpdatedAt { 172 | print("Video list did not change") 173 | newVideosAvailable = false 174 | } else { 175 | try! self.realm.write { self.config.videosUpdatedAt = json["updated"].stringValue } 176 | } 177 | } 178 | 179 | guard newVideosAvailable else { return } 180 | 181 | guard let sessionsArray = json["sessions"].array else { 182 | print("Could not parse array of sessions") 183 | return 184 | } 185 | 186 | var newSessionKeys: [String] = [] 187 | 188 | let migrator = LegacyWWDCDatabaseMigrator() 189 | 190 | // create and store/update each video 191 | for jsonSession in sessionsArray { 192 | var session = Session(json: jsonSession) 193 | if backgroundRealm.objectForPrimaryKey(Session.self, key: session.uniqueId) == nil { 194 | newSessionKeys.append(session.uniqueId) 195 | } 196 | backgroundRealm.beginWrite() 197 | 198 | if migrator.needsMigration { session = migrator.migrateSession(session) } 199 | backgroundRealm.add(session, update: true) 200 | 201 | try! backgroundRealm.commitWrite() 202 | } 203 | 204 | migrator.needsMigration = false 205 | 206 | #if os(OSX) 207 | self.indexTranscriptsForSessionsWithKeys(newSessionKeys) 208 | #endif 209 | 210 | mainQ { self.sessionListChangedCallback?(newSessionKeys: newSessionKeys) } 211 | } 212 | } 213 | } 214 | 215 | private func indexTranscriptsForSessionsWithKeys(sessionKeys: [String]) { 216 | guard sessionKeys.count > 0 else { return } 217 | 218 | transcriptIndexingProgress = NSProgress(totalUnitCount: Int64(sessionKeys.count)) 219 | transcriptIndexingQueue.underlyingQueue = bgThread 220 | transcriptIndexingQueue.name = "Transcript indexing" 221 | 222 | let backgroundRealm = try! Realm() 223 | 224 | for key in sessionKeys { 225 | guard let session = backgroundRealm.objectForPrimaryKey(Session.self, key: key) else { return } 226 | indexTranscriptForSession(session) 227 | } 228 | } 229 | 230 | private func indexTranscriptForSession(session: Session) { 231 | // TODO: check if transcript has been updated and index It again if It has (https://github.com/ASCIIwwdc/asciiwwdc.com/issues/24) 232 | guard session.transcript == nil else { return } 233 | 234 | let sessionKey = session.uniqueId 235 | let url = "\(Constants.asciiServiceBaseURL)\(session.year)//sessions/\(session.id)" 236 | let headers = ["Accept": "application/json"] 237 | Alamofire.request(.GET, url, parameters: nil, encoding: .JSON, headers: headers).response { _, response, data, error in 238 | guard let jsonData = data else { 239 | print("No data returned from ASCIIWWDC for session \(session.uniqueId)") 240 | return 241 | } 242 | 243 | self.transcriptIndexingQueue.addOperationWithBlock { 244 | let bgRealm = try! Realm() 245 | guard let session = bgRealm.objectForPrimaryKey(Session.self, key: sessionKey) else { return } 246 | let transcript = Transcript(json: JSON(data: jsonData), session: session) 247 | bgRealm.beginWrite() 248 | bgRealm.add(transcript) 249 | session.transcript = transcript 250 | try! bgRealm.commitWrite() 251 | self.transcriptIndexingProgress?.completedUnitCount += 1 252 | } 253 | } 254 | } 255 | 256 | } 257 | 258 | // MARK: - Data migration 259 | 260 | private class LegacyWWDCDatabaseMigrator { 261 | 262 | private let migrationStatusKey = "MigratedToRealm" 263 | 264 | var needsMigration: Bool { 265 | get { 266 | return !defaults.boolForKey(migrationStatusKey) 267 | } 268 | set { 269 | defaults.setBool(newValue, forKey: migrationStatusKey) 270 | } 271 | } 272 | 273 | /// Migrates the session's favorite status, progress and position from the legacy preferences to the new model 274 | func migrateSession(session: Session) -> Session { 275 | #if os(OSX) 276 | session.downloaded = session.hdVideoURL.isEmpty ? false : VideoStore.SharedStore().hasVideo(session.hdVideoURL) 277 | #endif 278 | session.favorite = fetchSessionIsFavorite(session) 279 | session.currentPosition = fetchSessionCurrentPosition(session) 280 | session.progress = fetchSessionProgress(session) 281 | 282 | return session 283 | } 284 | 285 | init() { 286 | loadFavorites() 287 | } 288 | 289 | private let defaults = NSUserDefaults.standardUserDefaults() 290 | 291 | private func fetchSessionProgress(session: Session) -> Double { 292 | return defaults.doubleForKey(session.legacyProgressKey) 293 | } 294 | 295 | private func fetchSessionCurrentPosition(session: Session) -> Double { 296 | return defaults.doubleForKey(session.legacyCurrentPositionKey) 297 | } 298 | 299 | private var favorites: [String] = [] 300 | 301 | private let favoritesKey = "Favorites" 302 | private func loadFavorites() { 303 | if let faves = defaults.arrayForKey(favoritesKey) as? [String] { 304 | favorites = faves 305 | } 306 | } 307 | 308 | private func fetchSessionIsFavorite(session: Session) -> Bool { 309 | return favorites.contains(session.legacyUniqueKey) 310 | } 311 | 312 | } 313 | 314 | private extension Session { 315 | /* The properties below are only used to migrate the data from the old defaults-based model to Realm and will be removed in the near future */ 316 | 317 | var legacyUniqueKey: String { 318 | get { 319 | return "\(year)-\(id)" 320 | } 321 | } 322 | var legacyProgressKey: String { 323 | get { 324 | return "\(legacyUniqueKey)-progress" 325 | } 326 | } 327 | var legacyCurrentPositionKey: String { 328 | get { 329 | return "\(legacyUniqueKey)-currentPosition" 330 | } 331 | } 332 | } -------------------------------------------------------------------------------- /WWDC/DetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.swift 3 | // WWDC 4 | // 5 | // Created by Guilherme Rambo on 20/11/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AVFoundation 11 | import AVKit 12 | 13 | class DetailViewController: UIViewController { 14 | 15 | var session: Session! { 16 | didSet { 17 | updateUI() 18 | } 19 | } 20 | 21 | @IBOutlet weak var titleLabel: UILabel! 22 | @IBOutlet weak var subtitleLabel: UILabel! 23 | @IBOutlet weak var descriptionView: UITextView! 24 | @IBOutlet weak var watchButton: UIButton! 25 | 26 | override func viewDidLoad() { 27 | super.viewDidLoad() 28 | 29 | watchButton.hidden = true 30 | titleLabel.hidden = true 31 | subtitleLabel.hidden = true 32 | descriptionView.hidden = true 33 | 34 | updateUI() 35 | } 36 | 37 | private func updateUI() { 38 | guard session != nil else { return } 39 | guard titleLabel != nil else { return } 40 | 41 | titleLabel.text = session.title 42 | subtitleLabel.text = session.subtitle 43 | descriptionView.text = session.summary 44 | 45 | watchButton.hidden = false 46 | titleLabel.hidden = false 47 | subtitleLabel.hidden = false 48 | descriptionView.hidden = false 49 | } 50 | 51 | // MARK: Playback 52 | 53 | var player: AVPlayer? 54 | var timeObserver: AnyObject? 55 | 56 | @IBAction func watch(sender: AnyObject?) { 57 | let (playerController, newPlayer) = PlayerBuilder.buildPlayerViewController(session.ATVURL.absoluteString, title: session.title, description: session.summary) 58 | player = newPlayer 59 | 60 | presentViewController(playerController, animated: true) { [unowned self] in 61 | self.timeObserver = self.player?.addPeriodicTimeObserverForInterval(CMTimeMakeWithSeconds(5, 1), queue: dispatch_get_main_queue()) { currentTime in 62 | let progress = Double(CMTimeGetSeconds(currentTime)/CMTimeGetSeconds(self.player!.currentItem!.duration)) 63 | 64 | WWDCDatabase.sharedDatabase.doChanges { 65 | self.session!.progress = progress 66 | self.session!.currentPosition = CMTimeGetSeconds(currentTime) 67 | } 68 | } 69 | 70 | if self.session.currentPosition > 0 { 71 | self.player?.seekToTime(CMTimeMakeWithSeconds(self.session.currentPosition, 1)) 72 | } 73 | 74 | playerController.player?.play() 75 | } 76 | } 77 | 78 | deinit { 79 | if let observer = timeObserver { 80 | player?.removeTimeObserver(observer) 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /WWDC/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 2 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | UIMainStoryboardFile 31 | Main 32 | UIRequiredDeviceCapabilities 33 | 34 | arm64 35 | 36 | CFBundleURLTypes 37 | 38 | 39 | CFBundleURLName 40 | WWDC Session Video 41 | CFBundleURLSchemes 42 | 43 | wwdc 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /WWDC/PlayerBuilder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlayerBuilder.swift 3 | // WWDC 4 | // 5 | // Created by Guilherme Rambo on 22/11/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AVFoundation 11 | import AVKit 12 | 13 | class PlayerBuilder { 14 | 15 | class func buildPlayerViewController(videoURL: String, title: String?, description: String?) -> (AVPlayerViewController, AVPlayer) { 16 | // build playerItem and It's metadata 17 | let playerItem = AVPlayerItem(URL: NSURL(string: videoURL)!) 18 | 19 | if let title = title { 20 | let titleMeta = AVMutableMetadataItem() 21 | titleMeta.locale = NSLocale.currentLocale() 22 | titleMeta.keySpace = AVMetadataKeySpaceCommon 23 | titleMeta.key = AVMetadataCommonKeyTitle 24 | titleMeta.value = title 25 | playerItem.externalMetadata.append(titleMeta) 26 | } 27 | if let description = description { 28 | let descriptionMeta = AVMutableMetadataItem() 29 | descriptionMeta.locale = NSLocale.currentLocale() 30 | descriptionMeta.keySpace = AVMetadataKeySpaceCommon 31 | descriptionMeta.key = AVMetadataCommonKeyDescription 32 | descriptionMeta.value = description 33 | playerItem.externalMetadata.append(descriptionMeta) 34 | } 35 | 36 | // build player and playerController 37 | let player = AVPlayer(playerItem: playerItem) 38 | 39 | let playerController = AVPlayerViewController() 40 | playerController.player = player 41 | 42 | return (playerController, player) 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /WWDC/VideosViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // WWDC 4 | // 5 | // Created by Guilherme Rambo on 19/11/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RealmSwift 11 | 12 | class VideosViewController: UITableViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | tableView.remembersLastFocusedIndexPath = true 18 | 19 | loadSessions() 20 | } 21 | 22 | // MARK: Data loading 23 | 24 | var sessionYears: [Int]! { 25 | guard let sessionGroups = sessionGroups else { return nil} 26 | 27 | return [Int](sessionGroups.keys).sort { $0 > $1 } 28 | } 29 | var sessionGroups: [Int:Results]! { 30 | didSet { 31 | guard sessionGroups != nil else { return } 32 | 33 | let previouslySelectedPath = tableView.indexPathForSelectedRow 34 | 35 | tableView.reloadData() 36 | 37 | if sessionGroups.keys.count > 0 { 38 | tableView.selectRowAtIndexPath(previouslySelectedPath ?? NSIndexPath(forRow: 0, inSection: 0), animated: false, scrollPosition: .Top) 39 | } 40 | } 41 | } 42 | 43 | func loadSessions() { 44 | fetchLocalSessions() 45 | 46 | WWDCDatabase.sharedDatabase.sessionListChangedCallback = { newSessionKeys in 47 | print("\(newSessionKeys.count) new session(s) available") 48 | 49 | self.fetchLocalSessions() 50 | } 51 | WWDCDatabase.sharedDatabase.refresh() 52 | } 53 | 54 | func fetchLocalSessions() { 55 | sessionGroups = WWDCDatabase.sharedDatabase.sessionsGroupedByYear 56 | } 57 | 58 | // MARK: Table View 59 | 60 | private struct Storyboard { 61 | static let videoCellIdentifier = "video" 62 | static let detailSegueIdentifier = "detail" 63 | } 64 | 65 | override func numberOfSectionsInTableView(tableView: UITableView) -> Int { 66 | return sessionGroups.keys.count 67 | } 68 | 69 | override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? { 70 | return "\(sessionYears[section])" 71 | } 72 | 73 | override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 74 | guard sessionGroups != nil else { return 0 } 75 | 76 | return sessionGroups[sessionYears[section]]!.count 77 | } 78 | 79 | override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 80 | let cell = tableView.dequeueReusableCellWithIdentifier(Storyboard.videoCellIdentifier)! 81 | 82 | let sectionSessions = sessionGroups[sessionYears[indexPath.section]]! 83 | let session = sectionSessions[indexPath.row] 84 | cell.textLabel?.text = session.title 85 | 86 | return cell 87 | } 88 | 89 | // MARK: Session selection 90 | 91 | var selectedSession: Session? { 92 | didSet { 93 | guard selectedSession != nil else { return } 94 | 95 | performSegueWithIdentifier(Storyboard.detailSegueIdentifier, sender: nil) 96 | } 97 | } 98 | 99 | override func tableView(tableView: UITableView, didUpdateFocusInContext context: UITableViewFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator) { 100 | guard let indexPath = context.nextFocusedIndexPath else { return } 101 | 102 | selectSessionAtIndexPath(indexPath) 103 | } 104 | 105 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { 106 | if segue.identifier == Storyboard.detailSegueIdentifier { 107 | let detailController = segue.destinationViewController as! DetailViewController 108 | detailController.session = selectedSession 109 | } 110 | } 111 | 112 | private func selectSessionAtIndexPath(indexPath: NSIndexPath) { 113 | tableView.selectRowAtIndexPath(indexPath, animated: false, scrollPosition: .Middle) 114 | 115 | let sectionSessions = sessionGroups[sessionYears[indexPath.section]]! 116 | selectedSession = sectionSessions[indexPath.row] 117 | } 118 | 119 | private func indexPathForSessionWithKey(key: String) -> NSIndexPath? { 120 | guard let session = WWDCDatabase.sharedDatabase.realm.objectForPrimaryKey(Session.self, key: key) else { return nil } 121 | 122 | var sections = [Int](sessionGroups.keys) 123 | sections.sortInPlace { $0 > $1 } 124 | 125 | guard let section = sections.indexOf(session.year) else { return nil } 126 | guard let row = sessionGroups[session.year]?.indexOf(session) else { return nil } 127 | 128 | return NSIndexPath(forRow: row, inSection: section) 129 | } 130 | 131 | // MARK: Session displaying and playback from URLs 132 | 133 | private var detailViewController: DetailViewController? { 134 | guard let splitController = parentViewController?.parentViewController else { return nil } 135 | guard splitController.childViewControllers.count > 1 else { return nil } 136 | 137 | return splitController.childViewControllers[1] as? DetailViewController 138 | } 139 | 140 | func displaySession(key: String) { 141 | guard let indexPath = indexPathForSessionWithKey(key) else { return } 142 | 143 | selectSessionAtIndexPath(indexPath) 144 | } 145 | 146 | func playSession(key: String) { 147 | displaySession(key) 148 | 149 | guard let detailVC = detailViewController else { return } 150 | 151 | detailVC.watch(nil) 152 | } 153 | 154 | } 155 | 156 | -------------------------------------------------------------------------------- /screenshots/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/screenshots/screenshot.png -------------------------------------------------------------------------------- /screenshots/topshelf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/screenshots/topshelf.png -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMArray.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import 22 | #import 23 | 24 | RLM_ASSUME_NONNULL_BEGIN 25 | 26 | @class RLMObject, RLMRealm, RLMResults RLM_GENERIC_COLLECTION; 27 | 28 | /** 29 | 30 | RLMArray is the container type in Realm used to define to-many relationships. 31 | 32 | Unlike an NSArray, RLMArrays hold a single type, specified by the `objectClassName` property. 33 | This is referred to in these docs as the “type” of the array. 34 | 35 | When declaring an RLMArray property, the type must be marked as conforming to a 36 | protocol by the same name as the objects it should contain (see the 37 | `RLM_ARRAY_TYPE` macro). RLMArray properties can also use Objective-C generics 38 | if available. For example: 39 | 40 | RLM_ARRAY_TYPE(ObjectType) 41 | ... 42 | @property RLMArray *arrayOfObjectTypes; 43 | 44 | RLMArrays can be queried with the same predicates as RLMObject and RLMResults. 45 | 46 | RLMArrays cannot be created directly. RLMArray properties on RLMObjects are 47 | lazily created when accessed, or can be obtained by querying a Realm. 48 | 49 | ### Key-Value Observing 50 | 51 | RLMArray supports array key-value observing on RLMArray properties on RLMObject 52 | subclasses, and the `invalidated` property on RLMArray instances themselves is 53 | key-value observing compliant when the RLMArray is attached to a persisted 54 | RLMObject (RLMArrays on standalone RLMObjects will never become invalidated). 55 | 56 | Because RLMArrays are attached to the object which they are a property of, they 57 | do not require using the mutable collection proxy objects from 58 | `-mutableArrayValueForKey:` or KVC-compatible mutation methods on the containing 59 | object. Instead, you can call the mutation methods on the RLMArray directly. 60 | */ 61 | 62 | @interface RLMArray RLM_GENERIC_COLLECTION : NSObject 63 | 64 | #pragma mark - Properties 65 | 66 | /** 67 | Number of objects in the array. 68 | */ 69 | @property (nonatomic, readonly, assign) NSUInteger count; 70 | 71 | /** 72 | The class name (i.e. type) of the RLMObjects contained in this RLMArray. 73 | */ 74 | @property (nonatomic, readonly, copy) NSString *objectClassName; 75 | 76 | /** 77 | The Realm in which this array is persisted. Returns nil for standalone arrays. 78 | */ 79 | @property (nonatomic, readonly, nullable) RLMRealm *realm; 80 | 81 | /** 82 | Indicates if an array can no longer be accessed. 83 | */ 84 | @property (nonatomic, readonly, getter = isInvalidated) BOOL invalidated; 85 | 86 | #pragma mark - Accessing Objects from an Array 87 | 88 | /** 89 | Returns the object at the index specified. 90 | 91 | @param index The index to look up. 92 | 93 | @return An RLMObject of the type contained in this RLMArray. 94 | */ 95 | - (RLMObjectType)objectAtIndex:(NSUInteger)index; 96 | 97 | /** 98 | Returns the first object in the array. 99 | 100 | Returns `nil` if called on an empty RLMArray. 101 | 102 | @return An RLMObject of the type contained in this RLMArray. 103 | */ 104 | - (nullable RLMObjectType)firstObject; 105 | 106 | /** 107 | Returns the last object in the array. 108 | 109 | Returns `nil` if called on an empty RLMArray. 110 | 111 | @return An RLMObject of the type contained in this RLMArray. 112 | */ 113 | - (nullable RLMObjectType)lastObject; 114 | 115 | 116 | 117 | #pragma mark - Adding, Removing, and Replacing Objects in an Array 118 | 119 | /** 120 | Adds an object to the end of the array. 121 | 122 | @warning This method can only be called during a write transaction. 123 | 124 | @param object An RLMObject of the type contained in this RLMArray. 125 | */ 126 | - (void)addObject:(RLMObjectArgument)object; 127 | 128 | /** 129 | Adds an array of objects at the end of the array. 130 | 131 | @warning This method can only be called during a write transaction. 132 | 133 | @param objects An enumerable object such as NSArray or RLMResults which contains objects of the 134 | same class as this RLMArray. 135 | */ 136 | - (void)addObjects:(id)objects; 137 | 138 | /** 139 | Inserts an object at the given index. 140 | 141 | Throws an exception when the index exceeds the bounds of this RLMArray. 142 | 143 | @warning This method can only be called during a write transaction. 144 | 145 | @param anObject An RLMObject of the type contained in this RLMArray. 146 | @param index The array index at which the object is inserted. 147 | */ 148 | - (void)insertObject:(RLMObjectArgument)anObject atIndex:(NSUInteger)index; 149 | 150 | /** 151 | Removes an object at a given index. 152 | 153 | Throws an exception when the index exceeds the bounds of this RLMArray. 154 | 155 | @warning This method can only be called during a write transaction. 156 | 157 | @param index The array index identifying the object to be removed. 158 | */ 159 | - (void)removeObjectAtIndex:(NSUInteger)index; 160 | 161 | /** 162 | Removes the last object in an RLMArray. 163 | 164 | @warning This method can only be called during a write transaction. 165 | */ 166 | - (void)removeLastObject; 167 | 168 | /** 169 | Removes all objects from an RLMArray. 170 | 171 | @warning This method can only be called during a write transaction. 172 | */ 173 | - (void)removeAllObjects; 174 | 175 | /** 176 | Replaces an object at the given index with a new object. 177 | 178 | Throws an exception when the index exceeds the bounds of this RLMArray. 179 | 180 | @warning This method can only be called during a write transaction. 181 | 182 | @param index The array index of the object to be replaced. 183 | @param anObject An object (of the same type as returned from the objectClassName selector). 184 | */ 185 | - (void)replaceObjectAtIndex:(NSUInteger)index withObject:(RLMObjectArgument)anObject; 186 | 187 | /** 188 | Moves the object at the given source index to the given destination index. 189 | 190 | Throws an exception when the index exceeds the bounds of this RLMArray. 191 | 192 | @warning This method can only be called during a write transaction. 193 | 194 | @param sourceIndex The index of the object to be moved. 195 | @param destinationIndex The index to which the object at `sourceIndex` should be moved. 196 | */ 197 | - (void)moveObjectAtIndex:(NSUInteger)sourceIndex toIndex:(NSUInteger)destinationIndex; 198 | 199 | /** 200 | Exchanges the objects in the array at given indexes. 201 | 202 | Throws an exception when either index exceeds the bounds of this RLMArray. 203 | 204 | @warning This method can only be called during a write transaction. 205 | 206 | @param index1 The index of the object with which to replace the object at index `index2`. 207 | @param index2 The index of the object with which to replace the object at index `index1`. 208 | */ 209 | - (void)exchangeObjectAtIndex:(NSUInteger)index1 withObjectAtIndex:(NSUInteger)index2; 210 | 211 | #pragma mark - Querying an Array 212 | 213 | /** 214 | Gets the index of an object. 215 | 216 | Returns NSNotFound if the object is not found in this RLMArray. 217 | 218 | @param object An object (of the same type as returned from the objectClassName selector). 219 | */ 220 | - (NSUInteger)indexOfObject:(RLMObjectArgument)object; 221 | 222 | /** 223 | Gets the index of the first object matching the predicate. 224 | 225 | @param predicateFormat The predicate format string which can accept variable arguments. 226 | 227 | @return Index of object or NSNotFound if the object is not found in this RLMArray. 228 | */ 229 | - (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...; 230 | 231 | /** 232 | Gets the index of the first object matching the predicate. 233 | 234 | @param predicate The predicate to filter the objects. 235 | 236 | @return Index of object or NSNotFound if the object is not found in this RLMArray. 237 | */ 238 | - (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate; 239 | 240 | /** 241 | Get objects matching the given predicate in the RLMArray. 242 | 243 | @param predicateFormat The predicate format string which can accept variable arguments. 244 | 245 | @return An RLMResults of objects that match the given predicate 246 | */ 247 | - (RLMResults RLM_GENERIC_RETURN*)objectsWhere:(NSString *)predicateFormat, ...; 248 | 249 | /** 250 | Get objects matching the given predicate in the RLMArray. 251 | 252 | @param predicate The predicate to filter the objects. 253 | 254 | @return An RLMResults of objects that match the given predicate 255 | */ 256 | - (RLMResults RLM_GENERIC_RETURN*)objectsWithPredicate:(NSPredicate *)predicate; 257 | 258 | /** 259 | Get a sorted RLMResults from an RLMArray 260 | 261 | @param property The property name to sort by. 262 | @param ascending The direction to sort by. 263 | 264 | @return An RLMResults sorted by the specified property. 265 | */ 266 | - (RLMResults RLM_GENERIC_RETURN*)sortedResultsUsingProperty:(NSString *)property ascending:(BOOL)ascending; 267 | 268 | /** 269 | Get a sorted RLMResults from an RLMArray 270 | 271 | @param properties An array of `RLMSortDescriptor`s to sort by. 272 | 273 | @return An RLMResults sorted by the specified properties. 274 | */ 275 | - (RLMResults RLM_GENERIC_RETURN*)sortedResultsUsingDescriptors:(NSArray *)properties; 276 | 277 | /// :nodoc: 278 | - (RLMObjectType)objectAtIndexedSubscript:(NSUInteger)index; 279 | 280 | /// :nodoc: 281 | - (void)setObject:(RLMObjectType)newValue atIndexedSubscript:(NSUInteger)index; 282 | 283 | #pragma mark - Unavailable Methods 284 | 285 | /** 286 | -[RLMArray init] is not available because RLMArrays cannot be created directly. 287 | RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm. 288 | */ 289 | - (instancetype)init __attribute__((unavailable("RLMArrays cannot be created directly"))); 290 | 291 | /** 292 | +[RLMArray new] is not available because RLMArrays cannot be created directly. 293 | RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm. 294 | */ 295 | + (instancetype)new __attribute__((unavailable("RLMArrays cannot be created directly"))); 296 | 297 | @end 298 | 299 | /** 300 | An RLMSortDescriptor stores a property name and a sort order for use with 301 | `sortedResultsUsingDescriptors:`. It is similar to NSSortDescriptor, but supports 302 | only the subset of functionality which can be efficiently run by the query 303 | engine. RLMSortDescriptor instances are immutable. 304 | */ 305 | @interface RLMSortDescriptor : NSObject 306 | 307 | #pragma mark - Properties 308 | 309 | /** 310 | The name of the property which this sort descriptor orders results by. 311 | */ 312 | @property (nonatomic, readonly) NSString *property; 313 | 314 | /** 315 | Whether this descriptor sorts in ascending or descending order. 316 | */ 317 | @property (nonatomic, readonly) BOOL ascending; 318 | 319 | #pragma mark - Methods 320 | 321 | /** 322 | Returns a new sort descriptor for the given property name and order. 323 | */ 324 | + (instancetype)sortDescriptorWithProperty:(NSString *)propertyName ascending:(BOOL)ascending; 325 | 326 | /** 327 | Returns a copy of the receiver with the sort order reversed. 328 | */ 329 | - (instancetype)reversedSortDescriptor; 330 | 331 | @end 332 | 333 | /// :nodoc: 334 | @interface RLMArray (Swift) 335 | // for use only in Swift class definitions 336 | - (instancetype)initWithObjectClassName:(NSString *)objectClassName; 337 | @end 338 | 339 | RLM_ASSUME_NONNULL_END 340 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMCollection.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | RLM_ASSUME_NONNULL_BEGIN 22 | 23 | @class RLMRealm, RLMResults, RLMObject, RLMSortDescriptor; 24 | 25 | /** 26 | A homogenous collection of `RLMObject`s like `RLMArray` or `RLMResults`. 27 | */ 28 | @protocol RLMCollection 29 | 30 | @required 31 | 32 | #pragma mark - Properties 33 | 34 | /** 35 | Number of objects in the collection. 36 | */ 37 | @property (nonatomic, readonly, assign) NSUInteger count; 38 | 39 | /** 40 | The class name (i.e. type) of the RLMObjects contained in this RLMCollection. 41 | */ 42 | @property (nonatomic, readonly, copy) NSString *objectClassName; 43 | 44 | /** 45 | The Realm in which this collection is persisted. Returns nil for standalone collections. 46 | */ 47 | @property (nonatomic, readonly) RLMRealm *realm; 48 | 49 | #pragma mark - Accessing Objects from a Collection 50 | 51 | /** 52 | Returns the object at the index specified. 53 | 54 | @param index The index to look up. 55 | 56 | @return An RLMObject of the type contained in this RLMCollection. 57 | */ 58 | - (id)objectAtIndex:(NSUInteger)index; 59 | 60 | /** 61 | Returns the first object in the collection. 62 | 63 | Returns `nil` if called on an empty RLMCollection. 64 | 65 | @return An RLMObject of the type contained in this RLMCollection. 66 | */ 67 | - (nullable id)firstObject; 68 | 69 | /** 70 | Returns the last object in the collection. 71 | 72 | Returns `nil` if called on an empty RLMCollection. 73 | 74 | @return An RLMObject of the type contained in this RLMCollection. 75 | */ 76 | - (nullable id)lastObject; 77 | 78 | #pragma mark - Querying a Collection 79 | 80 | /** 81 | Gets the index of an object. 82 | 83 | Returns NSNotFound if the object is not found in this RLMCollection. 84 | 85 | @param object An object (of the same type as returned from the objectClassName selector). 86 | */ 87 | - (NSUInteger)indexOfObject:(RLMObject *)object; 88 | 89 | /** 90 | Gets the index of the first object matching the predicate. 91 | 92 | @param predicateFormat The predicate format string which can accept variable arguments. 93 | 94 | @return Index of object or NSNotFound if the object is not found in this RLMCollection. 95 | */ 96 | - (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...; 97 | 98 | /** 99 | Gets the index of the first object matching the predicate. 100 | 101 | @param predicate The predicate to filter the objects. 102 | 103 | @return Index of object or NSNotFound if the object is not found in this RLMCollection. 104 | */ 105 | - (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate; 106 | 107 | /** 108 | Get objects matching the given predicate in the RLMCollection. 109 | 110 | @param predicateFormat The predicate format string which can accept variable arguments. 111 | 112 | @return An RLMResults of objects that match the given predicate 113 | */ 114 | - (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...; 115 | 116 | /** 117 | Get objects matching the given predicate in the RLMCollection. 118 | 119 | @param predicate The predicate to filter the objects. 120 | 121 | @return An RLMResults of objects that match the given predicate 122 | */ 123 | - (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate; 124 | 125 | /** 126 | Get a sorted RLMResults from an RLMCollection. 127 | 128 | @param property The property name to sort by. 129 | @param ascending The direction to sort by. 130 | 131 | @return An RLMResults sorted by the specified property. 132 | */ 133 | - (RLMResults *)sortedResultsUsingProperty:(NSString *)property ascending:(BOOL)ascending; 134 | 135 | /** 136 | Get a sorted RLMResults from an RLMCollection. 137 | 138 | @param properties An array of `RLMSortDescriptor`s to sort by. 139 | 140 | @return An RLMResults sorted by the specified properties. 141 | */ 142 | - (RLMResults *)sortedResultsUsingDescriptors:(NSArray RLM_GENERIC(RLMSortDescriptor *) *)properties; 143 | 144 | /// :nodoc: 145 | - (id)objectAtIndexedSubscript:(NSUInteger)index; 146 | 147 | /** 148 | Returns an NSArray containing the results of invoking `valueForKey:` using key on each of the collection's objects. 149 | 150 | @param key The name of the property. 151 | 152 | @return NSArray containing the results of invoking `valueForKey:` using key on each of the collection's objects. 153 | */ 154 | - (nullable id)valueForKey:(NSString *)key; 155 | 156 | /** 157 | Invokes `setValue:forKey:` on each of the collection's objects using the specified value and key. 158 | 159 | @warning This method can only be called during a write transaction. 160 | 161 | @param value The object value. 162 | @param key The name of the property. 163 | */ 164 | - (void)setValue:(nullable id)value forKey:(NSString *)key; 165 | 166 | @end 167 | 168 | RLM_ASSUME_NONNULL_END 169 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMConstants.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #pragma mark - Enums 22 | 23 | /** 24 | Property types supported in Realm models. 25 | 26 | See [Realm Models](https://realm.io/docs/objc/latest/#models) 27 | */ 28 | // Make sure numbers match those in 29 | typedef NS_ENUM(int32_t, RLMPropertyType) { 30 | 31 | #pragma mark - Primitive types 32 | 33 | /** Integer type: NSInteger, int, long, Int (Swift) */ 34 | RLMPropertyTypeInt = 0, 35 | /** Boolean type: BOOL, bool, Bool (Swift) */ 36 | RLMPropertyTypeBool = 1, 37 | /** Float type: float, Float (Swift) */ 38 | RLMPropertyTypeFloat = 9, 39 | /** Double type: double, Double (Swift) */ 40 | RLMPropertyTypeDouble = 10, 41 | 42 | #pragma mark - Object types 43 | 44 | /** String type: NSString, String (Swift) */ 45 | RLMPropertyTypeString = 2, 46 | /** Data type: NSData */ 47 | RLMPropertyTypeData = 4, 48 | /** Any type: id, **not supported in Swift** */ 49 | RLMPropertyTypeAny = 6, 50 | /** Date type: NSDate */ 51 | RLMPropertyTypeDate = 7, 52 | 53 | #pragma mark - Array/Linked object types 54 | 55 | /** Object type. See [Realm Models](https://realm.io/docs/objc/latest/#models) */ 56 | RLMPropertyTypeObject = 12, 57 | /** Array type. See [Realm Models](http://realms.io/docs/objc/latest/#models) */ 58 | RLMPropertyTypeArray = 13, 59 | }; 60 | 61 | /** 62 | Enum representing all recoverable errors in Realm. 63 | */ 64 | typedef NS_ENUM(NSInteger, RLMError) { 65 | /** Returned by RLMRealm if no other specific error is returned when a realm is opened. */ 66 | RLMErrorFail = 1, 67 | /** Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. */ 68 | RLMErrorFileAccessError = 2, 69 | /** Returned by RLMRealm if the user does not have permission to open or create 70 | the specified file in the specified access mode when the realm is opened. */ 71 | RLMErrorFilePermissionDenied = 3, 72 | /** Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. */ 73 | RLMErrorFileExists = 4, 74 | /** Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. */ 75 | RLMErrorFileNotFound = 5, 76 | /** Returned by RLMRealm if a file format upgrade is required to open the file, but upgrades were explicilty disabled. */ 77 | RLMErrorFileFormatUpgradeRequired = 6, 78 | /** Returned by RLMRealm if the database file is currently open in another 79 | process which cannot share with the current process due to an 80 | architecture mismatch. */ 81 | RLMErrorIncompatibleLockFile = 8, 82 | }; 83 | 84 | #pragma mark - Constants 85 | 86 | #pragma mark - Notification Constants 87 | 88 | /** 89 | Posted by RLMRealm when the data in the realm has changed. 90 | 91 | DidChange are posted after a realm has been refreshed to reflect a write 92 | transaction, i.e. when an autorefresh occurs, `[RLMRealm refresh]` is 93 | called, after an implicit refresh from `[RLMRealm beginWriteTransaction]`, 94 | and after a local write transaction is committed. 95 | */ 96 | extern NSString * const RLMRealmRefreshRequiredNotification; 97 | 98 | /** 99 | Posted by RLMRealm when a write transaction has been committed to an RLMRealm on 100 | a different thread for the same file. This is not posted if 101 | `[RLMRealm autorefresh]` is enabled or if the RLMRealm is 102 | refreshed before the notifcation has a chance to run. 103 | 104 | Realms with autorefresh disabled should normally have a handler for this 105 | notification which calls `[RLMRealm refresh]` after doing some work. 106 | While not refreshing is allowed, it may lead to large Realm files as Realm has 107 | to keep an extra copy of the data for the un-refreshed RLMRealm. 108 | */ 109 | extern NSString * const RLMRealmDidChangeNotification; 110 | 111 | #pragma mark - Other Constants 112 | 113 | /** Schema version used for uninitialized Realms */ 114 | extern const uint64_t RLMNotVersioned; 115 | 116 | /** Error domain used in Realm. */ 117 | extern NSString * const RLMErrorDomain; 118 | 119 | /** Key for name of Realm exceptions. */ 120 | extern NSString * const RLMExceptionName; 121 | 122 | /** Key for Realm file version. */ 123 | extern NSString * const RLMRealmVersionKey; 124 | 125 | /** Key for Realm core version. */ 126 | extern NSString * const RLMRealmCoreVersionKey; 127 | 128 | /** Key for Realm invalidated property name. */ 129 | extern NSString * const RLMInvalidatedKey; 130 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMDefines.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMObject; 22 | 23 | #ifndef __has_feature 24 | #define __has_feature(x) 0 25 | #endif 26 | 27 | #pragma mark - Generics 28 | 29 | #if __has_extension(objc_generics) 30 | #define RLM_GENERIC(...) <__VA_ARGS__> 31 | #define RLM_GENERIC_COLLECTION 32 | #define RLM_GENERIC_RETURN 33 | #define RLMObjectArgument RLMObjectType 34 | #else 35 | #define RLM_GENERIC(...) 36 | #define RLM_GENERIC_COLLECTION 37 | #define RLM_GENERIC_RETURN 38 | typedef id RLMObjectType; 39 | typedef RLMObject * RLMObjectArgument; 40 | #endif 41 | 42 | #pragma mark - Nullability 43 | 44 | #if !__has_feature(nullability) 45 | #ifndef __nullable 46 | #define __nullable 47 | #endif 48 | #ifndef __nonnull 49 | #define __nonnull 50 | #endif 51 | #ifndef __null_unspecified 52 | #define __null_unspecified 53 | #endif 54 | #ifndef nullable 55 | #define nullable 56 | #endif 57 | #ifndef nonnull 58 | #define nonnull 59 | #endif 60 | #ifndef null_unspecified 61 | #define null_unspecified 62 | #endif 63 | #endif 64 | 65 | #if defined(NS_ASSUME_NONNULL_BEGIN) && defined(NS_ASSUME_NONNULL_END) 66 | #define RLM_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN 67 | #define RLM_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END 68 | #else 69 | #define RLM_ASSUME_NONNULL_BEGIN 70 | #define RLM_ASSUME_NONNULL_END 71 | #endif 72 | 73 | #pragma mark - Escaping 74 | 75 | #if __has_attribute(noescape) 76 | # define RLM_NOESCAPE __attribute__((noescape)) 77 | #else 78 | # define RLM_NOESCAPE 79 | #endif 80 | 81 | #pragma mark - Swift Availability 82 | 83 | #if defined(NS_SWIFT_UNAVAILABLE) 84 | # define RLM_SWIFT_UNAVAILABLE(msg) NS_SWIFT_UNAVAILABLE(msg) 85 | #else 86 | # define RLM_SWIFT_UNAVAILABLE(msg) 87 | #endif 88 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMMigration.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | RLM_ASSUME_NONNULL_BEGIN 23 | 24 | @class RLMSchema; 25 | @class RLMArray; 26 | @class RLMObject; 27 | 28 | /** 29 | Provides both the old and new versions of an object in this Realm. Object properties can only be 30 | accessed using keyed subscripting. 31 | 32 | @param oldObject Object in original RLMRealm (read-only). 33 | @param newObject Object in migrated RLMRealm (read-write). 34 | */ 35 | typedef void (^RLMObjectMigrationBlock)(RLMObject * __nullable oldObject, RLMObject * __nullable newObject); 36 | 37 | /** 38 | RLMMigration is the object passed into a user defined RLMMigrationBlock when updating the version 39 | of an RLMRealm instance. 40 | 41 | This object provides access to the RLMSchema current to this migration. 42 | */ 43 | @interface RLMMigration : NSObject 44 | 45 | #pragma mark - Properties 46 | 47 | /** 48 | Get the old RLMSchema for the migration. This is the schema which describes the RLMRealm before the 49 | migration is applied. 50 | */ 51 | @property (nonatomic, readonly) RLMSchema *oldSchema; 52 | 53 | /** 54 | Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm after applying 55 | a migration. 56 | */ 57 | @property (nonatomic, readonly) RLMSchema *newSchema; 58 | 59 | 60 | #pragma mark - Altering Objects during a Migration 61 | 62 | /** 63 | Enumerates objects of a given type in this Realm, providing both the old and new versions of each object. 64 | Objects properties can be accessed using keyed subscripting. 65 | 66 | @param className The name of the RLMObject class to enumerate. 67 | 68 | @warning All objects returned are of a type specific to the current migration and should not be casted 69 | to className. Instead you should access them as RLMObjects and use keyed subscripting to access 70 | properties. 71 | */ 72 | - (void)enumerateObjects:(NSString *)className block:(RLMObjectMigrationBlock)block; 73 | 74 | /** 75 | Create an RLMObject of type `className` in the Realm being migrated. 76 | 77 | @param className The name of the RLMObject class to create. 78 | @param value The value used to populate the created object. This can be any key/value coding compliant 79 | object, or a JSON object such as those returned from the methods in NSJSONSerialization, or 80 | an NSArray with one object for each persisted property. An exception will be 81 | thrown if any required properties are not present and no default is set. 82 | 83 | When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model. 84 | */ 85 | -(RLMObject *)createObject:(NSString *)className withValue:(id)value; 86 | 87 | /** 88 | Delete an object from a Realm during a migration. This can be called within `enumerateObjects:block:`. 89 | 90 | @param object Object to be deleted from the Realm being migrated. 91 | */ 92 | - (void)deleteObject:(RLMObject *)object; 93 | 94 | /** 95 | Deletes the data for the class with the given name. 96 | This deletes all objects of the given class, and if the RLMObject subclass no longer exists in your program, 97 | cleans up any remaining metadata for the class in the Realm file. 98 | 99 | @param name The name of the RLMObject class to delete. 100 | 101 | @return whether there was any data to delete. 102 | */ 103 | - (BOOL)deleteDataForClassName:(NSString *)name; 104 | 105 | @end 106 | 107 | RLM_ASSUME_NONNULL_END 108 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMObjectBase.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | RLM_ASSUME_NONNULL_BEGIN 23 | 24 | @class RLMRealm; 25 | @class RLMSchema; 26 | @class RLMObjectSchema; 27 | 28 | /// :nodoc: 29 | @interface RLMObjectBase : NSObject 30 | 31 | @property (nonatomic, readonly, getter = isInvalidated) BOOL invalidated; 32 | 33 | - (instancetype)init; 34 | 35 | + (NSString *)className; 36 | 37 | // Returns whether the class is included in the default set of classes persisted in a Realm. 38 | + (BOOL)shouldIncludeInDefaultSchema; 39 | 40 | @end 41 | 42 | RLM_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMObjectBase_Dynamic.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMObjectSchema, RLMRealm; 22 | 23 | /** 24 | This function is useful only in specialized circumstances, for example, when building components 25 | that integrate with Realm. If you are simply building an app on Realm, it is 26 | recommended to retrieve `realm` via `RLMObject`. 27 | 28 | @param object an RLMObjectBase obtained via a Swift Object or RLMObject 29 | 30 | @return The Realm in which this object is persisted. Returns nil for standalone objects. 31 | */ 32 | FOUNDATION_EXTERN RLMRealm *RLMObjectBaseRealm(RLMObjectBase *object); 33 | 34 | /** 35 | This function is useful only in specialized circumstances, for example, when building components 36 | that integrate with Realm. If you are simply building an app on Realm, it is 37 | recommended to retrieve `objectSchema` via `RLMObject`. 38 | 39 | @param object an RLMObjectBase obtained via a Swift Object or RLMObject 40 | 41 | @return The ObjectSchema which lists the persisted properties for this object. 42 | */ 43 | FOUNDATION_EXTERN RLMObjectSchema *RLMObjectBaseObjectSchema(RLMObjectBase *object); 44 | 45 | /** 46 | This function is useful only in specialized circumstances, for example, when building components 47 | that integrate with Realm. If you are simply building an app on Realm, it is 48 | recommended to retrieve the linking objects via `RLMObject`. 49 | 50 | @param object an RLMObjectBase obtained via a Swift Object or RLMObject 51 | @param className The type of object on which the relationship to query is defined. 52 | @param property The name of the property which defines the relationship. 53 | 54 | @return An NSArray of objects of type `className` which have this object as their value for the `property` property. 55 | */ 56 | FOUNDATION_EXTERN NSArray *RLMObjectBaseLinkingObjectsOfClass(RLMObjectBase *object, NSString *className, NSString *property); 57 | 58 | /** 59 | This function is useful only in specialized circumstances, for example, when building components 60 | that integrate with Realm. If you are simply building an app on Realm, it is 61 | recommended to retrieve key values via `RLMObject`. 62 | 63 | @warning Will throw `NSUndefinedKeyException` if key is not present on the object 64 | 65 | @param object an RLMObjectBase obtained via a Swift Object or RLMObject 66 | @param key The name of the property 67 | 68 | @return the object for the property requested 69 | */ 70 | FOUNDATION_EXTERN id RLMObjectBaseObjectForKeyedSubscript(RLMObjectBase *object, NSString *key); 71 | 72 | /** 73 | This function is useful only in specialized circumstances, for example, when building components 74 | that integrate with Realm. If you are simply building an app on Realm, it is 75 | recommended to set key values via `RLMObject`. 76 | 77 | @warning Will throw `NSUndefinedKeyException` if key is not present on the object 78 | 79 | @param object an RLMObjectBase obtained via a Swift Object or RLMObject 80 | @param key The name of the property 81 | @param obj The object to set as the value of the key 82 | */ 83 | FOUNDATION_EXTERN void RLMObjectBaseSetObjectForKeyedSubscript(RLMObjectBase *object, NSString *key, id obj); 84 | 85 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMObjectSchema.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | RLM_ASSUME_NONNULL_BEGIN 23 | 24 | @class RLMProperty; 25 | 26 | /** 27 | This class represents Realm model object schemas. 28 | 29 | When using Realm, RLMObjectSchema objects allow performing migrations and 30 | introspecting the database's schema. 31 | 32 | Object schemas map to tables in the core database. 33 | */ 34 | @interface RLMObjectSchema : NSObject 35 | 36 | #pragma mark - Properties 37 | 38 | /** 39 | Array of persisted RLMProperty objects for an object. 40 | 41 | @see RLMProperty 42 | */ 43 | @property (nonatomic, readonly, copy) NSArray RLM_GENERIC(RLMProperty *) *properties; 44 | 45 | /** 46 | The name of the class this schema describes. 47 | */ 48 | @property (nonatomic, readonly) NSString *className; 49 | 50 | /** 51 | The property which is the primary key for this object (if any). 52 | */ 53 | @property (nonatomic, readonly, nullable) RLMProperty *primaryKeyProperty; 54 | 55 | #pragma mark - Methods 56 | 57 | /** 58 | Retrieve an RLMProperty object by name. 59 | 60 | @param propertyName The property's name. 61 | 62 | @return RLMProperty object or nil if there is no property with the given name. 63 | */ 64 | - (nullable RLMProperty *)objectForKeyedSubscript:(id )propertyName; 65 | 66 | /** 67 | Returns YES if equal to objectSchema 68 | */ 69 | - (BOOL)isEqualToObjectSchema:(RLMObjectSchema *)objectSchema; 70 | 71 | @end 72 | 73 | RLM_ASSUME_NONNULL_END 74 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMPlatform.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #if !TARGET_OS_IPHONE 20 | #error Attempting to use Realm's iOS framework in an OSX project. 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMProperty.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | #import 22 | 23 | RLM_ASSUME_NONNULL_BEGIN 24 | 25 | /// :nodoc: 26 | @protocol RLMInt 27 | @end 28 | 29 | /// :nodoc: 30 | @protocol RLMBool 31 | @end 32 | 33 | /// :nodoc: 34 | @protocol RLMDouble 35 | @end 36 | 37 | /// :nodoc: 38 | @protocol RLMFloat 39 | @end 40 | 41 | /// :nodoc: 42 | @interface NSNumber () 43 | @end 44 | 45 | /** 46 | This class models properties persisted to Realm in an RLMObjectSchema. 47 | 48 | When using Realm, RLMProperty objects allow performing migrations and 49 | introspecting the database's schema. 50 | 51 | These properties map to columns in the core database. 52 | */ 53 | @interface RLMProperty : NSObject 54 | 55 | #pragma mark - Properties 56 | 57 | /** 58 | Property name. 59 | */ 60 | @property (nonatomic, readonly) NSString *name; 61 | 62 | /** 63 | Property type. 64 | 65 | @see RLMPropertyType 66 | */ 67 | @property (nonatomic, readonly) RLMPropertyType type; 68 | 69 | /** 70 | Indicates if this property is indexed. 71 | 72 | @see RLMObject 73 | */ 74 | @property (nonatomic, readonly) BOOL indexed; 75 | 76 | /** 77 | Object class name - specify object types for RLMObject and RLMArray properties. 78 | */ 79 | @property (nonatomic, readonly, copy, nullable) NSString *objectClassName; 80 | 81 | /** 82 | Whether this property is optional. 83 | */ 84 | @property (nonatomic, readonly) BOOL optional; 85 | 86 | #pragma mark - Methods 87 | 88 | /** 89 | Returns YES if property objects are equal. 90 | */ 91 | - (BOOL)isEqualToProperty:(RLMProperty *)property; 92 | 93 | @end 94 | 95 | RLM_ASSUME_NONNULL_END 96 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMRealmConfiguration.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | RLM_ASSUME_NONNULL_BEGIN 23 | 24 | /** 25 | An `RLMRealmConfiguration` is used to describe the different options used to 26 | create an `RLMRealm` instance. 27 | 28 | `RLMRealmConfiguration` instances are just plain NSObjects, and unlike RLMRealm 29 | and RLMObjects can be freely shared between threads as long as you do not 30 | mutate them. Creating configuration objects for class subsets (by setting the 31 | `objectClasses` property) can be expensive, and so you will normally want to 32 | cache and reuse a single configuration object for each distinct configuration 33 | that you are using rather than creating a new one each time you open a Realm. 34 | */ 35 | @interface RLMRealmConfiguration : NSObject 36 | 37 | #pragma mark - Default Configuration 38 | 39 | /** 40 | Returns the default configuration used to create Realms when no other 41 | configuration is explicitly specified (i.e. `+[RLMRealm defaultRealm]`). 42 | 43 | @return The default Realm configuration. 44 | */ 45 | + (instancetype)defaultConfiguration; 46 | 47 | /** 48 | Sets the default configuration to the given `RLMRealmConfiguration`. 49 | 50 | @param configuration The new default Realm configuration. 51 | */ 52 | + (void)setDefaultConfiguration:(RLMRealmConfiguration *)configuration; 53 | 54 | #pragma mark - Properties 55 | 56 | /// The path to the realm file. Mutually exclusive with `inMemoryIdentifier`. 57 | @property (nonatomic, copy, nullable) NSString *path; 58 | 59 | /// A string used to identify a particular in-memory Realm. Mutually exclusive with `path`. 60 | @property (nonatomic, copy, nullable) NSString *inMemoryIdentifier; 61 | 62 | /// 64-byte key to use to encrypt the data. 63 | @property (nonatomic, copy, nullable) NSData *encryptionKey; 64 | 65 | /// Whether the Realm is read-only (must be YES for read-only files). 66 | @property (nonatomic) BOOL readOnly; 67 | 68 | /// The current schema version. 69 | @property (nonatomic) uint64_t schemaVersion; 70 | 71 | /// The block which migrates the Realm to the current version. 72 | @property (nonatomic, copy, nullable) RLMMigrationBlock migrationBlock; 73 | 74 | /// The classes persisted in the Realm. 75 | @property (nonatomic, copy, nullable) NSArray *objectClasses; 76 | 77 | @end 78 | 79 | RLM_ASSUME_NONNULL_END 80 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMRealm_Dynamic.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import 22 | #import 23 | 24 | @class RLMResults; 25 | 26 | @interface RLMRealm (Dynamic) 27 | 28 | #pragma mark - Getting Objects from a Realm 29 | 30 | /** 31 | This method is useful only in specialized circumstances, for example, when building components 32 | that integrate with Realm. If you are simply building an app on Realm, it is 33 | recommended to use the class methods on `RLMObject`. 34 | 35 | Get all objects of a given type in this Realm. 36 | 37 | The preferred way to get objects of a single class is to use the class methods on RLMObject. 38 | 39 | @warning This method is useful only in specialized circumstances. 40 | 41 | @param className The name of the RLMObject subclass to retrieve on e.g. `MyClass.className`. 42 | 43 | @return An RLMResults of all objects in this realm of the given type. 44 | 45 | @see RLMObject allObjects 46 | */ 47 | - (RLMResults *)allObjects:(NSString *)className; 48 | 49 | /** 50 | This method is useful only in specialized circumstances, for example, when building components 51 | that integrate with Realm. If you are simply building an app on Realm, it is 52 | recommended to use the class methods on `RLMObject`. 53 | 54 | Get objects matching the given predicate from the this Realm. 55 | 56 | The preferred way to get objects of a single class is to use the class methods on RLMObject. 57 | 58 | @warning This method is useful only in specialized circumstances. 59 | 60 | @param className The type of objects you are looking for (name of the class). 61 | @param predicateFormat The predicate format string which can accept variable arguments. 62 | 63 | @return An RLMResults of results matching the given predicate. 64 | 65 | @see RLMObject objectsWhere: 66 | */ 67 | - (RLMResults *)objects:(NSString *)className where:(NSString *)predicateFormat, ...; 68 | 69 | /** 70 | This method is useful only in specialized circumstances, for example, when building components 71 | that integrate with Realm. If you are simply building an app on Realm, it is 72 | recommended to use the class methods on `RLMObject`. 73 | 74 | Get objects matching the given predicate from the this Realm. 75 | 76 | The preferred way to get objects of a single class is to use the class methods on RLMObject. 77 | 78 | @warning This method is useful only in specialized circumstances. 79 | 80 | @param className The type of objects you are looking for (name of the class). 81 | @param predicate The predicate to filter the objects. 82 | 83 | @return An RLMResults of results matching the given predicate. 84 | 85 | @see RLMObject objectsWhere: 86 | */ 87 | - (RLMResults *)objects:(NSString *)className withPredicate:(NSPredicate *)predicate; 88 | 89 | /** 90 | This method is useful only in specialized circumstances, for example, when building components 91 | that integrate with Realm. If you are simply building an app on Realm, it is 92 | recommended to use the class methods on `RLMObject`. 93 | 94 | Get an object of a given class name with a primary key 95 | 96 | The preferred way to get an object of a single class is to use the class methods on RLMObject. 97 | 98 | @warning This method is useful only in specialized circumstances. 99 | 100 | @param className The class name for the object you are looking for 101 | @param primaryKey The primary key value for the object you are looking for 102 | 103 | @return An object or nil if an object with the given primary key does not exist. 104 | 105 | @see RLMObject objectForPrimaryKey: 106 | */ 107 | - (RLMObject *)objectWithClassName:(NSString *)className forPrimaryKey:(id)primaryKey; 108 | 109 | /** 110 | This method is useful only in specialized circumstances, for example, when building components 111 | that integrate with Realm. If you are simply building an app on Realm, it is 112 | recommended to use [RLMObject createInDefaultRealmWithValue:]. 113 | 114 | Create an RLMObject of type `className` in the Realm with a given object. 115 | 116 | @warning This method is useful only in specialized circumstances. 117 | 118 | @param value The value used to populate the object. This can be any key/value coding compliant 119 | object, or a JSON object such as those returned from the methods in NSJSONSerialization, or 120 | an NSArray with one object for each persisted property. An exception will be 121 | thrown if any required properties are not present and no default is set. 122 | 123 | When passing in an NSArray, all properties must be present, valid and in the same order as 124 | the properties defined in the model. 125 | 126 | @return An RLMObject of type `className` 127 | */ 128 | -(RLMObject *)createObject:(NSString *)className withValue:(id)value; 129 | 130 | @end 131 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMResults.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | #import 22 | 23 | RLM_ASSUME_NONNULL_BEGIN 24 | 25 | @class RLMObject, RLMRealm; 26 | 27 | /** 28 | RLMResults is an auto-updating container type in Realm returned from object 29 | queries. 30 | 31 | RLMResults can be queried with the same predicates as RLMObject and RLMArray 32 | and you can chain queries to further filter query results. 33 | 34 | RLMResults cannot be created directly. 35 | */ 36 | @interface RLMResults RLM_GENERIC_COLLECTION : NSObject 37 | 38 | #pragma mark - Properties 39 | 40 | /** 41 | Number of objects in the results. 42 | */ 43 | @property (nonatomic, readonly, assign) NSUInteger count; 44 | 45 | /** 46 | The class name (i.e. type) of the RLMObjects contained in this RLMResults. 47 | */ 48 | @property (nonatomic, readonly, copy) NSString *objectClassName; 49 | 50 | /** 51 | The Realm this `RLMResults` is associated with. 52 | */ 53 | @property (nonatomic, readonly) RLMRealm *realm; 54 | 55 | #pragma mark - Accessing Objects from an RLMResults 56 | 57 | /** 58 | Returns the object at the index specified. 59 | 60 | @param index The index to look up. 61 | 62 | @return An RLMObject of the type contained in this RLMResults. 63 | */ 64 | - (RLMObjectType)objectAtIndex:(NSUInteger)index; 65 | 66 | /** 67 | Returns the first object in the results. 68 | 69 | Returns `nil` if called on an empty RLMResults. 70 | 71 | @return An RLMObject of the type contained in this RLMResults. 72 | */ 73 | - (nullable RLMObjectType)firstObject; 74 | 75 | /** 76 | Returns the last object in the results. 77 | 78 | Returns `nil` if called on an empty RLMResults. 79 | 80 | @return An RLMObject of the type contained in this RLMResults. 81 | */ 82 | - (nullable RLMObjectType)lastObject; 83 | 84 | 85 | 86 | 87 | #pragma mark - Querying Results 88 | 89 | /** 90 | Gets the index of an object. 91 | 92 | Returns NSNotFound if the object is not found in this RLMResults. 93 | 94 | @param object An object (of the same type as returned from the objectClassName selector). 95 | */ 96 | - (NSUInteger)indexOfObject:(RLMObjectArgument)object; 97 | 98 | /** 99 | Gets the index of the first object matching the predicate. 100 | 101 | @param predicateFormat The predicate format string which can accept variable arguments. 102 | 103 | @return Index of object or NSNotFound if the object is not found in this RLMResults. 104 | */ 105 | - (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...; 106 | 107 | /** 108 | Gets the index of the first object matching the predicate. 109 | 110 | @param predicate The predicate to filter the objects. 111 | 112 | @return Index of object or NSNotFound if the object is not found in this RLMResults. 113 | */ 114 | - (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate; 115 | 116 | /** 117 | Get objects matching the given predicate in the RLMResults. 118 | 119 | @param predicateFormat The predicate format string which can accept variable arguments. 120 | 121 | @return An RLMResults of objects that match the given predicate 122 | */ 123 | - (RLMResults RLM_GENERIC_RETURN*)objectsWhere:(NSString *)predicateFormat, ...; 124 | 125 | /** 126 | Get objects matching the given predicate in the RLMResults. 127 | 128 | @param predicate The predicate to filter the objects. 129 | 130 | @return An RLMResults of objects that match the given predicate 131 | */ 132 | - (RLMResults RLM_GENERIC_RETURN*)objectsWithPredicate:(NSPredicate *)predicate; 133 | 134 | /** 135 | Get a sorted `RLMResults` from an existing `RLMResults` sorted by a property. 136 | 137 | @param property The property name to sort by. 138 | @param ascending The direction to sort by. 139 | 140 | @return An RLMResults sorted by the specified property. 141 | */ 142 | - (RLMResults RLM_GENERIC_RETURN*)sortedResultsUsingProperty:(NSString *)property ascending:(BOOL)ascending; 143 | 144 | /** 145 | Get a sorted `RLMResults` from an existing `RLMResults` sorted by an `NSArray`` of `RLMSortDescriptor`s. 146 | 147 | @param properties An array of `RLMSortDescriptor`s to sort by. 148 | 149 | @return An RLMResults sorted by the specified properties. 150 | */ 151 | - (RLMResults RLM_GENERIC_RETURN*)sortedResultsUsingDescriptors:(NSArray *)properties; 152 | 153 | 154 | #pragma mark - Aggregating Property Values 155 | 156 | /** 157 | Returns the minimum (lowest) value of the given property 158 | 159 | NSNumber *min = [results minOfProperty:@"age"]; 160 | 161 | @warning You cannot use this method on RLMObject, RLMArray, and NSData properties. 162 | 163 | @param property The property to look for a minimum on. Only properties of type int, float, double and NSDate are supported. 164 | 165 | @return The minimum value for the property amongst objects in an RLMResults. 166 | */ 167 | - (nullable id)minOfProperty:(NSString *)property; 168 | 169 | /** 170 | Returns the maximum (highest) value of the given property of objects in an RLMResults 171 | 172 | NSNumber *max = [results maxOfProperty:@"age"]; 173 | 174 | @warning You cannot use this method on RLMObject, RLMArray, and NSData properties. 175 | 176 | @param property The property to look for a maximum on. Only properties of type int, float, double and NSDate are supported. 177 | 178 | @return The maximum value for the property amongst objects in an RLMResults 179 | */ 180 | - (nullable id)maxOfProperty:(NSString *)property; 181 | 182 | /** 183 | Returns the sum of the given property for objects in an RLMResults. 184 | 185 | NSNumber *sum = [results sumOfProperty:@"age"]; 186 | 187 | @warning You cannot use this method on RLMObject, RLMArray, and NSData properties. 188 | 189 | @param property The property to calculate sum on. Only properties of type int, float and double are supported. 190 | 191 | @return The sum of the given property over all objects in an RLMResults. 192 | */ 193 | - (NSNumber *)sumOfProperty:(NSString *)property; 194 | 195 | /** 196 | Returns the average of a given property for objects in an RLMResults. 197 | 198 | NSNumber *average = [results averageOfProperty:@"age"]; 199 | 200 | @warning You cannot use this method on RLMObject, RLMArray, and NSData properties. 201 | 202 | @param property The property to calculate average on. Only properties of type int, float and double are supported. 203 | 204 | @return The average for the given property amongst objects in an RLMResults. This will be of type double for both 205 | float and double properties. 206 | */ 207 | - (nullable NSNumber *)averageOfProperty:(NSString *)property; 208 | 209 | /// :nodoc: 210 | - (id)objectAtIndexedSubscript:(NSUInteger)index; 211 | 212 | #pragma mark - Unavailable Methods 213 | 214 | /** 215 | -[RLMResults init] is not available because RLMResults cannot be created directly. 216 | RLMResults can be obtained by querying a Realm. 217 | */ 218 | - (instancetype)init __attribute__((unavailable("RLMResults cannot be created directly"))); 219 | 220 | /** 221 | +[RLMResults new] is not available because RLMResults cannot be created directly. 222 | RLMResults can be obtained by querying a Realm. 223 | */ 224 | + (instancetype)new __attribute__((unavailable("RLMResults cannot be created directly"))); 225 | 226 | @end 227 | 228 | RLM_ASSUME_NONNULL_END 229 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/RLMSchema.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | RLM_ASSUME_NONNULL_BEGIN 23 | 24 | @class RLMObjectSchema; 25 | 26 | /** 27 | This class represents the collection of model object schemas persisted to Realm. 28 | 29 | When using Realm, RLMSchema objects allow performing migrations and 30 | introspecting the database's schema. 31 | 32 | Schemas map to collections of tables in the core database. 33 | */ 34 | @interface RLMSchema : NSObject 35 | 36 | #pragma mark - Properties 37 | 38 | /** 39 | An NSArray containing RLMObjectSchemas for all object types in this Realm. Meant 40 | to be used during migrations for dynamic introspection. 41 | 42 | @see RLMObjectSchema 43 | */ 44 | @property (nonatomic, readonly, copy) NSArray RLM_GENERIC(RLMObjectSchema *) *objectSchema; 45 | 46 | #pragma mark - Methods 47 | 48 | /** 49 | Returns an RLMObjectSchema for the given class name in this RLMSchema. 50 | 51 | @param className The object class name. 52 | @return RLMObjectSchema for the given class in this RLMSchema. 53 | 54 | @see RLMObjectSchema 55 | */ 56 | - (nullable RLMObjectSchema *)schemaForClassName:(NSString *)className; 57 | 58 | /** 59 | Look up an RLMObjectSchema for the given class name in this Realm. Throws 60 | an exception if there is no object of type className in this RLMSchema instance. 61 | 62 | @param className The object class name. 63 | @return RLMObjectSchema for the given class in this Realm. 64 | 65 | @see RLMObjectSchema 66 | */ 67 | - (RLMObjectSchema *)objectForKeyedSubscript:(id )className; 68 | 69 | /** 70 | Returns YES if equal to schema 71 | */ 72 | - (BOOL)isEqualToSchema:(RLMSchema *)schema; 73 | 74 | @end 75 | 76 | RLM_ASSUME_NONNULL_END 77 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Headers/Realm.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/vendor/Realm.framework/Info.plist -------------------------------------------------------------------------------- /vendor/Realm.framework/LICENSE: -------------------------------------------------------------------------------- 1 | TABLE OF CONTENTS 2 | 3 | 1. Apache License version 2.0 4 | 2. Realm Components 5 | 3. Export Compliance 6 | 7 | ------------------------------------------------------------------------------- 8 | 9 | Apache License 10 | Version 2.0, January 2004 11 | http://www.apache.org/licenses/ 12 | 13 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 14 | 15 | 1. Definitions. 16 | 17 | "License" shall mean the terms and conditions for use, reproduction, 18 | and distribution as defined by Sections 1 through 9 of this document. 19 | 20 | "Licensor" shall mean the copyright owner or entity authorized by 21 | the copyright owner that is granting the License. 22 | 23 | "Legal Entity" shall mean the union of the acting entity and all 24 | other entities that control, are controlled by, or are under common 25 | control with that entity. For the purposes of this definition, 26 | "control" means (i) the power, direct or indirect, to cause the 27 | direction or management of such entity, whether by contract or 28 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 29 | outstanding shares, or (iii) beneficial ownership of such entity. 30 | 31 | "You" (or "Your") shall mean an individual or Legal Entity 32 | exercising permissions granted by this License. 33 | 34 | "Source" form shall mean the preferred form for making modifications, 35 | including but not limited to software source code, documentation 36 | source, and configuration files. 37 | 38 | "Object" form shall mean any form resulting from mechanical 39 | transformation or translation of a Source form, including but 40 | not limited to compiled object code, generated documentation, 41 | and conversions to other media types. 42 | 43 | "Work" shall mean the work of authorship, whether in Source or 44 | Object form, made available under the License, as indicated by a 45 | copyright notice that is included in or attached to the work 46 | (an example is provided in the Appendix below). 47 | 48 | "Derivative Works" shall mean any work, whether in Source or Object 49 | form, that is based on (or derived from) the Work and for which the 50 | editorial revisions, annotations, elaborations, or other modifications 51 | represent, as a whole, an original work of authorship. For the purposes 52 | of this License, Derivative Works shall not include works that remain 53 | separable from, or merely link (or bind by name) to the interfaces of, 54 | the Work and Derivative Works thereof. 55 | 56 | "Contribution" shall mean any work of authorship, including 57 | the original version of the Work and any modifications or additions 58 | to that Work or Derivative Works thereof, that is intentionally 59 | submitted to Licensor for inclusion in the Work by the copyright owner 60 | or by an individual or Legal Entity authorized to submit on behalf of 61 | the copyright owner. For the purposes of this definition, "submitted" 62 | means any form of electronic, verbal, or written communication sent 63 | to the Licensor or its representatives, including but not limited to 64 | communication on electronic mailing lists, source code control systems, 65 | and issue tracking systems that are managed by, or on behalf of, the 66 | Licensor for the purpose of discussing and improving the Work, but 67 | excluding communication that is conspicuously marked or otherwise 68 | designated in writing by the copyright owner as "Not a Contribution." 69 | 70 | "Contributor" shall mean Licensor and any individual or Legal Entity 71 | on behalf of whom a Contribution has been received by Licensor and 72 | subsequently incorporated within the Work. 73 | 74 | 2. Grant of Copyright License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | copyright license to reproduce, prepare Derivative Works of, 78 | publicly display, publicly perform, sublicense, and distribute the 79 | Work and such Derivative Works in Source or Object form. 80 | 81 | 3. Grant of Patent License. Subject to the terms and conditions of 82 | this License, each Contributor hereby grants to You a perpetual, 83 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 84 | (except as stated in this section) patent license to make, have made, 85 | use, offer to sell, sell, import, and otherwise transfer the Work, 86 | where such license applies only to those patent claims licensable 87 | by such Contributor that are necessarily infringed by their 88 | Contribution(s) alone or by combination of their Contribution(s) 89 | with the Work to which such Contribution(s) was submitted. If You 90 | institute patent litigation against any entity (including a 91 | cross-claim or counterclaim in a lawsuit) alleging that the Work 92 | or a Contribution incorporated within the Work constitutes direct 93 | or contributory patent infringement, then any patent licenses 94 | granted to You under this License for that Work shall terminate 95 | as of the date such litigation is filed. 96 | 97 | 4. Redistribution. You may reproduce and distribute copies of the 98 | Work or Derivative Works thereof in any medium, with or without 99 | modifications, and in Source or Object form, provided that You 100 | meet the following conditions: 101 | 102 | (a) You must give any other recipients of the Work or 103 | Derivative Works a copy of this License; and 104 | 105 | (b) You must cause any modified files to carry prominent notices 106 | stating that You changed the files; and 107 | 108 | (c) You must retain, in the Source form of any Derivative Works 109 | that You distribute, all copyright, patent, trademark, and 110 | attribution notices from the Source form of the Work, 111 | excluding those notices that do not pertain to any part of 112 | the Derivative Works; and 113 | 114 | (d) If the Work includes a "NOTICE" text file as part of its 115 | distribution, then any Derivative Works that You distribute must 116 | include a readable copy of the attribution notices contained 117 | within such NOTICE file, excluding those notices that do not 118 | pertain to any part of the Derivative Works, in at least one 119 | of the following places: within a NOTICE text file distributed 120 | as part of the Derivative Works; within the Source form or 121 | documentation, if provided along with the Derivative Works; or, 122 | within a display generated by the Derivative Works, if and 123 | wherever such third-party notices normally appear. The contents 124 | of the NOTICE file are for informational purposes only and 125 | do not modify the License. You may add Your own attribution 126 | notices within Derivative Works that You distribute, alongside 127 | or as an addendum to the NOTICE text from the Work, provided 128 | that such additional attribution notices cannot be construed 129 | as modifying the License. 130 | 131 | You may add Your own copyright statement to Your modifications and 132 | may provide additional or different license terms and conditions 133 | for use, reproduction, or distribution of Your modifications, or 134 | for any such Derivative Works as a whole, provided Your use, 135 | reproduction, and distribution of the Work otherwise complies with 136 | the conditions stated in this License. 137 | 138 | 5. Submission of Contributions. Unless You explicitly state otherwise, 139 | any Contribution intentionally submitted for inclusion in the Work 140 | by You to the Licensor shall be under the terms and conditions of 141 | this License, without any additional terms or conditions. 142 | Notwithstanding the above, nothing herein shall supersede or modify 143 | the terms of any separate license agreement you may have executed 144 | with Licensor regarding such Contributions. 145 | 146 | 6. Trademarks. This License does not grant permission to use the trade 147 | names, trademarks, service marks, or product names of the Licensor, 148 | except as required for reasonable and customary use in describing the 149 | origin of the Work and reproducing the content of the NOTICE file. 150 | 151 | 7. Disclaimer of Warranty. Unless required by applicable law or 152 | agreed to in writing, Licensor provides the Work (and each 153 | Contributor provides its Contributions) on an "AS IS" BASIS, 154 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 155 | implied, including, without limitation, any warranties or conditions 156 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 157 | PARTICULAR PURPOSE. You are solely responsible for determining the 158 | appropriateness of using or redistributing the Work and assume any 159 | risks associated with Your exercise of permissions under this License. 160 | 161 | 8. Limitation of Liability. In no event and under no legal theory, 162 | whether in tort (including negligence), contract, or otherwise, 163 | unless required by applicable law (such as deliberate and grossly 164 | negligent acts) or agreed to in writing, shall any Contributor be 165 | liable to You for damages, including any direct, indirect, special, 166 | incidental, or consequential damages of any character arising as a 167 | result of this License or out of the use or inability to use the 168 | Work (including but not limited to damages for loss of goodwill, 169 | work stoppage, computer failure or malfunction, or any and all 170 | other commercial damages or losses), even if such Contributor 171 | has been advised of the possibility of such damages. 172 | 173 | 9. Accepting Warranty or Additional Liability. While redistributing 174 | the Work or Derivative Works thereof, You may choose to offer, 175 | and charge a fee for, acceptance of support, warranty, indemnity, 176 | or other liability obligations and/or rights consistent with this 177 | License. However, in accepting such obligations, You may act only 178 | on Your own behalf and on Your sole responsibility, not on behalf 179 | of any other Contributor, and only if You agree to indemnify, 180 | defend, and hold each Contributor harmless for any liability 181 | incurred by, or claims asserted against, such Contributor by reason 182 | of your accepting any such warranty or additional liability. 183 | 184 | END OF TERMS AND CONDITIONS 185 | 186 | APPENDIX: How to apply the Apache License to your work. 187 | 188 | To apply the Apache License to your work, attach the following 189 | boilerplate notice, with the fields enclosed by brackets "{}" 190 | replaced with your own identifying information. (Don't include 191 | the brackets!) The text should be enclosed in the appropriate 192 | comment syntax for the file format. We also recommend that a 193 | file or class name and description of purpose be included on the 194 | same "printed page" as the copyright notice for easier 195 | identification within third-party archives. 196 | 197 | Copyright {yyyy} {name of copyright owner} 198 | 199 | Licensed under the Apache License, Version 2.0 (the "License"); 200 | you may not use this file except in compliance with the License. 201 | You may obtain a copy of the License at 202 | 203 | http://www.apache.org/licenses/LICENSE-2.0 204 | 205 | Unless required by applicable law or agreed to in writing, software 206 | distributed under the License is distributed on an "AS IS" BASIS, 207 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 208 | See the License for the specific language governing permissions and 209 | limitations under the License. 210 | 211 | 212 | REALM COMPONENTS 213 | 214 | This software contains components with separate copyright and license terms. 215 | Your use of these components is subject to the terms and conditions of the 216 | following licenses. 217 | 218 | For the Realm Core component 219 | 220 | Realm Core Binary License 221 | 222 | Copyright (c) 2011-2014 Realm Inc All rights reserved 223 | 224 | Redistribution and use in binary form, with or without modification, is 225 | permitted provided that the following conditions are met: 226 | 227 | 1. You agree not to attempt to decompile, disassemble, reverse engineer or 228 | otherwise discover the source code from which the binary code was derived. 229 | You may, however, access and obtain a separate license for most of the 230 | source code from which this Software was created, at 231 | http://realm.io/pricing/. 232 | 233 | 2. Redistributions in binary form must reproduce the above copyright notice, 234 | this list of conditions and the following disclaimer in the documentation 235 | and/or other materials provided with the distribution. 236 | 237 | 3. Neither the name of the copyright holder nor the names of its 238 | contributors may be used to endorse or promote products derived from this 239 | software without specific prior written permission. 240 | 241 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 242 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 243 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 244 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 245 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 246 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 247 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 248 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 249 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 250 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 251 | POSSIBILITY OF SUCH DAMAGE. 252 | 253 | EXPORT COMPLIANCE 254 | 255 | You understand that the Software may contain cryptographic functions that may be 256 | subject to export restrictions, and you represent and warrant that you are not 257 | located in a country that is subject to United States export restriction or embargo, 258 | including Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, and that you 259 | are not on the Department of Commerce list of Denied Persons, Unverified Parties, 260 | or affiliated with a Restricted Entity. 261 | 262 | You agree to comply with all export, re-export and import restrictions and 263 | regulations of the Department of Commerce or other agency or authority of the 264 | United States or other applicable countries. You also agree not to transfer, or 265 | authorize the transfer of, directly or indirectly, the Software to any prohibited 266 | country, including Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, 267 | or to any person or organization on or affiliated with the Department of 268 | Commerce lists of Denied Persons, Unverified Parties or Restricted Entities, or 269 | otherwise in violation of any such restrictions or regulations. 270 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Realm { 2 | umbrella header "Realm.h" 3 | 4 | export * 5 | module * { export * } 6 | 7 | explicit module Private { 8 | header "RLMAccessor.h" 9 | header "RLMArray_Private.h" 10 | header "RLMListBase.h" 11 | header "RLMMigration_Private.h" 12 | header "RLMObjectSchema_Private.h" 13 | header "RLMObjectStore.h" 14 | header "RLMObject_Private.h" 15 | header "RLMOptionalBase.h" 16 | header "RLMProperty_Private.h" 17 | header "RLMRealmConfiguration_Private.h" 18 | header "RLMRealm_Private.h" 19 | header "RLMResults_Private.h" 20 | header "RLMSchema_Private.h" 21 | } 22 | 23 | explicit module Dynamic { 24 | header "RLMRealm_Dynamic.h" 25 | header "RLMObjectBase_Dynamic.h" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMAccessor.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import 22 | 23 | @class RLMObjectSchema, RLMProperty, RLMObjectBase, RLMProperty; 24 | 25 | #ifdef __cplusplus 26 | typedef NSUInteger RLMCreationOptions; 27 | #else 28 | typedef NS_OPTIONS(NSUInteger, RLMCreationOptions); 29 | #endif 30 | 31 | RLM_ASSUME_NONNULL_BEGIN 32 | 33 | // 34 | // Accessors Class Creation/Caching 35 | // 36 | 37 | // get accessor classes for an object class - generates classes if not cached 38 | Class RLMAccessorClassForObjectClass(Class objectClass, RLMObjectSchema *schema, NSString *prefix); 39 | Class RLMStandaloneAccessorClassForObjectClass(Class objectClass, RLMObjectSchema *schema); 40 | 41 | // Check if a given class is a generated accessor class 42 | bool RLMIsGeneratedClass(Class cls); 43 | 44 | // 45 | // Dynamic getters/setters 46 | // 47 | FOUNDATION_EXTERN void RLMDynamicValidatedSet(RLMObjectBase *obj, NSString *propName, id __nullable val); 48 | FOUNDATION_EXTERN RLMProperty *RLMValidatedGetProperty(RLMObjectBase *obj, NSString *propName); 49 | FOUNDATION_EXTERN id __nullable RLMDynamicGet(RLMObjectBase *obj, RLMProperty *prop); 50 | 51 | // by property/column 52 | FOUNDATION_EXTERN void RLMDynamicSet(RLMObjectBase *obj, RLMProperty *prop, id val, RLMCreationOptions options); 53 | 54 | // 55 | // Class modification 56 | // 57 | 58 | // Replace className method for the given class 59 | void RLMReplaceClassNameMethod(Class accessorClass, NSString *className); 60 | 61 | // Replace sharedSchema method for the given class 62 | void RLMReplaceSharedSchemaMethod(Class accessorClass, RLMObjectSchema * __nullable schema); 63 | void RLMReplaceSharedSchemaMethodWithBlock(Class accessorClass, RLMObjectSchema *(^method)(Class)); 64 | 65 | RLM_ASSUME_NONNULL_END 66 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMArray_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @interface RLMArray () 22 | - (instancetype)initWithObjectClassName:(NSString *)objectClassName; 23 | - (NSString *)descriptionWithMaxDepth:(NSUInteger)depth; 24 | @end 25 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMListBase.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMArray; 22 | 23 | // A base class for Swift generic Lists to make it possible to interact with 24 | // them from obj-c 25 | @interface RLMListBase : NSObject 26 | @property (nonatomic, strong) RLMArray *_rlmArray; 27 | 28 | - (instancetype)initWithArray:(RLMArray *)array; 29 | @end 30 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMMigration_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | #import 22 | 23 | typedef void (^RLMObjectBaseMigrationBlock)(RLMObjectBase *oldObject, RLMObjectBase *newObject); 24 | 25 | @interface RLMMigration () 26 | 27 | @property (nonatomic, strong) RLMRealm *oldRealm; 28 | @property (nonatomic, strong) RLMRealm *realm; 29 | 30 | - (instancetype)initWithRealm:(RLMRealm *)realm oldRealm:(RLMRealm *)oldRealm; 31 | 32 | - (void)execute:(RLMMigrationBlock)block; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | RLM_ASSUME_NONNULL_BEGIN 23 | 24 | @class RLMRealm; 25 | 26 | // RLMObjectSchema private 27 | @interface RLMObjectSchema () 28 | 29 | // writable redecleration 30 | @property (nonatomic, readwrite, copy) NSArray RLM_GENERIC(RLMProperty *) *properties; 31 | @property (nonatomic, readwrite, assign) bool isSwiftClass; 32 | 33 | // class used for this object schema 34 | @property (nonatomic, readwrite, assign) Class objectClass; 35 | @property (nonatomic, readwrite, assign) Class accessorClass; 36 | @property (nonatomic, readwrite, assign) Class standaloneClass; 37 | 38 | @property (nonatomic, readwrite) RLMProperty *primaryKeyProperty; 39 | 40 | @property (nonatomic, readonly) NSArray RLM_GENERIC(RLMProperty *) *propertiesInDeclaredOrder; 41 | 42 | // The Realm retains its object schemas, so they need to not retain the Realm 43 | @property (nonatomic, unsafe_unretained, nullable) RLMRealm *realm; 44 | // returns a cached or new schema for a given object class 45 | + (instancetype)schemaForObjectClass:(Class)objectClass; 46 | 47 | - (void)sortPropertiesByColumn; 48 | 49 | @end 50 | 51 | @interface RLMObjectSchema (Dynamic) 52 | /** 53 | This method is useful only in specialized circumstances, for example, when accessing objects 54 | in a Realm produced externally. If you are simply building an app on Realm, it is not recommened 55 | to use this method as an [RLMObjectSchema](RLMObjectSchema) is generated automatically for every [RLMObject](RLMObject) subclass. 56 | 57 | Initialize an RLMObjectSchema with classname, objectClass, and an array of properties 58 | 59 | @warning This method is useful only in specialized circumstances. 60 | 61 | @param objectClassName The name of the class used to refer to objects of this type. 62 | @param objectClass The objective-c class used when creating instances of this type. 63 | @param properties An array RLMProperty describing the persisted properties for this type. 64 | 65 | @return An initialized instance of RLMObjectSchema. 66 | */ 67 | - (instancetype)initWithClassName:(NSString *)objectClassName objectClass:(Class)objectClass properties:(NSArray *)properties; 68 | @end 69 | 70 | RLM_ASSUME_NONNULL_END 71 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMObjectStore.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | @class RLMRealm, RLMSchema, RLMObjectSchema, RLMObjectBase, RLMResults, RLMProperty; 26 | 27 | // 28 | // Accessor Creation 29 | // 30 | 31 | // create or get cached accessors for the given schema 32 | void RLMRealmCreateAccessors(RLMSchema *schema); 33 | 34 | // Clear the cache of created accessor classes 35 | void RLMClearAccessorCache(); 36 | 37 | 38 | // 39 | // Options for object creation 40 | // 41 | typedef NS_OPTIONS(NSUInteger, RLMCreationOptions) { 42 | // Normal object creation 43 | RLMCreationOptionsNone = 0, 44 | // If the property is a link or array property, upsert the linked objects 45 | // if they have a primary key, and insert them otherwise. 46 | RLMCreationOptionsCreateOrUpdate = 1 << 0, 47 | // Allow standalone objects to be promoted to persisted objects 48 | // if false objects are copied during object creation 49 | RLMCreationOptionsPromoteStandalone = 1 << 1, 50 | }; 51 | 52 | 53 | // 54 | // Adding, Removing, Getting Objects 55 | // 56 | 57 | // add an object to the given realm 58 | void RLMAddObjectToRealm(RLMObjectBase *object, RLMRealm *realm, bool createOrUpdate); 59 | 60 | // delete an object from its realm 61 | void RLMDeleteObjectFromRealm(RLMObjectBase *object, RLMRealm *realm); 62 | 63 | // deletes all objects from a realm 64 | void RLMDeleteAllObjectsFromRealm(RLMRealm *realm); 65 | 66 | // get objects of a given class 67 | RLMResults *RLMGetObjects(RLMRealm *realm, NSString *objectClassName, NSPredicate *predicate) NS_RETURNS_RETAINED; 68 | 69 | // get an object with the given primary key 70 | id RLMGetObject(RLMRealm *realm, NSString *objectClassName, id key) NS_RETURNS_RETAINED; 71 | 72 | // create object from array or dictionary 73 | RLMObjectBase *RLMCreateObjectInRealmWithValue(RLMRealm *realm, NSString *className, id value, bool createOrUpdate) NS_RETURNS_RETAINED; 74 | 75 | 76 | // 77 | // Accessor Creation 78 | // 79 | 80 | 81 | // switch List<> properties from being backed by standalone RLMArrays to RLMArrayLinkView 82 | void RLMInitializeSwiftAccessorGenerics(RLMObjectBase *object); 83 | 84 | #ifdef __cplusplus 85 | } 86 | 87 | namespace realm { 88 | class Table; 89 | template class BasicRowExpr; 90 | using RowExpr = BasicRowExpr; 91 | } 92 | // Create accessors 93 | RLMObjectBase *RLMCreateObjectAccessor(RLMRealm *realm, 94 | RLMObjectSchema *objectSchema, 95 | NSUInteger index) NS_RETURNS_RETAINED; 96 | RLMObjectBase *RLMCreateObjectAccessor(RLMRealm *realm, 97 | RLMObjectSchema *objectSchema, 98 | realm::RowExpr row) NS_RETURNS_RETAINED; 99 | #endif 100 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMObject_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | // RLMObject accessor and read/write realm 22 | @interface RLMObjectBase () { 23 | @public 24 | RLMRealm *_realm; 25 | // objectSchema is a cached pointer to an object stored in the RLMSchema 26 | // owned by _realm, so it's guaranteed to stay alive as long as this object 27 | // without retaining it (and retaining it makes iteration slower) 28 | __unsafe_unretained RLMObjectSchema *_objectSchema; 29 | } 30 | 31 | // standalone initializer 32 | - (instancetype)initWithValue:(id)value schema:(RLMSchema *)schema; 33 | 34 | // live accessor initializer 35 | - (instancetype)initWithRealm:(__unsafe_unretained RLMRealm *const)realm 36 | schema:(__unsafe_unretained RLMObjectSchema *const)schema; 37 | 38 | // shared schema for this class 39 | + (RLMObjectSchema *)sharedSchema; 40 | 41 | @end 42 | 43 | @interface RLMDynamicObject : RLMObject 44 | 45 | @end 46 | 47 | // 48 | // Getters and setters for RLMObjectBase ivars for realm and objectSchema 49 | // 50 | FOUNDATION_EXTERN void RLMObjectBaseSetRealm(RLMObjectBase *object, RLMRealm *realm); 51 | FOUNDATION_EXTERN RLMRealm *RLMObjectBaseRealm(RLMObjectBase *object); 52 | FOUNDATION_EXTERN void RLMObjectBaseSetObjectSchema(RLMObjectBase *object, RLMObjectSchema *objectSchema); 53 | FOUNDATION_EXTERN RLMObjectSchema *RLMObjectBaseObjectSchema(RLMObjectBase *object); 54 | 55 | // Get linking objects for an RLMObjectBase 56 | FOUNDATION_EXTERN NSArray *RLMObjectBaseLinkingObjectsOfClass(RLMObjectBase *object, NSString *className, NSString *property); 57 | 58 | // Dynamic access to RLMObjectBase properties 59 | FOUNDATION_EXTERN id RLMObjectBaseObjectForKeyedSubscript(RLMObjectBase *object, NSString *key); 60 | FOUNDATION_EXTERN void RLMObjectBaseSetObjectForKeyedSubscript(RLMObjectBase *object, NSString *key, id obj); 61 | 62 | // Calls valueForKey: and re-raises NSUndefinedKeyExceptions 63 | FOUNDATION_EXTERN id RLMValidatedValueForProperty(id object, NSString *key, NSString *className); 64 | 65 | // Compare two RLObjectBases 66 | FOUNDATION_EXTERN BOOL RLMObjectBaseAreEqual(RLMObjectBase *o1, RLMObjectBase *o2); 67 | 68 | // Get ObjectUil class for objc or swift 69 | FOUNDATION_EXTERN Class RLMObjectUtilClass(BOOL isSwift); 70 | 71 | FOUNDATION_EXTERN const NSUInteger RLMDescriptionMaxDepth; 72 | 73 | @class RLMProperty, RLMArray; 74 | @interface RLMObjectUtil : NSObject 75 | 76 | + (NSArray RLM_GENERIC(NSString *) *)ignoredPropertiesForClass:(Class)cls; 77 | + (NSArray RLM_GENERIC(NSString *) *)indexedPropertiesForClass:(Class)cls; 78 | 79 | + (NSArray RLM_GENERIC(NSString *) *)getGenericListPropertyNames:(id)obj; 80 | + (void)initializeListProperty:(RLMObjectBase *)object property:(RLMProperty *)property array:(RLMArray *)array; 81 | + (void)initializeOptionalProperty:(RLMObjectBase *)object property:(RLMProperty *)property; 82 | 83 | + (NSDictionary RLM_GENERIC(NSString *, NSNumber *) *)getOptionalProperties:(id)obj; 84 | + (NSArray RLM_GENERIC(NSString *) *)requiredPropertiesForClass:(Class)cls; 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMOptionalBase.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | 22 | @class RLMObjectBase, RLMProperty; 23 | 24 | @interface RLMOptionalBase : NSProxy 25 | 26 | - (instancetype)init; 27 | 28 | @property (nonatomic, weak) RLMObjectBase *object; 29 | 30 | @property (nonatomic, unsafe_unretained) RLMProperty *property; 31 | 32 | @property (nonatomic) id underlyingValue; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMProperty_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | #import 22 | 23 | @class RLMObjectBase; 24 | 25 | FOUNDATION_EXTERN BOOL RLMPropertyTypeIsNullable(RLMPropertyType propertyType); 26 | FOUNDATION_EXTERN BOOL RLMPropertyTypeIsNumeric(RLMPropertyType propertyType); 27 | 28 | // private property interface 29 | @interface RLMProperty () 30 | 31 | - (instancetype)initWithName:(NSString *)name 32 | indexed:(BOOL)indexed 33 | property:(objc_property_t)property; 34 | 35 | - (instancetype)initSwiftPropertyWithName:(NSString *)name 36 | indexed:(BOOL)indexed 37 | property:(objc_property_t)property 38 | instance:(RLMObjectBase *)objectInstance; 39 | 40 | - (instancetype)initSwiftListPropertyWithName:(NSString *)name 41 | ivar:(Ivar)ivar 42 | objectClassName:(NSString *)objectClassName; 43 | 44 | - (instancetype)initSwiftOptionalPropertyWithName:(NSString *)name 45 | ivar:(Ivar)ivar 46 | propertyType:(RLMPropertyType)propertyType; 47 | 48 | // private setters 49 | @property (nonatomic, assign) NSUInteger column; 50 | @property (nonatomic, readwrite, assign) RLMPropertyType type; 51 | @property (nonatomic, readwrite) BOOL indexed; 52 | @property (nonatomic, readwrite) BOOL optional; 53 | @property (nonatomic, copy) NSString *objectClassName; 54 | 55 | // private properties 56 | @property (nonatomic, assign) char objcType; 57 | @property (nonatomic, copy) NSString *objcRawType; 58 | @property (nonatomic, assign) BOOL isPrimary; 59 | @property (nonatomic, assign) Ivar swiftIvar; 60 | @property (nonatomic, assign) NSUInteger declarationIndex; 61 | 62 | // getter and setter names 63 | @property (nonatomic, copy) NSString *getterName; 64 | @property (nonatomic, copy) NSString *setterName; 65 | @property (nonatomic) SEL getterSel; 66 | @property (nonatomic) SEL setterSel; 67 | 68 | @end 69 | 70 | @interface RLMProperty (Dynamic) 71 | /** 72 | This method is useful only in specialized circumstances, for example, in conjunction with 73 | +[RLMObjectSchema initWithClassName:objectClass:properties:]. If you are simply building an 74 | app on Realm, it is not recommened to use this method. 75 | 76 | Initialize an RLMProperty 77 | 78 | @warning This method is useful only in specialized circumstances. 79 | 80 | @param name The property name. 81 | @param type The property type. 82 | @param objectClassName The object type used for Object and Array types. 83 | 84 | @return An initialized instance of RLMProperty. 85 | */ 86 | - (instancetype)initWithName:(NSString *)name 87 | type:(RLMPropertyType)type 88 | objectClassName:(NSString *)objectClassName 89 | indexed:(BOOL)indexed 90 | optional:(BOOL)optional; 91 | @end 92 | 93 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2015 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMSchema; 22 | 23 | @interface RLMRealmConfiguration () 24 | 25 | @property (nonatomic, readwrite) bool cache; 26 | @property (nonatomic, readwrite) bool dynamic; 27 | @property (nonatomic, readwrite) bool disableFormatUpgrade; 28 | @property (nonatomic, copy) RLMSchema *customSchema; 29 | 30 | // Get the default confiugration without copying it 31 | + (RLMRealmConfiguration *)rawDefaultConfiguration; 32 | 33 | + (void)resetRealmConfigurationState; 34 | @end 35 | 36 | // Get a path in the platform-appropriate documents directory with the given filename 37 | FOUNDATION_EXTERN NSString *RLMRealmPathForFile(NSString *fileName); 38 | FOUNDATION_EXTERN NSString *RLMRealmPathForFileAndBundleIdentifier(NSString *fileName, NSString *mainBundleIdentifier); 39 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMRealmUtil.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | #import 21 | #import 22 | 23 | @class RLMRealm; 24 | 25 | namespace realm { 26 | class BindingContext; 27 | } 28 | 29 | // Add a Realm to the weak cache 30 | void RLMCacheRealm(std::string const& path, RLMRealm *realm); 31 | // Get a Realm for the given path which can be used on the current thread 32 | RLMRealm *RLMGetThreadLocalCachedRealmForPath(std::string const& path); 33 | // Get a Realm for the given path 34 | RLMRealm *RLMGetAnyCachedRealmForPath(std::string const& path); 35 | // Clear the weak cache of Realms 36 | void RLMClearRealmCache(); 37 | 38 | // Install an uncaught exception handler that cancels write transactions 39 | // for all cached realms on the current thread 40 | void RLMInstallUncaughtExceptionHandler(); 41 | 42 | std::unique_ptr RLMCreateBindingContext(RLMRealm *realm); 43 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMRealm_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMFastEnumerator; 22 | 23 | // Disable syncing files to disk. Cannot be re-enabled. Use only for tests. 24 | FOUNDATION_EXTERN void RLMDisableSyncToDisk(); 25 | 26 | FOUNDATION_EXTERN NSData *RLMRealmValidatedEncryptionKey(NSData *key); 27 | 28 | // RLMRealm private members 29 | @interface RLMRealm () 30 | 31 | @property (nonatomic, readonly) BOOL dynamic; 32 | @property (nonatomic, readwrite) RLMSchema *schema; 33 | 34 | + (void)resetRealmState; 35 | 36 | /** 37 | This method is useful only in specialized circumstances, for example, when opening Realm files 38 | retrieved externally that contain a different schema than defined in your application. 39 | If you are simply building an app on Realm you should consider using: 40 | [defaultRealm]([RLMRealm defaultRealm]) or [realmWithPath:]([RLMRealm realmWithPath:]) 41 | 42 | Obtains an `RLMRealm` instance with persistence to a specific file path with 43 | options. 44 | 45 | @warning This method is useful only in specialized circumstances. 46 | 47 | @param path Path to the file you want the data saved in. 48 | @param key 64-byte key to use to encrypt the data. 49 | @param readonly `BOOL` indicating if this Realm is read-only (must use for read-only files) 50 | @param inMemory `BOOL` indicating if this Realm is in-memory 51 | @param dynamic `BOOL` indicating if this Realm is dynamic 52 | @param customSchema `RLMSchema` object representing the schema for the Realm 53 | @param outError If an error occurs, upon return contains an `NSError` object 54 | that describes the problem. If you are not interested in 55 | possible errors, pass in NULL. 56 | 57 | @return An `RLMRealm` instance. 58 | 59 | @see RLMRealm defaultRealm 60 | @see RLMRealm realmWithPath: 61 | @see RLMRealm realmWithPath:readOnly:error: 62 | @see RLMRealm realmWithPath:encryptionKey:readOnly:error: 63 | */ 64 | + (instancetype)realmWithPath:(NSString *)path 65 | key:(NSData *)key 66 | readOnly:(BOOL)readonly 67 | inMemory:(BOOL)inMemory 68 | dynamic:(BOOL)dynamic 69 | schema:(RLMSchema *)customSchema 70 | error:(NSError **)outError; 71 | 72 | - (void)registerEnumerator:(RLMFastEnumerator *)enumerator; 73 | - (void)unregisterEnumerator:(RLMFastEnumerator *)enumerator; 74 | - (void)detachAllEnumerators; 75 | 76 | - (void)sendNotifications:(NSString *)notification; 77 | - (void)notify; 78 | - (void)verifyThread; 79 | 80 | + (NSString *)writeableTemporaryPathForFile:(NSString *)fileName; 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMResults_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #import 20 | 21 | @class RLMObjectSchema; 22 | 23 | @interface RLMResults () 24 | @property (nonatomic, unsafe_unretained) RLMObjectSchema *objectSchema; 25 | @end 26 | -------------------------------------------------------------------------------- /vendor/Realm.framework/PrivateHeaders/RLMSchema_Private.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2014 Realm Inc. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | //////////////////////////////////////////////////////////////////////////// 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | #import 24 | #import 25 | 26 | RLM_ASSUME_NONNULL_BEGIN 27 | 28 | @class RLMRealm; 29 | 30 | // 31 | // RLMSchema private interface 32 | // 33 | @interface RLMSchema () 34 | 35 | /** 36 | Returns an `RLMSchema` containing only the given `RLMObject` subclasses. 37 | 38 | @param classes The classes to be included in the schema. 39 | 40 | @return An `RLMSchema` containing only the given classes. 41 | */ 42 | + (instancetype)schemaWithObjectClasses:(NSArray RLM_GENERIC(Class) *)classes; 43 | 44 | @property (nonatomic, readwrite, copy) NSArray RLM_GENERIC(RLMObjectSchema *) *objectSchema; 45 | 46 | // schema based on runtime objects 47 | + (instancetype)sharedSchema; 48 | 49 | // schema based upon all currently registered object classes 50 | + (instancetype)partialSharedSchema; 51 | 52 | // schema based on tables in a Realm 53 | + (instancetype)dynamicSchemaFromRealm:(RLMRealm *)realm; 54 | 55 | // class for string 56 | + (nullable Class)classForString:(NSString *)className; 57 | 58 | // shallow copy for reusing schema properties accross the same Realm on multiple threads 59 | - (instancetype)shallowCopy; 60 | 61 | @end 62 | 63 | RLM_ASSUME_NONNULL_END 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | -------------------------------------------------------------------------------- /vendor/Realm.framework/Realm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/vendor/Realm.framework/Realm -------------------------------------------------------------------------------- /vendor/Realm.framework/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | CHANGELOG.md 8 | 9 | WtRnippLvfyXgYBTNBxbLpRbSBs= 10 | 11 | Headers/RLMArray.h 12 | 13 | bRs8XaYmHk0IHomL+DoLg9VIQcs= 14 | 15 | Headers/RLMCollection.h 16 | 17 | h4bGbTfAAbi6elYEeJrJjXPqt08= 18 | 19 | Headers/RLMConstants.h 20 | 21 | XqUg6H8LD1r47czttNT7tWKNEj0= 22 | 23 | Headers/RLMDefines.h 24 | 25 | LTBLIMI2hpGzefHHDJFlrFyBKbk= 26 | 27 | Headers/RLMMigration.h 28 | 29 | A4sSaGlSDsQXHcZdUzapdp/hau0= 30 | 31 | Headers/RLMObject.h 32 | 33 | IEyXRi6XT8aREje0aq4u1ojSfhw= 34 | 35 | Headers/RLMObjectBase.h 36 | 37 | fXWWphrRK0lge69TTsBoTRfLIfM= 38 | 39 | Headers/RLMObjectBase_Dynamic.h 40 | 41 | FBN57naxDdaazOlw9Nr0xzFqNSs= 42 | 43 | Headers/RLMObjectSchema.h 44 | 45 | M+w0HEHJ6KK7GXfRJ7y9bXkNeEo= 46 | 47 | Headers/RLMPlatform.h 48 | 49 | zYUh7M2Z6HWMeYtgEGVcJ0rh/Ms= 50 | 51 | Headers/RLMProperty.h 52 | 53 | 0eitI2tVWsqzamYEBn7BgMXX2Ok= 54 | 55 | Headers/RLMRealm.h 56 | 57 | bgO+AUJolw7Xh0MHh/QoKnAieIg= 58 | 59 | Headers/RLMRealmConfiguration.h 60 | 61 | yZ+GwRhf3S99mmMZ4Rwuhv2jBXY= 62 | 63 | Headers/RLMRealm_Dynamic.h 64 | 65 | hFGhGxu2S3Y6dPqCpZy3SO7W7nA= 66 | 67 | Headers/RLMResults.h 68 | 69 | pP+fyUttoujCFSw7GoeRn360Uck= 70 | 71 | Headers/RLMSchema.h 72 | 73 | ucTfsMHStZKxGPQonKt1ObQhKdw= 74 | 75 | Headers/Realm.h 76 | 77 | f/j3RmYmndvc1H++AFAkWTXKdNY= 78 | 79 | Info.plist 80 | 81 | 1BodvM97MFUV3niCJ0UmgNqyXLg= 82 | 83 | LICENSE 84 | 85 | O5GBxTR5LKuLS2mE2yllKbrYEMM= 86 | 87 | Modules/module.modulemap 88 | 89 | a8dTqOP2XQeiuyeVF8dfuB/54Qs= 90 | 91 | PrivateHeaders/RLMAccessor.h 92 | 93 | frmri5ACsKv2OnJX6jRK060rV7I= 94 | 95 | PrivateHeaders/RLMArray_Private.h 96 | 97 | cA4uV1tqKkcpRvA9d34Zc1hrpWE= 98 | 99 | PrivateHeaders/RLMListBase.h 100 | 101 | 7Xh7nklxIgCo14S2WYaAzy5H1nA= 102 | 103 | PrivateHeaders/RLMMigration_Private.h 104 | 105 | tj8rBoNCTBIIh1uADxnfvtomsHU= 106 | 107 | PrivateHeaders/RLMObjectSchema_Private.h 108 | 109 | suyvJeELVvYHFmMzTDZzHJRNI70= 110 | 111 | PrivateHeaders/RLMObjectStore.h 112 | 113 | C3sQjl4EiGEA6EsB/O+qlF391Vo= 114 | 115 | PrivateHeaders/RLMObject_Private.h 116 | 117 | QIad9fS9NNa0vUf1myF5yGQxSMw= 118 | 119 | PrivateHeaders/RLMOptionalBase.h 120 | 121 | A/LlZhK4J7iob6s5uQf/JMlmiKc= 122 | 123 | PrivateHeaders/RLMProperty_Private.h 124 | 125 | i68jLrh1gfTNuZtSUobmZBkCYtk= 126 | 127 | PrivateHeaders/RLMRealmConfiguration_Private.h 128 | 129 | 6YTZOy5plQg6qtOWdRS87YZKnic= 130 | 131 | PrivateHeaders/RLMRealmUtil.hpp 132 | 133 | EfQBaZeq1f7zRMWKtXsigqvzj+8= 134 | 135 | PrivateHeaders/RLMRealm_Private.h 136 | 137 | g3blVvmjHDUB1dnBaI4e5l/qMjA= 138 | 139 | PrivateHeaders/RLMResults_Private.h 140 | 141 | CXr8fqruIV+V8/QWCmANg/Y+Ba0= 142 | 143 | PrivateHeaders/RLMSchema_Private.h 144 | 145 | 7hUckKxhPwVmhaaG5mAX8sSxrpU= 146 | 147 | strip-frameworks.sh 148 | 149 | DPAZOV226EEqFQPiH+tOjs+Q+cU= 150 | 151 | 152 | files2 153 | 154 | CHANGELOG.md 155 | 156 | WtRnippLvfyXgYBTNBxbLpRbSBs= 157 | 158 | Headers/RLMArray.h 159 | 160 | bRs8XaYmHk0IHomL+DoLg9VIQcs= 161 | 162 | Headers/RLMCollection.h 163 | 164 | h4bGbTfAAbi6elYEeJrJjXPqt08= 165 | 166 | Headers/RLMConstants.h 167 | 168 | XqUg6H8LD1r47czttNT7tWKNEj0= 169 | 170 | Headers/RLMDefines.h 171 | 172 | LTBLIMI2hpGzefHHDJFlrFyBKbk= 173 | 174 | Headers/RLMMigration.h 175 | 176 | A4sSaGlSDsQXHcZdUzapdp/hau0= 177 | 178 | Headers/RLMObject.h 179 | 180 | IEyXRi6XT8aREje0aq4u1ojSfhw= 181 | 182 | Headers/RLMObjectBase.h 183 | 184 | fXWWphrRK0lge69TTsBoTRfLIfM= 185 | 186 | Headers/RLMObjectBase_Dynamic.h 187 | 188 | FBN57naxDdaazOlw9Nr0xzFqNSs= 189 | 190 | Headers/RLMObjectSchema.h 191 | 192 | M+w0HEHJ6KK7GXfRJ7y9bXkNeEo= 193 | 194 | Headers/RLMPlatform.h 195 | 196 | zYUh7M2Z6HWMeYtgEGVcJ0rh/Ms= 197 | 198 | Headers/RLMProperty.h 199 | 200 | 0eitI2tVWsqzamYEBn7BgMXX2Ok= 201 | 202 | Headers/RLMRealm.h 203 | 204 | bgO+AUJolw7Xh0MHh/QoKnAieIg= 205 | 206 | Headers/RLMRealmConfiguration.h 207 | 208 | yZ+GwRhf3S99mmMZ4Rwuhv2jBXY= 209 | 210 | Headers/RLMRealm_Dynamic.h 211 | 212 | hFGhGxu2S3Y6dPqCpZy3SO7W7nA= 213 | 214 | Headers/RLMResults.h 215 | 216 | pP+fyUttoujCFSw7GoeRn360Uck= 217 | 218 | Headers/RLMSchema.h 219 | 220 | ucTfsMHStZKxGPQonKt1ObQhKdw= 221 | 222 | Headers/Realm.h 223 | 224 | f/j3RmYmndvc1H++AFAkWTXKdNY= 225 | 226 | LICENSE 227 | 228 | O5GBxTR5LKuLS2mE2yllKbrYEMM= 229 | 230 | Modules/module.modulemap 231 | 232 | a8dTqOP2XQeiuyeVF8dfuB/54Qs= 233 | 234 | PrivateHeaders/RLMAccessor.h 235 | 236 | frmri5ACsKv2OnJX6jRK060rV7I= 237 | 238 | PrivateHeaders/RLMArray_Private.h 239 | 240 | cA4uV1tqKkcpRvA9d34Zc1hrpWE= 241 | 242 | PrivateHeaders/RLMListBase.h 243 | 244 | 7Xh7nklxIgCo14S2WYaAzy5H1nA= 245 | 246 | PrivateHeaders/RLMMigration_Private.h 247 | 248 | tj8rBoNCTBIIh1uADxnfvtomsHU= 249 | 250 | PrivateHeaders/RLMObjectSchema_Private.h 251 | 252 | suyvJeELVvYHFmMzTDZzHJRNI70= 253 | 254 | PrivateHeaders/RLMObjectStore.h 255 | 256 | C3sQjl4EiGEA6EsB/O+qlF391Vo= 257 | 258 | PrivateHeaders/RLMObject_Private.h 259 | 260 | QIad9fS9NNa0vUf1myF5yGQxSMw= 261 | 262 | PrivateHeaders/RLMOptionalBase.h 263 | 264 | A/LlZhK4J7iob6s5uQf/JMlmiKc= 265 | 266 | PrivateHeaders/RLMProperty_Private.h 267 | 268 | i68jLrh1gfTNuZtSUobmZBkCYtk= 269 | 270 | PrivateHeaders/RLMRealmConfiguration_Private.h 271 | 272 | 6YTZOy5plQg6qtOWdRS87YZKnic= 273 | 274 | PrivateHeaders/RLMRealmUtil.hpp 275 | 276 | EfQBaZeq1f7zRMWKtXsigqvzj+8= 277 | 278 | PrivateHeaders/RLMRealm_Private.h 279 | 280 | g3blVvmjHDUB1dnBaI4e5l/qMjA= 281 | 282 | PrivateHeaders/RLMResults_Private.h 283 | 284 | CXr8fqruIV+V8/QWCmANg/Y+Ba0= 285 | 286 | PrivateHeaders/RLMSchema_Private.h 287 | 288 | 7hUckKxhPwVmhaaG5mAX8sSxrpU= 289 | 290 | strip-frameworks.sh 291 | 292 | DPAZOV226EEqFQPiH+tOjs+Q+cU= 293 | 294 | 295 | rules 296 | 297 | ^ 298 | 299 | ^.*\.lproj/ 300 | 301 | optional 302 | 303 | weight 304 | 1000 305 | 306 | ^.*\.lproj/locversion.plist$ 307 | 308 | omit 309 | 310 | weight 311 | 1100 312 | 313 | ^version.plist$ 314 | 315 | 316 | rules2 317 | 318 | .*\.dSYM($|/) 319 | 320 | weight 321 | 11 322 | 323 | ^ 324 | 325 | weight 326 | 20 327 | 328 | ^(.*/)?\.DS_Store$ 329 | 330 | omit 331 | 332 | weight 333 | 2000 334 | 335 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 336 | 337 | nested 338 | 339 | weight 340 | 10 341 | 342 | ^.* 343 | 344 | ^.*\.lproj/ 345 | 346 | optional 347 | 348 | weight 349 | 1000 350 | 351 | ^.*\.lproj/locversion.plist$ 352 | 353 | omit 354 | 355 | weight 356 | 1100 357 | 358 | ^Info\.plist$ 359 | 360 | omit 361 | 362 | weight 363 | 20 364 | 365 | ^PkgInfo$ 366 | 367 | omit 368 | 369 | weight 370 | 20 371 | 372 | ^[^/]+$ 373 | 374 | nested 375 | 376 | weight 377 | 10 378 | 379 | ^embedded\.provisionprofile$ 380 | 381 | weight 382 | 20 383 | 384 | ^version\.plist$ 385 | 386 | weight 387 | 20 388 | 389 | 390 | 391 | 392 | -------------------------------------------------------------------------------- /vendor/Realm.framework/strip-frameworks.sh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015 Realm Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | ################################################################################ 18 | 19 | # This script strips all non-valid architectures from dynamic libraries in 20 | # the application's `Frameworks` directory. 21 | # 22 | # The following environment variables are required: 23 | # 24 | # BUILT_PRODUCTS_DIR 25 | # FRAMEWORKS_FOLDER_PATH 26 | # VALID_ARCHS 27 | # EXPANDED_CODE_SIGN_IDENTITY 28 | 29 | 30 | # Signs a framework with the provided identity 31 | code_sign() { 32 | # Use the current code_sign_identitiy 33 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 34 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" 35 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 36 | } 37 | 38 | if [ "$ACTION" = "install" ]; then 39 | echo "Copy .bcsymbolmap files to .xcarchive" 40 | find . -name '*.bcsymbolmap' -type f -exec mv {} "${CONFIGURATION_BUILD_DIR}" \; 41 | else 42 | # Delete *.bcsymbolmap files from framework bundle unless archiving 43 | find . -name '*.bcsymbolmap' -type f -exec rm -rf "{}" +\; 44 | fi 45 | 46 | echo "Stripping frameworks" 47 | cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}" 48 | 49 | for file in $(find . -type f -perm +111); do 50 | # Skip non-dynamic libraries 51 | if ! [[ "$(file "$file")" == *"dynamically linked shared library"* ]]; then 52 | continue 53 | fi 54 | # Get architectures for current file 55 | archs="$(lipo -info "${file}" | rev | cut -d ':' -f1 | rev)" 56 | stripped="" 57 | for arch in $archs; do 58 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 59 | # Strip non-valid architectures in-place 60 | lipo -remove "$arch" -output "$file" "$file" || exit 1 61 | stripped="$stripped $arch" 62 | fi 63 | done 64 | if [[ "$stripped" != "" ]]; then 65 | echo "Stripped $file of architectures:$stripped" 66 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then 67 | code_sign "${file}" 68 | fi 69 | fi 70 | done 71 | -------------------------------------------------------------------------------- /vendor/RealmSwift.framework/Headers/RealmSwift-Swift.h: -------------------------------------------------------------------------------- 1 | // Generated by Apple Swift version 2.1.1 (swiftlang-700.1.101.15 clang-700.1.81) 2 | #pragma clang diagnostic push 3 | 4 | #if defined(__has_include) && __has_include() 5 | # include 6 | #endif 7 | 8 | #pragma clang diagnostic ignored "-Wauto-import" 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #if defined(__has_include) && __has_include() 15 | # include 16 | #elif !defined(__cplusplus) || __cplusplus < 201103L 17 | typedef uint_least16_t char16_t; 18 | typedef uint_least32_t char32_t; 19 | #endif 20 | 21 | typedef struct _NSZone NSZone; 22 | 23 | #if !defined(SWIFT_PASTE) 24 | # define SWIFT_PASTE_HELPER(x, y) x##y 25 | # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) 26 | #endif 27 | #if !defined(SWIFT_METATYPE) 28 | # define SWIFT_METATYPE(X) Class 29 | #endif 30 | 31 | #if defined(__has_attribute) && __has_attribute(objc_runtime_name) 32 | # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) 33 | #else 34 | # define SWIFT_RUNTIME_NAME(X) 35 | #endif 36 | #if defined(__has_attribute) && __has_attribute(swift_name) 37 | # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) 38 | #else 39 | # define SWIFT_COMPILE_NAME(X) 40 | #endif 41 | #if !defined(SWIFT_CLASS_EXTRA) 42 | # define SWIFT_CLASS_EXTRA 43 | #endif 44 | #if !defined(SWIFT_PROTOCOL_EXTRA) 45 | # define SWIFT_PROTOCOL_EXTRA 46 | #endif 47 | #if !defined(SWIFT_ENUM_EXTRA) 48 | # define SWIFT_ENUM_EXTRA 49 | #endif 50 | #if !defined(SWIFT_CLASS) 51 | # if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted) 52 | # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA 53 | # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA 54 | # else 55 | # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA 56 | # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA 57 | # endif 58 | #endif 59 | 60 | #if !defined(SWIFT_PROTOCOL) 61 | # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA 62 | # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA 63 | #endif 64 | 65 | #if !defined(SWIFT_EXTENSION) 66 | # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) 67 | #endif 68 | 69 | #if !defined(OBJC_DESIGNATED_INITIALIZER) 70 | # if defined(__has_attribute) && __has_attribute(objc_designated_initializer) 71 | # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) 72 | # else 73 | # define OBJC_DESIGNATED_INITIALIZER 74 | # endif 75 | #endif 76 | #if !defined(SWIFT_ENUM) 77 | # define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_EXTRA _name : _type 78 | #endif 79 | typedef float swift_float2 __attribute__((__ext_vector_type__(2))); 80 | typedef float swift_float3 __attribute__((__ext_vector_type__(3))); 81 | typedef float swift_float4 __attribute__((__ext_vector_type__(4))); 82 | typedef double swift_double2 __attribute__((__ext_vector_type__(2))); 83 | typedef double swift_double3 __attribute__((__ext_vector_type__(3))); 84 | typedef double swift_double4 __attribute__((__ext_vector_type__(4))); 85 | typedef int swift_int2 __attribute__((__ext_vector_type__(2))); 86 | typedef int swift_int3 __attribute__((__ext_vector_type__(3))); 87 | typedef int swift_int4 __attribute__((__ext_vector_type__(4))); 88 | #if defined(__has_feature) && __has_feature(modules) 89 | @import Realm; 90 | @import Realm.Private; 91 | @import Foundation; 92 | @import ObjectiveC; 93 | #endif 94 | 95 | #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" 96 | #pragma clang diagnostic ignored "-Wduplicate-method-arg" 97 | @class RLMRealm; 98 | @class RLMObjectSchema; 99 | @class RLMSchema; 100 | @class RLMProperty; 101 | @class RLMListBase; 102 | @class RLMOptionalBase; 103 | 104 | 105 | /// In Realm you define your model classes by subclassing Object and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the Object class directly. 106 | /// 107 | /// class Dog: Object { 108 | /// dynamic var name: String = "" 109 | /// dynamic var adopted: Bool = false 110 | /// let siblings = List() 111 | /// } 112 | /// 113 | /// 114 | ///

Supported property types

115 | ///
  • String 116 | /// , NSString 117 | ///
  • Int 118 | ///
  • Int8 119 | /// , Int16 120 | /// , Int32 121 | /// , Int64 122 | ///
  • Float 123 | ///
  • Double 124 | ///
  • Bool 125 | ///
  • NSDate 126 | ///
  • NSData 127 | ///
  • RealmOptional 128 | /// for optional numeric properties
  • Object 129 | /// subclasses for to-one relationships
  • List 130 | /// for to-many relationships
131 | /// String 132 | /// , NSString 133 | /// , NSDate 134 | /// , NSData 135 | /// and Object 136 | /// subclass properties can be 137 | /// optional. Int 138 | /// , Int8 139 | /// , Int16, Int32 140 | /// , Int64 141 | /// , Float 142 | /// , Double 143 | /// , Bool 144 | /// 145 | /// and List 146 | /// properties cannot. To store an optional number, instead use 147 | /// RealmOptional 148 | /// , RealmOptional 149 | /// , RealmOptional 150 | /// , or 151 | /// RealmOptional 152 | /// instead, which wraps an optional value of the generic type. 153 | /// 154 | /// All property types except for List 155 | /// and RealmOptional 156 | /// must be declared as 157 | /// dynamic var 158 | /// . List 159 | /// and RealmOptional 160 | /// properties must be declared as 161 | /// non-dynamic let 162 | /// properties. 163 | /// 164 | ///

Querying

165 | /// You can gets Results 166 | /// of an Object subclass via the objects(_:) 167 | /// instance 168 | /// method on Realm 169 | /// . 170 | /// 171 | ///

Relationships

172 | /// See our Cocoa guide for more details. 173 | SWIFT_CLASS_NAMED("Object") 174 | @interface RealmSwiftObject : RLMObjectBase 175 | 176 | /// Initialize a standalone (unpersisted) Object. Call add(_:) on a Realm to add standalone objects to a realm. 177 | /// 178 | ///
  • see: Realm().add(_:)
179 | - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; 180 | 181 | /// Initialize a standalone (unpersisted) Object with values from an Array or Dictionary. Call add(_:) on a Realm to add standalone objects to a realm. 182 | /// 183 | /// \param value The value used to populate the object. This can be any key/value coding compliant 184 | /// object, or a JSON object such as those returned from the methods in NSJSONSerialization 185 | /// , 186 | /// or an Array 187 | /// with one object for each persisted property. An exception will be 188 | /// thrown if any required properties are not present and no default is set. 189 | - (nonnull instancetype)initWithValue:(id __nonnull)value OBJC_DESIGNATED_INITIALIZER; 190 | 191 | /// Indicates if an object can no longer be accessed. 192 | /// 193 | /// An object can no longer be accessed if the object has been deleted from the containing 194 | /// realm 195 | /// or if invalidate 196 | /// is called on the containing realm 197 | /// . 198 | @property (nonatomic, readonly, getter=isInvalidated) BOOL invalidated; 199 | 200 | /// Returns a human-readable description of this object. 201 | @property (nonatomic, readonly, copy) NSString * __nonnull description; 202 | 203 | /// Helper to return the class name for an Object subclass. 204 | @property (nonatomic, readonly, copy) NSString * __nonnull className; 205 | 206 | /// Override to designate a property as the primary key for an Object subclass. Only properties of type String and Int can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for primary key properties. 207 | /// 208 | /// \returns Name of the property designated as the primary key, or nil 209 | /// if the model has no primary key. 210 | + (NSString * __nullable)primaryKey; 211 | 212 | /// Override to return an array of property names to ignore. These properties will not be persisted and are treated as transient. 213 | /// 214 | /// \returns Array 215 | /// of property names to ignore. 216 | + (NSArray * __nonnull)ignoredProperties; 217 | 218 | /// Return an array of property names for properties which should be indexed. Only supported for string and int properties. 219 | /// 220 | /// \returns Array 221 | /// of property names to index. 222 | + (NSArray * __nonnull)indexedProperties; 223 | - (id __nullable)objectForKeyedSubscript:(NSString * __nonnull)key; 224 | - (void)setObject:(id __nullable)value forKeyedSubscript:(NSString * __nonnull)key; 225 | 226 | /// Returns whether both objects are equal. Objects are considered equal when they are both from the same Realm and point to the same underlying object in the database. 227 | - (BOOL)isEqual:(id __nullable)object; 228 | 229 | /// WARNING: This is an internal initializer not intended for public use. :nodoc: 230 | - (nonnull instancetype)initWithRealm:(RLMRealm * __nonnull)realm schema:(RLMObjectSchema * __nonnull)schema OBJC_DESIGNATED_INITIALIZER; 231 | 232 | /// WARNING: This is an internal initializer not intended for public use. :nodoc: 233 | - (nonnull instancetype)initWithValue:(id __nonnull)value schema:(RLMSchema * __nonnull)schema OBJC_DESIGNATED_INITIALIZER; 234 | - (RLMListBase * __nonnull)listForProperty:(RLMProperty * __nonnull)prop; 235 | - (RLMOptionalBase * __nonnull)optionalForProperty:(RLMProperty * __nonnull)prop; 236 | @end 237 | 238 | 239 | 240 | /// Object interface which allows untyped getters and setters for Objects. :nodoc: 241 | SWIFT_CLASS("_TtC10RealmSwift13DynamicObject") 242 | @interface DynamicObject : RealmSwiftObject 243 | - (RLMListBase * __nonnull)listForProperty:(RLMProperty * __nonnull)prop; 244 | - (RLMOptionalBase * __nonnull)optionalForProperty:(RLMProperty * __nonnull)prop; 245 | 246 | /// :nodoc: 247 | - (id __nullable)valueForUndefinedKey:(NSString * __nonnull)key; 248 | 249 | /// :nodoc: 250 | - (void)setValue:(id __nullable)value forUndefinedKey:(NSString * __nonnull)key; 251 | 252 | /// :nodoc: 253 | + (BOOL)shouldIncludeInDefaultSchema; 254 | - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; 255 | - (nonnull instancetype)initWithValue:(id __nonnull)value OBJC_DESIGNATED_INITIALIZER; 256 | - (nonnull instancetype)initWithRealm:(RLMRealm * __nonnull)realm schema:(RLMObjectSchema * __nonnull)schema OBJC_DESIGNATED_INITIALIZER; 257 | - (nonnull instancetype)initWithValue:(id __nonnull)value schema:(RLMSchema * __nonnull)schema OBJC_DESIGNATED_INITIALIZER; 258 | @end 259 | 260 | @class RLMArray; 261 | 262 | 263 | /// :nodoc: Internal class. Do not use directly. 264 | SWIFT_CLASS("_TtC10RealmSwift8ListBase") 265 | @interface ListBase : RLMListBase 266 | 267 | /// Returns a human-readable description of the objects contained in the List. 268 | @property (nonatomic, readonly, copy) NSString * __nonnull description; 269 | 270 | /// Returns the number of objects in this List. 271 | @property (nonatomic, readonly) NSInteger count; 272 | - (null_unspecified instancetype)initWithArray:(RLMArray * __null_unspecified)array OBJC_DESIGNATED_INITIALIZER; 273 | - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; 274 | @end 275 | 276 | 277 | @interface NSDate (SWIFT_EXTENSION(RealmSwift)) 278 | @end 279 | 280 | 281 | 282 | 283 | /// :nodoc: Internal class. Do not use directly. 284 | SWIFT_CLASS_NAMED("ObjectUtil") 285 | @interface RealmSwiftObjectUtil : NSObject 286 | - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; 287 | @end 288 | 289 | @class RLMResults; 290 | 291 | 292 | /// :nodoc: Internal class. Do not use directly. 293 | SWIFT_CLASS("_TtC10RealmSwift11ResultsBase") 294 | @interface ResultsBase : NSObject 295 | @property (nonatomic, readonly, strong) RLMResults * __nonnull rlmResults; 296 | 297 | /// Returns a human-readable description of the objects contained in these results. 298 | @property (nonatomic, readonly, copy) NSString * __nonnull description; 299 | - (nonnull instancetype)init:(RLMResults * __nonnull)rlmResults OBJC_DESIGNATED_INITIALIZER; 300 | - (NSInteger)countByEnumeratingWithState:(NSFastEnumerationState * __null_unspecified)state objects:(id __nullable * __null_unspecified)buffer count:(NSInteger)len; 301 | @end 302 | 303 | #pragma clang diagnostic pop 304 | -------------------------------------------------------------------------------- /vendor/RealmSwift.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/vendor/RealmSwift.framework/Info.plist -------------------------------------------------------------------------------- /vendor/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/vendor/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm64.swiftdoc -------------------------------------------------------------------------------- /vendor/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/vendor/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm64.swiftmodule -------------------------------------------------------------------------------- /vendor/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/vendor/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftdoc -------------------------------------------------------------------------------- /vendor/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/vendor/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule -------------------------------------------------------------------------------- /vendor/RealmSwift.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module RealmSwift { 2 | header "RealmSwift-Swift.h" 3 | } 4 | -------------------------------------------------------------------------------- /vendor/RealmSwift.framework/RealmSwift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/WWDC-tvOS/81fb5c15b40e77aee6f5d006690150f5c0af8290/vendor/RealmSwift.framework/RealmSwift -------------------------------------------------------------------------------- /vendor/RealmSwift.framework/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Headers/RealmSwift-Swift.h 8 | 9 | cFfxa9dsNtjOxlugvrJodFG/vbE= 10 | 11 | Info.plist 12 | 13 | NlpuJWZ4nPgmO+fEsXMeOWnsyco= 14 | 15 | Modules/RealmSwift.swiftmodule/arm64.swiftdoc 16 | 17 | +l7FpmwXP0oEbwG0Jmo9MNukjZk= 18 | 19 | Modules/RealmSwift.swiftmodule/arm64.swiftmodule 20 | 21 | 6AUtlKWPNz3W6aQTc/O7EoZaZc4= 22 | 23 | Modules/module.modulemap 24 | 25 | 9tvIENgxkNSlkY6s37U2G7wibRQ= 26 | 27 | 28 | files2 29 | 30 | Headers/RealmSwift-Swift.h 31 | 32 | cFfxa9dsNtjOxlugvrJodFG/vbE= 33 | 34 | Modules/RealmSwift.swiftmodule/arm64.swiftdoc 35 | 36 | +l7FpmwXP0oEbwG0Jmo9MNukjZk= 37 | 38 | Modules/RealmSwift.swiftmodule/arm64.swiftmodule 39 | 40 | 6AUtlKWPNz3W6aQTc/O7EoZaZc4= 41 | 42 | Modules/module.modulemap 43 | 44 | 9tvIENgxkNSlkY6s37U2G7wibRQ= 45 | 46 | 47 | rules 48 | 49 | ^ 50 | 51 | ^.*\.lproj/ 52 | 53 | optional 54 | 55 | weight 56 | 1000 57 | 58 | ^.*\.lproj/locversion.plist$ 59 | 60 | omit 61 | 62 | weight 63 | 1100 64 | 65 | ^version.plist$ 66 | 67 | 68 | rules2 69 | 70 | .*\.dSYM($|/) 71 | 72 | weight 73 | 11 74 | 75 | ^ 76 | 77 | weight 78 | 20 79 | 80 | ^(.*/)?\.DS_Store$ 81 | 82 | omit 83 | 84 | weight 85 | 2000 86 | 87 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 88 | 89 | nested 90 | 91 | weight 92 | 10 93 | 94 | ^.* 95 | 96 | ^.*\.lproj/ 97 | 98 | optional 99 | 100 | weight 101 | 1000 102 | 103 | ^.*\.lproj/locversion.plist$ 104 | 105 | omit 106 | 107 | weight 108 | 1100 109 | 110 | ^Info\.plist$ 111 | 112 | omit 113 | 114 | weight 115 | 20 116 | 117 | ^PkgInfo$ 118 | 119 | omit 120 | 121 | weight 122 | 20 123 | 124 | ^[^/]+$ 125 | 126 | nested 127 | 128 | weight 129 | 10 130 | 131 | ^embedded\.provisionprofile$ 132 | 133 | weight 134 | 20 135 | 136 | ^version\.plist$ 137 | 138 | weight 139 | 20 140 | 141 | 142 | 143 | 144 | --------------------------------------------------------------------------------