├── H4X0R News ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Models │ ├── PostData.swift │ └── NetworkManager.swift ├── Views │ ├── DetailView.swift │ ├── WebView.swift │ └── ContentView.swift ├── AppDelegate.swift ├── Base.lproj │ └── LaunchScreen.storyboard ├── Info.plist └── SceneDelegate.swift └── H4X0R News.xcodeproj ├── project.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── xcuserdata └── angelayu.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist └── project.pbxproj /H4X0R News/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /H4X0R News/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /H4X0R News.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /H4X0R News.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /H4X0R News.xcodeproj/xcuserdata/angelayu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | H4X0R News.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /H4X0R News/Models/PostData.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PostData.swift 3 | // H4X0R News 4 | // 5 | // Created by Angela Yu on 08/09/2019. 6 | // Copyright © 2019 Angela Yu. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Results: Decodable { 12 | let hits: [Post] 13 | } 14 | 15 | struct Post: Decodable, Identifiable { 16 | var id: String { 17 | return objectID 18 | } 19 | let objectID: String 20 | let points: Int 21 | let title: String 22 | let url: String? 23 | } 24 | -------------------------------------------------------------------------------- /H4X0R News/Views/DetailView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailView.swift 3 | // H4X0R News 4 | // 5 | // Created by Angela Yu on 08/09/2019. 6 | // Copyright © 2019 Angela Yu. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DetailView: View { 12 | 13 | let url: String? 14 | 15 | var body: some View { 16 | WebView(urlString: url) 17 | } 18 | } 19 | 20 | struct DetailView_Previews: PreviewProvider { 21 | static var previews: some View { 22 | DetailView(url: "https://www.google.com") 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /H4X0R News/Views/WebView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebView.swift 3 | // H4X0R News 4 | // 5 | // Created by Angela Yu on 08/09/2019. 6 | // Copyright © 2019 Angela Yu. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import WebKit 11 | import SwiftUI 12 | 13 | struct WebView: UIViewRepresentable { 14 | 15 | let urlString: String? 16 | 17 | func makeUIView(context: Context) -> WKWebView { 18 | return WKWebView() 19 | } 20 | 21 | func updateUIView(_ uiView: WKWebView, context: Context) { 22 | if let safeString = urlString { 23 | if let url = URL(string: safeString) { 24 | let request = URLRequest(url: url) 25 | uiView.load(request) 26 | } 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /H4X0R News/Views/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // H4X0R News 4 | // 5 | // Created by Angela Yu on 08/09/2019. 6 | // Copyright © 2019 Angela Yu. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | 13 | @ObservedObject var networkManager = NetworkManager() 14 | 15 | var body: some View { 16 | NavigationView { 17 | List(networkManager.posts) { post in 18 | NavigationLink(destination: DetailView(url: post.url)) { 19 | HStack { 20 | Text(String(post.points)) 21 | Text(post.title) 22 | } 23 | } 24 | } 25 | .navigationBarTitle("H4X0R NEWS") 26 | } 27 | .onAppear { 28 | self.networkManager.fetchData() 29 | } 30 | } 31 | } 32 | 33 | struct ContentView_Previews: PreviewProvider { 34 | static var previews: some View { 35 | ContentView() 36 | } 37 | } 38 | 39 | 40 | 41 | // 42 | //let posts = [ 43 | // Post(id: "1", title: "Hello"), 44 | // Post(id: "2", title: "Bonjour"), 45 | // Post(id: "3", title: "Hola") 46 | //] 47 | -------------------------------------------------------------------------------- /H4X0R News/Models/NetworkManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkManager.swift 3 | // H4X0R News 4 | // 5 | // Created by Angela Yu on 08/09/2019. 6 | // Copyright © 2019 Angela Yu. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class NetworkManager: ObservableObject { 12 | 13 | @Published var posts = [Post]() 14 | 15 | func fetchData() { 16 | if let url = URL(string: "https://hn.algolia.com/api/v1/search?tags=front_page") { 17 | let session = URLSession(configuration: .default) 18 | let task = session.dataTask(with: url) { (data, response, error) in 19 | if error == nil { 20 | let decoder = JSONDecoder() 21 | if let safeData = data { 22 | do { 23 | let results = try decoder.decode(Results.self, from: safeData) 24 | DispatchQueue.main.async { 25 | self.posts = results.hits 26 | } 27 | } catch { 28 | print(error) 29 | } 30 | } 31 | } 32 | } 33 | task.resume() 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /H4X0R News/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // H4X0R News 4 | // 5 | // Created by Angela Yu on 08/09/2019. 6 | // Copyright © 2019 Angela Yu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /H4X0R News/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 | -------------------------------------------------------------------------------- /H4X0R News/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 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /H4X0R News/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | 37 | 38 | 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /H4X0R News/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // H4X0R News 4 | // 5 | // Created by Angela Yu on 08/09/2019. 6 | // Copyright © 2019 Angela Yu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 21 | 22 | // Create the SwiftUI view that provides the window contents. 23 | let contentView = ContentView() 24 | 25 | // Use a UIHostingController as window root view controller. 26 | if let windowScene = scene as? UIWindowScene { 27 | let window = UIWindow(windowScene: windowScene) 28 | window.rootViewController = UIHostingController(rootView: contentView) 29 | self.window = window 30 | window.makeKeyAndVisible() 31 | } 32 | } 33 | 34 | func sceneDidDisconnect(_ scene: UIScene) { 35 | // Called as the scene is being released by the system. 36 | // This occurs shortly after the scene enters the background, or when its session is discarded. 37 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 38 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 39 | } 40 | 41 | func sceneDidBecomeActive(_ scene: UIScene) { 42 | // Called when the scene has moved from an inactive state to an active state. 43 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 44 | } 45 | 46 | func sceneWillResignActive(_ scene: UIScene) { 47 | // Called when the scene will move from an active state to an inactive state. 48 | // This may occur due to temporary interruptions (ex. an incoming phone call). 49 | } 50 | 51 | func sceneWillEnterForeground(_ scene: UIScene) { 52 | // Called as the scene transitions from the background to the foreground. 53 | // Use this method to undo the changes made on entering the background. 54 | } 55 | 56 | func sceneDidEnterBackground(_ scene: UIScene) { 57 | // Called as the scene transitions from the foreground to the background. 58 | // Use this method to save data, release shared resources, and store enough scene-specific state information 59 | // to restore the scene back to its current state. 60 | } 61 | 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /H4X0R News.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | ADAAB81623254E6F006325FC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAAB81523254E6F006325FC /* AppDelegate.swift */; }; 11 | ADAAB81823254E6F006325FC /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAAB81723254E6F006325FC /* SceneDelegate.swift */; }; 12 | ADAAB81A23254E6F006325FC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAAB81923254E6F006325FC /* ContentView.swift */; }; 13 | ADAAB81C23254E71006325FC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADAAB81B23254E71006325FC /* Assets.xcassets */; }; 14 | ADAAB81F23254E71006325FC /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADAAB81E23254E71006325FC /* Preview Assets.xcassets */; }; 15 | ADAAB82223254E71006325FC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ADAAB82023254E71006325FC /* LaunchScreen.storyboard */; }; 16 | ADAAB82D232553C9006325FC /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAAB82C232553C9006325FC /* NetworkManager.swift */; }; 17 | ADAAB82F232554F2006325FC /* PostData.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAAB82E232554F2006325FC /* PostData.swift */; }; 18 | ADAAB83223255A00006325FC /* DetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAAB83123255A00006325FC /* DetailView.swift */; }; 19 | ADAAB83423255E12006325FC /* WebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAAB83323255E12006325FC /* WebView.swift */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | ADAAB81223254E6F006325FC /* H4X0R News.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "H4X0R News.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | ADAAB81523254E6F006325FC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 25 | ADAAB81723254E6F006325FC /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 26 | ADAAB81923254E6F006325FC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 27 | ADAAB81B23254E71006325FC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 28 | ADAAB81E23254E71006325FC /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 29 | ADAAB82123254E71006325FC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 30 | ADAAB82323254E71006325FC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | ADAAB82C232553C9006325FC /* NetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = ""; }; 32 | ADAAB82E232554F2006325FC /* PostData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostData.swift; sourceTree = ""; }; 33 | ADAAB83123255A00006325FC /* DetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailView.swift; sourceTree = ""; }; 34 | ADAAB83323255E12006325FC /* WebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebView.swift; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | ADAAB80F23254E6F006325FC /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXFrameworksBuildPhase section */ 46 | 47 | /* Begin PBXGroup section */ 48 | ADAAB80923254E6F006325FC = { 49 | isa = PBXGroup; 50 | children = ( 51 | ADAAB81423254E6F006325FC /* H4X0R News */, 52 | ADAAB81323254E6F006325FC /* Products */, 53 | ); 54 | sourceTree = ""; 55 | }; 56 | ADAAB81323254E6F006325FC /* Products */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | ADAAB81223254E6F006325FC /* H4X0R News.app */, 60 | ); 61 | name = Products; 62 | sourceTree = ""; 63 | }; 64 | ADAAB81423254E6F006325FC /* H4X0R News */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | ADAAB81523254E6F006325FC /* AppDelegate.swift */, 68 | ADAAB81723254E6F006325FC /* SceneDelegate.swift */, 69 | ADAAB830232559EE006325FC /* Views */, 70 | ADAAB8292325535B006325FC /* Models */, 71 | ADAAB81B23254E71006325FC /* Assets.xcassets */, 72 | ADAAB82023254E71006325FC /* LaunchScreen.storyboard */, 73 | ADAAB82323254E71006325FC /* Info.plist */, 74 | ADAAB81D23254E71006325FC /* Preview Content */, 75 | ); 76 | path = "H4X0R News"; 77 | sourceTree = ""; 78 | }; 79 | ADAAB81D23254E71006325FC /* Preview Content */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | ADAAB81E23254E71006325FC /* Preview Assets.xcassets */, 83 | ); 84 | path = "Preview Content"; 85 | sourceTree = ""; 86 | }; 87 | ADAAB8292325535B006325FC /* Models */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | ADAAB82C232553C9006325FC /* NetworkManager.swift */, 91 | ADAAB82E232554F2006325FC /* PostData.swift */, 92 | ); 93 | path = Models; 94 | sourceTree = ""; 95 | }; 96 | ADAAB830232559EE006325FC /* Views */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | ADAAB81923254E6F006325FC /* ContentView.swift */, 100 | ADAAB83123255A00006325FC /* DetailView.swift */, 101 | ADAAB83323255E12006325FC /* WebView.swift */, 102 | ); 103 | path = Views; 104 | sourceTree = ""; 105 | }; 106 | /* End PBXGroup section */ 107 | 108 | /* Begin PBXNativeTarget section */ 109 | ADAAB81123254E6F006325FC /* H4X0R News */ = { 110 | isa = PBXNativeTarget; 111 | buildConfigurationList = ADAAB82623254E71006325FC /* Build configuration list for PBXNativeTarget "H4X0R News" */; 112 | buildPhases = ( 113 | ADAAB80E23254E6F006325FC /* Sources */, 114 | ADAAB80F23254E6F006325FC /* Frameworks */, 115 | ADAAB81023254E6F006325FC /* Resources */, 116 | ); 117 | buildRules = ( 118 | ); 119 | dependencies = ( 120 | ); 121 | name = "H4X0R News"; 122 | productName = "H4X0R News"; 123 | productReference = ADAAB81223254E6F006325FC /* H4X0R News.app */; 124 | productType = "com.apple.product-type.application"; 125 | }; 126 | /* End PBXNativeTarget section */ 127 | 128 | /* Begin PBXProject section */ 129 | ADAAB80A23254E6F006325FC /* Project object */ = { 130 | isa = PBXProject; 131 | attributes = { 132 | LastSwiftUpdateCheck = 1100; 133 | LastUpgradeCheck = 1100; 134 | ORGANIZATIONNAME = "Angela Yu"; 135 | TargetAttributes = { 136 | ADAAB81123254E6F006325FC = { 137 | CreatedOnToolsVersion = 11.0; 138 | }; 139 | }; 140 | }; 141 | buildConfigurationList = ADAAB80D23254E6F006325FC /* Build configuration list for PBXProject "H4X0R News" */; 142 | compatibilityVersion = "Xcode 9.3"; 143 | developmentRegion = en; 144 | hasScannedForEncodings = 0; 145 | knownRegions = ( 146 | en, 147 | Base, 148 | ); 149 | mainGroup = ADAAB80923254E6F006325FC; 150 | productRefGroup = ADAAB81323254E6F006325FC /* Products */; 151 | projectDirPath = ""; 152 | projectRoot = ""; 153 | targets = ( 154 | ADAAB81123254E6F006325FC /* H4X0R News */, 155 | ); 156 | }; 157 | /* End PBXProject section */ 158 | 159 | /* Begin PBXResourcesBuildPhase section */ 160 | ADAAB81023254E6F006325FC /* Resources */ = { 161 | isa = PBXResourcesBuildPhase; 162 | buildActionMask = 2147483647; 163 | files = ( 164 | ADAAB82223254E71006325FC /* LaunchScreen.storyboard in Resources */, 165 | ADAAB81F23254E71006325FC /* Preview Assets.xcassets in Resources */, 166 | ADAAB81C23254E71006325FC /* Assets.xcassets in Resources */, 167 | ); 168 | runOnlyForDeploymentPostprocessing = 0; 169 | }; 170 | /* End PBXResourcesBuildPhase section */ 171 | 172 | /* Begin PBXSourcesBuildPhase section */ 173 | ADAAB80E23254E6F006325FC /* Sources */ = { 174 | isa = PBXSourcesBuildPhase; 175 | buildActionMask = 2147483647; 176 | files = ( 177 | ADAAB82F232554F2006325FC /* PostData.swift in Sources */, 178 | ADAAB83223255A00006325FC /* DetailView.swift in Sources */, 179 | ADAAB82D232553C9006325FC /* NetworkManager.swift in Sources */, 180 | ADAAB81623254E6F006325FC /* AppDelegate.swift in Sources */, 181 | ADAAB81823254E6F006325FC /* SceneDelegate.swift in Sources */, 182 | ADAAB81A23254E6F006325FC /* ContentView.swift in Sources */, 183 | ADAAB83423255E12006325FC /* WebView.swift in Sources */, 184 | ); 185 | runOnlyForDeploymentPostprocessing = 0; 186 | }; 187 | /* End PBXSourcesBuildPhase section */ 188 | 189 | /* Begin PBXVariantGroup section */ 190 | ADAAB82023254E71006325FC /* LaunchScreen.storyboard */ = { 191 | isa = PBXVariantGroup; 192 | children = ( 193 | ADAAB82123254E71006325FC /* Base */, 194 | ); 195 | name = LaunchScreen.storyboard; 196 | sourceTree = ""; 197 | }; 198 | /* End PBXVariantGroup section */ 199 | 200 | /* Begin XCBuildConfiguration section */ 201 | ADAAB82423254E71006325FC /* Debug */ = { 202 | isa = XCBuildConfiguration; 203 | buildSettings = { 204 | ALWAYS_SEARCH_USER_PATHS = NO; 205 | CLANG_ANALYZER_NONNULL = YES; 206 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 207 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 208 | CLANG_CXX_LIBRARY = "libc++"; 209 | CLANG_ENABLE_MODULES = YES; 210 | CLANG_ENABLE_OBJC_ARC = YES; 211 | CLANG_ENABLE_OBJC_WEAK = YES; 212 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 213 | CLANG_WARN_BOOL_CONVERSION = YES; 214 | CLANG_WARN_COMMA = YES; 215 | CLANG_WARN_CONSTANT_CONVERSION = YES; 216 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 217 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 218 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 219 | CLANG_WARN_EMPTY_BODY = YES; 220 | CLANG_WARN_ENUM_CONVERSION = YES; 221 | CLANG_WARN_INFINITE_RECURSION = YES; 222 | CLANG_WARN_INT_CONVERSION = YES; 223 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 224 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 225 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 226 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 227 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 228 | CLANG_WARN_STRICT_PROTOTYPES = YES; 229 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 230 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 231 | CLANG_WARN_UNREACHABLE_CODE = YES; 232 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 233 | COPY_PHASE_STRIP = NO; 234 | DEBUG_INFORMATION_FORMAT = dwarf; 235 | ENABLE_STRICT_OBJC_MSGSEND = YES; 236 | ENABLE_TESTABILITY = YES; 237 | GCC_C_LANGUAGE_STANDARD = gnu11; 238 | GCC_DYNAMIC_NO_PIC = NO; 239 | GCC_NO_COMMON_BLOCKS = YES; 240 | GCC_OPTIMIZATION_LEVEL = 0; 241 | GCC_PREPROCESSOR_DEFINITIONS = ( 242 | "DEBUG=1", 243 | "$(inherited)", 244 | ); 245 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 246 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 247 | GCC_WARN_UNDECLARED_SELECTOR = YES; 248 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 249 | GCC_WARN_UNUSED_FUNCTION = YES; 250 | GCC_WARN_UNUSED_VARIABLE = YES; 251 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 252 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 253 | MTL_FAST_MATH = YES; 254 | ONLY_ACTIVE_ARCH = YES; 255 | SDKROOT = iphoneos; 256 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 257 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 258 | }; 259 | name = Debug; 260 | }; 261 | ADAAB82523254E71006325FC /* Release */ = { 262 | isa = XCBuildConfiguration; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | CLANG_ANALYZER_NONNULL = YES; 266 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 267 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 268 | CLANG_CXX_LIBRARY = "libc++"; 269 | CLANG_ENABLE_MODULES = YES; 270 | CLANG_ENABLE_OBJC_ARC = YES; 271 | CLANG_ENABLE_OBJC_WEAK = YES; 272 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 273 | CLANG_WARN_BOOL_CONVERSION = YES; 274 | CLANG_WARN_COMMA = YES; 275 | CLANG_WARN_CONSTANT_CONVERSION = YES; 276 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 277 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 278 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 279 | CLANG_WARN_EMPTY_BODY = YES; 280 | CLANG_WARN_ENUM_CONVERSION = YES; 281 | CLANG_WARN_INFINITE_RECURSION = YES; 282 | CLANG_WARN_INT_CONVERSION = YES; 283 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 284 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 285 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 286 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 287 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 288 | CLANG_WARN_STRICT_PROTOTYPES = YES; 289 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 290 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 291 | CLANG_WARN_UNREACHABLE_CODE = YES; 292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 293 | COPY_PHASE_STRIP = NO; 294 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 295 | ENABLE_NS_ASSERTIONS = NO; 296 | ENABLE_STRICT_OBJC_MSGSEND = YES; 297 | GCC_C_LANGUAGE_STANDARD = gnu11; 298 | GCC_NO_COMMON_BLOCKS = YES; 299 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 300 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 301 | GCC_WARN_UNDECLARED_SELECTOR = YES; 302 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 303 | GCC_WARN_UNUSED_FUNCTION = YES; 304 | GCC_WARN_UNUSED_VARIABLE = YES; 305 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 306 | MTL_ENABLE_DEBUG_INFO = NO; 307 | MTL_FAST_MATH = YES; 308 | SDKROOT = iphoneos; 309 | SWIFT_COMPILATION_MODE = wholemodule; 310 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 311 | VALIDATE_PRODUCT = YES; 312 | }; 313 | name = Release; 314 | }; 315 | ADAAB82723254E71006325FC /* Debug */ = { 316 | isa = XCBuildConfiguration; 317 | buildSettings = { 318 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 319 | CODE_SIGN_STYLE = Automatic; 320 | DEVELOPMENT_ASSET_PATHS = "\"H4X0R News/Preview Content\""; 321 | ENABLE_PREVIEWS = YES; 322 | INFOPLIST_FILE = "H4X0R News/Info.plist"; 323 | LD_RUNPATH_SEARCH_PATHS = ( 324 | "$(inherited)", 325 | "@executable_path/Frameworks", 326 | ); 327 | PRODUCT_BUNDLE_IDENTIFIER = "com.AngelaYu.H4X0R-News"; 328 | PRODUCT_NAME = "$(TARGET_NAME)"; 329 | SWIFT_VERSION = 5.0; 330 | TARGETED_DEVICE_FAMILY = "1,2"; 331 | }; 332 | name = Debug; 333 | }; 334 | ADAAB82823254E71006325FC /* Release */ = { 335 | isa = XCBuildConfiguration; 336 | buildSettings = { 337 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 338 | CODE_SIGN_STYLE = Automatic; 339 | DEVELOPMENT_ASSET_PATHS = "\"H4X0R News/Preview Content\""; 340 | ENABLE_PREVIEWS = YES; 341 | INFOPLIST_FILE = "H4X0R News/Info.plist"; 342 | LD_RUNPATH_SEARCH_PATHS = ( 343 | "$(inherited)", 344 | "@executable_path/Frameworks", 345 | ); 346 | PRODUCT_BUNDLE_IDENTIFIER = "com.AngelaYu.H4X0R-News"; 347 | PRODUCT_NAME = "$(TARGET_NAME)"; 348 | SWIFT_VERSION = 5.0; 349 | TARGETED_DEVICE_FAMILY = "1,2"; 350 | }; 351 | name = Release; 352 | }; 353 | /* End XCBuildConfiguration section */ 354 | 355 | /* Begin XCConfigurationList section */ 356 | ADAAB80D23254E6F006325FC /* Build configuration list for PBXProject "H4X0R News" */ = { 357 | isa = XCConfigurationList; 358 | buildConfigurations = ( 359 | ADAAB82423254E71006325FC /* Debug */, 360 | ADAAB82523254E71006325FC /* Release */, 361 | ); 362 | defaultConfigurationIsVisible = 0; 363 | defaultConfigurationName = Release; 364 | }; 365 | ADAAB82623254E71006325FC /* Build configuration list for PBXNativeTarget "H4X0R News" */ = { 366 | isa = XCConfigurationList; 367 | buildConfigurations = ( 368 | ADAAB82723254E71006325FC /* Debug */, 369 | ADAAB82823254E71006325FC /* Release */, 370 | ); 371 | defaultConfigurationIsVisible = 0; 372 | defaultConfigurationName = Release; 373 | }; 374 | /* End XCConfigurationList section */ 375 | }; 376 | rootObject = ADAAB80A23254E6F006325FC /* Project object */; 377 | } 378 | --------------------------------------------------------------------------------