├── .gitignore ├── Cartfile ├── Cartfile.resolved ├── README.md ├── SimpleZhihuDaily.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── mcui.xcuserdatad │ └── xcschemes │ ├── SimpleZhihuDaily.xcscheme │ └── xcschememanagement.plist ├── SimpleZhihuDaily ├── Apis │ ├── AlamofireRequest+JSONSerializable.swift │ ├── ResponseJSONObjectSerializable.swift │ └── Router.swift ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── Controllers │ ├── ContainerViewController.swift │ ├── ContentViewController.swift │ └── StoriesTableViewController.swift ├── Info.plist ├── Models │ └── Entry.swift └── Views │ └── Main.storyboard ├── SimpleZhihuDailyTests ├── Info.plist └── SimpleZhihuDailyTests.swift └── SimpleZhihuDailyUITests ├── Info.plist └── SimpleZhihuDailyUITests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | # Swift Package Manager 31 | # 32 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 33 | # Packages/ 34 | .build/ 35 | 36 | # CocoaPods 37 | # 38 | # We recommend against adding the Pods directory to your .gitignore. However 39 | # you should judge for yourself, the pros and cons are mentioned at: 40 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 41 | # 42 | Pods/ 43 | 44 | # Carthage 45 | # 46 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 47 | Carthage/Checkouts 48 | Carthage/Build 49 | 50 | # fastlane 51 | # 52 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 53 | # screenshots whenever they are needed. 54 | # For more information about the recommended setup visit: 55 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 56 | 57 | fastlane/report.xml 58 | fastlane/screenshots 59 | 60 | # AppCode 61 | .idea/ 62 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "Alamofire/Alamofire" 2 | github "SwiftyJSON/SwiftyJSON" 3 | github "onevcat/Kingfisher" 4 | github "realm/realm-cocoa" 5 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "Alamofire/Alamofire" "4.4.0" 2 | github "onevcat/Kingfisher" "3.5.1" 3 | github "SwiftyJSON/SwiftyJSON" "3.1.4" 4 | github "realm/realm-cocoa" "v2.4.3" 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Simple ZhihuDaily 2 | 一个简单的[**知乎日报**](http://daily.zhihu.com)阅读器。 3 | 4 | * 用到的第三方库包括: 5 | * [Alamofire](https://github.com/Alamofire/Alamofire) 6 | * [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON) 7 | * [Kingfisher](https://github.com/onevcat/Kingfisher) 8 | * [Realm](https://realm.io/) 9 | 10 | 使用 [Carthage](https://github.com/Carthage/Carthage) 管理。 11 | 12 | ## 为什么是 Cathage 13 | 14 | 考虑到 **Swift Package Manager** 依然处于beta状态, 除了 *Carthage* 之外我能选的就只有 **CocoaPods** 了。 15 | *Carthage* 和 *CocoaPods* 两者各有优缺。在我看来 *Carthage* 最大的缺点是不能像 *CocoaPods* 那样方便的查看第三方库的代码实现,但不用每次都把第三方库的代码都编一遍这个好处就让我下定决心要用它了。 16 | 就像它的名字那样,**Swift** 到现在还在飞速发展,每年都是一个新的样子,我们享受各种新东西的同时,各种bug也一直没断过,最近困扰我的最大问题就是 *Swift* 的[编译时间问题](https://medium.com/@RobertGummesson/regarding-swift-build-time-optimizations-fc92cdd91e31#.43ddf9po4)了,原本只需要一分钟的工程,现在竟然需要5分钟,简直不能忍,所以不用每次都编译第三方库的 *Carthage* 就成为了我最喜欢的包管理工具。 17 | 18 | ## Core Data vs. Realm 19 | 因为公司的某个app大量使用了 **Core Data**,接手那个项目以来我没少用它,*Core Data* 当然有我喜欢的地方,比如 [NSFetchedResultsController](https://developer.apple.com/reference/coredata/nsfetchedresultscontroller),但也有不少我痛恨不已的地方。其实在我看来,*Core Data* 最大的问题是它根本不是为 *Client-Server*架构准备的。 20 | 这个项目里的数据库其实就是一种*Cache*,没必要使用*Core Data*这种重量级的框架。 21 | 我对**Realm**一直很好奇(不得不提的是,他们的[Blog](https://realm.io/news/)简直太好了),所以正好趁这个机会试试看。 22 | -------------------------------------------------------------------------------- /SimpleZhihuDaily.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 189EE4451DF6BC6B00F69F84 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 189EE4401DF6BC6B00F69F84 /* Alamofire.framework */; }; 11 | 189EE4461DF6BC6B00F69F84 /* Kingfisher.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 189EE4411DF6BC6B00F69F84 /* Kingfisher.framework */; }; 12 | 189EE4471DF6BC6B00F69F84 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 189EE4421DF6BC6B00F69F84 /* Realm.framework */; }; 13 | 189EE4481DF6BC6B00F69F84 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 189EE4431DF6BC6B00F69F84 /* RealmSwift.framework */; }; 14 | 189EE4491DF6BC6B00F69F84 /* SwiftyJSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 189EE4441DF6BC6B00F69F84 /* SwiftyJSON.framework */; }; 15 | 189EE44F1DF6BD2C00F69F84 /* Alamofire.framework.dSYM in Copy Files For Carthage */ = {isa = PBXBuildFile; fileRef = 189EE44A1DF6BD2C00F69F84 /* Alamofire.framework.dSYM */; }; 16 | 189EE4501DF6BD2C00F69F84 /* Kingfisher.framework.dSYM in Copy Files For Carthage */ = {isa = PBXBuildFile; fileRef = 189EE44B1DF6BD2C00F69F84 /* Kingfisher.framework.dSYM */; }; 17 | 189EE4511DF6BD2C00F69F84 /* Realm.framework.dSYM in Copy Files For Carthage */ = {isa = PBXBuildFile; fileRef = 189EE44C1DF6BD2C00F69F84 /* Realm.framework.dSYM */; }; 18 | 189EE4521DF6BD2C00F69F84 /* RealmSwift.framework.dSYM in Copy Files For Carthage */ = {isa = PBXBuildFile; fileRef = 189EE44D1DF6BD2C00F69F84 /* RealmSwift.framework.dSYM */; }; 19 | 189EE4531DF6BD2C00F69F84 /* SwiftyJSON.framework.dSYM in Copy Files For Carthage */ = {isa = PBXBuildFile; fileRef = 189EE44E1DF6BD2C00F69F84 /* SwiftyJSON.framework.dSYM */; }; 20 | 189EE4581DF6BE3E00F69F84 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 189EE4571DF6BE3E00F69F84 /* Main.storyboard */; }; 21 | 189EE45A1DF6BF4500F69F84 /* StoriesTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 189EE4591DF6BF4500F69F84 /* StoriesTableViewController.swift */; }; 22 | 189EE45C1DF6BF6F00F69F84 /* ContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 189EE45B1DF6BF6F00F69F84 /* ContentViewController.swift */; }; 23 | 189EE45E1DF6BF8A00F69F84 /* ContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 189EE45D1DF6BF8A00F69F84 /* ContainerViewController.swift */; }; 24 | 18A165E81C3655A800F8736A /* ResponseJSONObjectSerializable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18A165E71C3655A800F8736A /* ResponseJSONObjectSerializable.swift */; }; 25 | 18A165EA1C3655CF00F8736A /* AlamofireRequest+JSONSerializable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18A165E91C3655CF00F8736A /* AlamofireRequest+JSONSerializable.swift */; }; 26 | 18A165EC1C365C6800F8736A /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18A165EB1C365C6800F8736A /* Router.swift */; }; 27 | 18A84A211C36166E00F8905A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18A84A201C36166E00F8905A /* AppDelegate.swift */; }; 28 | 18A84A2B1C36166E00F8905A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 18A84A2A1C36166E00F8905A /* Assets.xcassets */; }; 29 | 18A84A2E1C36166E00F8905A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18A84A2C1C36166E00F8905A /* LaunchScreen.storyboard */; }; 30 | 18A84A391C36166E00F8905A /* SimpleZhihuDailyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18A84A381C36166E00F8905A /* SimpleZhihuDailyTests.swift */; }; 31 | 18A84A441C36166E00F8905A /* SimpleZhihuDailyUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18A84A431C36166E00F8905A /* SimpleZhihuDailyUITests.swift */; }; 32 | 18F728F41E6DA0C70061FDD2 /* Entry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18F728F31E6DA0C70061FDD2 /* Entry.swift */; }; 33 | /* End PBXBuildFile section */ 34 | 35 | /* Begin PBXContainerItemProxy section */ 36 | 18A84A351C36166E00F8905A /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = 18A84A151C36166D00F8905A /* Project object */; 39 | proxyType = 1; 40 | remoteGlobalIDString = 18A84A1C1C36166D00F8905A; 41 | remoteInfo = SimpleZhihuDaily; 42 | }; 43 | 18A84A401C36166E00F8905A /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 18A84A151C36166D00F8905A /* Project object */; 46 | proxyType = 1; 47 | remoteGlobalIDString = 18A84A1C1C36166D00F8905A; 48 | remoteInfo = SimpleZhihuDaily; 49 | }; 50 | /* End PBXContainerItemProxy section */ 51 | 52 | /* Begin PBXCopyFilesBuildPhase section */ 53 | 18A46BC31C361CEF0027AEED /* Copy Files For Carthage */ = { 54 | isa = PBXCopyFilesBuildPhase; 55 | buildActionMask = 2147483647; 56 | dstPath = ""; 57 | dstSubfolderSpec = 16; 58 | files = ( 59 | 189EE44F1DF6BD2C00F69F84 /* Alamofire.framework.dSYM in Copy Files For Carthage */, 60 | 189EE4501DF6BD2C00F69F84 /* Kingfisher.framework.dSYM in Copy Files For Carthage */, 61 | 189EE4511DF6BD2C00F69F84 /* Realm.framework.dSYM in Copy Files For Carthage */, 62 | 189EE4521DF6BD2C00F69F84 /* RealmSwift.framework.dSYM in Copy Files For Carthage */, 63 | 189EE4531DF6BD2C00F69F84 /* SwiftyJSON.framework.dSYM in Copy Files For Carthage */, 64 | ); 65 | name = "Copy Files For Carthage"; 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXCopyFilesBuildPhase section */ 69 | 70 | /* Begin PBXFileReference section */ 71 | 189EE4401DF6BC6B00F69F84 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = ""; }; 72 | 189EE4411DF6BC6B00F69F84 /* Kingfisher.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kingfisher.framework; path = Carthage/Build/iOS/Kingfisher.framework; sourceTree = ""; }; 73 | 189EE4421DF6BC6B00F69F84 /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = Carthage/Build/iOS/Realm.framework; sourceTree = ""; }; 74 | 189EE4431DF6BC6B00F69F84 /* RealmSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RealmSwift.framework; path = Carthage/Build/iOS/RealmSwift.framework; sourceTree = ""; }; 75 | 189EE4441DF6BC6B00F69F84 /* SwiftyJSON.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftyJSON.framework; path = Carthage/Build/iOS/SwiftyJSON.framework; sourceTree = ""; }; 76 | 189EE44A1DF6BD2C00F69F84 /* Alamofire.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = Alamofire.framework.dSYM; path = Carthage/Build/iOS/Alamofire.framework.dSYM; sourceTree = ""; }; 77 | 189EE44B1DF6BD2C00F69F84 /* Kingfisher.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = Kingfisher.framework.dSYM; path = Carthage/Build/iOS/Kingfisher.framework.dSYM; sourceTree = ""; }; 78 | 189EE44C1DF6BD2C00F69F84 /* Realm.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = Realm.framework.dSYM; path = Carthage/Build/iOS/Realm.framework.dSYM; sourceTree = ""; }; 79 | 189EE44D1DF6BD2C00F69F84 /* RealmSwift.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = RealmSwift.framework.dSYM; path = Carthage/Build/iOS/RealmSwift.framework.dSYM; sourceTree = ""; }; 80 | 189EE44E1DF6BD2C00F69F84 /* SwiftyJSON.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = SwiftyJSON.framework.dSYM; path = Carthage/Build/iOS/SwiftyJSON.framework.dSYM; sourceTree = ""; }; 81 | 189EE4571DF6BE3E00F69F84 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 82 | 189EE4591DF6BF4500F69F84 /* StoriesTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoriesTableViewController.swift; sourceTree = ""; }; 83 | 189EE45B1DF6BF6F00F69F84 /* ContentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentViewController.swift; sourceTree = ""; }; 84 | 189EE45D1DF6BF8A00F69F84 /* ContainerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContainerViewController.swift; sourceTree = ""; }; 85 | 18A165E71C3655A800F8736A /* ResponseJSONObjectSerializable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResponseJSONObjectSerializable.swift; sourceTree = ""; }; 86 | 18A165E91C3655CF00F8736A /* AlamofireRequest+JSONSerializable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AlamofireRequest+JSONSerializable.swift"; sourceTree = ""; }; 87 | 18A165EB1C365C6800F8736A /* Router.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Router.swift; sourceTree = ""; }; 88 | 18A84A1D1C36166E00F8905A /* SimpleZhihuDaily.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleZhihuDaily.app; sourceTree = BUILT_PRODUCTS_DIR; }; 89 | 18A84A201C36166E00F8905A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 90 | 18A84A2A1C36166E00F8905A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 91 | 18A84A2D1C36166E00F8905A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 92 | 18A84A2F1C36166E00F8905A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 93 | 18A84A341C36166E00F8905A /* SimpleZhihuDailyTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SimpleZhihuDailyTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 94 | 18A84A381C36166E00F8905A /* SimpleZhihuDailyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleZhihuDailyTests.swift; sourceTree = ""; }; 95 | 18A84A3A1C36166E00F8905A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 96 | 18A84A3F1C36166E00F8905A /* SimpleZhihuDailyUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SimpleZhihuDailyUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 97 | 18A84A431C36166E00F8905A /* SimpleZhihuDailyUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleZhihuDailyUITests.swift; sourceTree = ""; }; 98 | 18A84A451C36166E00F8905A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 99 | 18F728F31E6DA0C70061FDD2 /* Entry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Entry.swift; sourceTree = ""; }; 100 | /* End PBXFileReference section */ 101 | 102 | /* Begin PBXFrameworksBuildPhase section */ 103 | 18A84A1A1C36166D00F8905A /* Frameworks */ = { 104 | isa = PBXFrameworksBuildPhase; 105 | buildActionMask = 2147483647; 106 | files = ( 107 | 189EE4451DF6BC6B00F69F84 /* Alamofire.framework in Frameworks */, 108 | 189EE4461DF6BC6B00F69F84 /* Kingfisher.framework in Frameworks */, 109 | 189EE4471DF6BC6B00F69F84 /* Realm.framework in Frameworks */, 110 | 189EE4481DF6BC6B00F69F84 /* RealmSwift.framework in Frameworks */, 111 | 189EE4491DF6BC6B00F69F84 /* SwiftyJSON.framework in Frameworks */, 112 | ); 113 | runOnlyForDeploymentPostprocessing = 0; 114 | }; 115 | 18A84A311C36166E00F8905A /* Frameworks */ = { 116 | isa = PBXFrameworksBuildPhase; 117 | buildActionMask = 2147483647; 118 | files = ( 119 | ); 120 | runOnlyForDeploymentPostprocessing = 0; 121 | }; 122 | 18A84A3C1C36166E00F8905A /* Frameworks */ = { 123 | isa = PBXFrameworksBuildPhase; 124 | buildActionMask = 2147483647; 125 | files = ( 126 | ); 127 | runOnlyForDeploymentPostprocessing = 0; 128 | }; 129 | /* End PBXFrameworksBuildPhase section */ 130 | 131 | /* Begin PBXGroup section */ 132 | 189EE43F1DF6BC6B00F69F84 /* Frameworks */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 189EE4401DF6BC6B00F69F84 /* Alamofire.framework */, 136 | 189EE4411DF6BC6B00F69F84 /* Kingfisher.framework */, 137 | 189EE4421DF6BC6B00F69F84 /* Realm.framework */, 138 | 189EE4431DF6BC6B00F69F84 /* RealmSwift.framework */, 139 | 189EE4441DF6BC6B00F69F84 /* SwiftyJSON.framework */, 140 | ); 141 | name = Frameworks; 142 | sourceTree = ""; 143 | }; 144 | 189EE4541DF6BD3500F69F84 /* Carghage */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 189EE44A1DF6BD2C00F69F84 /* Alamofire.framework.dSYM */, 148 | 189EE44B1DF6BD2C00F69F84 /* Kingfisher.framework.dSYM */, 149 | 189EE44C1DF6BD2C00F69F84 /* Realm.framework.dSYM */, 150 | 189EE44D1DF6BD2C00F69F84 /* RealmSwift.framework.dSYM */, 151 | 189EE44E1DF6BD2C00F69F84 /* SwiftyJSON.framework.dSYM */, 152 | ); 153 | name = Carghage; 154 | sourceTree = ""; 155 | }; 156 | 18A165E41C362C0B00F8736A /* Models */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 18F728F31E6DA0C70061FDD2 /* Entry.swift */, 160 | ); 161 | path = Models; 162 | sourceTree = ""; 163 | }; 164 | 18A84A141C36166D00F8905A = { 165 | isa = PBXGroup; 166 | children = ( 167 | 189EE4541DF6BD3500F69F84 /* Carghage */, 168 | 189EE43F1DF6BC6B00F69F84 /* Frameworks */, 169 | 18A84A1F1C36166E00F8905A /* SimpleZhihuDaily */, 170 | 18A84A371C36166E00F8905A /* SimpleZhihuDailyTests */, 171 | 18A84A421C36166E00F8905A /* SimpleZhihuDailyUITests */, 172 | 18A84A1E1C36166E00F8905A /* Products */, 173 | ); 174 | sourceTree = ""; 175 | }; 176 | 18A84A1E1C36166E00F8905A /* Products */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 18A84A1D1C36166E00F8905A /* SimpleZhihuDaily.app */, 180 | 18A84A341C36166E00F8905A /* SimpleZhihuDailyTests.xctest */, 181 | 18A84A3F1C36166E00F8905A /* SimpleZhihuDailyUITests.xctest */, 182 | ); 183 | name = Products; 184 | sourceTree = ""; 185 | }; 186 | 18A84A1F1C36166E00F8905A /* SimpleZhihuDaily */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 330EA37217EE8C02A80286B5 /* Apis */, 190 | 18A165E41C362C0B00F8736A /* Models */, 191 | 330EABC704C6DE0A234B6E86 /* Views */, 192 | 330EA3521400AB3A7EFDB485 /* Controllers */, 193 | 18A84A201C36166E00F8905A /* AppDelegate.swift */, 194 | 18A84A2A1C36166E00F8905A /* Assets.xcassets */, 195 | 18A84A2C1C36166E00F8905A /* LaunchScreen.storyboard */, 196 | 18A84A2F1C36166E00F8905A /* Info.plist */, 197 | ); 198 | path = SimpleZhihuDaily; 199 | sourceTree = ""; 200 | }; 201 | 18A84A371C36166E00F8905A /* SimpleZhihuDailyTests */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | 18A84A381C36166E00F8905A /* SimpleZhihuDailyTests.swift */, 205 | 18A84A3A1C36166E00F8905A /* Info.plist */, 206 | ); 207 | path = SimpleZhihuDailyTests; 208 | sourceTree = ""; 209 | }; 210 | 18A84A421C36166E00F8905A /* SimpleZhihuDailyUITests */ = { 211 | isa = PBXGroup; 212 | children = ( 213 | 18A84A431C36166E00F8905A /* SimpleZhihuDailyUITests.swift */, 214 | 18A84A451C36166E00F8905A /* Info.plist */, 215 | ); 216 | path = SimpleZhihuDailyUITests; 217 | sourceTree = ""; 218 | }; 219 | 330EA3521400AB3A7EFDB485 /* Controllers */ = { 220 | isa = PBXGroup; 221 | children = ( 222 | 189EE4591DF6BF4500F69F84 /* StoriesTableViewController.swift */, 223 | 189EE45B1DF6BF6F00F69F84 /* ContentViewController.swift */, 224 | 189EE45D1DF6BF8A00F69F84 /* ContainerViewController.swift */, 225 | ); 226 | path = Controllers; 227 | sourceTree = ""; 228 | }; 229 | 330EA37217EE8C02A80286B5 /* Apis */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | 18A165E71C3655A800F8736A /* ResponseJSONObjectSerializable.swift */, 233 | 18A165E91C3655CF00F8736A /* AlamofireRequest+JSONSerializable.swift */, 234 | 18A165EB1C365C6800F8736A /* Router.swift */, 235 | ); 236 | path = Apis; 237 | sourceTree = ""; 238 | }; 239 | 330EABC704C6DE0A234B6E86 /* Views */ = { 240 | isa = PBXGroup; 241 | children = ( 242 | 189EE4571DF6BE3E00F69F84 /* Main.storyboard */, 243 | ); 244 | path = Views; 245 | sourceTree = ""; 246 | }; 247 | /* End PBXGroup section */ 248 | 249 | /* Begin PBXNativeTarget section */ 250 | 18A84A1C1C36166D00F8905A /* SimpleZhihuDaily */ = { 251 | isa = PBXNativeTarget; 252 | buildConfigurationList = 18A84A481C36166E00F8905A /* Build configuration list for PBXNativeTarget "SimpleZhihuDaily" */; 253 | buildPhases = ( 254 | 18A84A191C36166D00F8905A /* Sources */, 255 | 18A84A1A1C36166D00F8905A /* Frameworks */, 256 | 18A84A1B1C36166D00F8905A /* Resources */, 257 | 18A46BC21C361C980027AEED /* Run Script For Carthage */, 258 | 18A46BC31C361CEF0027AEED /* Copy Files For Carthage */, 259 | ); 260 | buildRules = ( 261 | ); 262 | dependencies = ( 263 | ); 264 | name = SimpleZhihuDaily; 265 | productName = SimpleZhihuDaily; 266 | productReference = 18A84A1D1C36166E00F8905A /* SimpleZhihuDaily.app */; 267 | productType = "com.apple.product-type.application"; 268 | }; 269 | 18A84A331C36166E00F8905A /* SimpleZhihuDailyTests */ = { 270 | isa = PBXNativeTarget; 271 | buildConfigurationList = 18A84A4B1C36166E00F8905A /* Build configuration list for PBXNativeTarget "SimpleZhihuDailyTests" */; 272 | buildPhases = ( 273 | 18A84A301C36166E00F8905A /* Sources */, 274 | 18A84A311C36166E00F8905A /* Frameworks */, 275 | 18A84A321C36166E00F8905A /* Resources */, 276 | ); 277 | buildRules = ( 278 | ); 279 | dependencies = ( 280 | 18A84A361C36166E00F8905A /* PBXTargetDependency */, 281 | ); 282 | name = SimpleZhihuDailyTests; 283 | productName = SimpleZhihuDailyTests; 284 | productReference = 18A84A341C36166E00F8905A /* SimpleZhihuDailyTests.xctest */; 285 | productType = "com.apple.product-type.bundle.unit-test"; 286 | }; 287 | 18A84A3E1C36166E00F8905A /* SimpleZhihuDailyUITests */ = { 288 | isa = PBXNativeTarget; 289 | buildConfigurationList = 18A84A4E1C36166E00F8905A /* Build configuration list for PBXNativeTarget "SimpleZhihuDailyUITests" */; 290 | buildPhases = ( 291 | 18A84A3B1C36166E00F8905A /* Sources */, 292 | 18A84A3C1C36166E00F8905A /* Frameworks */, 293 | 18A84A3D1C36166E00F8905A /* Resources */, 294 | ); 295 | buildRules = ( 296 | ); 297 | dependencies = ( 298 | 18A84A411C36166E00F8905A /* PBXTargetDependency */, 299 | ); 300 | name = SimpleZhihuDailyUITests; 301 | productName = SimpleZhihuDailyUITests; 302 | productReference = 18A84A3F1C36166E00F8905A /* SimpleZhihuDailyUITests.xctest */; 303 | productType = "com.apple.product-type.bundle.ui-testing"; 304 | }; 305 | /* End PBXNativeTarget section */ 306 | 307 | /* Begin PBXProject section */ 308 | 18A84A151C36166D00F8905A /* Project object */ = { 309 | isa = PBXProject; 310 | attributes = { 311 | LastSwiftUpdateCheck = 0720; 312 | LastUpgradeCheck = 0810; 313 | ORGANIZATIONNAME = CuiMingyu; 314 | TargetAttributes = { 315 | 18A84A1C1C36166D00F8905A = { 316 | CreatedOnToolsVersion = 7.2; 317 | DevelopmentTeam = S93SS7F2CT; 318 | LastSwiftMigration = 0810; 319 | }; 320 | 18A84A331C36166E00F8905A = { 321 | CreatedOnToolsVersion = 7.2; 322 | DevelopmentTeam = S93SS7F2CT; 323 | LastSwiftMigration = 0810; 324 | TestTargetID = 18A84A1C1C36166D00F8905A; 325 | }; 326 | 18A84A3E1C36166E00F8905A = { 327 | CreatedOnToolsVersion = 7.2; 328 | DevelopmentTeam = S93SS7F2CT; 329 | LastSwiftMigration = 0810; 330 | TestTargetID = 18A84A1C1C36166D00F8905A; 331 | }; 332 | }; 333 | }; 334 | buildConfigurationList = 18A84A181C36166D00F8905A /* Build configuration list for PBXProject "SimpleZhihuDaily" */; 335 | compatibilityVersion = "Xcode 3.2"; 336 | developmentRegion = English; 337 | hasScannedForEncodings = 0; 338 | knownRegions = ( 339 | en, 340 | Base, 341 | ); 342 | mainGroup = 18A84A141C36166D00F8905A; 343 | productRefGroup = 18A84A1E1C36166E00F8905A /* Products */; 344 | projectDirPath = ""; 345 | projectRoot = ""; 346 | targets = ( 347 | 18A84A1C1C36166D00F8905A /* SimpleZhihuDaily */, 348 | 18A84A331C36166E00F8905A /* SimpleZhihuDailyTests */, 349 | 18A84A3E1C36166E00F8905A /* SimpleZhihuDailyUITests */, 350 | ); 351 | }; 352 | /* End PBXProject section */ 353 | 354 | /* Begin PBXResourcesBuildPhase section */ 355 | 18A84A1B1C36166D00F8905A /* Resources */ = { 356 | isa = PBXResourcesBuildPhase; 357 | buildActionMask = 2147483647; 358 | files = ( 359 | 189EE4581DF6BE3E00F69F84 /* Main.storyboard in Resources */, 360 | 18A84A2E1C36166E00F8905A /* LaunchScreen.storyboard in Resources */, 361 | 18A84A2B1C36166E00F8905A /* Assets.xcassets in Resources */, 362 | ); 363 | runOnlyForDeploymentPostprocessing = 0; 364 | }; 365 | 18A84A321C36166E00F8905A /* Resources */ = { 366 | isa = PBXResourcesBuildPhase; 367 | buildActionMask = 2147483647; 368 | files = ( 369 | ); 370 | runOnlyForDeploymentPostprocessing = 0; 371 | }; 372 | 18A84A3D1C36166E00F8905A /* Resources */ = { 373 | isa = PBXResourcesBuildPhase; 374 | buildActionMask = 2147483647; 375 | files = ( 376 | ); 377 | runOnlyForDeploymentPostprocessing = 0; 378 | }; 379 | /* End PBXResourcesBuildPhase section */ 380 | 381 | /* Begin PBXShellScriptBuildPhase section */ 382 | 18A46BC21C361C980027AEED /* Run Script For Carthage */ = { 383 | isa = PBXShellScriptBuildPhase; 384 | buildActionMask = 2147483647; 385 | files = ( 386 | ); 387 | inputPaths = ( 388 | "$(SRCROOT)/Carthage/Build/iOS/Alamofire.framework", 389 | "$(SRCROOT)/Carthage/Build/iOS/SwiftyJSON.framework", 390 | "$(SRCROOT)/Carthage/Build/iOS/Kingfisher.framework", 391 | "$(SRCROOT)/Carthage/Build/iOS/Realm.framework", 392 | "$(SRCROOT)/Carthage/Build/iOS/RealmSwift.framework", 393 | ); 394 | name = "Run Script For Carthage"; 395 | outputPaths = ( 396 | ); 397 | runOnlyForDeploymentPostprocessing = 0; 398 | shellPath = /bin/sh; 399 | shellScript = "/usr/local/bin/carthage copy-frameworks"; 400 | }; 401 | /* End PBXShellScriptBuildPhase section */ 402 | 403 | /* Begin PBXSourcesBuildPhase section */ 404 | 18A84A191C36166D00F8905A /* Sources */ = { 405 | isa = PBXSourcesBuildPhase; 406 | buildActionMask = 2147483647; 407 | files = ( 408 | 18F728F41E6DA0C70061FDD2 /* Entry.swift in Sources */, 409 | 18A84A211C36166E00F8905A /* AppDelegate.swift in Sources */, 410 | 18A165E81C3655A800F8736A /* ResponseJSONObjectSerializable.swift in Sources */, 411 | 189EE45E1DF6BF8A00F69F84 /* ContainerViewController.swift in Sources */, 412 | 189EE45A1DF6BF4500F69F84 /* StoriesTableViewController.swift in Sources */, 413 | 18A165EA1C3655CF00F8736A /* AlamofireRequest+JSONSerializable.swift in Sources */, 414 | 189EE45C1DF6BF6F00F69F84 /* ContentViewController.swift in Sources */, 415 | 18A165EC1C365C6800F8736A /* Router.swift in Sources */, 416 | ); 417 | runOnlyForDeploymentPostprocessing = 0; 418 | }; 419 | 18A84A301C36166E00F8905A /* Sources */ = { 420 | isa = PBXSourcesBuildPhase; 421 | buildActionMask = 2147483647; 422 | files = ( 423 | 18A84A391C36166E00F8905A /* SimpleZhihuDailyTests.swift in Sources */, 424 | ); 425 | runOnlyForDeploymentPostprocessing = 0; 426 | }; 427 | 18A84A3B1C36166E00F8905A /* Sources */ = { 428 | isa = PBXSourcesBuildPhase; 429 | buildActionMask = 2147483647; 430 | files = ( 431 | 18A84A441C36166E00F8905A /* SimpleZhihuDailyUITests.swift in Sources */, 432 | ); 433 | runOnlyForDeploymentPostprocessing = 0; 434 | }; 435 | /* End PBXSourcesBuildPhase section */ 436 | 437 | /* Begin PBXTargetDependency section */ 438 | 18A84A361C36166E00F8905A /* PBXTargetDependency */ = { 439 | isa = PBXTargetDependency; 440 | target = 18A84A1C1C36166D00F8905A /* SimpleZhihuDaily */; 441 | targetProxy = 18A84A351C36166E00F8905A /* PBXContainerItemProxy */; 442 | }; 443 | 18A84A411C36166E00F8905A /* PBXTargetDependency */ = { 444 | isa = PBXTargetDependency; 445 | target = 18A84A1C1C36166D00F8905A /* SimpleZhihuDaily */; 446 | targetProxy = 18A84A401C36166E00F8905A /* PBXContainerItemProxy */; 447 | }; 448 | /* End PBXTargetDependency section */ 449 | 450 | /* Begin PBXVariantGroup section */ 451 | 18A84A2C1C36166E00F8905A /* LaunchScreen.storyboard */ = { 452 | isa = PBXVariantGroup; 453 | children = ( 454 | 18A84A2D1C36166E00F8905A /* Base */, 455 | ); 456 | name = LaunchScreen.storyboard; 457 | sourceTree = ""; 458 | }; 459 | /* End PBXVariantGroup section */ 460 | 461 | /* Begin XCBuildConfiguration section */ 462 | 18A84A461C36166E00F8905A /* Debug */ = { 463 | isa = XCBuildConfiguration; 464 | buildSettings = { 465 | ALWAYS_SEARCH_USER_PATHS = NO; 466 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 467 | CLANG_CXX_LIBRARY = "libc++"; 468 | CLANG_ENABLE_MODULES = YES; 469 | CLANG_ENABLE_OBJC_ARC = YES; 470 | CLANG_WARN_BOOL_CONVERSION = YES; 471 | CLANG_WARN_CONSTANT_CONVERSION = YES; 472 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 473 | CLANG_WARN_EMPTY_BODY = YES; 474 | CLANG_WARN_ENUM_CONVERSION = YES; 475 | CLANG_WARN_INFINITE_RECURSION = YES; 476 | CLANG_WARN_INT_CONVERSION = YES; 477 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 478 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 479 | CLANG_WARN_UNREACHABLE_CODE = YES; 480 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 481 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 482 | COPY_PHASE_STRIP = NO; 483 | DEBUG_INFORMATION_FORMAT = dwarf; 484 | ENABLE_STRICT_OBJC_MSGSEND = YES; 485 | ENABLE_TESTABILITY = YES; 486 | GCC_C_LANGUAGE_STANDARD = gnu99; 487 | GCC_DYNAMIC_NO_PIC = NO; 488 | GCC_NO_COMMON_BLOCKS = YES; 489 | GCC_OPTIMIZATION_LEVEL = 0; 490 | GCC_PREPROCESSOR_DEFINITIONS = ( 491 | "DEBUG=1", 492 | "$(inherited)", 493 | ); 494 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 495 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 496 | GCC_WARN_UNDECLARED_SELECTOR = YES; 497 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 498 | GCC_WARN_UNUSED_FUNCTION = YES; 499 | GCC_WARN_UNUSED_VARIABLE = YES; 500 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 501 | MTL_ENABLE_DEBUG_INFO = YES; 502 | ONLY_ACTIVE_ARCH = YES; 503 | SDKROOT = iphoneos; 504 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 505 | TARGETED_DEVICE_FAMILY = "1,2"; 506 | }; 507 | name = Debug; 508 | }; 509 | 18A84A471C36166E00F8905A /* Release */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | ALWAYS_SEARCH_USER_PATHS = NO; 513 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 514 | CLANG_CXX_LIBRARY = "libc++"; 515 | CLANG_ENABLE_MODULES = YES; 516 | CLANG_ENABLE_OBJC_ARC = YES; 517 | CLANG_WARN_BOOL_CONVERSION = YES; 518 | CLANG_WARN_CONSTANT_CONVERSION = YES; 519 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 520 | CLANG_WARN_EMPTY_BODY = YES; 521 | CLANG_WARN_ENUM_CONVERSION = YES; 522 | CLANG_WARN_INFINITE_RECURSION = YES; 523 | CLANG_WARN_INT_CONVERSION = YES; 524 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 525 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 526 | CLANG_WARN_UNREACHABLE_CODE = YES; 527 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 528 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 529 | COPY_PHASE_STRIP = NO; 530 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 531 | ENABLE_NS_ASSERTIONS = NO; 532 | ENABLE_STRICT_OBJC_MSGSEND = YES; 533 | GCC_C_LANGUAGE_STANDARD = gnu99; 534 | GCC_NO_COMMON_BLOCKS = YES; 535 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 536 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 537 | GCC_WARN_UNDECLARED_SELECTOR = YES; 538 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 539 | GCC_WARN_UNUSED_FUNCTION = YES; 540 | GCC_WARN_UNUSED_VARIABLE = YES; 541 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 542 | MTL_ENABLE_DEBUG_INFO = NO; 543 | SDKROOT = iphoneos; 544 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 545 | TARGETED_DEVICE_FAMILY = "1,2"; 546 | VALIDATE_PRODUCT = YES; 547 | }; 548 | name = Release; 549 | }; 550 | 18A84A491C36166E00F8905A /* Debug */ = { 551 | isa = XCBuildConfiguration; 552 | buildSettings = { 553 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 554 | DEVELOPMENT_TEAM = S93SS7F2CT; 555 | FRAMEWORK_SEARCH_PATHS = ( 556 | "$(inherited)", 557 | "$(PROJECT_DIR)/Carthage/Build/iOS", 558 | ); 559 | INFOPLIST_FILE = SimpleZhihuDaily/Info.plist; 560 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 561 | PRODUCT_BUNDLE_IDENTIFIER = me.gnou.SimpleZhihuDaily; 562 | PRODUCT_NAME = "$(TARGET_NAME)"; 563 | SWIFT_VERSION = 3.0; 564 | }; 565 | name = Debug; 566 | }; 567 | 18A84A4A1C36166E00F8905A /* Release */ = { 568 | isa = XCBuildConfiguration; 569 | buildSettings = { 570 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 571 | DEVELOPMENT_TEAM = S93SS7F2CT; 572 | FRAMEWORK_SEARCH_PATHS = ( 573 | "$(inherited)", 574 | "$(PROJECT_DIR)/Carthage/Build/iOS", 575 | ); 576 | INFOPLIST_FILE = SimpleZhihuDaily/Info.plist; 577 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 578 | PRODUCT_BUNDLE_IDENTIFIER = me.gnou.SimpleZhihuDaily; 579 | PRODUCT_NAME = "$(TARGET_NAME)"; 580 | SWIFT_VERSION = 3.0; 581 | }; 582 | name = Release; 583 | }; 584 | 18A84A4C1C36166E00F8905A /* Debug */ = { 585 | isa = XCBuildConfiguration; 586 | buildSettings = { 587 | BUNDLE_LOADER = "$(TEST_HOST)"; 588 | DEVELOPMENT_TEAM = S93SS7F2CT; 589 | INFOPLIST_FILE = SimpleZhihuDailyTests/Info.plist; 590 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 591 | PRODUCT_BUNDLE_IDENTIFIER = me.gnou.SimpleZhihuDailyTests; 592 | PRODUCT_NAME = "$(TARGET_NAME)"; 593 | SWIFT_VERSION = 3.0; 594 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleZhihuDaily.app/SimpleZhihuDaily"; 595 | }; 596 | name = Debug; 597 | }; 598 | 18A84A4D1C36166E00F8905A /* Release */ = { 599 | isa = XCBuildConfiguration; 600 | buildSettings = { 601 | BUNDLE_LOADER = "$(TEST_HOST)"; 602 | DEVELOPMENT_TEAM = S93SS7F2CT; 603 | INFOPLIST_FILE = SimpleZhihuDailyTests/Info.plist; 604 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 605 | PRODUCT_BUNDLE_IDENTIFIER = me.gnou.SimpleZhihuDailyTests; 606 | PRODUCT_NAME = "$(TARGET_NAME)"; 607 | SWIFT_VERSION = 3.0; 608 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleZhihuDaily.app/SimpleZhihuDaily"; 609 | }; 610 | name = Release; 611 | }; 612 | 18A84A4F1C36166E00F8905A /* Debug */ = { 613 | isa = XCBuildConfiguration; 614 | buildSettings = { 615 | DEVELOPMENT_TEAM = S93SS7F2CT; 616 | INFOPLIST_FILE = SimpleZhihuDailyUITests/Info.plist; 617 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 618 | PRODUCT_BUNDLE_IDENTIFIER = me.gnou.SimpleZhihuDailyUITests; 619 | PRODUCT_NAME = "$(TARGET_NAME)"; 620 | SWIFT_VERSION = 3.0; 621 | TEST_TARGET_NAME = SimpleZhihuDaily; 622 | USES_XCTRUNNER = YES; 623 | }; 624 | name = Debug; 625 | }; 626 | 18A84A501C36166E00F8905A /* Release */ = { 627 | isa = XCBuildConfiguration; 628 | buildSettings = { 629 | DEVELOPMENT_TEAM = S93SS7F2CT; 630 | INFOPLIST_FILE = SimpleZhihuDailyUITests/Info.plist; 631 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 632 | PRODUCT_BUNDLE_IDENTIFIER = me.gnou.SimpleZhihuDailyUITests; 633 | PRODUCT_NAME = "$(TARGET_NAME)"; 634 | SWIFT_VERSION = 3.0; 635 | TEST_TARGET_NAME = SimpleZhihuDaily; 636 | USES_XCTRUNNER = YES; 637 | }; 638 | name = Release; 639 | }; 640 | /* End XCBuildConfiguration section */ 641 | 642 | /* Begin XCConfigurationList section */ 643 | 18A84A181C36166D00F8905A /* Build configuration list for PBXProject "SimpleZhihuDaily" */ = { 644 | isa = XCConfigurationList; 645 | buildConfigurations = ( 646 | 18A84A461C36166E00F8905A /* Debug */, 647 | 18A84A471C36166E00F8905A /* Release */, 648 | ); 649 | defaultConfigurationIsVisible = 0; 650 | defaultConfigurationName = Release; 651 | }; 652 | 18A84A481C36166E00F8905A /* Build configuration list for PBXNativeTarget "SimpleZhihuDaily" */ = { 653 | isa = XCConfigurationList; 654 | buildConfigurations = ( 655 | 18A84A491C36166E00F8905A /* Debug */, 656 | 18A84A4A1C36166E00F8905A /* Release */, 657 | ); 658 | defaultConfigurationIsVisible = 0; 659 | defaultConfigurationName = Release; 660 | }; 661 | 18A84A4B1C36166E00F8905A /* Build configuration list for PBXNativeTarget "SimpleZhihuDailyTests" */ = { 662 | isa = XCConfigurationList; 663 | buildConfigurations = ( 664 | 18A84A4C1C36166E00F8905A /* Debug */, 665 | 18A84A4D1C36166E00F8905A /* Release */, 666 | ); 667 | defaultConfigurationIsVisible = 0; 668 | defaultConfigurationName = Release; 669 | }; 670 | 18A84A4E1C36166E00F8905A /* Build configuration list for PBXNativeTarget "SimpleZhihuDailyUITests" */ = { 671 | isa = XCConfigurationList; 672 | buildConfigurations = ( 673 | 18A84A4F1C36166E00F8905A /* Debug */, 674 | 18A84A501C36166E00F8905A /* Release */, 675 | ); 676 | defaultConfigurationIsVisible = 0; 677 | defaultConfigurationName = Release; 678 | }; 679 | /* End XCConfigurationList section */ 680 | }; 681 | rootObject = 18A84A151C36166D00F8905A /* Project object */; 682 | } 683 | -------------------------------------------------------------------------------- /SimpleZhihuDaily.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SimpleZhihuDaily.xcodeproj/xcuserdata/mcui.xcuserdatad/xcschemes/SimpleZhihuDaily.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /SimpleZhihuDaily.xcodeproj/xcuserdata/mcui.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SimpleZhihuDaily.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 18A84A1C1C36166D00F8905A 16 | 17 | primary 18 | 19 | 20 | 18A84A331C36166E00F8905A 21 | 22 | primary 23 | 24 | 25 | 18A84A3E1C36166E00F8905A 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Apis/AlamofireRequest+JSONSerializable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AlamofireRequest+JSONSerializable.swift 3 | // SimpleZhihuDaily 4 | // 5 | // Created by CuiMingyu on 1/1/16. 6 | // Copyright © 2016 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Alamofire 11 | import SwiftyJSON 12 | 13 | //extension Alamofire.Request { 14 | // public func responseObject(_ completionHandler: 15 | // (Response) -> Void) -> Self { 16 | // let serializer = ResponseSerializer { request, response, data, error in 17 | // guard error == nil else { 18 | // return .Failure(error!) 19 | // } 20 | // guard let responseData = data else { 21 | // let failureReason = "Object could not be serialized because input data was nil." 22 | // let error = Error.errorWithCode(.DataSerializationFailed, 23 | // failureReason: failureReason) 24 | // return .Failure(error) 25 | // } 26 | // 27 | // let JSONResponseSerializer = Request.JSONResponseSerializer(options: .AllowFragments) 28 | // let result = JSONResponseSerializer.serializeResponse(request, response, 29 | // responseData, error) 30 | // 31 | // switch result { 32 | // case .Success(let value): 33 | // let json = SwiftyJSON.JSON(value) 34 | // if let object = T(json: json) { 35 | // return .Success(object) 36 | // } else { 37 | // let failureReason = "Object could not be created from JSON." 38 | // let error = Error.errorWithCode(.JSONSerializationFailed, 39 | // failureReason: failureReason) 40 | // return .Failure(error) 41 | // } 42 | // case .Failure(let error): 43 | // return .Failure(error) 44 | // } 45 | // } 46 | // 47 | // return response(responseSerializer: serializer, completionHandler: completionHandler) 48 | // } 49 | // 50 | // public func responseArray(_ completionHandler: (Response<[T], NSError>) -> Void) -> Self { 51 | // let serializer = ResponseSerializer<[T], NSError> { request, response, data, error in 52 | // guard error == nil else { 53 | // return .Failure(error!) 54 | // } 55 | // guard let responseData = data else { 56 | // let failureReason = "Array could not be serialized because input data was nil." 57 | // let error = Error.errorWithCode(.DataSerializationFailed, 58 | // failureReason: failureReason) 59 | // return .Failure(error) 60 | // } 61 | // 62 | // let JSONResponseSerializer = Request.JSONResponseSerializer(options: .AllowFragments) 63 | // let result = JSONResponseSerializer.serializeResponse(request, response, 64 | // responseData, error) 65 | // 66 | // switch result { 67 | // case .Success(let value): 68 | // let json = SwiftyJSON.JSON(value) 69 | // let objects = json.arrayValue.flatMap { T(json: $0) } 70 | // return .Success(objects) 71 | // case .Failure(let error): 72 | // return .Failure(error) 73 | // } 74 | // } 75 | // 76 | // return response(responseSerializer: serializer, completionHandler: completionHandler) 77 | // } 78 | //} 79 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Apis/ResponseJSONObjectSerializable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResponseJSONObjectSerializable.swift 3 | // SimpleZhihuDaily 4 | // 5 | // Created by CuiMingyu on 1/1/16. 6 | // Copyright © 2016 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftyJSON 11 | 12 | public protocol ResponseJSONObjectSerializable { 13 | init?(json: JSON) 14 | } 15 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Apis/Router.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Router.swift 3 | // SimpleZhihuDaily 4 | // 5 | // Created by CuiMingyu on 1/1/16. 6 | // Copyright © 2016 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Alamofire 11 | 12 | //enum SRRouter: URLRequestConvertible { 13 | // static let baseURLString = "http://news-at.zhihu.com/api/4" 14 | // 15 | // case latestStoryList 16 | // case storyListForDay(dayString: String) 17 | // case story(id: Int) 18 | // 19 | // var URLRequest: NSMutableURLRequest { 20 | // var method: Alamofire.Method { 21 | // switch self { 22 | // default: 23 | // return .GET 24 | // } 25 | // } 26 | // let result: (path: String, parameters: [String: AnyObject]?) = { 27 | // switch self { 28 | // case .latestStoryList: 29 | // return ("news/latest", nil) 30 | // case .story(let id): 31 | // return ("news/\(id)", nil) 32 | // case .storyListForDay(let dayString): 33 | // return ("news/before/\(dayString)", nil) 34 | // } 35 | // }() 36 | // 37 | // let URL = Foundation.URL(string: Router.baseURLString)! 38 | // let URLRequest = NSMutableURLRequest(url: URL.appendingPathComponent(result.path)) 39 | // 40 | // let encoding: ParameterEncoding = { 41 | // switch method { 42 | // case .GET, .HEAD, .DELETE: 43 | // return ParameterEncoding.URL 44 | // case .POST, .PUT: 45 | // return ParameterEncoding.JSON 46 | // default: 47 | // return ParameterEncoding.JSON 48 | // } 49 | // }() 50 | // 51 | // let encodingRequest = encoding.encode(URLRequest as! URLRequestConvertible, with: result.parameters).0 52 | // encodingRequest.HTTPMethod = method.rawValue 53 | // return encodingRequest 54 | // } 55 | //} 56 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SimpleZhihuDaily 4 | // 5 | // Created by CuiMingyu on 1/1/16. 6 | // Copyright © 2016 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CoreData 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | 18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 19 | // Override point for customization after application launch. 20 | return true 21 | } 22 | 23 | func applicationWillResignActive(_ application: UIApplication) { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | func applicationDidEnterBackground(_ application: UIApplication) { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | func applicationWillEnterForeground(_ application: UIApplication) { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | func applicationDidBecomeActive(_ application: UIApplication) { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | func applicationWillTerminate(_ application: UIApplication) { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | // Saves changes in the application's managed object context before the application terminates. 44 | } 45 | 46 | lazy var applicationDocumentsDirectory: URL = { 47 | // The directory the application uses to store the Core Data store file. This code uses a directory named "me.gnou.SimpleZhihuDaily" in the application's documents Application Support directory. 48 | let urls = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask) 49 | return urls[urls.count-1] 50 | }() 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /SimpleZhihuDaily/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Controllers/ContainerViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContainerViewController.swift 3 | // SimpleZhihuDaily 4 | // 5 | // Created by Mingyu Cui on 06/12/2016. 6 | // Copyright © 2016 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ContainerViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | 25 | /* 26 | // MARK: - Navigation 27 | 28 | // In a storyboard-based application, you will often want to do a little preparation before navigation 29 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 30 | // Get the new view controller using segue.destinationViewController. 31 | // Pass the selected object to the new view controller. 32 | } 33 | */ 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Controllers/ContentViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentViewController.swift 3 | // SimpleZhihuDaily 4 | // 5 | // Created by Mingyu Cui on 06/12/2016. 6 | // Copyright © 2016 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ContentViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | 25 | /* 26 | // MARK: - Navigation 27 | 28 | // In a storyboard-based application, you will often want to do a little preparation before navigation 29 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 30 | // Get the new view controller using segue.destinationViewController. 31 | // Pass the selected object to the new view controller. 32 | } 33 | */ 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Controllers/StoriesTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StoriesTableViewController.swift 3 | // SimpleZhihuDaily 4 | // 5 | // Created by Mingyu Cui on 06/12/2016. 6 | // Copyright © 2016 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class StoriesTableViewController: UITableViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Uncomment the following line to preserve selection between presentations 17 | // self.clearsSelectionOnViewWillAppear = false 18 | 19 | // Uncomment the following line to display an Edit button in the navigation bar for this view controller. 20 | // self.navigationItem.rightBarButtonItem = self.editButtonItem() 21 | } 22 | 23 | override func didReceiveMemoryWarning() { 24 | super.didReceiveMemoryWarning() 25 | // Dispose of any resources that can be recreated. 26 | } 27 | 28 | // MARK: - Table view data source 29 | 30 | override func numberOfSections(in tableView: UITableView) -> Int { 31 | // #warning Incomplete implementation, return the number of sections 32 | return 0 33 | } 34 | 35 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 36 | // #warning Incomplete implementation, return the number of rows 37 | return 0 38 | } 39 | 40 | /* 41 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 42 | let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath) 43 | 44 | // Configure the cell... 45 | 46 | return cell 47 | } 48 | */ 49 | 50 | /* 51 | // Override to support conditional editing of the table view. 52 | override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { 53 | // Return false if you do not want the specified item to be editable. 54 | return true 55 | } 56 | */ 57 | 58 | /* 59 | // Override to support editing the table view. 60 | override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { 61 | if editingStyle == .delete { 62 | // Delete the row from the data source 63 | tableView.deleteRows(at: [indexPath], with: .fade) 64 | } else if editingStyle == .insert { 65 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view 66 | } 67 | } 68 | */ 69 | 70 | /* 71 | // Override to support rearranging the table view. 72 | override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { 73 | 74 | } 75 | */ 76 | 77 | /* 78 | // Override to support conditional rearranging of the table view. 79 | override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { 80 | // Return false if you do not want the item to be re-orderable. 81 | return true 82 | } 83 | */ 84 | 85 | /* 86 | // MARK: - Navigation 87 | 88 | // In a storyboard-based application, you will often want to do a little preparation before navigation 89 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 90 | // Get the new view controller using segue.destinationViewController. 91 | // Pass the selected object to the new view controller. 92 | } 93 | */ 94 | 95 | } 96 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Models/Entry.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Entry.swift 3 | // SimpleZhihuDaily 4 | // 5 | // Created by Mingyu Cui on 06/03/2017. 6 | // Copyright © 2017 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import RealmSwift 11 | 12 | class Entry: Object { 13 | dynamic var id: Int = 0 14 | dynamic var name: String? 15 | dynamic var descriptionString: String? 16 | 17 | let color = RealmOptional() 18 | dynamic var thumbnail: String? 19 | 20 | override static func indexedProperties() -> [String] { 21 | return ["id"] 22 | } 23 | 24 | override static func primaryKey() -> String { 25 | return "id" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SimpleZhihuDaily/Views/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /SimpleZhihuDailyTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SimpleZhihuDailyTests/SimpleZhihuDailyTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SimpleZhihuDailyTests.swift 3 | // SimpleZhihuDailyTests 4 | // 5 | // Created by CuiMingyu on 1/1/16. 6 | // Copyright © 2016 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import SimpleZhihuDaily 11 | 12 | class SimpleZhihuDailyTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /SimpleZhihuDailyUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SimpleZhihuDailyUITests/SimpleZhihuDailyUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SimpleZhihuDailyUITests.swift 3 | // SimpleZhihuDailyUITests 4 | // 5 | // Created by CuiMingyu on 1/1/16. 6 | // Copyright © 2016 CuiMingyu. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SimpleZhihuDailyUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------