From 54f4fb229c64e9b5badc02e9cd69796d178475b0 Mon Sep 17 00:00:00 2001 From: Marco Schmickler Date: Sun, 13 Dec 2015 07:49:16 +0100 Subject: [PATCH] XCode 7.2 --- .idea/encodings.xml | 4 +- .idea/kplayer.iml | 447 +++++- .idea/misc.xml | 4 - Podfile | 9 +- kplayer.xcodeproj/project.pbxproj | 96 +- kplayer/AppDelegate.swift | 57 +- kplayer/Base.lproj/Main.storyboard | 15 +- kplayer/Info.plist | 7 +- kplayer/core/ItemModel.swift | 28 + kplayer/core/MediaItem.swift | 54 +- kplayer/core/NetworkManager.swift | 341 ++--- kplayer/detail/DetailViewController.swift | 159 ++- kplayer/detail/HeaderCell.swift | 2 +- kplayer/detail/ItemCell.swift | 2 +- kplayer/detail/VideoPlayerController.swift | 40 +- kplayer/exswift/Array.swift | 1419 ------------------- kplayer/exswift/Bool.swift | 18 - kplayer/exswift/Character.swift | 21 - kplayer/exswift/Dictionary.swift | 421 ------ kplayer/exswift/Double.swift | 93 -- kplayer/exswift/ExSwift.h | 19 - kplayer/exswift/ExSwift.swift | 282 ---- kplayer/exswift/Float.swift | 83 -- kplayer/exswift/Int.swift | 256 ---- kplayer/exswift/NSArray.swift | 64 - kplayer/exswift/NSDate.swift | 318 ----- kplayer/exswift/Range.swift | 80 -- kplayer/exswift/Sequence.swift | 244 ---- kplayer/exswift/String.swift | 403 ------ kplayer/master/MasterViewController.swift | 153 +- kplayer/photo/MediaPhotoController.swift | 144 +- kplayer/util/ImageLoadOperation.swift | 19 +- kplayer/util/LayoutTools.swift | 14 +- kplayer/util/NetData.swift | 4 +- kplayer/util/UploadOperation.swift | 4 +- kplayer/util/ViewControllerExtensions.swift | 67 + kplayer/util/alamoimage.swift | 38 +- kplayer/util/alamojson.swift | 48 - kplayer/util/stringutil.swift | 16 + kplayerTests/Info.plist | 2 +- kplayerTests/kplayerTests.swift | 9 +- 41 files changed, 1195 insertions(+), 4309 deletions(-) delete mode 100644 .idea/misc.xml create mode 100644 kplayer/core/ItemModel.swift delete mode 100644 kplayer/exswift/Array.swift delete mode 100644 kplayer/exswift/Bool.swift delete mode 100644 kplayer/exswift/Character.swift delete mode 100644 kplayer/exswift/Dictionary.swift delete mode 100644 kplayer/exswift/Double.swift delete mode 100644 kplayer/exswift/ExSwift.h delete mode 100644 kplayer/exswift/ExSwift.swift delete mode 100644 kplayer/exswift/Float.swift delete mode 100644 kplayer/exswift/Int.swift delete mode 100644 kplayer/exswift/NSArray.swift delete mode 100644 kplayer/exswift/NSDate.swift delete mode 100644 kplayer/exswift/Range.swift delete mode 100644 kplayer/exswift/Sequence.swift delete mode 100644 kplayer/exswift/String.swift create mode 100644 kplayer/util/ViewControllerExtensions.swift delete mode 100644 kplayer/util/alamojson.swift create mode 100644 kplayer/util/stringutil.swift diff --git a/.idea/encodings.xml b/.idea/encodings.xml index d821048..f758959 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -1,4 +1,6 @@ - + + + \ No newline at end of file diff --git a/.idea/kplayer.iml b/.idea/kplayer.iml index cb345e8..0875b24 100644 --- a/.idea/kplayer.iml +++ b/.idea/kplayer.iml @@ -1,8 +1,451 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 8662aa9..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Podfile b/Podfile index 4f690a9..3859a64 100644 --- a/Podfile +++ b/Podfile @@ -4,11 +4,16 @@ source 'https://github.com/CocoaPods/Specs.git' use_frameworks! # pod 'Player' -pod 'Alamofire', '~> 1.2' +#pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift-2.0' +#pod 'Alamofire', '~> 1.2' +pod 'Alamofire', '~> 2.0' pod 'ALMoviePlayerController', '~>0.3.0' +#pod 'DZVideoPlayerViewController' pod 'SwiftyJSON' pod 'HanekeSwift' pod 'Nimbus/Photos' pod 'Nimbus/PagingScrollView' -pod 'AFNetworking', '= 2.1' +pod 'AFNetworking', '~>2.1' +pod 'Dollar' +pod 'Cent' #, '1.2.0' diff --git a/kplayer.xcodeproj/project.pbxproj b/kplayer.xcodeproj/project.pbxproj index 16a1b4f..94daea4 100644 --- a/kplayer.xcodeproj/project.pbxproj +++ b/kplayer.xcodeproj/project.pbxproj @@ -7,40 +7,29 @@ objects = { /* Begin PBXBuildFile section */ - 1C7361B71E73ECBE5891B755 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73649A4ADDAAAED634F537 /* Dictionary.swift */; }; - 1C7361F0F80FEC5B72946923 /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73605289164DF119E60720 /* Array.swift */; }; 1C73626E34BA4D64ACF94AE5 /* alamoimage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736C60C423AE87B8D0F22A /* alamoimage.swift */; }; 1C73631EACF56BABD3B2BCFB /* LayoutTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736BC4450890C45F8FBC63 /* LayoutTools.swift */; }; - 1C7363402AB2B0E5CA0B35BF /* Float.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7365A537608EDDE897BF7C /* Float.swift */; }; 1C73635138BBD2BB480A308F /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C736777456388CA571DA17B /* MediaPlayer.framework */; }; - 1C7363D241B56AEE78D82FAD /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73666529EEEBD464F193CD /* Sequence.swift */; }; 1C7363D9DC8F9D1F866DE935 /* Kirschkeks-256x256.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C7368DC7EF11A553145E169 /* Kirschkeks-256x256.png */; }; 1C73640D928DE56D35175D39 /* UploadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736260E748CF136FF37EA7 /* UploadOperation.swift */; }; 1C73646F87B495A47D7943C7 /* NetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7369EC16B19B32B515169E /* NetData.swift */; }; - 1C7364F64DCE93FCF4671D98 /* Character.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7369BCA71AAF64F874F946 /* Character.swift */; }; 1C736503B656C999E5E12081 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7365B06FA66294E99AC2D3 /* NetworkManager.swift */; }; 1C73654C9EA6D255CFC039C5 /* NetworkHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73620D01687FB4F1811C5C /* NetworkHelper.swift */; }; 1C7365885FAF292F2221ED44 /* MediaPhotoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73673DC671535E3A049F54 /* MediaPhotoController.swift */; }; - 1C73677CD719D0F82D144BF6 /* Bool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736C43137E3B8391E5F07B /* Bool.swift */; }; + 1C73675C34BE0990D44570BE /* ItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736253AB7A95EA41B605B7 /* ItemModel.swift */; }; 1C7367AF39961D2BA72480ED /* DataLoadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736F9338CE36708244D42A /* DataLoadOperation.swift */; }; + 1C736821D6DF2237A3EABCC1 /* ViewControllerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73648CEC974A2500172064 /* ViewControllerExtensions.swift */; }; 1C7368364397315E12E90F05 /* VideoPlayerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7367379DEE94EBF3FAFA78 /* VideoPlayerController.swift */; }; 1C73688D13E5A804880C8768 /* UIImageExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736DCCE3AA9993E15F7652 /* UIImageExtension.swift */; }; - 1C73689C7E6A25E758B16C54 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73653A9EBCC466FD4E3DA6 /* String.swift */; }; + 1C73691A9C7174E0C6B57267 /* stringutil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736B794396F2E50387B8F2 /* stringutil.swift */; }; 1C73693A1334A7792856FC58 /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73611D226B48C24DB37535 /* MasterViewController.swift */; }; 1C7369ABC44CFB530EA71FB6 /* HeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736D9BB5498E7E8F11C754 /* HeaderCell.swift */; }; - 1C7369C330F1AB1E4F166050 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736E7B8BAD989DC544088E /* Range.swift */; }; - 1C736A88E2CF46197FAE3160 /* NSDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7360E65B741C57C034FC7C /* NSDate.swift */; }; - 1C736C5DD23466269607E07F /* alamojson.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73618272969871601AB817 /* alamojson.swift */; }; - 1C736C5EA9EEFF40AD42CA60 /* Double.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736BCC6787411AA435D1E6 /* Double.swift */; }; - 1C736C885C8EE7CFBF3B8DC3 /* ExSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7365E164CCEDB0A9FDF7FA /* ExSwift.swift */; }; - 1C736C9C89BABC38C80025FE /* Int.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7368956B34717DAFC35EFF /* Int.swift */; }; 1C736D16E81BA1FB325200E0 /* HanekeFetchOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7360744ABACC3557D05760 /* HanekeFetchOperation.swift */; }; 1C736D24891597F2728230EE /* ImageLoadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7360A94DBECA685ED8602F /* ImageLoadOperation.swift */; }; 1C736D24B49451141CD4B64D /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7369F53095B7A4D65679C2 /* DetailViewController.swift */; }; - 1C736F3BC10D1A5ECEA50A30 /* NSArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736DB8164E3EF18FA6F28D /* NSArray.swift */; }; 1C736F6A223D4ADB2E1BA733 /* ItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C736069C214E9522BB1BD97 /* ItemCell.swift */; }; 1C736FB92B19FE17E4357C85 /* MediaItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C73688DAB88F9360FB62A49 /* MediaItem.swift */; }; - A5D637AE4588AAB5DC1CBC6B /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 127AC1F28342F9AAE3CEC5C2 /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + A5D637AE4588AAB5DC1CBC6B /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 127AC1F28342F9AAE3CEC5C2 /* Pods.framework */; }; C98AF5D51B124D6A00D196CC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5D41B124D6A00D196CC /* AppDelegate.swift */; }; C98AF5D81B124D6A00D196CC /* kplayer.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = C98AF5D61B124D6A00D196CC /* kplayer.xcdatamodeld */; }; C98AF5DF1B124D6A00D196CC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C98AF5DD1B124D6A00D196CC /* Main.storyboard */; }; @@ -61,39 +50,27 @@ /* Begin PBXFileReference section */ 127AC1F28342F9AAE3CEC5C2 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1C73605289164DF119E60720 /* Array.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Array.swift; sourceTree = ""; }; 1C736069C214E9522BB1BD97 /* ItemCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = ""; }; 1C7360744ABACC3557D05760 /* HanekeFetchOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HanekeFetchOperation.swift; sourceTree = ""; }; 1C7360A94DBECA685ED8602F /* ImageLoadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageLoadOperation.swift; sourceTree = ""; }; - 1C7360E65B741C57C034FC7C /* NSDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSDate.swift; sourceTree = ""; }; - 1C7361024E8CCBDE9C052658 /* ExSwift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExSwift.h; sourceTree = ""; }; 1C73611D226B48C24DB37535 /* MasterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = ""; }; - 1C73618272969871601AB817 /* alamojson.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = alamojson.swift; sourceTree = ""; }; 1C73620D01687FB4F1811C5C /* NetworkHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkHelper.swift; sourceTree = ""; }; + 1C736253AB7A95EA41B605B7 /* ItemModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemModel.swift; sourceTree = ""; }; 1C736260E748CF136FF37EA7 /* UploadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadOperation.swift; sourceTree = ""; }; - 1C73649A4ADDAAAED634F537 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; - 1C73653A9EBCC466FD4E3DA6 /* String.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; - 1C7365A537608EDDE897BF7C /* Float.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Float.swift; sourceTree = ""; }; + 1C73648CEC974A2500172064 /* ViewControllerExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewControllerExtensions.swift; sourceTree = ""; }; 1C7365B06FA66294E99AC2D3 /* NetworkManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = ""; }; - 1C7365E164CCEDB0A9FDF7FA /* ExSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExSwift.swift; sourceTree = ""; }; - 1C73666529EEEBD464F193CD /* Sequence.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sequence.swift; sourceTree = ""; }; 1C7367379DEE94EBF3FAFA78 /* VideoPlayerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoPlayerController.swift; sourceTree = ""; }; 1C73673DC671535E3A049F54 /* MediaPhotoController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaPhotoController.swift; sourceTree = ""; }; 1C736777456388CA571DA17B /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; 1C73688DAB88F9360FB62A49 /* MediaItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaItem.swift; sourceTree = ""; }; - 1C7368956B34717DAFC35EFF /* Int.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Int.swift; sourceTree = ""; }; 1C7368DC7EF11A553145E169 /* Kirschkeks-256x256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Kirschkeks-256x256.png"; sourceTree = ""; }; - 1C7369BCA71AAF64F874F946 /* Character.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Character.swift; sourceTree = ""; }; 1C7369EC16B19B32B515169E /* NetData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetData.swift; sourceTree = ""; }; 1C7369F53095B7A4D65679C2 /* DetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; + 1C736B794396F2E50387B8F2 /* stringutil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = stringutil.swift; sourceTree = ""; }; 1C736BC4450890C45F8FBC63 /* LayoutTools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutTools.swift; sourceTree = ""; }; - 1C736BCC6787411AA435D1E6 /* Double.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Double.swift; sourceTree = ""; }; - 1C736C43137E3B8391E5F07B /* Bool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bool.swift; sourceTree = ""; }; 1C736C60C423AE87B8D0F22A /* alamoimage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = alamoimage.swift; sourceTree = ""; }; 1C736D9BB5498E7E8F11C754 /* HeaderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderCell.swift; sourceTree = ""; }; - 1C736DB8164E3EF18FA6F28D /* NSArray.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSArray.swift; sourceTree = ""; }; 1C736DCCE3AA9993E15F7652 /* UIImageExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageExtension.swift; sourceTree = ""; }; - 1C736E7B8BAD989DC544088E /* Range.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Range.swift; sourceTree = ""; }; 1C736F9338CE36708244D42A /* DataLoadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataLoadOperation.swift; sourceTree = ""; }; 5C6CBA548F885BF342F594EA /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; A170BFB886D61D57F7009BFC /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; @@ -156,27 +133,6 @@ path = master; sourceTree = ""; }; - 1C73654BC4A499E5D104B61F /* exswift */ = { - isa = PBXGroup; - children = ( - 1C7369BCA71AAF64F874F946 /* Character.swift */, - 1C736C43137E3B8391E5F07B /* Bool.swift */, - 1C736DB8164E3EF18FA6F28D /* NSArray.swift */, - 1C736BCC6787411AA435D1E6 /* Double.swift */, - 1C73653A9EBCC466FD4E3DA6 /* String.swift */, - 1C7361024E8CCBDE9C052658 /* ExSwift.h */, - 1C7368956B34717DAFC35EFF /* Int.swift */, - 1C7365A537608EDDE897BF7C /* Float.swift */, - 1C7360E65B741C57C034FC7C /* NSDate.swift */, - 1C73666529EEEBD464F193CD /* Sequence.swift */, - 1C7365E164CCEDB0A9FDF7FA /* ExSwift.swift */, - 1C73649A4ADDAAAED634F537 /* Dictionary.swift */, - 1C736E7B8BAD989DC544088E /* Range.swift */, - 1C73605289164DF119E60720 /* Array.swift */, - ); - path = exswift; - sourceTree = ""; - }; 1C7365603CAE04E39B73D843 /* util */ = { isa = PBXGroup; children = ( @@ -185,11 +141,12 @@ 1C73620D01687FB4F1811C5C /* NetworkHelper.swift */, 1C736260E748CF136FF37EA7 /* UploadOperation.swift */, 1C7369EC16B19B32B515169E /* NetData.swift */, - 1C73618272969871601AB817 /* alamojson.swift */, 1C7360744ABACC3557D05760 /* HanekeFetchOperation.swift */, 1C7360A94DBECA685ED8602F /* ImageLoadOperation.swift */, 1C736C60C423AE87B8D0F22A /* alamoimage.swift */, 1C736F9338CE36708244D42A /* DataLoadOperation.swift */, + 1C736B794396F2E50387B8F2 /* stringutil.swift */, + 1C73648CEC974A2500172064 /* ViewControllerExtensions.swift */, ); path = util; sourceTree = ""; @@ -199,6 +156,7 @@ children = ( 1C7365B06FA66294E99AC2D3 /* NetworkManager.swift */, 1C73688DAB88F9360FB62A49 /* MediaItem.swift */, + 1C736253AB7A95EA41B605B7 /* ItemModel.swift */, ); path = core; sourceTree = ""; @@ -256,7 +214,6 @@ 1C73615846EE8B07DAAFD230 /* detail */, 1C7364808E72BFA7575E75E1 /* master */, 1C7363B608460DED4F522D1C /* photo */, - 1C73654BC4A499E5D104B61F /* exswift */, ); path = kplayer; sourceTree = ""; @@ -333,11 +290,14 @@ C98AF5C71B124D6A00D196CC /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0630; + LastSwiftMigration = 0700; + LastSwiftUpdateCheck = 0700; + LastUpgradeCheck = 0720; ORGANIZATIONNAME = "Marco Schmickler"; TargetAttributes = { C98AF5CE1B124D6A00D196CC = { CreatedOnToolsVersion = 6.3.1; + DevelopmentTeam = G9J99WBBN9; }; C98AF5E81B124D6A00D196CC = { CreatedOnToolsVersion = 6.3.1; @@ -451,26 +411,15 @@ 1C73654C9EA6D255CFC039C5 /* NetworkHelper.swift in Sources */, 1C73640D928DE56D35175D39 /* UploadOperation.swift in Sources */, 1C73646F87B495A47D7943C7 /* NetData.swift in Sources */, - 1C736C5DD23466269607E07F /* alamojson.swift in Sources */, 1C73693A1334A7792856FC58 /* MasterViewController.swift in Sources */, 1C7365885FAF292F2221ED44 /* MediaPhotoController.swift in Sources */, - 1C7364F64DCE93FCF4671D98 /* Character.swift in Sources */, - 1C73677CD719D0F82D144BF6 /* Bool.swift in Sources */, - 1C736F3BC10D1A5ECEA50A30 /* NSArray.swift in Sources */, - 1C736C5EA9EEFF40AD42CA60 /* Double.swift in Sources */, - 1C73689C7E6A25E758B16C54 /* String.swift in Sources */, - 1C736C9C89BABC38C80025FE /* Int.swift in Sources */, - 1C7363402AB2B0E5CA0B35BF /* Float.swift in Sources */, - 1C736A88E2CF46197FAE3160 /* NSDate.swift in Sources */, - 1C7363D241B56AEE78D82FAD /* Sequence.swift in Sources */, - 1C736C885C8EE7CFBF3B8DC3 /* ExSwift.swift in Sources */, - 1C7361B71E73ECBE5891B755 /* Dictionary.swift in Sources */, - 1C7369C330F1AB1E4F166050 /* Range.swift in Sources */, - 1C7361F0F80FEC5B72946923 /* Array.swift in Sources */, 1C736D16E81BA1FB325200E0 /* HanekeFetchOperation.swift in Sources */, 1C736D24891597F2728230EE /* ImageLoadOperation.swift in Sources */, 1C73626E34BA4D64ACF94AE5 /* alamoimage.swift in Sources */, 1C7367AF39961D2BA72480ED /* DataLoadOperation.swift in Sources */, + 1C73675C34BE0990D44570BE /* ItemModel.swift in Sources */, + 1C73691A9C7174E0C6B57267 /* stringutil.swift in Sources */, + 1C736821D6DF2237A3EABCC1 /* ViewControllerExtensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -533,6 +482,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -600,9 +550,13 @@ baseConfigurationReference = 5C6CBA548F885BF342F594EA /* Pods.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; INFOPLIST_FILE = kplayer/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "schmickler.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; }; name = Debug; }; @@ -611,9 +565,13 @@ baseConfigurationReference = A170BFB886D61D57F7009BFC /* Pods.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; INFOPLIST_FILE = kplayer/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "schmickler.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; }; name = Release; }; @@ -631,6 +589,7 @@ ); INFOPLIST_FILE = kplayerTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "schmickler.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/kplayer.app/kplayer"; }; @@ -646,6 +605,7 @@ ); INFOPLIST_FILE = kplayerTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "schmickler.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/kplayer.app/kplayer"; }; diff --git a/kplayer/AppDelegate.swift b/kplayer/AppDelegate.swift index c837202..4d64cab 100644 --- a/kplayer/AppDelegate.swift +++ b/kplayer/AppDelegate.swift @@ -19,28 +19,27 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele // Override point for customization after application launch. let splitViewController = self.window!.rootViewController as! UISplitViewController let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController - navigationController.topViewController.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem() + navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem() splitViewController.delegate = self let masterNavigationController = splitViewController.viewControllers[0] as! UINavigationController let controller = masterNavigationController.topViewController as! MasterViewController controller.items = [ - MediaItem(name: "fav", path:"fav", root: "/srv/samba/ren/fav", type: ItemType.VIDEOROOT), - MediaItem(name: "knk", path:"knk", root: "/srv/samba/ren/knk", type: ItemType.VIDEOROOT), - MediaItem(name: "knk_archiv", path:"knk_archiv", root: "/srv/samba/ren/knk_archiv", type: ItemType.VIDEOROOT), - MediaItem(name: "knk_archiv2", path:"knk_archiv2", root: "/srv/samba/ren/knk_archiv2", type: ItemType.VIDEOROOT), - MediaItem(name: "knk_archiv3", path:"knk_archiv3", root: "/srv/samba/ren/knk_archiv3", type: ItemType.VIDEOROOT), - MediaItem(name: "knk_archiv4", path:"knk_archiv4", root: "/srv/samba/ren/knk_archiv4", type: ItemType.VIDEOROOT), - MediaItem(name: "ewp", path:"ewp", root: "/srv/samba/ren/ewp", type: ItemType.ROOT), - MediaItem(name: "fjoy", path:"fjoy", root: "/srv/samba/ren/fjoy", type: ItemType.ROOT), - MediaItem(name: "heg", path:"heg", root: "/srv/samba/ren/heg", type: ItemType.ROOT), - MediaItem(name: "ten", path:"ten", root: "/srv/samba/ren/ten", type: ItemType.ROOT), - MediaItem(name: "leg", path:"leg", root: "/srv/samba/ren/leg", type: ItemType.ROOT), - MediaItem(name: "ang", path:"ang", root: "/srv/samba/ren/ang", type: ItemType.ROOT), - MediaItem(name: "series", path:"series", root: "/srv/samba/ren/series", type: ItemType.ROOT), - MediaItem(name: "bm", path:"bm", root: "/srv/samba/ren/bm", type: ItemType.ROOT), - MediaItem(name: "medieval", path:"medieval", root: "/srv/samba/ren/medieval", type: ItemType.ROOT), + MediaItem(name: "fav", path:"", root: "/srv/samba/ren/fav", type: ItemType.VIDEOROOT), + MediaItem(name: "knk", path:"", root: "/srv/samba/ren/knk", type: ItemType.VIDEOROOT), + MediaItem(name: "knk_archiv", path:"", root: "/srv/samba/ren/knk_archiv", type: ItemType.VIDEOROOT), + MediaItem(name: "knk_archiv2", path:"", root: "/srv/samba/ren/knk_archiv2", type: ItemType.VIDEOROOT), + MediaItem(name: "knk_archiv3", path:"", root: "/srv/samba/ren/knk_archiv3", type: ItemType.VIDEOROOT), + MediaItem(name: "knk_archiv4", path:"", root: "/srv/samba/ren/knk_archiv4", type: ItemType.VIDEOROOT), + MediaItem(name: "fjoy", path:"", root: "/srv/samba/ren/fjoy", type: ItemType.ROOT), + MediaItem(name: "heg", path:"", root: "/srv/samba/ren/heg", type: ItemType.ROOT), + MediaItem(name: "ten", path:"", root: "/srv/samba/ren/ten", type: ItemType.ROOT), + MediaItem(name: "leg", path:"", root: "/srv/samba/ren/leg", type: ItemType.ROOT), + MediaItem(name: "ang", path:"", root: "/srv/samba/ren/ang", type: ItemType.ROOT), + MediaItem(name: "series", path:"", root: "/srv/samba/ren/series", type: ItemType.ROOT), + MediaItem(name: "bm", path:"", root: "/srv/samba/ren/bm", type: ItemType.ROOT), + MediaItem(name: "medieval", path:"", root: "/srv/samba/ren/medieval", type: ItemType.ROOT), ] @@ -73,7 +72,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele // MARK: - Split view - func splitViewController(splitViewController: UISplitViewController, collapseSecondaryViewController secondaryViewController:UIViewController!, ontoPrimaryViewController primaryViewController:UIViewController!) -> Bool { + func splitViewController(splitViewController: UISplitViewController, collapseSecondaryViewController secondaryViewController:UIViewController, ontoPrimaryViewController primaryViewController:UIViewController) -> Bool { if let secondaryAsNavController = secondaryViewController as? UINavigationController { if let topAsDetailController = secondaryAsNavController.topViewController as? DetailViewController { if topAsDetailController.detailItem == nil { @@ -89,7 +88,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele lazy var applicationDocumentsDirectory: NSURL = { // The directory the application uses to store the Core Data store file. This code uses a directory named "schmickler.kplayer" in the application's documents Application Support directory. let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask) - return urls[urls.count-1] as! NSURL + return urls[urls.count-1] }() lazy var managedObjectModel: NSManagedObjectModel = { @@ -105,7 +104,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("kplayer.sqlite") var error: NSError? = nil var failureReason = "There was an error creating or loading the application's saved data." - if coordinator!.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil, error: &error) == nil { + do { + try coordinator!.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil) + } catch var error1 as NSError { + error = error1 coordinator = nil // Report any error we got. var dict = [String: AnyObject]() @@ -117,6 +119,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. NSLog("Unresolved error \(error), \(error!.userInfo)") abort() + } catch { + fatalError() } return coordinator @@ -138,11 +142,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele func saveContext () { if let moc = self.managedObjectContext { var error: NSError? = nil - if moc.hasChanges && !moc.save(&error) { - // Replace this implementation with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - NSLog("Unresolved error \(error), \(error!.userInfo)") - abort() + if moc.hasChanges { + do { + try moc.save() + } catch let error1 as NSError { + error = error1 + // Replace this implementation with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + NSLog("Unresolved error \(error), \(error!.userInfo)") + abort() + } } } } diff --git a/kplayer/Base.lproj/Main.storyboard b/kplayer/Base.lproj/Main.storyboard index 72d7782..c8a3a52 100644 --- a/kplayer/Base.lproj/Main.storyboard +++ b/kplayer/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -28,7 +29,7 @@ - +