diff --git a/.swiftlint.yml b/.swiftlint.yml index dc712b6..cc3cbe3 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -1,5 +1,5 @@ disabled_rules: -# FourceCastを許可 +# ForceCastを許可 - force_cast # FourceTryを許可 - force_try diff --git a/Cartfile b/Cartfile index d627dfc..8191e68 100644 --- a/Cartfile +++ b/Cartfile @@ -1,4 +1,6 @@ # PyCon JP use Library -github "Alamofire/Alamofire" ~> 4.0 -github "Alamofire/AlamofireImage" ~> 3.0 +github "ishkawa/APIKit" ~> 3.0 +github "antitypical/Result" ~> 3.0 +github "onevcat/Kingfisher" ~> 3.0 github "realm/realm-cocoa" ~> 2.0 +github "kishikawakatsumi/SpreadsheetView" diff --git a/PyConJP.xcodeproj/project.pbxproj b/PyConJP.xcodeproj/project.pbxproj index 74eaaae..c38af7e 100644 --- a/PyConJP.xcodeproj/project.pbxproj +++ b/PyConJP.xcodeproj/project.pbxproj @@ -8,19 +8,12 @@ /* Begin PBXBuildFile section */ 7FFB73401C9162C2006FB375 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FFB733F1C9162C2006FB375 /* MapKit.framework */; }; - DB05D0FC1E43FB6200781BF7 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBC72D121D6F0B0C008DF718 /* Alamofire.framework */; }; - DB05D0FD1E43FB6200781BF7 /* AlamofireImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB8028AD1D81D0A300A4818A /* AlamofireImage.framework */; }; DB05D0FE1E43FB6200781BF7 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBC72D131D6F0B0C008DF718 /* Realm.framework */; }; DB05D0FF1E43FB6200781BF7 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBC72D141D6F0B0C008DF718 /* RealmSwift.framework */; }; DB05D1971E43FBCB00781BF7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1021E43FBCB00781BF7 /* AppDelegate.swift */; }; DB05D1981E43FBCB00781BF7 /* PCJConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1031E43FBCB00781BF7 /* PCJConfig.swift */; }; DB05D1991E43FBCB00781BF7 /* PCJNotificationConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1041E43FBCB00781BF7 /* PCJNotificationConfig.swift */; }; DB05D19A1E43FBCB00781BF7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DB05D1051E43FBCB00781BF7 /* Assets.xcassets */; }; - DB05D19B1E43FBCB00781BF7 /* StaffListDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1081E43FBCB00781BF7 /* StaffListDataSource.swift */; }; - DB05D19C1E43FBCB00781BF7 /* SpeakersCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D10A1E43FBCB00781BF7 /* SpeakersCollectionViewDataSource.swift */; }; - DB05D19D1E43FBCB00781BF7 /* BookmarkListDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D10D1E43FBCB00781BF7 /* BookmarkListDataSource.swift */; }; - DB05D19E1E43FBCB00781BF7 /* ConferenceListDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D10F1E43FBCB00781BF7 /* ConferenceListDataSource.swift */; }; - DB05D19F1E43FBCB00781BF7 /* TimelineDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1101E43FBCB00781BF7 /* TimelineDataSource.swift */; }; DB05D1A01E43FBCB00781BF7 /* AppDelegateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1131E43FBCB00781BF7 /* AppDelegateExtension.swift */; }; DB05D1A11E43FBCB00781BF7 /* ArrayExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1141E43FBCB00781BF7 /* ArrayExtension.swift */; }; DB05D1A21E43FBCB00781BF7 /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1151E43FBCB00781BF7 /* DateExtension.swift */; }; @@ -28,12 +21,9 @@ DB05D1A41E43FBCB00781BF7 /* UIColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1171E43FBCB00781BF7 /* UIColorExtension.swift */; }; DB05D1A51E43FBCB00781BF7 /* UIDeviceExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1181E43FBCB00781BF7 /* UIDeviceExtension.swift */; }; DB05D1A61E43FBCB00781BF7 /* UIViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1191E43FBCB00781BF7 /* UIViewExtension.swift */; }; - DB05D1A71E43FBCB00781BF7 /* LocalNotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D11C1E43FBCB00781BF7 /* LocalNotificationManager.swift */; }; - DB05D1A81E43FBCB00781BF7 /* ReceiveLocalNotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D11D1E43FBCB00781BF7 /* ReceiveLocalNotificationManager.swift */; }; DB05D1A91E43FBCB00781BF7 /* TalkObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1201E43FBCB00781BF7 /* TalkObject.swift */; }; DB05D1AA1E43FBCB00781BF7 /* Language.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1221E43FBCB00781BF7 /* Language.swift */; }; DB05D1AB1E43FBCB00781BF7 /* PyConJPDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1231E43FBCB00781BF7 /* PyConJPDate.swift */; }; - DB05D1AC1E43FBCB00781BF7 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1241E43FBCB00781BF7 /* Result.swift */; }; DB05D1AD1E43FBCB00781BF7 /* Room.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1251E43FBCB00781BF7 /* Room.swift */; }; DB05D1AE1E43FBCB00781BF7 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1271E43FBCB00781BF7 /* Category.swift */; }; DB05D1AF1E43FBCB00781BF7 /* Level.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1281E43FBCB00781BF7 /* Level.swift */; }; @@ -46,13 +36,9 @@ DB05D1B61E43FBCB00781BF7 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D12F1E43FBCB00781BF7 /* Timeline.swift */; }; DB05D1B71E43FBCB00781BF7 /* ErrorAlertProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1311E43FBCB00781BF7 /* ErrorAlertProtocol.swift */; }; DB05D1B81E43FBCB00781BF7 /* GestureProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1321E43FBCB00781BF7 /* GestureProtocol.swift */; }; - DB05D1B91E43FBCB00781BF7 /* RealmTalkDetailProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1341E43FBCB00781BF7 /* RealmTalkDetailProtocol.swift */; }; - DB05D1BA1E43FBCB00781BF7 /* RealmTalksProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1351E43FBCB00781BF7 /* RealmTalksProtocol.swift */; }; + DB05D1BA1E43FBCB00781BF7 /* RealmLoadTalksProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1351E43FBCB00781BF7 /* RealmLoadTalksProtocol.swift */; }; DB05D1BB1E43FBCB00781BF7 /* MailURLSchemeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1371E43FBCB00781BF7 /* MailURLSchemeProtocol.swift */; }; DB05D1BC1E43FBCB00781BF7 /* TwitterURLSchemeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1381E43FBCB00781BF7 /* TwitterURLSchemeProtocol.swift */; }; - DB05D1BD1E43FBCB00781BF7 /* StaffListAPIProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D13A1E43FBCB00781BF7 /* StaffListAPIProtocol.swift */; }; - DB05D1BE1E43FBCB00781BF7 /* TalkDetailAPIProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D13B1E43FBCB00781BF7 /* TalkDetailAPIProtocol.swift */; }; - DB05D1BF1E43FBCB00781BF7 /* TalksAPIProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D13C1E43FBCB00781BF7 /* TalksAPIProtocol.swift */; }; DB05D1C01E43FBCB00781BF7 /* DummyTalkDetail.json in Resources */ = {isa = PBXBuildFile; fileRef = DB05D13E1E43FBCB00781BF7 /* DummyTalkDetail.json */; }; DB05D1C11E43FBCB00781BF7 /* DummyTalks.json in Resources */ = {isa = PBXBuildFile; fileRef = DB05D13F1E43FBCB00781BF7 /* DummyTalks.json */; }; DB05D1C21E43FBCB00781BF7 /* Language.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB05D1411E43FBCB00781BF7 /* Language.strings */; }; @@ -65,12 +51,6 @@ DB05D1C91E43FBCB00781BF7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DB05D1581E43FBCB00781BF7 /* LaunchScreen.storyboard */; }; DB05D1CA1E43FBCB00781BF7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DB05D15A1E43FBCB00781BF7 /* Main.storyboard */; }; DB05D1CB1E43FBCB00781BF7 /* More.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DB05D15C1E43FBCB00781BF7 /* More.storyboard */; }; - DB05D1CC1E43FBCB00781BF7 /* Bookmark.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB05D15E1E43FBCB00781BF7 /* Bookmark.strings */; }; - DB05D1CD1E43FBCB00781BF7 /* Conference.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB05D1601E43FBCB00781BF7 /* Conference.strings */; }; - DB05D1CE1E43FBCB00781BF7 /* Events.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB05D1621E43FBCB00781BF7 /* Events.strings */; }; - DB05D1CF1E43FBCB00781BF7 /* LaunchScreen.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB05D1641E43FBCB00781BF7 /* LaunchScreen.strings */; }; - DB05D1D01E43FBCB00781BF7 /* Main.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB05D1661E43FBCB00781BF7 /* Main.strings */; }; - DB05D1D11E43FBCB00781BF7 /* More.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB05D1681E43FBCB00781BF7 /* More.strings */; }; DB05D1D31E43FBCB00781BF7 /* CustomImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1731E43FBCB00781BF7 /* CustomImageView.swift */; }; DB05D1D41E43FBCB00781BF7 /* SpeakerCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1751E43FBCB00781BF7 /* SpeakerCollectionViewCell.swift */; }; DB05D1D51E43FBCB00781BF7 /* SpeakerCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DB05D1761E43FBCB00781BF7 /* SpeakerCollectionViewCell.xib */; }; @@ -90,7 +70,6 @@ DB05D1E31E43FBCB00781BF7 /* ConferencePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1891E43FBCB00781BF7 /* ConferencePageViewController.swift */; }; DB05D1E41E43FBCB00781BF7 /* ConferenceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D18A1E43FBCB00781BF7 /* ConferenceViewController.swift */; }; DB05D1E51E43FBCB00781BF7 /* EventsListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D18C1E43FBCB00781BF7 /* EventsListViewController.swift */; }; - DB05D1E61E43FBCB00781BF7 /* AcknowledgmentsListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D18E1E43FBCB00781BF7 /* AcknowledgmentsListViewController.swift */; }; DB05D1E71E43FBCB00781BF7 /* FloorMapListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D18F1E43FBCB00781BF7 /* FloorMapListViewController.swift */; }; DB05D1E81E43FBCB00781BF7 /* FloorMapZoomableImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1901E43FBCB00781BF7 /* FloorMapZoomableImageViewController.swift */; }; DB05D1E91E43FBCB00781BF7 /* MapListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1911E43FBCB00781BF7 /* MapListViewController.swift */; }; @@ -100,16 +79,56 @@ DB05D1ED1E43FBCB00781BF7 /* PCJWKWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1961E43FBCB00781BF7 /* PCJWKWebViewController.swift */; }; DB05D1F81E43FC1F00781BF7 /* PyConJPUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1F31E43FBF700781BF7 /* PyConJPUITests.swift */; }; DB05D1F91E43FC2E00781BF7 /* PyConJPTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB05D1F01E43FBF700781BF7 /* PyConJPTests.swift */; }; + DB10DE961EDFDEC400DAED31 /* Timetable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB10DE951EDFDEC400DAED31 /* Timetable.swift */; }; + DB10DE981EDFDED600DAED31 /* Track.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB10DE971EDFDED600DAED31 /* Track.swift */; }; + DB10DE9D1EDFDF3B00DAED31 /* UIStoryboardExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB10DE9C1EDFDF3B00DAED31 /* UIStoryboardExtension.swift */; }; + DB10DEA11EDFDF8200DAED31 /* NibInstantitable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB10DEA01EDFDF8200DAED31 /* NibInstantitable.swift */; }; + DB10DEA31EDFDF9900DAED31 /* StoryboardIdentifiable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB10DEA21EDFDF9900DAED31 /* StoryboardIdentifiable.swift */; }; + DB10DEA71EDFE62A00DAED31 /* RealmError.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB10DEA61EDFE62A00DAED31 /* RealmError.swift */; }; + DB28C1921F59AFB2003BEFE0 /* GitHubRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB28C1911F59AFB2003BEFE0 /* GitHubRequest.swift */; }; + DB4BC68F1EF5098D00650964 /* SpreadsheetView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB4BC68E1EF5098D00650964 /* SpreadsheetView.framework */; }; + DB4BC6911EF522CD00650964 /* ConferenceTimetableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC6901EF522CD00650964 /* ConferenceTimetableViewController.swift */; }; + DB4BC6941EF525CD00650964 /* TimetableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC6931EF525CD00650964 /* TimetableCell.swift */; }; + DB4BC6A11EF5916D00650964 /* StaffListDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC6981EF5916D00650964 /* StaffListDataSource.swift */; }; + DB4BC6A21EF5916D00650964 /* SpeakersCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC69A1EF5916D00650964 /* SpeakersCollectionViewDataSource.swift */; }; + DB4BC6A31EF5916D00650964 /* BookmarkListDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC69D1EF5916D00650964 /* BookmarkListDataSource.swift */; }; + DB4BC6A41EF5916D00650964 /* ConferenceListDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC69F1EF5916D00650964 /* ConferenceListDataSource.swift */; }; + DB4BC6A51EF5916D00650964 /* TimelineDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC6A01EF5916D00650964 /* TimelineDataSource.swift */; }; + DB4BC6A81EF5926600650964 /* ConferenceTimetableDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC6A71EF5926600650964 /* ConferenceTimetableDataStore.swift */; }; + DB4BC6AA1EF6705500650964 /* TimetableCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DB4BC6A91EF6705500650964 /* TimetableCell.xib */; }; + DB4BC6AC1EF670B600650964 /* TimetableRoomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC6AB1EF670B600650964 /* TimetableRoomCell.swift */; }; + DB4BC6AE1EF6711500650964 /* TimetableRoomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DB4BC6AD1EF6711500650964 /* TimetableRoomCell.xib */; }; + DB4BC6B01EF671D800650964 /* TimetableTimeAxisCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4BC6AF1EF671D800650964 /* TimetableTimeAxisCell.swift */; }; + DB4BC6B21EF6720700650964 /* TimetableTimeAxisCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DB4BC6B11EF6720700650964 /* TimetableTimeAxisCell.xib */; }; + DB51C2191F5322D20016C952 /* EventList.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB51C21B1F5322D20016C952 /* EventList.strings */; }; + DB51C23B1F53FC040016C952 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DB51C23A1F53FC040016C952 /* Settings.bundle */; }; DB77FD531E06720D00504869 /* WebAPIFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB77FD4A1E06720C00504869 /* WebAPIFramework.framework */; }; DB77FD5A1E06720D00504869 /* WebAPIFrameworkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB77FD591E06720D00504869 /* WebAPIFrameworkTests.swift */; }; DB77FD5C1E06720D00504869 /* WebAPIFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = DB77FD4C1E06720C00504869 /* WebAPIFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; DB77FD5F1E06720D00504869 /* WebAPIFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB77FD4A1E06720C00504869 /* WebAPIFramework.framework */; }; DB77FD601E06720D00504869 /* WebAPIFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DB77FD4A1E06720C00504869 /* WebAPIFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - DB77FD691E06783900504869 /* AlamofireProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB77FD681E06783900504869 /* AlamofireProtocol.swift */; }; - DB77FD6A1E06798D00504869 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBC72D121D6F0B0C008DF718 /* Alamofire.framework */; }; - DB77FD6B1E06798D00504869 /* AlamofireImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB8028AD1D81D0A300A4818A /* AlamofireImage.framework */; }; DB77FD6D1E067A0F00504869 /* WebConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB77FD6C1E067A0F00504869 /* WebConfig.swift */; }; DB77FD6F1E067BD000504869 /* LocaleExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB77FD6E1E067BD000504869 /* LocaleExtension.swift */; }; + DB7EAADB1EEEF76A00FEF504 /* UIImageViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7EAADA1EEEF76A00FEF504 /* UIImageViewExtension.swift */; }; + DB7EAADD1EEFA86B00FEF504 /* RealmSaveTalksProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7EAADC1EEFA86B00FEF504 /* RealmSaveTalksProtocol.swift */; }; + DB7EAAE01EF04D2800FEF504 /* DummyTalkDetailProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7EAADF1EF04D2800FEF504 /* DummyTalkDetailProtocol.swift */; }; + DB7EAAE21EF04DAC00FEF504 /* DummyTalksProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7EAAE11EF04DAC00FEF504 /* DummyTalksProtocol.swift */; }; + DBA8722F1EF1A40E0001F8A3 /* LocalNotificationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBA8722D1EF1A40E0001F8A3 /* LocalNotificationProtocol.swift */; }; + DBA872301EF1A40E0001F8A3 /* ReceiveLocalNotificationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBA8722E1EF1A40E0001F8A3 /* ReceiveLocalNotificationProtocol.swift */; }; + DBA872321EF1A4990001F8A3 /* NotificationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBA872311EF1A4990001F8A3 /* NotificationType.swift */; }; + DBA872371EF2E0E90001F8A3 /* StaffListAPIRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBA872341EF2E0E90001F8A3 /* StaffListAPIRequest.swift */; }; + DBA872381EF2E0E90001F8A3 /* TalkDetailAPIRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBA872351EF2E0E90001F8A3 /* TalkDetailAPIRequest.swift */; }; + DBA872391EF2E0E90001F8A3 /* TalksAPIRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBA872361EF2E0E90001F8A3 /* TalksAPIRequest.swift */; }; + DBA8723C1EF2E14B0001F8A3 /* SaveTalksRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBA8723B1EF2E14B0001F8A3 /* SaveTalksRequest.swift */; }; + DBA8723E1EF2E5320001F8A3 /* LoadFavoriteTalksRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBA8723D1EF2E5320001F8A3 /* LoadFavoriteTalksRequest.swift */; }; + DBA872401EF2E7410001F8A3 /* LoadTalksRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBA8723F1EF2E7410001F8A3 /* LoadTalksRequest.swift */; }; + DBB4AECA1EED91DD0097CF99 /* APIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBB4AEC81EED91DD0097CF99 /* APIKit.framework */; }; + DBB4AECB1EED91DD0097CF99 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBB4AEC91EED91DD0097CF99 /* Result.framework */; }; + DBB4AECC1EED922D0097CF99 /* APIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBB4AEC81EED91DD0097CF99 /* APIKit.framework */; }; + DBB4AECD1EED922D0097CF99 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBB4AEC91EED91DD0097CF99 /* Result.framework */; }; + DBB4AED01EED93F60097CF99 /* APIError.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBB4AECF1EED93F60097CF99 /* APIError.swift */; }; + DBB4AED31EED95950097CF99 /* PyConJPRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBB4AED21EED95950097CF99 /* PyConJPRequest.swift */; }; + DBDA6FB91EEEB75E008FE17B /* Kingfisher.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBDA6FB81EEEB75E008FE17B /* Kingfisher.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -170,11 +189,6 @@ DB05D1031E43FBCB00781BF7 /* PCJConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PCJConfig.swift; sourceTree = ""; }; DB05D1041E43FBCB00781BF7 /* PCJNotificationConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PCJNotificationConfig.swift; sourceTree = ""; }; DB05D1051E43FBCB00781BF7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - DB05D1081E43FBCB00781BF7 /* StaffListDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StaffListDataSource.swift; sourceTree = ""; }; - DB05D10A1E43FBCB00781BF7 /* SpeakersCollectionViewDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeakersCollectionViewDataSource.swift; sourceTree = ""; }; - DB05D10D1E43FBCB00781BF7 /* BookmarkListDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarkListDataSource.swift; sourceTree = ""; }; - DB05D10F1E43FBCB00781BF7 /* ConferenceListDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConferenceListDataSource.swift; sourceTree = ""; }; - DB05D1101E43FBCB00781BF7 /* TimelineDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimelineDataSource.swift; sourceTree = ""; }; DB05D1131E43FBCB00781BF7 /* AppDelegateExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegateExtension.swift; sourceTree = ""; }; DB05D1141E43FBCB00781BF7 /* ArrayExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArrayExtension.swift; sourceTree = ""; }; DB05D1151E43FBCB00781BF7 /* DateExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateExtension.swift; sourceTree = ""; }; @@ -182,12 +196,9 @@ DB05D1171E43FBCB00781BF7 /* UIColorExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIColorExtension.swift; sourceTree = ""; }; DB05D1181E43FBCB00781BF7 /* UIDeviceExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIDeviceExtension.swift; sourceTree = ""; }; DB05D1191E43FBCB00781BF7 /* UIViewExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIViewExtension.swift; sourceTree = ""; }; - DB05D11C1E43FBCB00781BF7 /* LocalNotificationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalNotificationManager.swift; sourceTree = ""; }; - DB05D11D1E43FBCB00781BF7 /* ReceiveLocalNotificationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReceiveLocalNotificationManager.swift; sourceTree = ""; }; DB05D1201E43FBCB00781BF7 /* TalkObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TalkObject.swift; sourceTree = ""; }; DB05D1221E43FBCB00781BF7 /* Language.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Language.swift; sourceTree = ""; }; DB05D1231E43FBCB00781BF7 /* PyConJPDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PyConJPDate.swift; sourceTree = ""; }; - DB05D1241E43FBCB00781BF7 /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = ""; }; DB05D1251E43FBCB00781BF7 /* Room.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Room.swift; sourceTree = ""; }; DB05D1271E43FBCB00781BF7 /* Category.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; DB05D1281E43FBCB00781BF7 /* Level.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Level.swift; sourceTree = ""; }; @@ -200,13 +211,9 @@ DB05D12F1E43FBCB00781BF7 /* Timeline.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timeline.swift; sourceTree = ""; }; DB05D1311E43FBCB00781BF7 /* ErrorAlertProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorAlertProtocol.swift; sourceTree = ""; }; DB05D1321E43FBCB00781BF7 /* GestureProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GestureProtocol.swift; sourceTree = ""; }; - DB05D1341E43FBCB00781BF7 /* RealmTalkDetailProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmTalkDetailProtocol.swift; sourceTree = ""; }; - DB05D1351E43FBCB00781BF7 /* RealmTalksProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmTalksProtocol.swift; sourceTree = ""; }; + DB05D1351E43FBCB00781BF7 /* RealmLoadTalksProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmLoadTalksProtocol.swift; sourceTree = ""; }; DB05D1371E43FBCB00781BF7 /* MailURLSchemeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MailURLSchemeProtocol.swift; sourceTree = ""; }; DB05D1381E43FBCB00781BF7 /* TwitterURLSchemeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TwitterURLSchemeProtocol.swift; sourceTree = ""; }; - DB05D13A1E43FBCB00781BF7 /* StaffListAPIProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StaffListAPIProtocol.swift; sourceTree = ""; }; - DB05D13B1E43FBCB00781BF7 /* TalkDetailAPIProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TalkDetailAPIProtocol.swift; sourceTree = ""; }; - DB05D13C1E43FBCB00781BF7 /* TalksAPIProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TalksAPIProtocol.swift; sourceTree = ""; }; DB05D13E1E43FBCB00781BF7 /* DummyTalkDetail.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = DummyTalkDetail.json; sourceTree = ""; }; DB05D13F1E43FBCB00781BF7 /* DummyTalks.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = DummyTalks.json; sourceTree = ""; }; DB05D1421E43FBCB00781BF7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Language.strings; sourceTree = ""; }; @@ -227,18 +234,6 @@ DB05D1591E43FBCB00781BF7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; DB05D15B1E43FBCB00781BF7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; DB05D15D1E43FBCB00781BF7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/More.storyboard; sourceTree = ""; }; - DB05D15F1E43FBCB00781BF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Bookmark.strings; sourceTree = ""; }; - DB05D1611E43FBCB00781BF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Conference.strings; sourceTree = ""; }; - DB05D1631E43FBCB00781BF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Events.strings; sourceTree = ""; }; - DB05D1651E43FBCB00781BF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LaunchScreen.strings; sourceTree = ""; }; - DB05D1671E43FBCB00781BF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = ""; }; - DB05D1691E43FBCB00781BF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/More.strings; sourceTree = ""; }; - DB05D16A1E43FBCB00781BF7 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Bookmark.strings; sourceTree = ""; }; - DB05D16B1E43FBCB00781BF7 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Conference.strings; sourceTree = ""; }; - DB05D16C1E43FBCB00781BF7 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Events.strings; sourceTree = ""; }; - DB05D16D1E43FBCB00781BF7 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; - DB05D16E1E43FBCB00781BF7 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; - DB05D16F1E43FBCB00781BF7 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/More.strings; sourceTree = ""; }; DB05D1711E43FBCB00781BF7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DB05D1731E43FBCB00781BF7 /* CustomImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomImageView.swift; sourceTree = ""; }; DB05D1751E43FBCB00781BF7 /* SpeakerCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeakerCollectionViewCell.swift; sourceTree = ""; }; @@ -259,7 +254,6 @@ DB05D1891E43FBCB00781BF7 /* ConferencePageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConferencePageViewController.swift; sourceTree = ""; }; DB05D18A1E43FBCB00781BF7 /* ConferenceViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConferenceViewController.swift; sourceTree = ""; }; DB05D18C1E43FBCB00781BF7 /* EventsListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventsListViewController.swift; sourceTree = ""; }; - DB05D18E1E43FBCB00781BF7 /* AcknowledgmentsListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcknowledgmentsListViewController.swift; sourceTree = ""; }; DB05D18F1E43FBCB00781BF7 /* FloorMapListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloorMapListViewController.swift; sourceTree = ""; }; DB05D1901E43FBCB00781BF7 /* FloorMapZoomableImageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloorMapZoomableImageViewController.swift; sourceTree = ""; }; DB05D1911E43FBCB00781BF7 /* MapListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapListViewController.swift; sourceTree = ""; }; @@ -271,22 +265,74 @@ DB05D1F01E43FBF700781BF7 /* PyConJPTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PyConJPTests.swift; sourceTree = ""; }; DB05D1F21E43FBF700781BF7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DB05D1F31E43FBF700781BF7 /* PyConJPUITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PyConJPUITests.swift; sourceTree = ""; }; + DB10DE951EDFDEC400DAED31 /* Timetable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timetable.swift; sourceTree = ""; }; + DB10DE971EDFDED600DAED31 /* Track.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Track.swift; sourceTree = ""; }; + DB10DE9C1EDFDF3B00DAED31 /* UIStoryboardExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIStoryboardExtension.swift; sourceTree = ""; }; + DB10DEA01EDFDF8200DAED31 /* NibInstantitable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NibInstantitable.swift; sourceTree = ""; }; + DB10DEA21EDFDF9900DAED31 /* StoryboardIdentifiable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardIdentifiable.swift; sourceTree = ""; }; + DB10DEA61EDFE62A00DAED31 /* RealmError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmError.swift; sourceTree = ""; }; + DB28C1911F59AFB2003BEFE0 /* GitHubRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GitHubRequest.swift; sourceTree = ""; }; + DB4BC68E1EF5098D00650964 /* SpreadsheetView.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SpreadsheetView.framework; path = Carthage/Build/iOS/SpreadsheetView.framework; sourceTree = ""; }; + DB4BC6901EF522CD00650964 /* ConferenceTimetableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConferenceTimetableViewController.swift; sourceTree = ""; }; + DB4BC6931EF525CD00650964 /* TimetableCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimetableCell.swift; sourceTree = ""; }; + DB4BC6981EF5916D00650964 /* StaffListDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StaffListDataSource.swift; sourceTree = ""; }; + DB4BC69A1EF5916D00650964 /* SpeakersCollectionViewDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeakersCollectionViewDataSource.swift; sourceTree = ""; }; + DB4BC69D1EF5916D00650964 /* BookmarkListDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarkListDataSource.swift; sourceTree = ""; }; + DB4BC69F1EF5916D00650964 /* ConferenceListDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConferenceListDataSource.swift; sourceTree = ""; }; + DB4BC6A01EF5916D00650964 /* TimelineDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimelineDataSource.swift; sourceTree = ""; }; + DB4BC6A71EF5926600650964 /* ConferenceTimetableDataStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConferenceTimetableDataStore.swift; sourceTree = ""; }; + DB4BC6A91EF6705500650964 /* TimetableCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TimetableCell.xib; sourceTree = ""; }; + DB4BC6AB1EF670B600650964 /* TimetableRoomCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimetableRoomCell.swift; sourceTree = ""; }; + DB4BC6AD1EF6711500650964 /* TimetableRoomCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TimetableRoomCell.xib; sourceTree = ""; }; + DB4BC6AF1EF671D800650964 /* TimetableTimeAxisCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimetableTimeAxisCell.swift; sourceTree = ""; }; + DB4BC6B11EF6720700650964 /* TimetableTimeAxisCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TimetableTimeAxisCell.xib; sourceTree = ""; }; + DB51C21A1F5322D20016C952 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/EventList.strings; sourceTree = ""; }; + DB51C21C1F5322D30016C952 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/EventList.strings; sourceTree = ""; }; + DB51C21D1F5322D40016C952 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/EventList.strings; sourceTree = ""; }; + DB51C22D1F53B9700016C952 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Bookmark.strings; sourceTree = ""; }; + DB51C22E1F53B9730016C952 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Bookmark.strings; sourceTree = ""; }; + DB51C22F1F53B9790016C952 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Conference.strings; sourceTree = ""; }; + DB51C2301F53B97B0016C952 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Conference.strings; sourceTree = ""; }; + DB51C2311F53B9800016C952 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Events.strings; sourceTree = ""; }; + DB51C2321F53B9810016C952 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Events.strings; sourceTree = ""; }; + DB51C2331F53B9850016C952 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LaunchScreen.strings; sourceTree = ""; }; + DB51C2341F53B9870016C952 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; + DB51C2351F53B98B0016C952 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = ""; }; + DB51C2361F53B98D0016C952 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; + DB51C2371F53B9910016C952 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/More.strings; sourceTree = ""; }; + DB51C2381F53B9950016C952 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/More.strings; sourceTree = ""; }; + DB51C23A1F53FC040016C952 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; DB77FD4A1E06720C00504869 /* WebAPIFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WebAPIFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DB77FD4C1E06720C00504869 /* WebAPIFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebAPIFramework.h; sourceTree = ""; }; DB77FD4D1E06720C00504869 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DB77FD521E06720D00504869 /* WebAPIFrameworkTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WebAPIFrameworkTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; DB77FD591E06720D00504869 /* WebAPIFrameworkTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebAPIFrameworkTests.swift; sourceTree = ""; }; DB77FD5B1E06720D00504869 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DB77FD681E06783900504869 /* AlamofireProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlamofireProtocol.swift; sourceTree = ""; }; DB77FD6C1E067A0F00504869 /* WebConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebConfig.swift; sourceTree = ""; }; DB77FD6E1E067BD000504869 /* LocaleExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocaleExtension.swift; sourceTree = ""; }; - DB8028AD1D81D0A300A4818A /* AlamofireImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AlamofireImage.framework; path = Carthage/Build/iOS/AlamofireImage.framework; sourceTree = ""; }; + DB7EAADA1EEEF76A00FEF504 /* UIImageViewExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageViewExtension.swift; sourceTree = ""; }; + DB7EAADC1EEFA86B00FEF504 /* RealmSaveTalksProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmSaveTalksProtocol.swift; sourceTree = ""; }; + DB7EAADF1EF04D2800FEF504 /* DummyTalkDetailProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DummyTalkDetailProtocol.swift; sourceTree = ""; }; + DB7EAAE11EF04DAC00FEF504 /* DummyTalksProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DummyTalksProtocol.swift; sourceTree = ""; }; DBA1C0A91C7228E2004F0C8D /* PyConJP.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PyConJP.app; sourceTree = BUILT_PRODUCTS_DIR; }; DBA1C0BD1C7228E2004F0C8D /* PyConJPTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PyConJPTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; DBA1C0C81C7228E2004F0C8D /* PyConJPUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PyConJPUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - DBC72D121D6F0B0C008DF718 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = ""; }; + DBA8722D1EF1A40E0001F8A3 /* LocalNotificationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalNotificationProtocol.swift; sourceTree = ""; }; + DBA8722E1EF1A40E0001F8A3 /* ReceiveLocalNotificationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReceiveLocalNotificationProtocol.swift; sourceTree = ""; }; + DBA872311EF1A4990001F8A3 /* NotificationType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationType.swift; sourceTree = ""; }; + DBA872341EF2E0E90001F8A3 /* StaffListAPIRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StaffListAPIRequest.swift; sourceTree = ""; }; + DBA872351EF2E0E90001F8A3 /* TalkDetailAPIRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TalkDetailAPIRequest.swift; sourceTree = ""; }; + DBA872361EF2E0E90001F8A3 /* TalksAPIRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TalksAPIRequest.swift; sourceTree = ""; }; + DBA8723B1EF2E14B0001F8A3 /* SaveTalksRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SaveTalksRequest.swift; sourceTree = ""; }; + DBA8723D1EF2E5320001F8A3 /* LoadFavoriteTalksRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadFavoriteTalksRequest.swift; sourceTree = ""; }; + DBA8723F1EF2E7410001F8A3 /* LoadTalksRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadTalksRequest.swift; sourceTree = ""; }; + DBB4AEC81EED91DD0097CF99 /* APIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = APIKit.framework; path = Carthage/Build/iOS/APIKit.framework; sourceTree = ""; }; + DBB4AEC91EED91DD0097CF99 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Result.framework; path = Carthage/Build/iOS/Result.framework; sourceTree = ""; }; + DBB4AECF1EED93F60097CF99 /* APIError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIError.swift; sourceTree = ""; }; + DBB4AED21EED95950097CF99 /* PyConJPRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PyConJPRequest.swift; sourceTree = ""; }; DBC72D131D6F0B0C008DF718 /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = Carthage/Build/iOS/Realm.framework; sourceTree = ""; }; DBC72D141D6F0B0C008DF718 /* RealmSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RealmSwift.framework; path = Carthage/Build/iOS/RealmSwift.framework; sourceTree = ""; }; + DBDA6FB81EEEB75E008FE17B /* Kingfisher.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kingfisher.framework; path = Carthage/Build/iOS/Kingfisher.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -294,8 +340,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - DB77FD6A1E06798D00504869 /* Alamofire.framework in Frameworks */, - DB77FD6B1E06798D00504869 /* AlamofireImage.framework in Frameworks */, + DBB4AECC1EED922D0097CF99 /* APIKit.framework in Frameworks */, + DBB4AECD1EED922D0097CF99 /* Result.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -311,10 +357,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - DB05D0FC1E43FB6200781BF7 /* Alamofire.framework in Frameworks */, - DB05D0FD1E43FB6200781BF7 /* AlamofireImage.framework in Frameworks */, + DBB4AECA1EED91DD0097CF99 /* APIKit.framework in Frameworks */, + DBB4AECB1EED91DD0097CF99 /* Result.framework in Frameworks */, + DBDA6FB91EEEB75E008FE17B /* Kingfisher.framework in Frameworks */, DB05D0FE1E43FB6200781BF7 /* Realm.framework in Frameworks */, DB05D0FF1E43FB6200781BF7 /* RealmSwift.framework in Frameworks */, + DB4BC68F1EF5098D00650964 /* SpreadsheetView.framework in Frameworks */, DB77FD5F1E06720D00504869 /* WebAPIFramework.framework in Frameworks */, 7FFB73401C9162C2006FB375 /* MapKit.framework in Frameworks */, ); @@ -340,11 +388,13 @@ BB6F29A77E8682EFE6C9DA97 /* Frameworks */ = { isa = PBXGroup; children = ( - DB8028AD1D81D0A300A4818A /* AlamofireImage.framework */, - 7FFB733F1C9162C2006FB375 /* MapKit.framework */, - DBC72D121D6F0B0C008DF718 /* Alamofire.framework */, + DB4BC68E1EF5098D00650964 /* SpreadsheetView.framework */, + DBB4AEC81EED91DD0097CF99 /* APIKit.framework */, + DBB4AEC91EED91DD0097CF99 /* Result.framework */, + DBDA6FB81EEEB75E008FE17B /* Kingfisher.framework */, DBC72D131D6F0B0C008DF718 /* Realm.framework */, DBC72D141D6F0B0C008DF718 /* RealmSwift.framework */, + 7FFB733F1C9162C2006FB375 /* MapKit.framework */, ); name = Frameworks; sourceTree = ""; @@ -354,10 +404,9 @@ children = ( DB05D1011E43FBCB00781BF7 /* Application */, DB05D1051E43FBCB00781BF7 /* Assets.xcassets */, - DB05D1061E43FBCB00781BF7 /* DataSource */, + DB4BC6951EF5916D00650964 /* DataStore */, DB05D1111E43FBCB00781BF7 /* Delegate */, DB05D1121E43FBCB00781BF7 /* Extension */, - DB05D11A1E43FBCB00781BF7 /* Manager */, DB05D11E1E43FBCB00781BF7 /* Model */, DB05D1301E43FBCB00781BF7 /* Protocol */, DB05D13D1E43FBCB00781BF7 /* Resource */, @@ -379,58 +428,6 @@ path = Application; sourceTree = ""; }; - DB05D1061E43FBCB00781BF7 /* DataSource */ = { - isa = PBXGroup; - children = ( - DB05D1071E43FBCB00781BF7 /* More */, - DB05D1091E43FBCB00781BF7 /* TalkDetail */, - DB05D10B1E43FBCB00781BF7 /* Timeline */, - ); - path = DataSource; - sourceTree = ""; - }; - DB05D1071E43FBCB00781BF7 /* More */ = { - isa = PBXGroup; - children = ( - DB05D1081E43FBCB00781BF7 /* StaffListDataSource.swift */, - ); - path = More; - sourceTree = ""; - }; - DB05D1091E43FBCB00781BF7 /* TalkDetail */ = { - isa = PBXGroup; - children = ( - DB05D10A1E43FBCB00781BF7 /* SpeakersCollectionViewDataSource.swift */, - ); - path = TalkDetail; - sourceTree = ""; - }; - DB05D10B1E43FBCB00781BF7 /* Timeline */ = { - isa = PBXGroup; - children = ( - DB05D10C1E43FBCB00781BF7 /* Bookmark */, - DB05D10E1E43FBCB00781BF7 /* Conference */, - DB05D1101E43FBCB00781BF7 /* TimelineDataSource.swift */, - ); - path = Timeline; - sourceTree = ""; - }; - DB05D10C1E43FBCB00781BF7 /* Bookmark */ = { - isa = PBXGroup; - children = ( - DB05D10D1E43FBCB00781BF7 /* BookmarkListDataSource.swift */, - ); - path = Bookmark; - sourceTree = ""; - }; - DB05D10E1E43FBCB00781BF7 /* Conference */ = { - isa = PBXGroup; - children = ( - DB05D10F1E43FBCB00781BF7 /* ConferenceListDataSource.swift */, - ); - path = Conference; - sourceTree = ""; - }; DB05D1111E43FBCB00781BF7 /* Delegate */ = { isa = PBXGroup; children = ( @@ -448,33 +445,20 @@ DB05D1171E43FBCB00781BF7 /* UIColorExtension.swift */, DB05D1181E43FBCB00781BF7 /* UIDeviceExtension.swift */, DB05D1191E43FBCB00781BF7 /* UIViewExtension.swift */, + DB10DE9C1EDFDF3B00DAED31 /* UIStoryboardExtension.swift */, + DB7EAADA1EEEF76A00FEF504 /* UIImageViewExtension.swift */, ); path = Extension; sourceTree = ""; }; - DB05D11A1E43FBCB00781BF7 /* Manager */ = { - isa = PBXGroup; - children = ( - DB05D11B1E43FBCB00781BF7 /* Notification */, - ); - path = Manager; - sourceTree = ""; - }; - DB05D11B1E43FBCB00781BF7 /* Notification */ = { - isa = PBXGroup; - children = ( - DB05D11C1E43FBCB00781BF7 /* LocalNotificationManager.swift */, - DB05D11D1E43FBCB00781BF7 /* ReceiveLocalNotificationManager.swift */, - ); - path = Notification; - sourceTree = ""; - }; DB05D11E1E43FBCB00781BF7 /* Model */ = { isa = PBXGroup; children = ( DB05D11F1E43FBCB00781BF7 /* Class */, DB05D1211E43FBCB00781BF7 /* Enum */, DB05D1261E43FBCB00781BF7 /* Struct */, + DBA872331EF2E0E90001F8A3 /* APIRequest */, + DBA8723A1EF2E1050001F8A3 /* Realm */, ); path = Model; sourceTree = ""; @@ -492,8 +476,9 @@ children = ( DB05D1221E43FBCB00781BF7 /* Language.swift */, DB05D1231E43FBCB00781BF7 /* PyConJPDate.swift */, - DB05D1241E43FBCB00781BF7 /* Result.swift */, DB05D1251E43FBCB00781BF7 /* Room.swift */, + DBA872311EF1A4990001F8A3 /* NotificationType.swift */, + DB10DE991EDFDEF600DAED31 /* Error */, ); path = Enum; sourceTree = ""; @@ -510,6 +495,8 @@ DB05D12D1E43FBCB00781BF7 /* TalkDetail.swift */, DB05D12E1E43FBCB00781BF7 /* Team.swift */, DB05D12F1E43FBCB00781BF7 /* Timeline.swift */, + DB10DE951EDFDEC400DAED31 /* Timetable.swift */, + DB10DE971EDFDED600DAED31 /* Track.swift */, ); path = Struct; sourceTree = ""; @@ -521,7 +508,9 @@ DB05D1321E43FBCB00781BF7 /* GestureProtocol.swift */, DB05D1331E43FBCB00781BF7 /* Realm */, DB05D1361E43FBCB00781BF7 /* URLScheme */, - DB05D1391E43FBCB00781BF7 /* WebAPI */, + DB10DE9F1EDFDF7600DAED31 /* UI */, + DBA8722C1EF1A40E0001F8A3 /* Notification */, + DB7EAADE1EF04D2800FEF504 /* DummyJSON */, ); path = Protocol; sourceTree = ""; @@ -529,8 +518,8 @@ DB05D1331E43FBCB00781BF7 /* Realm */ = { isa = PBXGroup; children = ( - DB05D1341E43FBCB00781BF7 /* RealmTalkDetailProtocol.swift */, - DB05D1351E43FBCB00781BF7 /* RealmTalksProtocol.swift */, + DB05D1351E43FBCB00781BF7 /* RealmLoadTalksProtocol.swift */, + DB7EAADC1EEFA86B00FEF504 /* RealmSaveTalksProtocol.swift */, ); path = Realm; sourceTree = ""; @@ -544,22 +533,13 @@ path = URLScheme; sourceTree = ""; }; - DB05D1391E43FBCB00781BF7 /* WebAPI */ = { - isa = PBXGroup; - children = ( - DB05D13A1E43FBCB00781BF7 /* StaffListAPIProtocol.swift */, - DB05D13B1E43FBCB00781BF7 /* TalkDetailAPIProtocol.swift */, - DB05D13C1E43FBCB00781BF7 /* TalksAPIProtocol.swift */, - ); - path = WebAPI; - sourceTree = ""; - }; DB05D13D1E43FBCB00781BF7 /* Resource */ = { isa = PBXGroup; children = ( DB05D13E1E43FBCB00781BF7 /* DummyTalkDetail.json */, DB05D13F1E43FBCB00781BF7 /* DummyTalks.json */, DB05D1401E43FBCB00781BF7 /* Localizable */, + DB51C23A1F53FC040016C952 /* Settings.bundle */, ); path = Resource; sourceTree = ""; @@ -571,6 +551,7 @@ DB05D1431E43FBCB00781BF7 /* Localizable.strings */, DB05D1451E43FBCB00781BF7 /* Map.strings */, DB05D1471E43FBCB00781BF7 /* URLScheme.strings */, + DB51C21B1F5322D20016C952 /* EventList.strings */, ); path = Localizable; sourceTree = ""; @@ -584,12 +565,6 @@ DB05D1581E43FBCB00781BF7 /* LaunchScreen.storyboard */, DB05D15A1E43FBCB00781BF7 /* Main.storyboard */, DB05D15C1E43FBCB00781BF7 /* More.storyboard */, - DB05D15E1E43FBCB00781BF7 /* Bookmark.strings */, - DB05D1601E43FBCB00781BF7 /* Conference.strings */, - DB05D1621E43FBCB00781BF7 /* Events.strings */, - DB05D1641E43FBCB00781BF7 /* LaunchScreen.strings */, - DB05D1661E43FBCB00781BF7 /* Main.strings */, - DB05D1681E43FBCB00781BF7 /* More.strings */, ); path = Storyboard; sourceTree = ""; @@ -606,8 +581,9 @@ isa = PBXGroup; children = ( DB05D1731E43FBCB00781BF7 /* CustomImageView.swift */, - DB05D1741E43FBCB00781BF7 /* UICollectionViewCell */, DB05D1771E43FBCB00781BF7 /* UITableViewCell */, + DB05D1741E43FBCB00781BF7 /* UICollectionViewCell */, + DB4BC6921EF5257200650964 /* SpreadsheetViewCell */, ); path = View; sourceTree = ""; @@ -673,6 +649,7 @@ DB05D1881E43FBCB00781BF7 /* ConferenceModelController.swift */, DB05D1891E43FBCB00781BF7 /* ConferencePageViewController.swift */, DB05D18A1E43FBCB00781BF7 /* ConferenceViewController.swift */, + DB4BC6901EF522CD00650964 /* ConferenceTimetableViewController.swift */, ); path = Conference; sourceTree = ""; @@ -688,7 +665,6 @@ DB05D18D1E43FBCB00781BF7 /* More */ = { isa = PBXGroup; children = ( - DB05D18E1E43FBCB00781BF7 /* AcknowledgmentsListViewController.swift */, DB05D18F1E43FBCB00781BF7 /* FloorMapListViewController.swift */, DB05D1901E43FBCB00781BF7 /* FloorMapZoomableImageViewController.swift */, DB05D1911E43FBCB00781BF7 /* MapListViewController.swift */, @@ -725,13 +701,113 @@ path = PyConJPUITests; sourceTree = ""; }; + DB10DE991EDFDEF600DAED31 /* Error */ = { + isa = PBXGroup; + children = ( + DB10DEA61EDFE62A00DAED31 /* RealmError.swift */, + ); + path = Error; + sourceTree = ""; + }; + DB10DE9F1EDFDF7600DAED31 /* UI */ = { + isa = PBXGroup; + children = ( + DB10DEA01EDFDF8200DAED31 /* NibInstantitable.swift */, + DB10DEA21EDFDF9900DAED31 /* StoryboardIdentifiable.swift */, + ); + path = UI; + sourceTree = ""; + }; + DB4BC6921EF5257200650964 /* SpreadsheetViewCell */ = { + isa = PBXGroup; + children = ( + DB4BC6931EF525CD00650964 /* TimetableCell.swift */, + DB4BC6A91EF6705500650964 /* TimetableCell.xib */, + DB4BC6AB1EF670B600650964 /* TimetableRoomCell.swift */, + DB4BC6AD1EF6711500650964 /* TimetableRoomCell.xib */, + DB4BC6AF1EF671D800650964 /* TimetableTimeAxisCell.swift */, + DB4BC6B11EF6720700650964 /* TimetableTimeAxisCell.xib */, + ); + path = SpreadsheetViewCell; + sourceTree = ""; + }; + DB4BC6951EF5916D00650964 /* DataStore */ = { + isa = PBXGroup; + children = ( + DB4BC6A61EF5925800650964 /* Conference */, + DB4BC6961EF5916D00650964 /* DataSource */, + ); + path = DataStore; + sourceTree = ""; + }; + DB4BC6961EF5916D00650964 /* DataSource */ = { + isa = PBXGroup; + children = ( + DB4BC6971EF5916D00650964 /* More */, + DB4BC6991EF5916D00650964 /* TalkDetail */, + DB4BC69B1EF5916D00650964 /* Timeline */, + ); + path = DataSource; + sourceTree = ""; + }; + DB4BC6971EF5916D00650964 /* More */ = { + isa = PBXGroup; + children = ( + DB4BC6981EF5916D00650964 /* StaffListDataSource.swift */, + ); + path = More; + sourceTree = ""; + }; + DB4BC6991EF5916D00650964 /* TalkDetail */ = { + isa = PBXGroup; + children = ( + DB4BC69A1EF5916D00650964 /* SpeakersCollectionViewDataSource.swift */, + ); + path = TalkDetail; + sourceTree = ""; + }; + DB4BC69B1EF5916D00650964 /* Timeline */ = { + isa = PBXGroup; + children = ( + DB4BC69C1EF5916D00650964 /* Bookmark */, + DB4BC69E1EF5916D00650964 /* Conference */, + DB4BC6A01EF5916D00650964 /* TimelineDataSource.swift */, + ); + path = Timeline; + sourceTree = ""; + }; + DB4BC69C1EF5916D00650964 /* Bookmark */ = { + isa = PBXGroup; + children = ( + DB4BC69D1EF5916D00650964 /* BookmarkListDataSource.swift */, + ); + path = Bookmark; + sourceTree = ""; + }; + DB4BC69E1EF5916D00650964 /* Conference */ = { + isa = PBXGroup; + children = ( + DB4BC69F1EF5916D00650964 /* ConferenceListDataSource.swift */, + ); + path = Conference; + sourceTree = ""; + }; + DB4BC6A61EF5925800650964 /* Conference */ = { + isa = PBXGroup; + children = ( + DB4BC6A71EF5926600650964 /* ConferenceTimetableDataStore.swift */, + ); + path = Conference; + sourceTree = ""; + }; DB77FD4B1E06720C00504869 /* WebAPIFramework */ = { isa = PBXGroup; children = ( DB77FD4C1E06720C00504869 /* WebAPIFramework.h */, DB77FD6C1E067A0F00504869 /* WebConfig.swift */, DB77FD6E1E067BD000504869 /* LocaleExtension.swift */, - DB77FD671E06783900504869 /* Alamofire */, + DBB4AED11EED957F0097CF99 /* APIKit */, + DBB4AECE1EED93F60097CF99 /* Error */, DB77FD4D1E06720C00504869 /* Info.plist */, ); path = WebAPIFramework; @@ -746,12 +822,13 @@ path = WebAPIFrameworkTests; sourceTree = ""; }; - DB77FD671E06783900504869 /* Alamofire */ = { + DB7EAADE1EF04D2800FEF504 /* DummyJSON */ = { isa = PBXGroup; children = ( - DB77FD681E06783900504869 /* AlamofireProtocol.swift */, + DB7EAADF1EF04D2800FEF504 /* DummyTalkDetailProtocol.swift */, + DB7EAAE11EF04DAC00FEF504 /* DummyTalksProtocol.swift */, ); - path = Alamofire; + path = DummyJSON; sourceTree = ""; }; DBA1C0A01C7228E2004F0C8D = { @@ -779,6 +856,52 @@ name = Products; sourceTree = ""; }; + DBA8722C1EF1A40E0001F8A3 /* Notification */ = { + isa = PBXGroup; + children = ( + DBA8722D1EF1A40E0001F8A3 /* LocalNotificationProtocol.swift */, + DBA8722E1EF1A40E0001F8A3 /* ReceiveLocalNotificationProtocol.swift */, + ); + path = Notification; + sourceTree = ""; + }; + DBA872331EF2E0E90001F8A3 /* APIRequest */ = { + isa = PBXGroup; + children = ( + DBA872341EF2E0E90001F8A3 /* StaffListAPIRequest.swift */, + DBA872351EF2E0E90001F8A3 /* TalkDetailAPIRequest.swift */, + DBA872361EF2E0E90001F8A3 /* TalksAPIRequest.swift */, + ); + path = APIRequest; + sourceTree = ""; + }; + DBA8723A1EF2E1050001F8A3 /* Realm */ = { + isa = PBXGroup; + children = ( + DBA8723D1EF2E5320001F8A3 /* LoadFavoriteTalksRequest.swift */, + DBA8723F1EF2E7410001F8A3 /* LoadTalksRequest.swift */, + DBA8723B1EF2E14B0001F8A3 /* SaveTalksRequest.swift */, + ); + path = Realm; + sourceTree = ""; + }; + DBB4AECE1EED93F60097CF99 /* Error */ = { + isa = PBXGroup; + children = ( + DBB4AECF1EED93F60097CF99 /* APIError.swift */, + ); + path = Error; + sourceTree = ""; + }; + DBB4AED11EED957F0097CF99 /* APIKit */ = { + isa = PBXGroup; + children = ( + DBB4AED21EED95950097CF99 /* PyConJPRequest.swift */, + DB28C1911F59AFB2003BEFE0 /* GitHubRequest.swift */, + ); + path = APIKit; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -840,6 +963,7 @@ DB533BD01D6F05690056C09A /* Embed Frameworks */, DBEE75F11D27A53E008A9D47 /* Run Script for SwiftLint */, DB533BD11D6F058D0056C09A /* Run Script for Carthage */, + DB51C2391F53FB520016C952 /* Run Script for LicensePlist */, ); buildRules = ( ); @@ -969,27 +1093,26 @@ buildActionMask = 2147483647; files = ( DB05D1C31E43FBCB00781BF7 /* Localizable.strings in Resources */, + DB51C2191F5322D20016C952 /* EventList.strings in Resources */, + DB4BC6B21EF6720700650964 /* TimetableTimeAxisCell.xib in Resources */, DB05D19A1E43FBCB00781BF7 /* Assets.xcassets in Resources */, - DB05D1CC1E43FBCB00781BF7 /* Bookmark.strings in Resources */, - DB05D1D01E43FBCB00781BF7 /* Main.strings in Resources */, DB05D1C91E43FBCB00781BF7 /* LaunchScreen.storyboard in Resources */, DB05D1D91E43FBCB00781BF7 /* TalkTableViewCell.xib in Resources */, DB05D1C71E43FBCB00781BF7 /* Conference.storyboard in Resources */, DB05D1C51E43FBCB00781BF7 /* URLScheme.strings in Resources */, - DB05D1CE1E43FBCB00781BF7 /* Events.strings in Resources */, DB05D1CB1E43FBCB00781BF7 /* More.storyboard in Resources */, + DB4BC6AE1EF6711500650964 /* TimetableRoomCell.xib in Resources */, DB05D1D71E43FBCB00781BF7 /* StaffTableViewCell.xib in Resources */, DB05D1C61E43FBCB00781BF7 /* Bookmark.storyboard in Resources */, DB05D1C21E43FBCB00781BF7 /* Language.strings in Resources */, + DB51C23B1F53FC040016C952 /* Settings.bundle in Resources */, DB05D1C11E43FBCB00781BF7 /* DummyTalks.json in Resources */, DB05D1CA1E43FBCB00781BF7 /* Main.storyboard in Resources */, DB05D1D51E43FBCB00781BF7 /* SpeakerCollectionViewCell.xib in Resources */, - DB05D1CF1E43FBCB00781BF7 /* LaunchScreen.strings in Resources */, - DB05D1CD1E43FBCB00781BF7 /* Conference.strings in Resources */, DB05D1C41E43FBCB00781BF7 /* Map.strings in Resources */, DB05D1C81E43FBCB00781BF7 /* Events.storyboard in Resources */, - DB05D1D11E43FBCB00781BF7 /* More.strings in Resources */, DB05D1C01E43FBCB00781BF7 /* DummyTalkDetail.json in Resources */, + DB4BC6AA1EF6705500650964 /* TimetableCell.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1010,16 +1133,32 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + DB51C2391F53FB520016C952 /* Run Script for LicensePlist */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script for LicensePlist"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ $CONFIGURATION = \"Debug\" ]; then\ncd $SRCROOT\n/usr/local/bin/license-plist --output-path $PRODUCT_NAME/Resource/Settings.bundle\nfi"; + }; DB533BD11D6F058D0056C09A /* Run Script for Carthage */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "$(SRCROOT)/Carthage/Build/iOS/Alamofire.framework", + "$(SRCROOT)/Carthage/Build/iOS/APIKit.framework", + "$(SRCROOT)/Carthage/Build/iOS/Result.framework", + "$(SRCROOT)/Carthage/Build/iOS/Kingfisher.framework", "$(SRCROOT)/Carthage/Build/iOS/Realm.framework", "$(SRCROOT)/Carthage/Build/iOS/RealmSwift.framework", - "$(SRCROOT)/Carthage/Build/iOS/AlamofireImage.framework", + "$(SRCROOT)/Carthage/Build/iOS/SpreadsheetView.framework", ); name = "Run Script for Carthage"; outputPaths = ( @@ -1049,9 +1188,11 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + DB28C1921F59AFB2003BEFE0 /* GitHubRequest.swift in Sources */, DB77FD6D1E067A0F00504869 /* WebConfig.swift in Sources */, + DBB4AED31EED95950097CF99 /* PyConJPRequest.swift in Sources */, DB77FD6F1E067BD000504869 /* LocaleExtension.swift in Sources */, - DB77FD691E06783900504869 /* AlamofireProtocol.swift in Sources */, + DBB4AED01EED93F60097CF99 /* APIError.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1067,68 +1208,84 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + DB7EAAE21EF04DAC00FEF504 /* DummyTalksProtocol.swift in Sources */, + DB4BC6A81EF5926600650964 /* ConferenceTimetableDataStore.swift in Sources */, + DB4BC6A51EF5916D00650964 /* TimelineDataSource.swift in Sources */, DB05D1E51E43FBCB00781BF7 /* EventsListViewController.swift in Sources */, - DB05D1A81E43FBCB00781BF7 /* ReceiveLocalNotificationManager.swift in Sources */, + DBA872301EF1A40E0001F8A3 /* ReceiveLocalNotificationProtocol.swift in Sources */, DB05D1E01E43FBCB00781BF7 /* ConferenceDateViewController.swift in Sources */, DB05D1E41E43FBCB00781BF7 /* ConferenceViewController.swift in Sources */, DB05D1AD1E43FBCB00781BF7 /* Room.swift in Sources */, DB05D1DD1E43FBCB00781BF7 /* ZoomableImageViewController.swift in Sources */, DB05D1B51E43FBCB00781BF7 /* Team.swift in Sources */, + DB7EAAE01EF04D2800FEF504 /* DummyTalkDetailProtocol.swift in Sources */, DB05D1B31E43FBCB00781BF7 /* Talk.swift in Sources */, DB05D1DE1E43FBCB00781BF7 /* BookmarkListViewController.swift in Sources */, DB05D1A41E43FBCB00781BF7 /* UIColorExtension.swift in Sources */, DB05D1971E43FBCB00781BF7 /* AppDelegate.swift in Sources */, + DBA872401EF2E7410001F8A3 /* LoadTalksRequest.swift in Sources */, + DBA872391EF2E0E90001F8A3 /* TalksAPIRequest.swift in Sources */, + DBA872381EF2E0E90001F8A3 /* TalkDetailAPIRequest.swift in Sources */, + DB10DEA11EDFDF8200DAED31 /* NibInstantitable.swift in Sources */, DB05D1BC1E43FBCB00781BF7 /* TwitterURLSchemeProtocol.swift in Sources */, DB05D1991E43FBCB00781BF7 /* PCJNotificationConfig.swift in Sources */, + DB10DEA31EDFDF9900DAED31 /* StoryboardIdentifiable.swift in Sources */, + DB4BC6AC1EF670B600650964 /* TimetableRoomCell.swift in Sources */, + DBA8723E1EF2E5320001F8A3 /* LoadFavoriteTalksRequest.swift in Sources */, + DBA872371EF2E0E90001F8A3 /* StaffListAPIRequest.swift in Sources */, + DB7EAADB1EEEF76A00FEF504 /* UIImageViewExtension.swift in Sources */, DB05D1E11E43FBCB00781BF7 /* ConferenceListViewController.swift in Sources */, + DB10DE9D1EDFDF3B00DAED31 /* UIStoryboardExtension.swift in Sources */, DB05D1B41E43FBCB00781BF7 /* TalkDetail.swift in Sources */, DB05D1E31E43FBCB00781BF7 /* ConferencePageViewController.swift in Sources */, DB05D1DB1E43FBCB00781BF7 /* DetailImageViewController.swift in Sources */, + DB4BC6A11EF5916D00650964 /* StaffListDataSource.swift in Sources */, + DB10DEA71EDFE62A00DAED31 /* RealmError.swift in Sources */, DB05D1A31E43FBCB00781BF7 /* StringExtension.swift in Sources */, DB05D1981E43FBCB00781BF7 /* PCJConfig.swift in Sources */, - DB05D1BF1E43FBCB00781BF7 /* TalksAPIProtocol.swift in Sources */, - DB05D1A71E43FBCB00781BF7 /* LocalNotificationManager.swift in Sources */, DB05D1A61E43FBCB00781BF7 /* UIViewExtension.swift in Sources */, - DB05D1BE1E43FBCB00781BF7 /* TalkDetailAPIProtocol.swift in Sources */, - DB05D1BA1E43FBCB00781BF7 /* RealmTalksProtocol.swift in Sources */, + DB10DE981EDFDED600DAED31 /* Track.swift in Sources */, + DB4BC6A31EF5916D00650964 /* BookmarkListDataSource.swift in Sources */, + DB05D1BA1E43FBCB00781BF7 /* RealmLoadTalksProtocol.swift in Sources */, DB05D1BB1E43FBCB00781BF7 /* MailURLSchemeProtocol.swift in Sources */, - DB05D19E1E43FBCB00781BF7 /* ConferenceListDataSource.swift in Sources */, + DBA8723C1EF2E14B0001F8A3 /* SaveTalksRequest.swift in Sources */, + DB4BC6941EF525CD00650964 /* TimetableCell.swift in Sources */, + DB4BC6911EF522CD00650964 /* ConferenceTimetableViewController.swift in Sources */, DB05D1B01E43FBCB00781BF7 /* Place.swift in Sources */, DB05D1E91E43FBCB00781BF7 /* MapListViewController.swift in Sources */, DB05D1A51E43FBCB00781BF7 /* UIDeviceExtension.swift in Sources */, DB05D1E81E43FBCB00781BF7 /* FloorMapZoomableImageViewController.swift in Sources */, - DB05D1AC1E43FBCB00781BF7 /* Result.swift in Sources */, DB05D1B81E43FBCB00781BF7 /* GestureProtocol.swift in Sources */, DB05D1B71E43FBCB00781BF7 /* ErrorAlertProtocol.swift in Sources */, DB05D1AB1E43FBCB00781BF7 /* PyConJPDate.swift in Sources */, DB05D1A01E43FBCB00781BF7 /* AppDelegateExtension.swift in Sources */, + DB7EAADD1EEFA86B00FEF504 /* RealmSaveTalksProtocol.swift in Sources */, DB05D1EA1E43FBCB00781BF7 /* MapViewController.swift in Sources */, - DB05D19D1E43FBCB00781BF7 /* BookmarkListDataSource.swift in Sources */, + DB10DE961EDFDEC400DAED31 /* Timetable.swift in Sources */, DB05D1E21E43FBCB00781BF7 /* ConferenceModelController.swift in Sources */, - DB05D1B91E43FBCB00781BF7 /* RealmTalkDetailProtocol.swift in Sources */, - DB05D19C1E43FBCB00781BF7 /* SpeakersCollectionViewDataSource.swift in Sources */, DB05D1E71E43FBCB00781BF7 /* FloorMapListViewController.swift in Sources */, DB05D1D41E43FBCB00781BF7 /* SpeakerCollectionViewCell.swift in Sources */, DB05D1EB1E43FBCB00781BF7 /* MoreListViewController.swift in Sources */, DB05D1ED1E43FBCB00781BF7 /* PCJWKWebViewController.swift in Sources */, DB05D1D81E43FBCB00781BF7 /* TalkTableViewCell.swift in Sources */, + DB4BC6A41EF5916D00650964 /* ConferenceListDataSource.swift in Sources */, DB05D1D61E43FBCB00781BF7 /* StaffTableViewCell.swift in Sources */, + DBA872321EF1A4990001F8A3 /* NotificationType.swift in Sources */, + DBA8722F1EF1A40E0001F8A3 /* LocalNotificationProtocol.swift in Sources */, DB05D1DA1E43FBCB00781BF7 /* BaseTabBarController.swift in Sources */, DB05D1AA1E43FBCB00781BF7 /* Language.swift in Sources */, DB05D1DF1E43FBCB00781BF7 /* ConferenceBaseViewController.swift in Sources */, - DB05D1E61E43FBCB00781BF7 /* AcknowledgmentsListViewController.swift in Sources */, - DB05D1BD1E43FBCB00781BF7 /* StaffListAPIProtocol.swift in Sources */, + DB4BC6A21EF5916D00650964 /* SpeakersCollectionViewDataSource.swift in Sources */, DB05D1DC1E43FBCB00781BF7 /* TalkDetailViewController.swift in Sources */, DB05D1EC1E43FBCB00781BF7 /* StaffListViewController.swift in Sources */, DB05D1A21E43FBCB00781BF7 /* DateExtension.swift in Sources */, + DB4BC6B01EF671D800650964 /* TimetableTimeAxisCell.swift in Sources */, DB05D1A91E43FBCB00781BF7 /* TalkObject.swift in Sources */, DB05D1AF1E43FBCB00781BF7 /* Level.swift in Sources */, DB05D1A11E43FBCB00781BF7 /* ArrayExtension.swift in Sources */, DB05D1D31E43FBCB00781BF7 /* CustomImageView.swift in Sources */, - DB05D19B1E43FBCB00781BF7 /* StaffListDataSource.swift in Sources */, DB05D1B61E43FBCB00781BF7 /* Timeline.swift in Sources */, DB05D1AE1E43FBCB00781BF7 /* Category.swift in Sources */, - DB05D19F1E43FBCB00781BF7 /* TimelineDataSource.swift in Sources */, DB05D1B11E43FBCB00781BF7 /* Speaker.swift in Sources */, DB05D1B21E43FBCB00781BF7 /* Staff.swift in Sources */, ); @@ -1225,6 +1382,8 @@ isa = PBXVariantGroup; children = ( DB05D1531E43FBCB00781BF7 /* Base */, + DB51C22D1F53B9700016C952 /* en */, + DB51C22E1F53B9730016C952 /* ja */, ); name = Bookmark.storyboard; sourceTree = ""; @@ -1233,6 +1392,8 @@ isa = PBXVariantGroup; children = ( DB05D1551E43FBCB00781BF7 /* Base */, + DB51C22F1F53B9790016C952 /* en */, + DB51C2301F53B97B0016C952 /* ja */, ); name = Conference.storyboard; sourceTree = ""; @@ -1241,6 +1402,8 @@ isa = PBXVariantGroup; children = ( DB05D1571E43FBCB00781BF7 /* Base */, + DB51C2311F53B9800016C952 /* en */, + DB51C2321F53B9810016C952 /* ja */, ); name = Events.storyboard; sourceTree = ""; @@ -1249,6 +1412,8 @@ isa = PBXVariantGroup; children = ( DB05D1591E43FBCB00781BF7 /* Base */, + DB51C2331F53B9850016C952 /* en */, + DB51C2341F53B9870016C952 /* ja */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -1257,6 +1422,8 @@ isa = PBXVariantGroup; children = ( DB05D15B1E43FBCB00781BF7 /* Base */, + DB51C2351F53B98B0016C952 /* en */, + DB51C2361F53B98D0016C952 /* ja */, ); name = Main.storyboard; sourceTree = ""; @@ -1265,62 +1432,20 @@ isa = PBXVariantGroup; children = ( DB05D15D1E43FBCB00781BF7 /* Base */, + DB51C2371F53B9910016C952 /* en */, + DB51C2381F53B9950016C952 /* ja */, ); name = More.storyboard; sourceTree = ""; }; - DB05D15E1E43FBCB00781BF7 /* Bookmark.strings */ = { - isa = PBXVariantGroup; - children = ( - DB05D15F1E43FBCB00781BF7 /* en */, - DB05D16A1E43FBCB00781BF7 /* ja */, - ); - name = Bookmark.strings; - sourceTree = ""; - }; - DB05D1601E43FBCB00781BF7 /* Conference.strings */ = { - isa = PBXVariantGroup; - children = ( - DB05D1611E43FBCB00781BF7 /* en */, - DB05D16B1E43FBCB00781BF7 /* ja */, - ); - name = Conference.strings; - sourceTree = ""; - }; - DB05D1621E43FBCB00781BF7 /* Events.strings */ = { - isa = PBXVariantGroup; - children = ( - DB05D1631E43FBCB00781BF7 /* en */, - DB05D16C1E43FBCB00781BF7 /* ja */, - ); - name = Events.strings; - sourceTree = ""; - }; - DB05D1641E43FBCB00781BF7 /* LaunchScreen.strings */ = { - isa = PBXVariantGroup; - children = ( - DB05D1651E43FBCB00781BF7 /* en */, - DB05D16D1E43FBCB00781BF7 /* ja */, - ); - name = LaunchScreen.strings; - sourceTree = ""; - }; - DB05D1661E43FBCB00781BF7 /* Main.strings */ = { - isa = PBXVariantGroup; - children = ( - DB05D1671E43FBCB00781BF7 /* en */, - DB05D16E1E43FBCB00781BF7 /* ja */, - ); - name = Main.strings; - sourceTree = ""; - }; - DB05D1681E43FBCB00781BF7 /* More.strings */ = { + DB51C21B1F5322D20016C952 /* EventList.strings */ = { isa = PBXVariantGroup; children = ( - DB05D1691E43FBCB00781BF7 /* en */, - DB05D16F1E43FBCB00781BF7 /* ja */, + DB51C21A1F5322D20016C952 /* Base */, + DB51C21C1F5322D30016C952 /* en */, + DB51C21D1F5322D40016C952 /* ja */, ); - name = More.strings; + name = EventList.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ @@ -1521,6 +1646,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = KP7AT73S3W; @@ -1544,6 +1670,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = KP7AT73S3W; diff --git a/PyConJP.xcodeproj/xcshareddata/xcschemes/PyConJP2016.xcscheme b/PyConJP.xcodeproj/xcshareddata/xcschemes/PyConJP.xcscheme similarity index 100% rename from PyConJP.xcodeproj/xcshareddata/xcschemes/PyConJP2016.xcscheme rename to PyConJP.xcodeproj/xcshareddata/xcschemes/PyConJP.xcscheme diff --git a/PyConJP/Application/AppDelegate.swift b/PyConJP/Application/AppDelegate.swift index 879998d..b152276 100644 --- a/PyConJP/Application/AppDelegate.swift +++ b/PyConJP/Application/AppDelegate.swift @@ -1,77 +1,57 @@ // // AppDelegate.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/02/16. // Copyright © 2016 PyCon JP. All rights reserved. // import UIKit +import APIKit import RealmSwift @UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate, TalksAPIProtocol, ErrorAlertProtocol { +class AppDelegate: UIResponder, UIApplicationDelegate, ReceiveLocalNotificationProtocol, ErrorAlertProtocol { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // let settings = UIUserNotificationSettings(forTypes: [UIUserNotificationType.Alert, UIUserNotificationType.Badge, UIUserNotificationType.Sound], categories: nil) - // UIApplication.sharedApplication().registerUserNotificationSettings(settings) - // - // if let _ = launchOptions![UIApplicationLaunchOptionsURLKey] as? [NSObject : AnyObject] { - // if let osVersion = Float64(UIDevice.currentDevice().systemVersion) { - // if osVersion >= 9.0 { - // } - // } - // } - // if let launchOptions = launchOptions { - // if let localNotification = launchOptions[UIApplicationLaunchOptionsLocalNotificationKey] as? UILocalNotification { - // self.application(application, didReceiveLocalNotification: localNotification) - // } - // } - getTalks { result in - switch result { - case .success: - NotificationCenter.default.post(name: Notification.Name(rawValue: PCJNotificationConfig.CompleteFetchDataNotification), object: nil) - case .failure(let error): - self.showErrorAlart(with: error) - } - } + getTalksFromAPI() - UINavigationBar.appearance().barTintColor = UIColor.PyConJP2016.red + UINavigationBar.appearance().barTintColor = UIColor.PyConJP2017.navy UINavigationBar.appearance().tintColor = .white UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.white] - UITabBar.appearance().tintColor = UIColor.PyConJP2016.blue - UITabBarItem.appearance().setTitleTextAttributes([NSFontAttributeName: UIFont.boldSystemFont(ofSize: 10), NSForegroundColorAttributeName: UIColor.PyConJP2016.blue], for: .selected) + UITabBar.appearance().tintColor = UIColor.PyConJP2017.yellow + UITabBarItem.appearance().setTitleTextAttributes([NSFontAttributeName: UIFont.boldSystemFont(ofSize: 10), NSForegroundColorAttributeName: UIColor.PyConJP2017.yellow], for: .selected) + + let configuration = Realm.Configuration(schemaVersion: 1, deleteRealmIfMigrationNeeded: true) + Realm.Configuration.defaultConfiguration = configuration return true } - func applicationWillResignActive(_ application: UIApplication) { - } - - func applicationDidEnterBackground(_ application: UIApplication) { - } - - func applicationWillEnterForeground(_ application: UIApplication) { - } - - func applicationDidBecomeActive(_ application: UIApplication) { - UIApplication.shared.applicationIconBadgeNumber = 0 + func application(_ application: UIApplication, didReceive notification: UILocalNotification) { + handle(application, didReceiveLocalNotification: notification) + UIApplication.shared.cancelLocalNotification(notification) } - func applicationWillTerminate(_ application: UIApplication) { - } +} + +extension AppDelegate { - func application(_ application: UIApplication, didReceive notification: UILocalNotification) { - if let userInfo = notification.userInfo { - let receiveLocalNotificationManager = ReceiveLocalNotificationManager() - receiveLocalNotificationManager.application(application, didReceiveLocalNotification: userInfo) + fileprivate func getTalksFromAPI() { + let request = TalksAPIRequest() + Session.send(request) { [weak self](result) in + switch result { + case .success(let talks): + try? SaveTalksRequest().save(talks: talks) + NotificationCenter.default.post(name: Notification.Name(rawValue: PCJNotificationConfig.completeFetchDataNotification), object: nil) + case .failure(let error): + self?.showErrorAlart(with: error) + } } - - UIApplication.shared.cancelLocalNotification(notification) } } diff --git a/PyConJP/Application/PCJConfig.swift b/PyConJP/Application/PCJConfig.swift index a15b21d..f33fb8e 100644 --- a/PyConJP/Application/PCJConfig.swift +++ b/PyConJP/Application/PCJConfig.swift @@ -1,12 +1,12 @@ // // PCJConfig.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 8/30/2016. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation enum PCJConfig { diff --git a/PyConJP/Application/PCJNotificationConfig.swift b/PyConJP/Application/PCJNotificationConfig.swift index 2ff22da..e3753a1 100644 --- a/PyConJP/Application/PCJNotificationConfig.swift +++ b/PyConJP/Application/PCJNotificationConfig.swift @@ -1,15 +1,15 @@ // // PCJNotificationConfig.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/07/21. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation enum PCJNotificationConfig { - static let CompleteFetchDataNotification = "CompleteFetchDateNotification" + static let completeFetchDataNotification = "CompleteFetchDateNotification" } diff --git a/PyConJP/Assets.xcassets/App/Image/Launch.imageset/Contents.json b/PyConJP/Assets.xcassets/App/Image/Launch.imageset/Contents.json deleted file mode 100644 index 091a003..0000000 --- a/PyConJP/Assets.xcassets/App/Image/Launch.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "launch.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "launch@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "launch@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/PyConJP/Assets.xcassets/App/Image/Launch.imageset/launch.png b/PyConJP/Assets.xcassets/App/Image/Launch.imageset/launch.png deleted file mode 100644 index 3ea12ab..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Launch.imageset/launch.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Launch.imageset/launch@2x.png b/PyConJP/Assets.xcassets/App/Image/Launch.imageset/launch@2x.png deleted file mode 100644 index d5c5bcb..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Launch.imageset/launch@2x.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Launch.imageset/launch@3x.png b/PyConJP/Assets.xcassets/App/Image/Launch.imageset/launch@3x.png deleted file mode 100644 index e9c22f7..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Launch.imageset/launch@3x.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/1st-floor@1x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/1st-floor@1x.png new file mode 100644 index 0000000..b491a0f Binary files /dev/null and b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/1st-floor@1x.png differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/1st-floor@2x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/1st-floor@2x.png new file mode 100644 index 0000000..118658a Binary files /dev/null and b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/1st-floor@2x.png differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/1st-floor@3x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/1st-floor@3x.png new file mode 100644 index 0000000..8f84fff Binary files /dev/null and b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/1st-floor@3x.png differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/Contents.json b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/Contents.json index 4111d8c..7936de8 100644 --- a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/Contents.json +++ b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/Contents.json @@ -2,17 +2,17 @@ "images" : [ { "idiom" : "universal", - "filename" : "floor_1.png", + "filename" : "1st-floor@1x.png", "scale" : "1x" }, { "idiom" : "universal", - "filename" : "floor_1@2x.png", + "filename" : "1st-floor@2x.png", "scale" : "2x" }, { "idiom" : "universal", - "filename" : "floor_1@3x.png", + "filename" : "1st-floor@3x.png", "scale" : "3x" } ], diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/floor_1.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/floor_1.png deleted file mode 100644 index 27c2e5e..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/floor_1.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/floor_1@2x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/floor_1@2x.png deleted file mode 100644 index 9c53201..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/floor_1@2x.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/floor_1@3x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/floor_1@3x.png deleted file mode 100644 index b5933c7..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Map/Floor/FirstFloorMap.imageset/floor_1@3x.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/2nd-floor@1x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/2nd-floor@1x.png new file mode 100644 index 0000000..21a6daa Binary files /dev/null and b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/2nd-floor@1x.png differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/2nd-floor@2x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/2nd-floor@2x.png new file mode 100644 index 0000000..cafd5b6 Binary files /dev/null and b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/2nd-floor@2x.png differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/2nd-floor@3x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/2nd-floor@3x.png new file mode 100644 index 0000000..1c4c5fe Binary files /dev/null and b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/2nd-floor@3x.png differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/Contents.json b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/Contents.json index a0a3ea2..a7623e0 100644 --- a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/Contents.json +++ b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/Contents.json @@ -2,17 +2,17 @@ "images" : [ { "idiom" : "universal", - "filename" : "floor_2.png", + "filename" : "2nd-floor@1x.png", "scale" : "1x" }, { "idiom" : "universal", - "filename" : "floor_2@2x.png", + "filename" : "2nd-floor@2x.png", "scale" : "2x" }, { "idiom" : "universal", - "filename" : "floor_2@3x.png", + "filename" : "2nd-floor@3x.png", "scale" : "3x" } ], diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/floor_2.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/floor_2.png deleted file mode 100644 index 14024ab..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/floor_2.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/floor_2@2x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/floor_2@2x.png deleted file mode 100644 index f32fef8..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/floor_2@2x.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/floor_2@3x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/floor_2@3x.png deleted file mode 100644 index 9a63f30..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Map/Floor/SecondFloorMap.imageset/floor_2@3x.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/3rd-floor@1x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/3rd-floor@1x.png new file mode 100644 index 0000000..314e6ff Binary files /dev/null and b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/3rd-floor@1x.png differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/3rd-floor@2x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/3rd-floor@2x.png new file mode 100644 index 0000000..6e8c228 Binary files /dev/null and b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/3rd-floor@2x.png differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/3rd-floor@3x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/3rd-floor@3x.png new file mode 100644 index 0000000..458bde4 Binary files /dev/null and b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/3rd-floor@3x.png differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/Contents.json b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/Contents.json index 7361e74..adb6df0 100644 --- a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/Contents.json +++ b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/Contents.json @@ -2,17 +2,17 @@ "images" : [ { "idiom" : "universal", - "filename" : "floor_3.png", + "filename" : "3rd-floor@1x.png", "scale" : "1x" }, { "idiom" : "universal", - "filename" : "floor_3@2x.png", + "filename" : "3rd-floor@2x.png", "scale" : "2x" }, { "idiom" : "universal", - "filename" : "floor_3@3x.png", + "filename" : "3rd-floor@3x.png", "scale" : "3x" } ], diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/floor_3.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/floor_3.png deleted file mode 100644 index 6028d1e..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/floor_3.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/floor_3@2x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/floor_3@2x.png deleted file mode 100644 index 57264fc..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/floor_3@2x.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/floor_3@3x.png b/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/floor_3@3x.png deleted file mode 100644 index 88bc028..0000000 Binary files a/PyConJP/Assets.xcassets/App/Image/Map/Floor/ThirdFloorMap.imageset/floor_3@3x.png and /dev/null differ diff --git a/PyConJP/Assets.xcassets/AppIcon.appiconset/icon@2x.png b/PyConJP/Assets.xcassets/AppIcon.appiconset/icon@2x.png index fae6517..dbabfd4 100644 Binary files a/PyConJP/Assets.xcassets/AppIcon.appiconset/icon@2x.png and b/PyConJP/Assets.xcassets/AppIcon.appiconset/icon@2x.png differ diff --git a/PyConJP/Assets.xcassets/AppIcon.appiconset/icon@3x.png b/PyConJP/Assets.xcassets/AppIcon.appiconset/icon@3x.png index a0210d6..965f269 100644 Binary files a/PyConJP/Assets.xcassets/AppIcon.appiconset/icon@3x.png and b/PyConJP/Assets.xcassets/AppIcon.appiconset/icon@3x.png differ diff --git a/PyConJP/Assets.xcassets/AppIcon.appiconset/spotlight@2x.png b/PyConJP/Assets.xcassets/AppIcon.appiconset/spotlight@2x.png index 1b58097..9037f29 100644 Binary files a/PyConJP/Assets.xcassets/AppIcon.appiconset/spotlight@2x.png and b/PyConJP/Assets.xcassets/AppIcon.appiconset/spotlight@2x.png differ diff --git a/PyConJP/Assets.xcassets/AppIcon.appiconset/spotlight@3x.png b/PyConJP/Assets.xcassets/AppIcon.appiconset/spotlight@3x.png index ea215f1..dbabfd4 100644 Binary files a/PyConJP/Assets.xcassets/AppIcon.appiconset/spotlight@3x.png and b/PyConJP/Assets.xcassets/AppIcon.appiconset/spotlight@3x.png differ diff --git a/PyConJP/Assets.xcassets/LaunchImage.launchimage/Contents.json b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..e1a0d0c --- /dev/null +++ b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,52 @@ +{ + "images" : [ + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Portrait 5.5.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Landscape 5.png", + "minimum-system-version" : "8.0", + "orientation" : "landscape", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "667h", + "filename" : "Portrait 4.7.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Portrait 3.5.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "retina4", + "filename" : "Portrait 4.png", + "minimum-system-version" : "7.0", + "orientation" : "portrait", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PyConJP/Assets.xcassets/LaunchImage.launchimage/Landscape 5.png b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Landscape 5.png new file mode 100644 index 0000000..22a53fc Binary files /dev/null and b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Landscape 5.png differ diff --git a/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 3.5.png b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 3.5.png new file mode 100644 index 0000000..6fb622c Binary files /dev/null and b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 3.5.png differ diff --git a/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 4.7.png b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 4.7.png new file mode 100644 index 0000000..1ad1474 Binary files /dev/null and b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 4.7.png differ diff --git a/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 4.png b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 4.png new file mode 100644 index 0000000..f0d2dd6 Binary files /dev/null and b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 4.png differ diff --git a/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 5.5.png b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 5.5.png new file mode 100644 index 0000000..5d78092 Binary files /dev/null and b/PyConJP/Assets.xcassets/LaunchImage.launchimage/Portrait 5.5.png differ diff --git a/PyConJP/DataSource/Timeline/Bookmark/BookmarkListDataSource.swift b/PyConJP/DataSource/Timeline/Bookmark/BookmarkListDataSource.swift deleted file mode 100644 index d2abcab..0000000 --- a/PyConJP/DataSource/Timeline/Bookmark/BookmarkListDataSource.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// BookmarkListDataSource.swift -// PyConJP2016 -// -// Created by Yutaro Muta on 2016/08/18. -// Copyright © 2016 PyCon JP. All rights reserved. -// - -import UIKit -import RealmSwift - -class BookmarkListDataSource: TimelineDataSource, RealmTalksProtocol { - - let filterPredicate = NSPredicate(format: "favorited == %@", true as CVarArg) - let sortProperties = [SortDescriptor(property: "date", ascending: true), SortDescriptor(property: "place", ascending: true)] - - func refreshData(completionHandler: @escaping ((Result) -> Void)) { - loadTalkObjects { [weak self](result) in - guard let weakSelf = self else { return } - switch result { - case .success(let talks): - weakSelf.timelines.removeAll() - let keys = talks.map { $0.day }.unique() - for tuple in keys.enumerated() { - weakSelf.timelines.append(Timeline(key: keys[tuple.offset], talks: talks.filter { $0.day == keys[tuple.offset]})) - } - completionHandler(.success()) - case .failure(let error): - completionHandler(.failure(error)) - } - } - } - -} diff --git a/PyConJP/DataSource/Timeline/Conference/ConferenceListDataSource.swift b/PyConJP/DataSource/Timeline/Conference/ConferenceListDataSource.swift deleted file mode 100644 index 24e4e1f..0000000 --- a/PyConJP/DataSource/Timeline/Conference/ConferenceListDataSource.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// ConferenceListDataSource.swift -// PyConJP2016 -// -// Created by Yutaro Muta on 2016/06/13. -// Copyright © 2016 PyCon JP. All rights reserved. -// - -import UIKit -import RealmSwift - -class ConferenceListDataSource: TimelineDataSource, RealmTalksProtocol { - - let filterPredicate: NSPredicate - let sortProperties = [SortDescriptor(property: "date", ascending: true), SortDescriptor(property: "place", ascending: true)] - - init(day: String?) { - self.filterPredicate = NSPredicate(format: "day == %@", day ?? "") - super.init() - } - - func refreshData(completionHandler: @escaping ((Result) -> Void)) { - loadTalkObjects { [weak self](result) in - guard let weakSelf = self else { return } - switch result { - case .success(let talks): - weakSelf.timelines.removeAll() - let keys = talks.map { $0.startTime }.unique() - for tuple in keys.enumerated() { - weakSelf.timelines.append(Timeline(time: keys[tuple.offset], talks: talks.filter { $0.startTime == keys[tuple.offset]})) - } - completionHandler(.success()) - case .failure(let error): - completionHandler(.failure(error)) - } - } - } - -} diff --git a/PyConJP/DataStore/Conference/ConferenceTimetableDataStore.swift b/PyConJP/DataStore/Conference/ConferenceTimetableDataStore.swift new file mode 100644 index 0000000..71d6609 --- /dev/null +++ b/PyConJP/DataStore/Conference/ConferenceTimetableDataStore.swift @@ -0,0 +1,166 @@ +// +// ConferenceTimetableDataStore.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/18. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation +import UIKit + +final class ConferenceTimetableDataStore { + + private(set) var timetable: Timetable + let pyconJPDate: PyConJPDate + + private let loadTalksRequest: LoadTalksRequest + private let apiRequest: TalksAPIRequest = TalksAPIRequest() + + init?(pyconJPDate: PyConJPDate) { + self.pyconJPDate = pyconJPDate + self.loadTalksRequest = LoadTalksRequest(day: pyconJPDate.description) + do { + self.timetable = Timetable(talks: try loadTalksRequest.load()) + } catch { + return nil + } + } + + var start: Date? { + guard let start = timetable.start else { return nil } + return start.calculate(minute: -(start.components.minute ?? 0), second: -(start.components.second ?? 0)) + } + + var end: Date? { + guard let end = timetable.end else { return nil } + return end.update(minute: 59, second: 59) + } + + var frozenColumns: Int { + return Section.frozenColumns + } + + var frozenRows: Int { + return Section.frozenRows + } + + func room(_ indexPath: IndexPath) -> Room { + return timetable.rooms[indexPath.column - Section.frozenColumns] + } + + func hourClock(_ indexPath: IndexPath) -> String? { + return start?.calculate(minute: indexPath.row)?.hourClock + } + + func talk(_ indexPath: IndexPath) -> TalkObject? { + guard let date = start?.calculate(minute: indexPath.row) else { return nil } + return timetable.tracks[indexPath.column - Section.frozenColumns].talks.filter({ talkObject in + return talkObject.startDate < date && date < talkObject.endDate + }).first + } + + func numberOfColumns() -> Int { + return Section.numberOfColumns(timetable.rooms.count) + } + + func numberOfRows() -> Int { + return Section.numberOfRows(timetable.hourDuration.count * 60) + } + + func cellIdentifier(_ indexPath: IndexPath) -> String? { + return Section(indexPath: indexPath).cellIdentifier + } + + func widthForColumn(_ column: Int) -> CGFloat { + return Section(indexPath: IndexPath(row: 0, column: column)).widthForColumn + } + + func heightForRow(_ row: Int) -> CGFloat { + return Section(indexPath: IndexPath(row: row, column: 0)).heightForRow + } + + func reloadTimetable() { + do { + self.timetable = Timetable(talks: try loadTalksRequest.load()) + } catch { + return + } + } + + enum Section { + case corner + case rowHeader + case columnHeader + case timetable + + init(indexPath: IndexPath) { + switch (indexPath.row, indexPath.column) { + case (0, 0): + self = .corner + case (0, _): + self = .rowHeader + case (_, 0): + self = .columnHeader + default: + self = .timetable + } + } + + var cellIdentifier: String? { + switch self { + case .corner: + return nil + case .rowHeader: + return TimetableRoomCell.nibName + case .columnHeader: + return TimetableTimeAxisCell.nibName + case .timetable: + return TimetableCell.nibName + } + } + + var widthForColumn: CGFloat { + switch self { + case .corner: + return TimetableTimeAxisCell.width + case .rowHeader: + return TimetableRoomCell.width + case .columnHeader: + return TimetableTimeAxisCell.width + case .timetable: + return TimetableCell.width + } + } + + var heightForRow: CGFloat { + switch self { + case .corner: + return TimetableRoomCell.height + case .rowHeader: + return TimetableRoomCell.height + case .columnHeader: + return TimetableTimeAxisCell.height + case .timetable: + return TimetableCell.height + } + } + + static var frozenColumns: Int { + return 1 + } + + static var frozenRows: Int { + return 1 + } + + static func numberOfColumns(_ count: Int) -> Int { + return count + frozenColumns + } + + static func numberOfRows(_ length: Int) -> Int { + return length + frozenRows + } + } + +} diff --git a/PyConJP/DataSource/More/StaffListDataSource.swift b/PyConJP/DataStore/DataSource/More/StaffListDataSource.swift similarity index 67% rename from PyConJP/DataSource/More/StaffListDataSource.swift rename to PyConJP/DataStore/DataSource/More/StaffListDataSource.swift index c0ea6f0..7e83c75 100644 --- a/PyConJP/DataSource/More/StaffListDataSource.swift +++ b/PyConJP/DataStore/DataSource/More/StaffListDataSource.swift @@ -1,14 +1,16 @@ // // StaffListDataSource.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 9/10/16. // Copyright © 2016 PyCon JP. All rights reserved. // import UIKit +import APIKit +import Result -class StaffListDataSource: NSObject, UITableViewDataSource, StaffListAPIProtocol { +class StaffListDataSource: NSObject { let reuseIdentifier = "StaffTableViewCell" @@ -22,15 +24,15 @@ class StaffListDataSource: NSObject, UITableViewDataSource, StaffListAPIProtocol self.twitterAction = twitterAction } - func refreshData(completionHandler: @escaping ((Result) -> Void)) { - getStaffs { [weak self](result) in - guard let weakSelf = self else { return } + func refreshData(completionHandler: @escaping ((Result) -> Void)) { + let request = StaffListAPIRequest() + Session.send(request) { [weak self](result) in switch result { case .success(let staffs): - weakSelf.teams.removeAll() + self?.teams.removeAll() let teamNames = staffs.map({ $0.team }).unique() for tuple in teamNames.enumerated() { - weakSelf.teams.append(Team(name: teamNames[tuple.offset], staffs: staffs.filter({ $0.team == teamNames[tuple.offset] }))) + self?.teams.append(Team(name: teamNames[tuple.offset], staffs: staffs.filter({ $0.team == teamNames[tuple.offset] }))) } completionHandler(.success()) case .failure(let error): @@ -39,7 +41,10 @@ class StaffListDataSource: NSObject, UITableViewDataSource, StaffListAPIProtocol } } +} // MARK: - Table View Controller Data Source + +extension StaffListDataSource: UITableViewDataSource { func numberOfSections(in tableView: UITableView) -> Int { return teams.count @@ -57,9 +62,9 @@ class StaffListDataSource: NSObject, UITableViewDataSource, StaffListAPIProtocol guard let cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath) as? StaffTableViewCell else { fatalError("Could not create StaffTableViewCell") } - cell.fill(staff: teams[(indexPath as NSIndexPath).section].staffs[(indexPath as NSIndexPath).row], - onFacebookButton: facebookAction(teams[(indexPath as NSIndexPath).section].staffs[(indexPath as NSIndexPath).row].facebook), - onTwitterButton: twitterAction(teams[(indexPath as NSIndexPath).section].staffs[(indexPath as NSIndexPath).row].twitter)) + cell.fill(staff: teams[indexPath.section].staffs[indexPath.row], + onFacebookButton: facebookAction(teams[indexPath.section].staffs[indexPath.row].facebook), + onTwitterButton: twitterAction(teams[indexPath.section].staffs[indexPath.row].twitter)) return cell } } diff --git a/PyConJP/DataSource/TalkDetail/SpeakersCollectionViewDataSource.swift b/PyConJP/DataStore/DataSource/TalkDetail/SpeakersCollectionViewDataSource.swift similarity index 90% rename from PyConJP/DataSource/TalkDetail/SpeakersCollectionViewDataSource.swift rename to PyConJP/DataStore/DataSource/TalkDetail/SpeakersCollectionViewDataSource.swift index d756834..6d1dade 100644 --- a/PyConJP/DataSource/TalkDetail/SpeakersCollectionViewDataSource.swift +++ b/PyConJP/DataStore/DataSource/TalkDetail/SpeakersCollectionViewDataSource.swift @@ -1,6 +1,6 @@ // // SpeakersCollectionViewDataSource.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 9/8/16. // Copyright © 2016 PyCon JP. All rights reserved. @@ -22,7 +22,7 @@ class SpeakersCollectionViewDataSource: NSObject, UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! SpeakerCollectionViewCell - cell.fill(speaker: speakers[(indexPath as NSIndexPath).row]) + cell.fill(speaker: speakers[indexPath.row]) return cell } } diff --git a/PyConJP/DataStore/DataSource/Timeline/Bookmark/BookmarkListDataSource.swift b/PyConJP/DataStore/DataSource/Timeline/Bookmark/BookmarkListDataSource.swift new file mode 100644 index 0000000..51c3465 --- /dev/null +++ b/PyConJP/DataStore/DataSource/Timeline/Bookmark/BookmarkListDataSource.swift @@ -0,0 +1,30 @@ +// +// BookmarkListDataSource.swift +// PyConJP +// +// Created by Yutaro Muta on 2016/08/18. +// Copyright © 2016 PyCon JP. All rights reserved. +// + +import Foundation +import Result + +class BookmarkListDataSource: TimelineDataSource { + + private let loadTalksRequest = LoadFavoriteTalksRequest() + + func refreshData(completionHandler: @escaping ((Result) -> Void)) { + do { + let talks = try loadTalksRequest.load() + timelines.removeAll() + let keys = talks.map { $0.day }.unique() + for tuple in keys.enumerated() { + timelines.append(Timeline(key: keys[tuple.offset], talks: talks.filter { $0.day == keys[tuple.offset]})) + } + completionHandler(.success()) + } catch let error as NSError { + completionHandler(.failure(error)) + } + } + +} diff --git a/PyConJP/DataStore/DataSource/Timeline/Conference/ConferenceListDataSource.swift b/PyConJP/DataStore/DataSource/Timeline/Conference/ConferenceListDataSource.swift new file mode 100644 index 0000000..e08a6ca --- /dev/null +++ b/PyConJP/DataStore/DataSource/Timeline/Conference/ConferenceListDataSource.swift @@ -0,0 +1,49 @@ +// +// ConferenceListDataSource.swift +// PyConJP +// +// Created by Yutaro Muta on 2016/06/13. +// Copyright © 2016 PyCon JP. All rights reserved. +// + +import Foundation +import APIKit +import Result + +class ConferenceListDataSource: TimelineDataSource { + + private let loadTalksRequest: LoadTalksRequest + + init(day: String?) { + self.loadTalksRequest = LoadTalksRequest(day: day) + super.init() + } + + func getTalksFromAPI(completionHandler: @escaping ((Result) -> Void)) { + let request = TalksAPIRequest() + Session.send(request) { result in + switch result { + case .success(let talks): + try? SaveTalksRequest().save(talks: talks) + completionHandler(.success()) + case .failure(let error): + completionHandler(.failure(error)) + } + } + } + + func refreshData(completionHandler: @escaping ((Result) -> Void)) { + do { + let talks = try loadTalksRequest.load() + timelines.removeAll() + let keys = talks.map { $0.startTime }.unique() + for tuple in keys.enumerated() { + timelines.append(Timeline(time: keys[tuple.offset], talks: talks.filter { $0.startTime == keys[tuple.offset]})) + } + completionHandler(.success()) + } catch let error as NSError { + completionHandler(.failure(error)) + } + } + +} diff --git a/PyConJP/DataSource/Timeline/TimelineDataSource.swift b/PyConJP/DataStore/DataSource/Timeline/TimelineDataSource.swift similarity index 89% rename from PyConJP/DataSource/Timeline/TimelineDataSource.swift rename to PyConJP/DataStore/DataSource/Timeline/TimelineDataSource.swift index 2d707ef..7bf5a99 100644 --- a/PyConJP/DataSource/Timeline/TimelineDataSource.swift +++ b/PyConJP/DataStore/DataSource/Timeline/TimelineDataSource.swift @@ -1,6 +1,6 @@ // // TimelineDataSource.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 8/19/16. // Copyright © 2016 PyCon JP. All rights reserved. @@ -32,7 +32,7 @@ class TimelineDataSource: NSObject, UITableViewDataSource { guard let cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath) as? TalkTableViewCell else { fatalError("Could not create TalkTableViewCell") } - cell.fill(talkObject: timelines[(indexPath as NSIndexPath).section].talks[(indexPath as NSIndexPath).row]) + cell.fill(talkObject: timelines[indexPath.section].talks[indexPath.row]) return cell } } diff --git a/PyConJP/Extension/AppDelegateExtension.swift b/PyConJP/Extension/AppDelegateExtension.swift index 3630686..6607978 100644 --- a/PyConJP/Extension/AppDelegateExtension.swift +++ b/PyConJP/Extension/AppDelegateExtension.swift @@ -1,6 +1,6 @@ // // AppDelegateExtension.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/03/15. // Copyright © 2016 PyCon JP. All rights reserved. diff --git a/PyConJP/Extension/ArrayExtension.swift b/PyConJP/Extension/ArrayExtension.swift index 898a5ff..9ff52ad 100644 --- a/PyConJP/Extension/ArrayExtension.swift +++ b/PyConJP/Extension/ArrayExtension.swift @@ -1,12 +1,12 @@ // // ArrayExtension.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/07/22. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation extension Array where Element: Hashable { diff --git a/PyConJP/Extension/DateExtension.swift b/PyConJP/Extension/DateExtension.swift index 7ad3832..8778059 100644 --- a/PyConJP/Extension/DateExtension.swift +++ b/PyConJP/Extension/DateExtension.swift @@ -1,29 +1,65 @@ // // DateExtension.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 7/18/16. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation extension Date { - static private let dateFormatterInstance: DateFormatter = { + static func date(from string: String) -> Date? { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss" - return dateFormatter - }() + return dateFormatter.date(from: string) + } - static func date(from string: String) -> Date? { - return dateFormatterInstance.date(from: string) + var components: DateComponents { + let calendar = Calendar(identifier: Calendar.Identifier.gregorian) + return calendar.dateComponents([.year, .month, .day, .weekday, .hour, .minute], from: self) + } + + var hourClock: String? { + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = "h\na" + return dateFormatter.string(from: self) } func convertToTime() -> String { - let calender = Calendar(identifier: Calendar.Identifier.gregorian) - let components = (calender as NSCalendar).components([.year, .month, .day, .weekday, .hour, .minute], from: self) + let components = self.components return String(format: "%02d", components.hour!) + ":" + String(format: "%02d", components.minute!) } + func calculate(year: Int = 0, month: Int = 0, day: Int = 0, hour: Int = 0, minute: Int = 0, second: Int = 0) -> Date? { + + var components = self.components + components.year = (components.year ?? 0) + year + components.month = (components.month ?? 0) + month + components.day = (components.day ?? 0) + day + components.hour = (components.hour ?? 0) + hour + components.minute = (components.minute ?? 0) + minute + components.second = (components.second ?? 0) + second + + let calendar = Calendar(identifier: Calendar.Identifier.gregorian) + return calendar.date(from: components) + + } + + func update(year: Int? = nil, month: Int? = nil, day: Int? = nil, hour: Int? = nil, minute: Int? = nil, second: Int? = nil) -> Date? { + + var components = self.components + components.year = year ?? components.year + components.month = month ?? components.month + components.day = day ?? components.day + components.hour = hour ?? components.hour + components.minute = minute ?? components.minute + components.second = second ?? components.second + + let calendar = Calendar(identifier: Calendar.Identifier.gregorian) + return calendar.date(from: components) + + } + } diff --git a/PyConJP/Extension/StringExtension.swift b/PyConJP/Extension/StringExtension.swift index 48d8c0d..8309fff 100644 --- a/PyConJP/Extension/StringExtension.swift +++ b/PyConJP/Extension/StringExtension.swift @@ -1,12 +1,12 @@ // // StringExtension.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/07/22. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation extension String { diff --git a/PyConJP/Extension/UIColorExtension.swift b/PyConJP/Extension/UIColorExtension.swift index d175580..d2ff748 100644 --- a/PyConJP/Extension/UIColorExtension.swift +++ b/PyConJP/Extension/UIColorExtension.swift @@ -1,6 +1,6 @@ // // UIColorExtension.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 4/23/16. // Copyright © 2016 PyCon JP. All rights reserved. @@ -29,24 +29,18 @@ extension UIColor { extension UIColor { - struct PyConJP2016 { + struct PyConJP2017 { - static var red: UIColor { return #colorLiteral(red: 0.9215686275, green: 0.4274509804, blue: 0.6039215686, alpha: 1) } + static var navy: UIColor { return #colorLiteral(red: 0.1098039216, green: 0.4274509804, blue: 0.6235294118, alpha: 1) } - static var orange: UIColor { return #colorLiteral(red: 0.9450980392, green: 0.6, blue: 0.4588235294, alpha: 1) } + static var yellow: UIColor { return #colorLiteral(red: 0.8862745098, green: 0.6666666667, blue: 0.07843137255, alpha: 1) } - static var lightOrange: UIColor { return #colorLiteral(red: 0.9725490196, green: 0.7529411765, blue: 0.3450980392, alpha: 1) } + static var red: UIColor { return #colorLiteral(red: 0.8392156863, green: 0, blue: 0.2274509804, alpha: 1) } - static var yellow: UIColor { return #colorLiteral(red: 1, green: 0.8941176471, blue: 0.3725490196, alpha: 1) } - - static var lightGreen: UIColor { return #colorLiteral(red: 0.662745098, green: 0.7882352941, blue: 0.3215686275, alpha: 1) } - - static var green: UIColor { return #colorLiteral(red: 0.5254901961, green: 0.7843137255, blue: 0.6274509804, alpha: 1) } + static var gray: UIColor { return #colorLiteral(red: 0.7843137255, green: 0.7843137255, blue: 0.7843137255, alpha: 1) } - static var blue: UIColor { return #colorLiteral(red: 0.3294117647, green: 0.7607843137, blue: 0.9411764706, alpha: 1) } + static var favorite: UIColor { return #colorLiteral(red: 1, green: 1, blue: 0.5987487964, alpha: 1) } - static var gray: UIColor { return #colorLiteral(red: 0.7843137255, green: 0.7843137255, blue: 0.7843137255, alpha: 1) } - } static var twitter: UIColor { return #colorLiteral(red: 0.3333333333, green: 0.6745098039, blue: 0.9333333333, alpha: 1) } diff --git a/PyConJP/Extension/UIDeviceExtension.swift b/PyConJP/Extension/UIDeviceExtension.swift index 7fad644..edca0a9 100644 --- a/PyConJP/Extension/UIDeviceExtension.swift +++ b/PyConJP/Extension/UIDeviceExtension.swift @@ -1,6 +1,6 @@ // // UIDeviceExtension.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 9/20/16. // Copyright © 2016 PyCon JP. All rights reserved. diff --git a/PyConJP/Extension/UIImageViewExtension.swift b/PyConJP/Extension/UIImageViewExtension.swift new file mode 100644 index 0000000..cd07cbe --- /dev/null +++ b/PyConJP/Extension/UIImageViewExtension.swift @@ -0,0 +1,118 @@ +// +// UIImageViewExtension.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/13. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import UIKit +import Kingfisher + +extension UIImageView { + + @discardableResult + func setImage(withURL url: URL?, placeholder: Image? = nil, imageTrainsition: ImageTransition = .noTransition) -> RetrieveImageTask { + return self.kf.setImage(with: url, + placeholder: placeholder) { [weak self](image, _, _, _) in + self?.run(imageTrainsition, with: image) + } + } + + private func run(_ imageTransition: ImageTransition, with image: Image?) { + UIView.transition( + with: self, + duration: imageTransition.duration, + options: imageTransition.animationOptions, + animations: { imageTransition.animations(self, image) }, + completion: imageTransition.completion + ) + } + + /// Used to wrap all `UIView` animation transition options alongside a duration. + enum ImageTransition { + case noTransition + case crossDissolve(TimeInterval) + case curlDown(TimeInterval) + case curlUp(TimeInterval) + case flipFromBottom(TimeInterval) + case flipFromLeft(TimeInterval) + case flipFromRight(TimeInterval) + case flipFromTop(TimeInterval) + case custom( + duration: TimeInterval, + animationOptions: UIViewAnimationOptions, + animations: (UIImageView, Image?) -> Void, + completion: ((Bool) -> Void)? + ) + + /// The duration of the image transition in seconds. + var duration: TimeInterval { + switch self { + case .noTransition: + return 0.0 + case .crossDissolve(let duration): + return duration + case .curlDown(let duration): + return duration + case .curlUp(let duration): + return duration + case .flipFromBottom(let duration): + return duration + case .flipFromLeft(let duration): + return duration + case .flipFromRight(let duration): + return duration + case .flipFromTop(let duration): + return duration + case .custom(let duration, _, _, _): + return duration + } + } + + /// The animation options of the image transition. + var animationOptions: UIViewAnimationOptions { + switch self { + case .noTransition: + return UIViewAnimationOptions() + case .crossDissolve: + return .transitionCrossDissolve + case .curlDown: + return .transitionCurlDown + case .curlUp: + return .transitionCurlUp + case .flipFromBottom: + return .transitionFlipFromBottom + case .flipFromLeft: + return .transitionFlipFromLeft + case .flipFromRight: + return .transitionFlipFromRight + case .flipFromTop: + return .transitionFlipFromTop + case .custom(_, let animationOptions, _, _): + return animationOptions + } + } + + /// The animation options of the image transition. + var animations: ((UIImageView, Image?) -> Void) { + switch self { + case .custom(_, _, let animations, _): + return animations + default: + return { $0.image = $1 } + } + } + + /// The completion closure associated with the image transition. + var completion: ((Bool) -> Void)? { + switch self { + case .custom(_, _, _, let completion): + return completion + default: + return nil + } + } + } + +} diff --git a/PyConJP/Extension/UIStoryboardExtension.swift b/PyConJP/Extension/UIStoryboardExtension.swift new file mode 100644 index 0000000..56d1cb5 --- /dev/null +++ b/PyConJP/Extension/UIStoryboardExtension.swift @@ -0,0 +1,42 @@ +// +// UIStoryboardExtension.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/01. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import UIKit + +extension UIStoryboard { + + convenience init(storyboard: Storyboard, bundle: Bundle? = nil) { + self.init(name: storyboard.description, bundle: bundle) + } + + func instantiateViewController() -> T where T: StoryboardIdentifiable { + return self.instantiateViewController(withIdentifier: T.storyboardIdentifier) as! T + } + + enum Storyboard: CustomStringConvertible { + case main + case launch + case events + case conference + case bookmark + case more + + var description: String { + switch self { + case .main: return "Main" + case .launch: return "Launch" + case .events: return "Events" + case .conference: return "Conference" + case .bookmark: return "Bookmark" + case .more: return "More" + } + } + + } + +} diff --git a/PyConJP/Extension/UIViewExtension.swift b/PyConJP/Extension/UIViewExtension.swift index 03d9fd6..eaa6748 100644 --- a/PyConJP/Extension/UIViewExtension.swift +++ b/PyConJP/Extension/UIViewExtension.swift @@ -1,6 +1,6 @@ // // UIViewExtension.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/08/02. // Copyright © 2016 PyCon JP. All rights reserved. diff --git a/PyConJP/Model/APIRequest/StaffListAPIRequest.swift b/PyConJP/Model/APIRequest/StaffListAPIRequest.swift new file mode 100644 index 0000000..662d0d5 --- /dev/null +++ b/PyConJP/Model/APIRequest/StaffListAPIRequest.swift @@ -0,0 +1,31 @@ +// +// StaffListAPIRequest.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/12. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation +import APIKit +import WebAPIFramework + +struct StaffListAPIRequest: GitHubRequest { + + var method: HTTPMethod { + return .get + } + + var path: String { + return "stafflist.json" + } + + func response(from object: Any, urlResponse: HTTPURLResponse) throws -> [Staff] { + guard let dictionary = object as? [String: Any], + let staffList = dictionary["staffList"] as? [Any] else { + throw ResponseError.unexpectedObject(object) + } + return staffList.flatMap({ Staff(object: $0) }) + } + +} diff --git a/PyConJP/Model/APIRequest/TalkDetailAPIRequest.swift b/PyConJP/Model/APIRequest/TalkDetailAPIRequest.swift new file mode 100644 index 0000000..0a77dcd --- /dev/null +++ b/PyConJP/Model/APIRequest/TalkDetailAPIRequest.swift @@ -0,0 +1,36 @@ +// +// TalkDetailAPIRequest.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/12. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation +import APIKit +import WebAPIFramework + +struct TalkDetailAPIRequest: PyConJPRequest { + + let id: Int + + var method: HTTPMethod { + return .get + } + + var path: String { + return "presentation/\(id)/" + } + + init(id: Int) { + self.id = id + } + + func response(from object: Any, urlResponse: HTTPURLResponse) throws -> TalkDetail { + guard let talkDetail = TalkDetail(object: object) else { + throw ResponseError.unexpectedObject(object) + } + return talkDetail + } + +} diff --git a/PyConJP/Model/APIRequest/TalksAPIRequest.swift b/PyConJP/Model/APIRequest/TalksAPIRequest.swift new file mode 100644 index 0000000..e9a2913 --- /dev/null +++ b/PyConJP/Model/APIRequest/TalksAPIRequest.swift @@ -0,0 +1,33 @@ +// +// TalksAPIRequest.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/12. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation +import APIKit +import Result +import RealmSwift +import WebAPIFramework + +struct TalksAPIRequest: PyConJPRequest { + + var method: HTTPMethod { + return .get + } + + var path: String { + return "talks/list/" + } + + func response(from object: Any, urlResponse: HTTPURLResponse) throws -> [TalkObject] { + guard let dictionary = object as? [String: Any], + let presentations = dictionary["presentations"] as? [Any] else { + throw ResponseError.unexpectedObject(object) + } + return presentations.flatMap({ TalkObject(object: $0) }) + } + +} diff --git a/PyConJP/Model/Class/TalkObject.swift b/PyConJP/Model/Class/TalkObject.swift index 721ba10..c9499e6 100644 --- a/PyConJP/Model/Class/TalkObject.swift +++ b/PyConJP/Model/Class/TalkObject.swift @@ -1,70 +1,151 @@ // // TalkObject.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 7/11/16. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation +import APIKit import RealmSwift -class TalkObject: RealmSwift.Object { - dynamic var id = 0 - dynamic var title = "" - dynamic var descriptionText = "" - dynamic var speakers = "" - dynamic var date: Date? - dynamic var day = "" - dynamic var startTime = "" - dynamic var endTime = "" - dynamic var periodTime = "" - dynamic var category = "" - dynamic var place = "" - dynamic var language = "" - dynamic var favorited = false +final class TalkObject: RealmSwift.Object { - convenience init(dictionary: [String: Any]) { + dynamic var id: Int = 0 + dynamic var title: String = "" + dynamic var descriptionText: String = "" + dynamic var speakers: String = "" + dynamic var startDate: Date = Date() + dynamic var endDate: Date = Date() + dynamic var day: String = "" + dynamic var startTime: String = "" + dynamic var endTime: String = "" + dynamic var category: String = "" + dynamic var roomString: String = "" + dynamic var languageString: String = "" + dynamic var isFavorite: Bool = false + + convenience init(id: Int, title: String, descriptionText: String, speakers: String, startDate: Date, endDate: Date, day: String, startTime: String, endTime: String, category: String, roomString: String, languageString: String, isFavorite: Bool) { self.init() - id = dictionary["id"] as? Int ?? 0 - title = dictionary["title"] as? String ?? "" - descriptionText = dictionary["description"] as? String ?? "" - speakers = (dictionary["speakers"] as? [String] ?? []).enumerated().reduce("") { + self.id = id + self.title = title + self.descriptionText = descriptionText + self.speakers = speakers + self.startDate = startDate + self.endDate = endDate + self.day = day + self.startTime = startTime + self.endTime = endTime + self.category = category + self.roomString = roomString + self.languageString = languageString + self.isFavorite = isFavorite + } + + convenience init?(dictionary: [String: Any]) { + guard let id = dictionary["id"] as? Int, + let title = dictionary["title"] as? String, + let descriptionText = dictionary["description"] as? String, + let day = dictionary["day"] as? String, + let startTime = dictionary["start"] as? String, + let startDate = Date.date(from: day + " " + startTime), + let endTime = dictionary["end"] as? String, + let endDate = Date.date(from: day + " " + endTime), + let category = dictionary["category"] as? String, + let roomString = dictionary["rooms"] as? String, + let language = dictionary["language"] as? String else { return nil } + + let speakers = (dictionary["speakers"] as? [String] ?? []).enumerated().reduce("") { $0 + $1.element + ((dictionary["speakers"] as? [String] ?? []).count - 1 == $1.offset ? "" : ", ") } - date = Date.date(from: (dictionary["day"] as? String ?? "") + " " + (dictionary["start"] as? String ?? "")) - day = dictionary["day"] as? String ?? "" - startTime = dictionary["start"] as? String ?? "" - endTime = dictionary["end"] as? String ?? "" - periodTime = (dictionary["start"] as? String ?? "").timeStringByTrimmingSecond() + " ~ " + (dictionary["end"] as? String ?? "").timeStringByTrimmingSecond() - category = dictionary["category"] as? String ?? "" - place = dictionary["rooms"] as? String ?? "" - language = dictionary["language"] as? String ?? "" + + let isFavorite: Bool = { + let realm = try? Realm() + guard let localTalkObject = (realm?.objects(TalkObject.self).filter("id == %@", id).map { $0 })?.first else { return false } + return localTalkObject.isFavorite + }() - do { - let realm = try Realm() - if let localTalkObject = (realm.objects(TalkObject.self).filter("id == %@", id).map { $0 }).first { - favorited = localTalkObject.favorited - } - } catch { - + self.init(id: id, + title: title, + descriptionText: descriptionText, + speakers: speakers, + startDate: startDate, + endDate: endDate, + day: day, + startTime: startTime, + endTime: endTime, + category: category, + roomString: roomString, + languageString: language, + isFavorite: isFavorite) + } + + convenience init?(object: Any) { + guard let dictionary = object as? [String: Any] else { + return nil } + self.init(dictionary: dictionary) } + convenience init(_ talk: Talk) { + let speakersString = talk.speakers.enumerated().reduce("") { + $0 + $1.element + (talk.speakers.count - 1 == $1.offset ? "" : ", ") + } + let isFavorite: Bool = { + let realm = try? Realm() + guard let localTalkObject = (realm?.objects(TalkObject.self).filter("id == %@", talk.id).map { $0 })?.first else { return false } + return localTalkObject.isFavorite + }() + self.init(id: talk.id, + title: talk.title, + descriptionText: talk.description, + speakers: speakersString, + startDate: talk.startDate, + endDate: talk.endDate, + day: talk.day, + startTime: talk.startTime, + endTime: talk.endTime, + category: talk.category, + roomString: talk.room.description, + languageString: talk.language.description, + isFavorite: isFavorite) + } + override static func primaryKey() -> String? { return "id" } - var languageType: Language? { - return Language(rawValue: language) + var periodTime: String { + return startTime.timeStringByTrimmingSecond() + " ~ " + endTime.timeStringByTrimmingSecond() + } + + var minutesDuration: Int { + return Int(endDate.timeIntervalSince(startDate) / 60) + } + + var language: Language? { + return Language(languageString) } var placeNumber: String { - return self.place.components(separatedBy: CharacterSet.decimalDigits.inverted).last ?? "" + return self.roomString.components(separatedBy: CharacterSet.decimalDigits.inverted).last ?? "" } - var room: TalkRoom? { - return TalkRoom(rawValue: place) + var room: Room? { + return Room(roomString) + } + + func invertFavorite() throws { + do { + self.isFavorite = !self.isFavorite + let realm = try Realm() + try realm.write({ + realm.create(TalkObject.self, value: ["id": self.id, "isFavorite": self.isFavorite], update: true) + }) + } catch { + throw error + } } } diff --git a/PyConJP/Model/Enum/Error/RealmError.swift b/PyConJP/Model/Enum/Error/RealmError.swift new file mode 100644 index 0000000..ee2c708 --- /dev/null +++ b/PyConJP/Model/Enum/Error/RealmError.swift @@ -0,0 +1,14 @@ +// +// RealmError.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/01. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation + +enum RealmError: Error { + case failureLoad + case failureSave +} diff --git a/PyConJP/Model/Enum/Language.swift b/PyConJP/Model/Enum/Language.swift index 32d9f17..2e7fb2a 100644 --- a/PyConJP/Model/Enum/Language.swift +++ b/PyConJP/Model/Enum/Language.swift @@ -1,22 +1,44 @@ // // Language.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 7/11/16. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation -enum Language: String { - case En = "en" - case Ja = "ja" +enum Language: CustomStringConvertible { + case en + case ja + + var description: String { + switch self { + case .en: + return "en" + case .ja: + return "ja" + } + } var localized: String { switch self { - case .En: return NSLocalizedString("English", tableName: "Language", comment: "") - case .Ja: return NSLocalizedString("Japanese", tableName: "Language", comment: "") + case .en: + return NSLocalizedString("english", tableName: "Language", comment: "") + case .ja: + return NSLocalizedString("japanese", tableName: "Language", comment: "") } } + + init?(_ string: String) { + switch string { + case Language.en.description: + self = .en + case Language.ja.description: + self = .ja + default: + return nil + } + } } diff --git a/PyConJP/Model/Enum/NotificationType.swift b/PyConJP/Model/Enum/NotificationType.swift new file mode 100644 index 0000000..cfaf6d1 --- /dev/null +++ b/PyConJP/Model/Enum/NotificationType.swift @@ -0,0 +1,35 @@ +// +// NotificationType.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/15. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation + +enum NotificationType: CustomStringConvertible { + case information + case talk + + var description: String { + switch self { + case .information: + return "information" + case .talk: + return "talk" + } + } + + init?(_ stting: String) { + switch stting { + case NotificationType.information.description: + self = .information + case NotificationType.talk.description: + self = .talk + default: + return nil + } + } + +} diff --git a/PyConJP/Model/Enum/PyConJPDate.swift b/PyConJP/Model/Enum/PyConJPDate.swift index 147cd52..fe74e00 100644 --- a/PyConJP/Model/Enum/PyConJPDate.swift +++ b/PyConJP/Model/Enum/PyConJPDate.swift @@ -1,20 +1,29 @@ // // PyConJPDate.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/08/04. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation -enum PyConJPDate: String { - case Tutorials = "2016-09-20" - case Confarence1 = "2016-09-21" - case Confarence2 = "2016-09-22" - case Sprints = "2016-09-23" +enum PyConJPDate: CustomStringConvertible { + case tutorials + case confarence1 + case confarence2 + case sprints + + var description: String { + switch self { + case .tutorials: return "2017-09-07" + case .confarence1: return "2017-09-08" + case .confarence2: return "2017-09-09" + case .sprints: return "2017-09-10" + } + } static func confarenceDate() -> [PyConJPDate] { - return [Confarence1, Confarence2] + return [confarence1, confarence2] } } diff --git a/PyConJP/Model/Enum/Result.swift b/PyConJP/Model/Enum/Result.swift deleted file mode 100644 index a9c7021..0000000 --- a/PyConJP/Model/Enum/Result.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// Result.swift -// PyConJP2016 -// -// Created by Yutaro Muta on 2016/08/10. -// Copyright © 2016 PyCon JP. All rights reserved. -// - -import Foundation - -enum Result { - case success(Value) - case failure(Error) - - var isSuccess: Bool { - switch self { - case .success: return true - case .failure: return false - } - } - - var isFailure: Bool { - return !isSuccess - } - - var value: Value? { - switch self { - case .success(let value): return value - case .failure: return nil - } - } - - var error: Error? { - switch self { - case .success: return nil - case .failure(let error): return error - } - } - -} diff --git a/PyConJP/Model/Enum/Room.swift b/PyConJP/Model/Enum/Room.swift index 6a2e377..5ddefa8 100644 --- a/PyConJP/Model/Enum/Room.swift +++ b/PyConJP/Model/Enum/Room.swift @@ -1,6 +1,6 @@ // // Room.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 8/7/16. // Copyright © 2016 PyCon JP. All rights reserved. @@ -8,40 +8,53 @@ import UIKit -enum TalkRoom: String { - case Room201 = "Room 201" - case Room202 = "Room 202" - case Room203 = "Room 203" - case Room204 = "Room 204" - case Room205 = "Room 205" +enum Room: CustomStringConvertible { + case room201 + case room202 + case room203 + + static var rooms: [Room] { + return [.room201, .room202, .room203] + } + + var description: String { + switch self { + case .room201: return "Room 201" + case .room202: return "Room 202" + case .room203: return "Room 203" + } + } var number: Int { switch self { - case .Room201: return 201 - case .Room202: return 202 - case .Room203: return 203 - case .Room204: return 204 - case .Room205: return 205 + case .room201: return 201 + case .room202: return 202 + case .room203: return 203 } } var color: UIColor { switch self { - case .Room201: return UIColor.PyConJP2016.orange - case .Room202: return UIColor.PyConJP2016.lightOrange - case .Room203: return UIColor.PyConJP2016.yellow - case .Room204: return UIColor.PyConJP2016.lightGreen - case .Room205: return UIColor.PyConJP2016.green + case .room201: return UIColor.PyConJP2017.navy + case .room202: return UIColor.PyConJP2017.yellow + case .room203: return UIColor.PyConJP2017.red } } var hashTag: String { switch self { - case .Room201: return "#pyconjp_201" - case .Room202: return "#pyconjp_202" - case .Room203: return "#pyconjp_203" - case .Room204: return "#pyconjp_204" - case .Room205: return "#pyconjp_205" + case .room201: return "#pyconjp_201" + case .room202: return "#pyconjp_202" + case .room203: return "#pyconjp_203" + } + } + + init?(_ string: String) { + switch string { + case Room.room201.description: self = .room201 + case Room.room202.description: self = .room202 + case Room.room203.description: self = .room203 + default: return nil } } diff --git a/PyConJP/Model/Realm/LoadFavoriteTalksRequest.swift b/PyConJP/Model/Realm/LoadFavoriteTalksRequest.swift new file mode 100644 index 0000000..343ac49 --- /dev/null +++ b/PyConJP/Model/Realm/LoadFavoriteTalksRequest.swift @@ -0,0 +1,18 @@ +// +// LoadFavoriteTalksRequest.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/16. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation +import RealmSwift + +struct LoadFavoriteTalksRequest: RealmLoadTalksProtocol { + + let filterPredicate = NSPredicate(format: "isFavorite == %@", true as CVarArg) + let sortProperties = [SortDescriptor(keyPath: "startDate", ascending: true), + SortDescriptor(keyPath: "roomString", ascending: true)] + +} diff --git a/PyConJP/Model/Realm/LoadTalksRequest.swift b/PyConJP/Model/Realm/LoadTalksRequest.swift new file mode 100644 index 0000000..c5766e1 --- /dev/null +++ b/PyConJP/Model/Realm/LoadTalksRequest.swift @@ -0,0 +1,22 @@ +// +// LoadTalksRequest.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/16. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation +import RealmSwift + +struct LoadTalksRequest: RealmLoadTalksProtocol { + + let filterPredicate: NSPredicate + let sortProperties = [SortDescriptor(keyPath: "startDate", ascending: true), + SortDescriptor(keyPath: "roomString", ascending: true)] + + init(day: String?) { + self.filterPredicate = NSPredicate(format: "day == %@", day ?? "") + } + +} diff --git a/PyConJP/Model/Realm/SaveTalksRequest.swift b/PyConJP/Model/Realm/SaveTalksRequest.swift new file mode 100644 index 0000000..2a99e14 --- /dev/null +++ b/PyConJP/Model/Realm/SaveTalksRequest.swift @@ -0,0 +1,13 @@ +// +// SaveTalksRequest.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/16. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation +import Result +import RealmSwift + +struct SaveTalksRequest: RealmSaveTalksProtocol {} diff --git a/PyConJP/Model/Struct/Category.swift b/PyConJP/Model/Struct/Category.swift index f4e7c08..2b2d820 100644 --- a/PyConJP/Model/Struct/Category.swift +++ b/PyConJP/Model/Struct/Category.swift @@ -1,12 +1,12 @@ // // Category.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/04/27. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation struct Category { diff --git a/PyConJP/Model/Struct/Level.swift b/PyConJP/Model/Struct/Level.swift index c8c4f7b..705f7a1 100644 --- a/PyConJP/Model/Struct/Level.swift +++ b/PyConJP/Model/Struct/Level.swift @@ -1,12 +1,12 @@ // // Level.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/02/22. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation struct Level { diff --git a/PyConJP/Model/Struct/Place.swift b/PyConJP/Model/Struct/Place.swift index 9db84eb..a9dabfb 100644 --- a/PyConJP/Model/Struct/Place.swift +++ b/PyConJP/Model/Struct/Place.swift @@ -1,12 +1,12 @@ // // Place.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/02/22. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation struct Place { diff --git a/PyConJP/Model/Struct/Speaker.swift b/PyConJP/Model/Struct/Speaker.swift index 46ea722..1dcd8f6 100644 --- a/PyConJP/Model/Struct/Speaker.swift +++ b/PyConJP/Model/Struct/Speaker.swift @@ -1,12 +1,12 @@ // // Speaker.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/02/22. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation struct Speaker { diff --git a/PyConJP/Model/Struct/Staff.swift b/PyConJP/Model/Struct/Staff.swift index 794ba5c..49e5c60 100644 --- a/PyConJP/Model/Struct/Staff.swift +++ b/PyConJP/Model/Struct/Staff.swift @@ -1,12 +1,12 @@ // // Staff.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 9/10/16. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation struct Staff { @@ -20,12 +20,22 @@ struct Staff { extension Staff { - init(dictionary: [String: Any]) { - self.init(team: dictionary["team"] as? String ?? "", - name: dictionary["name"] as? String ?? "", - role: dictionary["title"] as? String ?? "", + init?(dictionary: [String: Any]) { + guard let team = dictionary["team"] as? String, + let name = dictionary["name"] as? String, + let role = dictionary["title"] as? String else { + return nil + } + self.init(team: team, + name: name, + role: role, twitter: dictionary["twitter"] as? String ?? "", facebook: dictionary["facebook"] as? String ?? "") } + init?(object: Any) { + guard let dictionary = object as? [String: Any] else { return nil } + self.init(dictionary: dictionary) + } + } diff --git a/PyConJP/Model/Struct/Talk.swift b/PyConJP/Model/Struct/Talk.swift index 1c004dd..ff87d1e 100644 --- a/PyConJP/Model/Struct/Talk.swift +++ b/PyConJP/Model/Struct/Talk.swift @@ -1,58 +1,75 @@ // // Talk.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 7/11/16. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation struct Talk { let id: Int let title: String let description: String - let speakers: [String]? - let date: Date? + let speakers: [String] + let startDate: Date + let endDate: Date let day: String let startTime: String let endTime: String - let periodTime: String let category: String - let place: String + let room: Room let language: Language } extension Talk { - init(id: Int, title: String, description: String, speakers: [String]?, day: String, startTime: String, endTime: String, category: String, place: String, language: String) { - self.id = id - self.title = title - self.description = description - self.speakers = speakers - self.date = Date.date(from: day + " " + startTime) - self.day = day - self.startTime = startTime - self.endTime = endTime - self.periodTime = startTime.timeStringByTrimmingSecond() + " ~ " + endTime.timeStringByTrimmingSecond() - self.category = category - self.place = place - self.language = Language(rawValue: language) ?? .En + init?(dictionary: [String: Any]) { + guard let id = dictionary["id"] as? Int, + let title = dictionary["title"] as? String, + let description = dictionary["description"] as? String, + let speakers = dictionary["speakers"] as? [String], + let day = dictionary["day"] as? String, + let startTime = dictionary["start"] as? String, + let startDate = Date.date(from: day + " " + startTime), + let endTime = dictionary["end"] as? String, + let endDate = Date.date(from: day + " " + endTime), + let category = dictionary["category"] as? String, + let room = Room(dictionary["rooms"] as? String ?? ""), + let language = Language(dictionary["language"] as? String ?? "") else { return nil } + + self.init(id: id, + title: title, + description: description, + speakers: speakers, + startDate: startDate, + endDate: endDate, + day: day, + startTime: startTime, + endTime: endTime, + category: category, + room: room, + language: language) } - init(dictionary: [String: Any]) { - self.init(id: dictionary["id"] as? Int ?? 0, - title: dictionary["title"] as? String ?? "", - description: dictionary["description"] as? String ?? "", - speakers: dictionary["speakers"] as? [String], - day: dictionary["day"] as? String ?? "", - startTime: dictionary["start"] as? String ?? "", - endTime: dictionary["end"] as? String ?? "", - category: dictionary["category"] as? String ?? "", - place: dictionary["rooms"] as? String ?? "", - language: dictionary["language"] as? String ?? "") + init?(_ talkObject: TalkObject) { + guard let room = talkObject.room, + let language = talkObject.language else { return nil } + self.init(id: talkObject.id, + title: talkObject.title, + description: talkObject.descriptionText, + speakers: talkObject.speakers.components(separatedBy: ", "), + startDate: talkObject.startDate, + endDate: talkObject.endDate, + day: talkObject.day, + startTime: talkObject.startTime, + endTime: talkObject.endTime, + category: talkObject.category, + room: room, + language: language) } } diff --git a/PyConJP/Model/Struct/TalkDetail.swift b/PyConJP/Model/Struct/TalkDetail.swift index 1bed5ee..1ea0099 100644 --- a/PyConJP/Model/Struct/TalkDetail.swift +++ b/PyConJP/Model/Struct/TalkDetail.swift @@ -1,12 +1,12 @@ // // TalkDetail.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/02/22. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation struct TalkDetail { @@ -19,11 +19,19 @@ struct TalkDetail { extension TalkDetail { - init(dictionary: [String: Any]) { - self.init(talkObject: TalkObject(dictionary: dictionary), - speakers: (dictionary["speaker_infomations"] as? [[String: Any]] ?? []).map({ Speaker.init(dictionary: $0) }), - abstract: dictionary["abstract"] as? String ?? "", - level: dictionary["level"] as? String ?? "") + init?(dictionary: [String: Any]) { + guard let talkObject = TalkObject(dictionary: dictionary), + let abstract = dictionary["abstract"] as? String, + let level = dictionary["level"] as? String else { return nil } + self.init(talkObject: talkObject, + speakers: (dictionary["speaker_infomations"] as? [[String: Any]] ?? []).map({ Speaker(dictionary: $0) }), + abstract: abstract, + level: level) } + init?(object: Any) { + guard let dictionary = object as? [String: Any] else { return nil} + self.init(dictionary: dictionary) + } + } diff --git a/PyConJP/Model/Struct/Team.swift b/PyConJP/Model/Struct/Team.swift index 2edb16b..c5e802f 100644 --- a/PyConJP/Model/Struct/Team.swift +++ b/PyConJP/Model/Struct/Team.swift @@ -1,12 +1,12 @@ // // Team.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 9/10/16. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation struct Team { diff --git a/PyConJP/Model/Struct/Timeline.swift b/PyConJP/Model/Struct/Timeline.swift index b812869..a4a06d1 100644 --- a/PyConJP/Model/Struct/Timeline.swift +++ b/PyConJP/Model/Struct/Timeline.swift @@ -1,12 +1,12 @@ // // Timeline.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 2016/07/21. // Copyright © 2016 PyCon JP. All rights reserved. // -import UIKit +import Foundation struct Timeline { diff --git a/PyConJP/Model/Struct/Timetable.swift b/PyConJP/Model/Struct/Timetable.swift new file mode 100644 index 0000000..c5a2c57 --- /dev/null +++ b/PyConJP/Model/Struct/Timetable.swift @@ -0,0 +1,53 @@ +// +// Timetable.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/01. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation + +struct Timetable { + + let tracks: [Track] + + var rooms: [Room] { + return tracks.map({ $0.room }) + } + + var start: Date? { + return tracks.flatMap({ $0.start }).min() + } + + var end: Date? { + return tracks.flatMap({ $0.end }).max() + } + + var duration: Double? { + guard let start = start, + let end = end else { return nil } + return end.timeIntervalSince(start) + } + + var minutesDuration: Int { + return Int((duration ?? 0) / 60) + } + + var hours: Int { + return minutesDuration / 60 + } + + var hourDuration: [Int] { + guard let startHourClock = start?.components.hour, + let endHourClock = end?.components.hour else { return [] } + return Array(startHourClock...endHourClock) + } + + init(talks: [TalkObject]) { + self.tracks = Room.rooms.map { room -> Track in + Track(room: room, talks: talks.filter({ $0.room == room })) + } + } + +} diff --git a/PyConJP/Model/Struct/Track.swift b/PyConJP/Model/Struct/Track.swift new file mode 100644 index 0000000..4d13371 --- /dev/null +++ b/PyConJP/Model/Struct/Track.swift @@ -0,0 +1,24 @@ +// +// Track.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/01. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation + +struct Track { + + let room: Room + let talks: [TalkObject] + + var start: Date? { + return talks.flatMap({ $0.startDate }).min() + } + + var end: Date? { + return talks.flatMap({ $0.endDate }).max() + } + +} diff --git a/PyConJP/Protocol/DummyJSON/DummyTalkDetailProtocol.swift b/PyConJP/Protocol/DummyJSON/DummyTalkDetailProtocol.swift new file mode 100644 index 0000000..c01539f --- /dev/null +++ b/PyConJP/Protocol/DummyJSON/DummyTalkDetailProtocol.swift @@ -0,0 +1,36 @@ +// +// DummyTalkDetailProtocol.swift +// PyConJP +// +// Created by Yutaro Muta on 2016/12/18. +// Copyright © 2016 PyCon JP. All rights reserved. +// + +import Foundation +import Result + +protocol DummyTalkDetailProtocol { + + func getTalksFromLocalDummyJSON(completionHandler: ((Result) -> Void)) + +} + +extension DummyTalkDetailProtocol { + + func getTalkDetailFromLocalDummyJSON(completionHandler: ((Result) -> Void)) { + let path = Bundle.main.path(forResource: "DummyTalkDetail", ofType: "json") + let fileHandle = FileHandle(forReadingAtPath: path!) + let data = fileHandle?.readDataToEndOfFile() + + do { + let dictionary = try JSONSerialization.jsonObject(with: data!, options: .allowFragments) as! [String: Any] + + let talkDetail = TalkDetail(dictionary: dictionary)! + completionHandler(.success(talkDetail)) + } catch let error as NSError { + completionHandler(.failure(error)) + } + + } + +} diff --git a/PyConJP/Protocol/DummyJSON/DummyTalksProtocol.swift b/PyConJP/Protocol/DummyJSON/DummyTalksProtocol.swift new file mode 100644 index 0000000..d0d64cb --- /dev/null +++ b/PyConJP/Protocol/DummyJSON/DummyTalksProtocol.swift @@ -0,0 +1,31 @@ +// +// DummyTalksProtocol.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/14. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation +import Result + +protocol DummyTalksProtocol { + + func getTalksFromLocalDummyJSON(completionHandler: ((Result<[TalkObject], NSError>) -> Void)) + +} + +extension DummyTalksProtocol { + + func getTalksFromLocalDummyJSON(completionHandler: ((Result<[TalkObject], NSError>) -> Void)) { + let path = Bundle.main.path(forResource: "DummyTalks", ofType: "json") + let fileHandle = FileHandle(forReadingAtPath: path!) + let data = fileHandle?.readDataToEndOfFile() + let dictionary = try! JSONSerialization.jsonObject(with: data!, options: .allowFragments) as! [String: Any] + let presentations = dictionary["presentations"] as? [[String: Any]] ?? [[String: Any]]() + + completionHandler(.success(presentations.flatMap({ TalkObject(object: $0) }))) + + } + +} diff --git a/PyConJP/Protocol/ErrorAlertProtocol.swift b/PyConJP/Protocol/ErrorAlertProtocol.swift index c1cabf7..2571226 100644 --- a/PyConJP/Protocol/ErrorAlertProtocol.swift +++ b/PyConJP/Protocol/ErrorAlertProtocol.swift @@ -1,6 +1,6 @@ // // ErrorAlertProtocol.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 4/23/16. // Copyright © 2016 PyCon JP. All rights reserved. diff --git a/PyConJP/Protocol/GestureProtocol.swift b/PyConJP/Protocol/GestureProtocol.swift index 50bf1ae..6622e2b 100644 --- a/PyConJP/Protocol/GestureProtocol.swift +++ b/PyConJP/Protocol/GestureProtocol.swift @@ -1,6 +1,6 @@ // // GestureProtocol.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 9/13/16. // Copyright © 2016 PyCon JP. All rights reserved. diff --git a/PyConJP/Manager/Notification/LocalNotificationManager.swift b/PyConJP/Protocol/Notification/LocalNotificationProtocol.swift similarity index 54% rename from PyConJP/Manager/Notification/LocalNotificationManager.swift rename to PyConJP/Protocol/Notification/LocalNotificationProtocol.swift index b0c68ad..1e2cd95 100644 --- a/PyConJP/Manager/Notification/LocalNotificationManager.swift +++ b/PyConJP/Protocol/Notification/LocalNotificationProtocol.swift @@ -1,6 +1,6 @@ // -// LocalNotificationManager.swift -// PyConJP2016 +// LocalNotificationProtocol.swift +// PyConJP // // Created by Yutaro Muta on 3/13/16. // Copyright © 2016 PyCon JP. All rights reserved. @@ -8,35 +8,28 @@ import UIKit -class LocalNotificationManager: NSObject { +protocol LocalNotificationProtocol {} + +extension LocalNotificationProtocol { func makeNotification(talkDetail: TalkDetail) -> Bool { - guard let date = talkDetail.talkObject.date else { return false } - let calendar = Calendar(identifier: Calendar.Identifier.gregorian) - let fireDate = (calendar as NSCalendar?)?.date(byAdding: .minute, value: -10, to: date as Date, options: NSCalendar.Options()) + guard let date = calendar.date(byAdding: .minute, value: -10, to: talkDetail.talkObject.startDate), + date.timeIntervalSinceNow > 0 else { return false } - if fireDate!.timeIntervalSinceNow > 0 { - self.schedule(talkDetail: talkDetail) - return true - } else { - return false - } + self.schedule(talkDetail: talkDetail, at: date) + return true } - private func schedule(talkDetail: TalkDetail) { + private func schedule(talkDetail: TalkDetail, at date: Date) { - guard let date = talkDetail.talkObject.date else { return } - - let calendar = Calendar(identifier: Calendar.Identifier.gregorian) - let fireDate = (calendar as NSCalendar?)?.date(byAdding: .minute, value: -10, to: date as Date, options: NSCalendar.Options()) - let userInfo = ["type": "Talk", "id": talkDetail.talkObject.id] as [AnyHashable: Any] + let userInfo = ["type": NotificationType.talk.description, "id": talkDetail.talkObject.id] as [AnyHashable: Any] let notificaiton = UILocalNotification() - notificaiton.fireDate = fireDate + notificaiton.fireDate = date notificaiton.timeZone = TimeZone.current - notificaiton.alertBody = "10分後に \" \(talkDetail.talkObject.title) \" が開始します。 \(talkDetail.talkObject.place)" + notificaiton.alertBody = "10分後に \" \(talkDetail.talkObject.title) \" が開始します。 \(talkDetail.talkObject.room?.description ?? "")" notificaiton.userInfo = userInfo UIApplication.shared.scheduleLocalNotification(notificaiton) diff --git a/PyConJP/Manager/Notification/ReceiveLocalNotificationManager.swift b/PyConJP/Protocol/Notification/ReceiveLocalNotificationProtocol.swift similarity index 52% rename from PyConJP/Manager/Notification/ReceiveLocalNotificationManager.swift rename to PyConJP/Protocol/Notification/ReceiveLocalNotificationProtocol.swift index 19c55eb..67703c3 100644 --- a/PyConJP/Manager/Notification/ReceiveLocalNotificationManager.swift +++ b/PyConJP/Protocol/Notification/ReceiveLocalNotificationProtocol.swift @@ -1,6 +1,6 @@ // -// ReceiveLocalNotificationManager.swift -// PyConJP2016 +// ReceiveLocalNotificationProtocol.swift +// PyConJP // // Created by Yutaro Muta on 2016/03/15. // Copyright © 2016 PyCon JP. All rights reserved. @@ -8,12 +8,19 @@ import UIKit -class ReceiveLocalNotificationManager: NSObject { +protocol ReceiveLocalNotificationProtocol {} + +extension ReceiveLocalNotificationProtocol { - func application(_ application: UIApplication, didReceiveLocalNotification userInfo: [AnyHashable: Any]) { - guard let type = userInfo["type"] as? String, let id = userInfo["id"] as? Int, let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } - switch type { - case "Talk" where application.applicationState == .active: + func handle(_ application: UIApplication, didReceiveLocalNotification notification: UILocalNotification) { + guard let type = notification.userInfo?["type"] as? String, + let id = notification.userInfo?["id"] as? Int, + let appDelegate = UIApplication.shared.delegate as? AppDelegate, + let notificationType = NotificationType(type) else { return } + + switch notificationType { + case .information:break + case .talk where application.applicationState == .active: let alertController = UIAlertController(title: "", message: "", preferredStyle: .alert) alertController.addAction(UIAlertAction(title: "閉じる", style: .default, handler: nil)) alertController.addAction(UIAlertAction(title: "詳細へ", style: .default, handler: { _ -> Void in @@ -22,10 +29,8 @@ class ReceiveLocalNotificationManager: NSObject { if let appDelegate = UIApplication.shared.delegate as? AppDelegate { appDelegate.showAlert(alertController: alertController) } - case "Talk" where application.applicationState == .inactive: + case .talk where application.applicationState == .inactive: appDelegate.openTalkDetailViewController(id: id) - case "Information": - break default: break } diff --git a/PyConJP/Protocol/Realm/RealmLoadTalksProtocol.swift b/PyConJP/Protocol/Realm/RealmLoadTalksProtocol.swift new file mode 100644 index 0000000..824651d --- /dev/null +++ b/PyConJP/Protocol/Realm/RealmLoadTalksProtocol.swift @@ -0,0 +1,30 @@ +// +// RealmLoadTalksProtocol.swift +// PyConJP +// +// Created by Yutaro Muta on 2016/08/18. +// Copyright © 2016 PyCon JP. All rights reserved. +// + +import Foundation +import RealmSwift + +protocol RealmLoadTalksProtocol { + var filterPredicate: NSPredicate { get } + var sortProperties: [SortDescriptor] { get } + + func load() throws -> [TalkObject] +} + +extension RealmLoadTalksProtocol { + + func load() throws -> [TalkObject] { + do { + let realm = try Realm() + return Array(realm.objects(TalkObject.self).filter(filterPredicate).sorted(by: sortProperties)) + } catch { + throw error + } + } + +} diff --git a/PyConJP/Protocol/Realm/RealmSaveTalksProtocol.swift b/PyConJP/Protocol/Realm/RealmSaveTalksProtocol.swift new file mode 100644 index 0000000..f3bc3e6 --- /dev/null +++ b/PyConJP/Protocol/Realm/RealmSaveTalksProtocol.swift @@ -0,0 +1,33 @@ +// +// RealmSaveTalksProtocol.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/13. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation +import RealmSwift + +protocol RealmSaveTalksProtocol { + + func save(talks: [TalkObject]) throws + +} + +extension RealmSaveTalksProtocol { + + func save(talks: [TalkObject]) throws { + do { + let realm = try Realm() + let rejectedTalks = realm.objects(TalkObject.self).filter("NOT(id IN %@)", talks.map({ $0.id })) + try realm.write({ + realm.delete(rejectedTalks) + realm.add(talks, update: true) + }) + } catch { + throw error + } + } + +} diff --git a/PyConJP/Protocol/Realm/RealmTalkDetailProtocol.swift b/PyConJP/Protocol/Realm/RealmTalkDetailProtocol.swift deleted file mode 100644 index 857476a..0000000 --- a/PyConJP/Protocol/Realm/RealmTalkDetailProtocol.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// RealmTalkDetailProtocol.swift -// PyCon-JP -// -// Created by Yutaro Muta on 2016/12/18. -// Copyright © 2016 PyCon JP. All rights reserved. -// - -import UIKit - -protocol RealmTalkDetailProtocol { - func getTalksFromLocalDummyJson(completionHandler: ((Result) -> Void)) -} - -extension RealmTalkDetailProtocol { - - func getTalkDetailFromLocalDummyJson(completionHandler: ((Result) -> Void)) { - let path = Bundle.main.path(forResource: "DummyTalkDetail", ofType: "json") - let fileHandle = FileHandle(forReadingAtPath: path!) - let data = fileHandle?.readDataToEndOfFile() - let dictionary = try! JSONSerialization.jsonObject(with: data!, options: .allowFragments) as! [String: Any] - - let talkDetail = TalkDetail(dictionary: dictionary) - completionHandler(.success(talkDetail)) - - } - -} diff --git a/PyConJP/Protocol/Realm/RealmTalksProtocol.swift b/PyConJP/Protocol/Realm/RealmTalksProtocol.swift deleted file mode 100644 index 099be55..0000000 --- a/PyConJP/Protocol/Realm/RealmTalksProtocol.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// RealmTalksProtocol.swift -// PyConJP2016 -// -// Created by Yutaro Muta on 2016/08/18. -// Copyright © 2016 PyCon JP. All rights reserved. -// - -import UIKit -import RealmSwift - -protocol RealmTalksProtocol { - var filterPredicate: NSPredicate { get } - var sortProperties: [SortDescriptor] { get } - - func loadTalkObjects(_ completionHandler: ((Result<[TalkObject]>) -> Void)) - func getTalksFromLocalDummyJson(completionHandler: ((Result) -> Void)) -} - -extension RealmTalksProtocol { - - func loadTalkObjects(_ completionHandler: ((Result<[TalkObject]>) -> Void)) { - do { - let realm = try Realm() - let talks = Array(realm.objects(TalkObject.self).filter(filterPredicate).sorted(by: sortProperties)) - completionHandler(.success(talks)) - } catch let error as NSError { - completionHandler(.failure(error)) - } - } - -} - -extension RealmTalksProtocol { - - func getTalksFromLocalDummyJson(completionHandler: ((Result) -> Void)) { - let path = Bundle.main.path(forResource: "DummyTalks", ofType: "json") - let fileHandle = FileHandle(forReadingAtPath: path!) - let data = fileHandle?.readDataToEndOfFile() - let dictionary = try! JSONSerialization.jsonObject(with: data!, options: .allowFragments) as! [String: Any] - let presentations = dictionary["presentations"] as? [[String: Any]] ?? [[String: Any]]() - - do { - let realm = try Realm() - try realm.write({ - presentations.forEach({ - let talkObject = TalkObject(dictionary: $0) - realm.add(talkObject, update: true) - }) - }) - - completionHandler(.success()) - } catch let error as NSError { - completionHandler(.failure(error)) - } - - } - -} diff --git a/PyConJP/Protocol/UI/NibInstantitable.swift b/PyConJP/Protocol/UI/NibInstantitable.swift new file mode 100644 index 0000000..3471e50 --- /dev/null +++ b/PyConJP/Protocol/UI/NibInstantitable.swift @@ -0,0 +1,27 @@ +// +// NibInstantitable.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/01. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import UIKit + +protocol NibInstantitable {} + +extension NibInstantitable { + + static var nibName: String { + return String(describing: Self.self) + } + + static var nib: UINib { + return UINib(nibName: Self.nibName, bundle: nil) + } + + static func instantiateFromNib() -> Self { + return nib.instantiate(withOwner: self, options: nil)[0] as! Self + } + +} diff --git a/PyConJP/Protocol/UI/StoryboardIdentifiable.swift b/PyConJP/Protocol/UI/StoryboardIdentifiable.swift new file mode 100644 index 0000000..fbc4154 --- /dev/null +++ b/PyConJP/Protocol/UI/StoryboardIdentifiable.swift @@ -0,0 +1,19 @@ +// +// StoryboardIdentifiable.swift +// PyConJP +// +// Created by Yutaro Muta on 2017/06/01. +// Copyright © 2017 PyCon JP. All rights reserved. +// + +import Foundation + +protocol StoryboardIdentifiable {} + +extension StoryboardIdentifiable { + + static var storyboardIdentifier: String { + return String(describing: Self.self) + } + +} diff --git a/PyConJP/Protocol/URLScheme/MailURLSchemeProtocol.swift b/PyConJP/Protocol/URLScheme/MailURLSchemeProtocol.swift index 66e3d65..132cd5a 100644 --- a/PyConJP/Protocol/URLScheme/MailURLSchemeProtocol.swift +++ b/PyConJP/Protocol/URLScheme/MailURLSchemeProtocol.swift @@ -1,6 +1,6 @@ // // MailURLSchemeProtocol.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 9/17/16. // Copyright © 2016 PyCon JP. All rights reserved. @@ -22,7 +22,7 @@ extension MailURLSchemeProtocol { } func mailURLScheme(to address: String, subject: String, body: String) -> URL? { - if !UIApplication.shared.canOpenURL(urlScheme) { return nil } + guard UIApplication.shared.canOpenURL(urlScheme) else { return nil } return URL(string: String(format: "mailto:%@?subject=%@&body=%@", arguments: [address, subject.addingPercentEncoding(withAllowedCharacters: CharacterSet.alphanumerics)!, body.addingPercentEncoding(withAllowedCharacters: CharacterSet.alphanumerics)!])) } diff --git a/PyConJP/Protocol/URLScheme/TwitterURLSchemeProtocol.swift b/PyConJP/Protocol/URLScheme/TwitterURLSchemeProtocol.swift index 33fbdc1..1bfe3c4 100644 --- a/PyConJP/Protocol/URLScheme/TwitterURLSchemeProtocol.swift +++ b/PyConJP/Protocol/URLScheme/TwitterURLSchemeProtocol.swift @@ -1,6 +1,6 @@ // // TwitterURLSchemeProtocol.swift -// PyConJP2016 +// PyConJP // // Created by Yutaro Muta on 9/11/16. // Copyright © 2016 PyCon JP. All rights reserved. @@ -23,13 +23,13 @@ extension TwitterURLSchemeProtocol { } private func openTwitterAppWithAlert(targetName: String, url: URL, from viewController: UIViewController) { - let alertController = UIAlertController(title: NSLocalizedString("TwitterAlertTitle", tableName: "URLScheme", comment: ""), - message: String(format: NSLocalizedString("TwitterAlertMessage", tableName: "URLScheme", comment: ""), arguments: [targetName]), + let alertController = UIAlertController(title: NSLocalizedString("twitterAlertTitle", tableName: "URLScheme", comment: ""), + message: String(format: NSLocalizedString("twitterAlertMessage", tableName: "URLScheme", comment: ""), arguments: [targetName]), preferredStyle: .alert) - alertController.addAction(UIAlertAction(title: NSLocalizedString("Open", comment: ""), style: .default, handler: { _ in + alertController.addAction(UIAlertAction(title: NSLocalizedString("open", comment: ""), style: .default, handler: { _ in UIApplication.shared.openURL(url) })) - alertController.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel, handler: nil)) + alertController.addAction(UIAlertAction(title: NSLocalizedString("cancel", comment: ""), style: .cancel, handler: nil)) viewController.present(alertController, animated: true, completion: nil) } diff --git a/PyConJP/Protocol/WebAPI/StaffListAPIProtocol.swift b/PyConJP/Protocol/WebAPI/StaffListAPIProtocol.swift deleted file mode 100644 index 363d977..0000000 --- a/PyConJP/Protocol/WebAPI/StaffListAPIProtocol.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// StaffListAPIProtocol.swift -// PyConJP2016 -// -// Created by Yutaro Muta on 9/10/16. -// Copyright © 2016 PyCon JP. All rights reserved. -// - -import UIKit -import WebAPIFramework - -protocol StaffListAPIProtocol: AlamofireProtocol { - func getStaffs(completionHandler: @escaping ((Result<[Staff]>) -> Void)) -} - -extension StaffListAPIProtocol { - - var baseURL: String { - return "https://pyconjp.github.io/" - } - - var path: String { - return "pyconjp-android/stafflist.json" - } - -} - -extension StaffListAPIProtocol { - - func getStaffs(completionHandler: @escaping ((Result<[Staff]>) -> Void)) { - get { result in - switch result { - case .success(let value): - let staffList = value["staffList"] as? [[String: Any]] ?? [] - completionHandler(.success(staffList.map({ Staff(dictionary: $0) }))) - case .failure(let error): - completionHandler(.failure(error)) - } - - } - } - -} diff --git a/PyConJP/Protocol/WebAPI/TalkDetailAPIProtocol.swift b/PyConJP/Protocol/WebAPI/TalkDetailAPIProtocol.swift deleted file mode 100644 index 33ef277..0000000 --- a/PyConJP/Protocol/WebAPI/TalkDetailAPIProtocol.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// TalkDetailAPIProtocol.swift -// PyConJP2016 -// -// Created by Yutaro Muta on 7/25/16. -// Copyright © 2016 PyCon JP. All rights reserved. -// - -import UIKit -import WebAPIFramework - -protocol TalkDetailAPIProtocol: AlamofireProtocol { - var id: Int? { get set } - - func getTalkDetail(completionHandler: @escaping ((Result) -> Void)) -} - -extension TalkDetailAPIProtocol { - - var path: String { - guard let id = id else { return "" } - return "presentation/\(id)/" - } - -} - -extension TalkDetailAPIProtocol { - - func getTalkDetail(completionHandler: @escaping ((Result) -> Void)) { - get { result in - switch result { - case .success(let value): - let talkDetail = TalkDetail(dictionary: value) - completionHandler(.success(talkDetail)) - case .failure(let error): - completionHandler(.failure(error)) - } - } - } - -} diff --git a/PyConJP/Protocol/WebAPI/TalksAPIProtocol.swift b/PyConJP/Protocol/WebAPI/TalksAPIProtocol.swift deleted file mode 100644 index ecbd2fc..0000000 --- a/PyConJP/Protocol/WebAPI/TalksAPIProtocol.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// TalksAPIProtocol.swift -// PyConJP2016 -// -// Created by Yutaro Muta on 4/23/16. -// Copyright © 2016 PyCon JP. All rights reserved. -// - -import UIKit -import WebAPIFramework -import RealmSwift - -protocol TalksAPIProtocol: AlamofireProtocol { - func getTalks(completionHandler: @escaping ((Result) -> Void)) -} - -extension TalksAPIProtocol { - - var path: String { - return "talks/list/" - } - -} - -extension TalksAPIProtocol { - - func getTalks(completionHandler: @escaping ((Result) -> Void)) { - get { result in - switch result { - case .success(let value): - let presentations = value["presentations"] as? [[String: Any]] ?? [[String: Any]]() - - do { - let apiTalks = presentations.map({ TalkObject(dictionary: $0) }) - - let realm = try Realm() - let rejectedLocalTalks = realm.objects(TalkObject.self).filter("NOT(id IN %@)", apiTalks.map({ $0.id })) - try realm.write({ - realm.delete(rejectedLocalTalks) - realm.add(apiTalks, update: true) - }) - - completionHandler(.success()) - } catch let error as NSError { - completionHandler(.failure(error)) - } - case .failure(let error): - completionHandler(.failure(error)) - } - } - } - -} diff --git a/PyConJP/Resource/Localizable/Base.lproj/EventList.strings b/PyConJP/Resource/Localizable/Base.lproj/EventList.strings new file mode 100644 index 0000000..59965e6 --- /dev/null +++ b/PyConJP/Resource/Localizable/Base.lproj/EventList.strings @@ -0,0 +1,23 @@ +/* + EventList.strings + PyConJP + + Created by Yutaro Muta on 2017/08/28. + Copyright © 2017 PyCon JP. All rights reserved. +*/ + +/** + EventsListViewController Section Row + */ + +"tutorials" = "Tutorials"; +"keynote" = "Keynote"; +"posters" = "Posters"; +"lightningTalks" = "Lightning Talks (LT)"; +"youthCoderWorkshop" = "Youth Coder Workshop"; +"committeeMeeting" = "Committee Meeting"; +"communityBooth" = "Community Booth"; +"jobFair" = "Job Fair"; +"openSpace" = "Open Space"; +"mediaMeeting" = "Media Meeting"; +"sprints" = "Sprints"; diff --git a/PyConJP/Resource/Localizable/Base.lproj/Language.strings b/PyConJP/Resource/Localizable/Base.lproj/Language.strings index 6f76f65..b976ad5 100644 --- a/PyConJP/Resource/Localizable/Base.lproj/Language.strings +++ b/PyConJP/Resource/Localizable/Base.lproj/Language.strings @@ -1,11 +1,11 @@ /* Language.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 8/31/16. Copyright © 2016 PyCon JP. All rights reserved. */ -"English" = "English"; +"english" = "English"; -"Japanese" = "Japanese"; +"japanese" = "Japanese"; diff --git a/PyConJP/Resource/Localizable/Base.lproj/Localizable.strings b/PyConJP/Resource/Localizable/Base.lproj/Localizable.strings index 325a7fc..f3bef41 100644 --- a/PyConJP/Resource/Localizable/Base.lproj/Localizable.strings +++ b/PyConJP/Resource/Localizable/Base.lproj/Localizable.strings @@ -1,6 +1,6 @@ /* Localizable.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 9/17/16. Copyright © 2016 PyCon JP. All rights reserved. @@ -10,6 +10,6 @@ AlertController */ -"Cancel" = "Cancel"; +"cancel" = "Cancel"; -"Open" = "Open"; +"open" = "Open"; diff --git a/PyConJP/Resource/Localizable/Base.lproj/Map.strings b/PyConJP/Resource/Localizable/Base.lproj/Map.strings index 97c2c59..c1473a1 100644 --- a/PyConJP/Resource/Localizable/Base.lproj/Map.strings +++ b/PyConJP/Resource/Localizable/Base.lproj/Map.strings @@ -1,6 +1,6 @@ /* Map.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 8/30/2016. Copyright © 2016 PyCon JP. All rights reserved. @@ -10,10 +10,10 @@ MapViewController */ -"NameWaseda" = "Waseda University, Nishi-Waseda Campus"; +"nameWaseda" = "Waseda University, Nishi-Waseda Campus"; -"AddressWaseda" = "Waseda University, Nishi-Waseda Campus, Building 63\n3-4-1, Okubo, Shinjuku, Tokyo\n169-0072, Japan"; +"addressWaseda" = "Waseda University, Nishi-Waseda Campus, Building 63\n3-4-1, Okubo, Shinjuku, Tokyo\n169-0072, Japan"; -"NameMicrosoft" = "Microsoft Japan Co., Ltd."; +"nameMicrosoft" = "Microsoft Japan Co., Ltd."; -"AddressMicrosoft" = "Microsoft Japan Co., Ltd.\nShinagawa Grand Central Tower, 2-16-3 Konan, Minato, Tokyo\n108-0075, Japan"; +"addressMicrosoft" = "Microsoft Japan Co., Ltd.\nShinagawa Grand Central Tower, 2-16-3 Konan, Minato, Tokyo\n108-0075, Japan"; diff --git a/PyConJP/Resource/Localizable/Base.lproj/URLScheme.strings b/PyConJP/Resource/Localizable/Base.lproj/URLScheme.strings index cc11ec9..bae967c 100644 --- a/PyConJP/Resource/Localizable/Base.lproj/URLScheme.strings +++ b/PyConJP/Resource/Localizable/Base.lproj/URLScheme.strings @@ -1,6 +1,6 @@ /* URLScheme.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 9/17/16. Copyright © 2016 PyCon JP. All rights reserved. @@ -10,6 +10,6 @@ TwitterURLSchemeType */ -"TwitterAlertTitle" = "Launch Twitter App"; +"twitterAlertTitle" = "Launch Twitter App"; -"TwitterAlertMessage" = "Try to open %@"; +"twitterAlertMessage" = "Try to open %@"; diff --git a/PyConJP/Resource/Localizable/en.lproj/EventList.strings b/PyConJP/Resource/Localizable/en.lproj/EventList.strings new file mode 100644 index 0000000..59965e6 --- /dev/null +++ b/PyConJP/Resource/Localizable/en.lproj/EventList.strings @@ -0,0 +1,23 @@ +/* + EventList.strings + PyConJP + + Created by Yutaro Muta on 2017/08/28. + Copyright © 2017 PyCon JP. All rights reserved. +*/ + +/** + EventsListViewController Section Row + */ + +"tutorials" = "Tutorials"; +"keynote" = "Keynote"; +"posters" = "Posters"; +"lightningTalks" = "Lightning Talks (LT)"; +"youthCoderWorkshop" = "Youth Coder Workshop"; +"committeeMeeting" = "Committee Meeting"; +"communityBooth" = "Community Booth"; +"jobFair" = "Job Fair"; +"openSpace" = "Open Space"; +"mediaMeeting" = "Media Meeting"; +"sprints" = "Sprints"; diff --git a/PyConJP/Resource/Localizable/en.lproj/Language.strings b/PyConJP/Resource/Localizable/en.lproj/Language.strings index 89e6f16..be3d22c 100644 --- a/PyConJP/Resource/Localizable/en.lproj/Language.strings +++ b/PyConJP/Resource/Localizable/en.lproj/Language.strings @@ -1,11 +1,11 @@ /* Language.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 8/31/16. Copyright © 2016 PyCon JP. All rights reserved. */ -"English" = "English"; +"english" = "English"; -"Japanese" = "Japanese"; +"japanese" = "Japanese"; diff --git a/PyConJP/Resource/Localizable/en.lproj/Localizable.strings b/PyConJP/Resource/Localizable/en.lproj/Localizable.strings index 325a7fc..f3bef41 100644 --- a/PyConJP/Resource/Localizable/en.lproj/Localizable.strings +++ b/PyConJP/Resource/Localizable/en.lproj/Localizable.strings @@ -1,6 +1,6 @@ /* Localizable.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 9/17/16. Copyright © 2016 PyCon JP. All rights reserved. @@ -10,6 +10,6 @@ AlertController */ -"Cancel" = "Cancel"; +"cancel" = "Cancel"; -"Open" = "Open"; +"open" = "Open"; diff --git a/PyConJP/Resource/Localizable/en.lproj/Map.strings b/PyConJP/Resource/Localizable/en.lproj/Map.strings index 97c2c59..c1473a1 100644 --- a/PyConJP/Resource/Localizable/en.lproj/Map.strings +++ b/PyConJP/Resource/Localizable/en.lproj/Map.strings @@ -1,6 +1,6 @@ /* Map.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 8/30/2016. Copyright © 2016 PyCon JP. All rights reserved. @@ -10,10 +10,10 @@ MapViewController */ -"NameWaseda" = "Waseda University, Nishi-Waseda Campus"; +"nameWaseda" = "Waseda University, Nishi-Waseda Campus"; -"AddressWaseda" = "Waseda University, Nishi-Waseda Campus, Building 63\n3-4-1, Okubo, Shinjuku, Tokyo\n169-0072, Japan"; +"addressWaseda" = "Waseda University, Nishi-Waseda Campus, Building 63\n3-4-1, Okubo, Shinjuku, Tokyo\n169-0072, Japan"; -"NameMicrosoft" = "Microsoft Japan Co., Ltd."; +"nameMicrosoft" = "Microsoft Japan Co., Ltd."; -"AddressMicrosoft" = "Microsoft Japan Co., Ltd.\nShinagawa Grand Central Tower, 2-16-3 Konan, Minato, Tokyo\n108-0075, Japan"; +"addressMicrosoft" = "Microsoft Japan Co., Ltd.\nShinagawa Grand Central Tower, 2-16-3 Konan, Minato, Tokyo\n108-0075, Japan"; diff --git a/PyConJP/Resource/Localizable/en.lproj/URLScheme.strings b/PyConJP/Resource/Localizable/en.lproj/URLScheme.strings index cc11ec9..bae967c 100644 --- a/PyConJP/Resource/Localizable/en.lproj/URLScheme.strings +++ b/PyConJP/Resource/Localizable/en.lproj/URLScheme.strings @@ -1,6 +1,6 @@ /* URLScheme.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 9/17/16. Copyright © 2016 PyCon JP. All rights reserved. @@ -10,6 +10,6 @@ TwitterURLSchemeType */ -"TwitterAlertTitle" = "Launch Twitter App"; +"twitterAlertTitle" = "Launch Twitter App"; -"TwitterAlertMessage" = "Try to open %@"; +"twitterAlertMessage" = "Try to open %@"; diff --git a/PyConJP/Resource/Localizable/ja.lproj/EventList.strings b/PyConJP/Resource/Localizable/ja.lproj/EventList.strings new file mode 100644 index 0000000..847a34e --- /dev/null +++ b/PyConJP/Resource/Localizable/ja.lproj/EventList.strings @@ -0,0 +1,23 @@ +/* + EventList.strings + PyConJP + + Created by Yutaro Muta on 2017/08/28. + Copyright © 2017 PyCon JP. All rights reserved. +*/ + +/** + EventsListViewController Section Row + */ + +"tutorials" = "チュートリアル"; +"keynote" = "基調講演"; +"posters" = "ポスター"; +"lightningTalks" = "ライトニングトーク (LT)"; +"youthCoderWorkshop" = "Youth Coder Workshop"; +"committeeMeeting" = "Committee Meeting"; +"communityBooth" = "Community Booth"; +"jobFair" = "ジョブフェア"; +"openSpace" = "オープンスペース"; +"mediaMeeting" = "メディア会議"; +"sprints" = "スプリント"; diff --git a/PyConJP/Resource/Localizable/ja.lproj/Language.strings b/PyConJP/Resource/Localizable/ja.lproj/Language.strings index 286df34..834d2bc 100644 --- a/PyConJP/Resource/Localizable/ja.lproj/Language.strings +++ b/PyConJP/Resource/Localizable/ja.lproj/Language.strings @@ -1,11 +1,11 @@ /* Language.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 8/31/16. Copyright © 2016 PyCon JP. All rights reserved. */ -"English" = "英語"; +"english" = "英語"; -"Japanese" = "日本語"; +"japanese" = "日本語"; diff --git a/PyConJP/Resource/Localizable/ja.lproj/Localizable.strings b/PyConJP/Resource/Localizable/ja.lproj/Localizable.strings index 5bcf4c6..1e97fee 100644 --- a/PyConJP/Resource/Localizable/ja.lproj/Localizable.strings +++ b/PyConJP/Resource/Localizable/ja.lproj/Localizable.strings @@ -1,6 +1,6 @@ /* Localizable.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 9/17/16. Copyright © 2016 PyCon JP. All rights reserved. @@ -10,6 +10,6 @@ AlertController */ -"Cancel" = "キャンセル"; +"cancel" = "キャンセル"; -"Open" = "開く"; +"open" = "開く"; diff --git a/PyConJP/Resource/Localizable/ja.lproj/Map.strings b/PyConJP/Resource/Localizable/ja.lproj/Map.strings index 8db6fa8..4db9627 100644 --- a/PyConJP/Resource/Localizable/ja.lproj/Map.strings +++ b/PyConJP/Resource/Localizable/ja.lproj/Map.strings @@ -1,6 +1,6 @@ /* Map.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 8/30/2016. Copyright © 2016 PyCon JP. All rights reserved. @@ -10,10 +10,10 @@ MapViewController */ -"NameWaseda" = "早稲田大学西早稲田キャンパス"; +"nameWaseda" = "早稲田大学西早稲田キャンパス"; -"AddressWaseda" = "〒169-0072\n東京都新宿区大久保 3-4-1\n早稲田大学西早稲田キャンパス 63号館"; +"addressWaseda" = "〒169-0072\n東京都新宿区大久保 3-4-1\n早稲田大学西早稲田キャンパス 63号館"; -"NameMicrosoft" = "日本マイクロソフト株式会社"; +"nameMicrosoft" = "日本マイクロソフト株式会社"; -"AddressMicrosoft" = "〒108-0075\n東京都港区港南 2-16-3 品川グランドセントラルタワー\n日本マイクロソフト株式会社"; +"addressMicrosoft" = "〒108-0075\n東京都港区港南 2-16-3 品川グランドセントラルタワー\n日本マイクロソフト株式会社"; diff --git a/PyConJP/Resource/Localizable/ja.lproj/URLScheme.strings b/PyConJP/Resource/Localizable/ja.lproj/URLScheme.strings index dcd3b2d..2097afe 100644 --- a/PyConJP/Resource/Localizable/ja.lproj/URLScheme.strings +++ b/PyConJP/Resource/Localizable/ja.lproj/URLScheme.strings @@ -1,6 +1,6 @@ /* URLScheme.strings - PyConJP2016 + PyConJP Created by Yutaro Muta on 9/17/16. Copyright © 2016 PyCon JP. All rights reserved. @@ -10,6 +10,6 @@ TwitterURLSchemeType */ -"TwitterAlertTitle" = "Twiiterアプリを起動"; +"twitterAlertTitle" = "Twiiterアプリを起動"; -"TwitterAlertMessage" = "%@ を開きます"; +"twitterAlertMessage" = "%@ を開きます"; diff --git a/PyConJP/Resource/Settings.bundle/Root.plist b/PyConJP/Resource/Settings.bundle/Root.plist new file mode 100644 index 0000000..98a02c0 --- /dev/null +++ b/PyConJP/Resource/Settings.bundle/Root.plist @@ -0,0 +1,25 @@ + + + + + StringsTable + Root + PreferenceSpecifiers + + + Type + PSChildPaneSpecifier + Title + Acknowledgments + File + com.mono0926.LicensePlist + + + Type + PSGroupSpecifier + Title + Copyright + + + + diff --git a/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist.latest_result.txt b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist.latest_result.txt new file mode 100644 index 0000000..af6ffcf --- /dev/null +++ b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist.latest_result.txt @@ -0,0 +1,13 @@ +name: Result, nameSpecified: , owner: antitypical, version: 3.2.3 + +name: APIKit, nameSpecified: , owner: ishkawa, version: 3.1.2 + +name: SpreadsheetView, nameSpecified: , owner: kishikawakatsumi, version: v0.8.3 + +name: Kingfisher, nameSpecified: , owner: onevcat, version: 3.12.1 + +name: realm-cocoa, nameSpecified: , owner: realm, version: v2.10.0 + +add-version-numbers: false + +LicensePlist Version: 1.4.5 \ No newline at end of file diff --git a/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist.plist b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist.plist new file mode 100644 index 0000000..28bff5f --- /dev/null +++ b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist.plist @@ -0,0 +1,49 @@ + + + + + PreferenceSpecifiers + + + File + com.mono0926.LicensePlist/APIKit + Title + APIKit + Type + PSChildPaneSpecifier + + + File + com.mono0926.LicensePlist/Kingfisher + Title + Kingfisher + Type + PSChildPaneSpecifier + + + File + com.mono0926.LicensePlist/realm-cocoa + Title + realm-cocoa + Type + PSChildPaneSpecifier + + + File + com.mono0926.LicensePlist/Result + Title + Result + Type + PSChildPaneSpecifier + + + File + com.mono0926.LicensePlist/SpreadsheetView + Title + SpreadsheetView + Type + PSChildPaneSpecifier + + + + diff --git a/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/APIKit.plist b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/APIKit.plist new file mode 100644 index 0000000..8063050 --- /dev/null +++ b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/APIKit.plist @@ -0,0 +1,23 @@ + + + + + PreferenceSpecifiers + + + FooterText + **Copyright (c) 2015 - 2016 Yosuke Ishikawa** + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + Type + PSGroupSpecifier + + + + diff --git a/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/Kingfisher.plist b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/Kingfisher.plist new file mode 100644 index 0000000..72218c4 --- /dev/null +++ b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/Kingfisher.plist @@ -0,0 +1,37 @@ + + + + + PreferenceSpecifiers + + + FooterText + The MIT License (MIT) + +Copyright (c) 2017 Wei Wang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + Type + PSGroupSpecifier + + + + diff --git a/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/Result.plist b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/Result.plist new file mode 100644 index 0000000..0427f2e --- /dev/null +++ b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/Result.plist @@ -0,0 +1,35 @@ + + + + + PreferenceSpecifiers + + + FooterText + The MIT License (MIT) + +Copyright (c) 2014 Rob Rix + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + Type + PSGroupSpecifier + + + + diff --git a/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/SpreadsheetView.plist b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/SpreadsheetView.plist new file mode 100644 index 0000000..3d9b1b5 --- /dev/null +++ b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/SpreadsheetView.plist @@ -0,0 +1,36 @@ + + + + + PreferenceSpecifiers + + + FooterText + MIT License + +Copyright (c) 2017 Kishikawa Katsumi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + Type + PSGroupSpecifier + + + + diff --git a/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/realm-cocoa.plist b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/realm-cocoa.plist new file mode 100644 index 0000000..4e47153 --- /dev/null +++ b/PyConJP/Resource/Settings.bundle/com.mono0926.LicensePlist/realm-cocoa.plist @@ -0,0 +1,263 @@ + + + + + PreferenceSpecifiers + + + FooterText + TABLE OF CONTENTS + +1. Apache License version 2.0 +2. Realm Components +3. Export Compliance + +1. ------------------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +2. ------------------------------------------------------------------------------- + +REALM COMPONENTS + +This software contains components with separate copyright and license terms. +Your use of these components is subject to the terms and conditions of the +following licenses. + +For the Realm Platform Extensions component + + Realm Platform Extensions License + + Copyright (c) 2011-2017 Realm Inc All rights reserved + + Redistribution and use in binary form, with or without modification, is + permitted provided that the following conditions are met: + + 1. You agree not to attempt to decompile, disassemble, reverse engineer or + otherwise discover the source code from which the binary code was derived. + You may, however, access and obtain a separate license for most of the + source code from which this Software was created, at + http://realm.io/pricing/. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +3. ------------------------------------------------------------------------------- + +EXPORT COMPLIANCE + +You understand that the Software may contain cryptographic functions that may be +subject to export restrictions, and you represent and warrant that you are not +(i) located in a jurisdiction that is subject to United States economic +sanctions (“Prohibited Jurisdiction”), including Cuba, Iran, North Korea, +Sudan, Syria or the Crimea region, (ii) a person listed on any U.S. government +blacklist (to include the List of Specially Designated Nationals and Blocked +Persons or the Consolidated Sanctions List administered by the U.S. Department +of the Treasury’s Office of Foreign Assets Control, or the Denied Persons List +or Entity List administered by the U.S. Department of Commerce) +(“Sanctioned Person”), or (iii) controlled or 50% or more owned by a Sanctioned +Person. + +You agree to comply with all export, re-export and import restrictions and +regulations of the U.S. Department of Commerce or other agency or authority of +the United States or other applicable countries. You also agree not to transfer, +or authorize the transfer of, directly or indirectly, of the Software to any +Prohibited Jurisdiction, or otherwise in violation of any such restrictions or +regulations. + + Type + PSGroupSpecifier + + + + diff --git a/PyConJP/Resource/Settings.bundle/en.lproj/Root.strings b/PyConJP/Resource/Settings.bundle/en.lproj/Root.strings new file mode 100644 index 0000000..63628ec Binary files /dev/null and b/PyConJP/Resource/Settings.bundle/en.lproj/Root.strings differ diff --git a/PyConJP/Resource/Settings.bundle/ja.lproj/Root.strings b/PyConJP/Resource/Settings.bundle/ja.lproj/Root.strings new file mode 100644 index 0000000..3708026 Binary files /dev/null and b/PyConJP/Resource/Settings.bundle/ja.lproj/Root.strings differ diff --git a/PyConJP/Storyboard/Base.lproj/Conference.storyboard b/PyConJP/Storyboard/Base.lproj/Conference.storyboard index b48613d..c76b9f2 100644 --- a/PyConJP/Storyboard/Base.lproj/Conference.storyboard +++ b/PyConJP/Storyboard/Base.lproj/Conference.storyboard @@ -1,7 +1,10 @@ - + + + + - + @@ -28,7 +31,7 @@ - + @@ -38,12 +41,14 @@ + + @@ -74,7 +79,7 @@ - + @@ -84,8 +89,9 @@ + - + @@ -113,7 +119,7 @@ - + @@ -123,6 +129,7 @@ + @@ -143,12 +150,12 @@ - + - + @@ -158,9 +165,11 @@ + - + + @@ -171,6 +180,7 @@