├── Instagram-SWUI
├── Assets.xcassets
│ ├── Contents.json
│ ├── wwdc.imageset
│ │ ├── wwdc.JPG
│ │ └── Contents.json
│ ├── pizza.imageset
│ │ ├── IMG_0156.jpeg
│ │ └── Contents.json
│ ├── burrito.imageset
│ │ ├── IMG_0163.jpeg
│ │ └── Contents.json
│ ├── photo-camera.imageset
│ │ ├── photo-camera.png
│ │ └── Contents.json
│ ├── badge.imageset
│ │ ├── 58120000553__7091B1D4-F645-4760-B5EE-D38E53D53F54.JPG
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
├── PhotoLibrary.swift
├── Instagram_SWUI.xcdatamodeld
│ ├── .xccurrentversion
│ └── Instagram_SWUI.xcdatamodel
│ │ └── contents
├── InstaPhoto.swift
├── Instagram-SWUI.entitlements
├── CameraView.swift
├── Base.lproj
│ └── LaunchScreen.storyboard
├── Info.plist
├── SceneDelegate.swift
├── ContentView.swift
├── AppDelegate.swift
└── CameraViewController.swift
├── Instagram-SWUI.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcuserdata
│ └── leavenstee.xcuserdatad
│ │ ├── xcschemes
│ │ └── xcschememanagement.plist
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── project.pbxproj
└── README.md
/Instagram-SWUI/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Instagram-SWUI/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/wwdc.imageset/wwdc.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavenstee/InstaFake-Swift-UI/HEAD/Instagram-SWUI/Assets.xcassets/wwdc.imageset/wwdc.JPG
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/pizza.imageset/IMG_0156.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavenstee/InstaFake-Swift-UI/HEAD/Instagram-SWUI/Assets.xcassets/pizza.imageset/IMG_0156.jpeg
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/burrito.imageset/IMG_0163.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavenstee/InstaFake-Swift-UI/HEAD/Instagram-SWUI/Assets.xcassets/burrito.imageset/IMG_0163.jpeg
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/photo-camera.imageset/photo-camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavenstee/InstaFake-Swift-UI/HEAD/Instagram-SWUI/Assets.xcassets/photo-camera.imageset/photo-camera.png
--------------------------------------------------------------------------------
/Instagram-SWUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/badge.imageset/58120000553__7091B1D4-F645-4760-B5EE-D38E53D53F54.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavenstee/InstaFake-Swift-UI/HEAD/Instagram-SWUI/Assets.xcassets/badge.imageset/58120000553__7091B1D4-F645-4760-B5EE-D38E53D53F54.JPG
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/wwdc.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "wwdc.JPG"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/Instagram-SWUI/PhotoLibrary.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PhotoLibrary.swift
3 | // Instagram-SWUI
4 | //
5 | // Created by Steven Lee on 6/4/19.
6 | // Copyright © 2019 leavenstee llc. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | struct PhotoLibrary {
12 | let photos: [InstaPhoto]
13 | }
14 |
--------------------------------------------------------------------------------
/Instagram-SWUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Instagram-SWUI/Instagram_SWUI.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | Instagram_SWUI.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/photo-camera.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "photo-camera.png"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "template-rendering-intent" : "original"
14 | }
15 | }
--------------------------------------------------------------------------------
/Instagram-SWUI/Instagram_SWUI.xcdatamodeld/Instagram_SWUI.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Instagram-SWUI/InstaPhoto.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InstaPhoto.swift
3 | // Instagram-SWUI
4 | //
5 | // Created by Steven Lee on 6/4/19.
6 | // Copyright © 2019 leavenstee llc. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import SwiftUI
11 |
12 | struct InstaPhoto: Identifiable {
13 | let id: Int
14 | let username: String
15 | let comments: [String]
16 | let likes: Int
17 | let image: String
18 | }
19 |
--------------------------------------------------------------------------------
/Instagram-SWUI/Instagram-SWUI.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.device.camera
8 |
9 | com.apple.security.network.client
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/burrito.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "IMG_0163.jpeg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/pizza.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "IMG_0156.jpeg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Instagram-SWUI/Assets.xcassets/badge.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "58120000553__7091B1D4-F645-4760-B5EE-D38E53D53F54.JPG",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Instagram-SWUI.xcodeproj/xcuserdata/leavenstee.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Instagram-SWUI.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # InstaFake-Swift-UI
2 | Swift UI Demo for an instagram copy @ WWDC 2019
3 |
4 | ## Why?
5 | This is a quick attempt to replicate the UI of a particular photo sharing app. All purpose is to create simple clean code with
6 | new SwiftUI Framework.
7 |
8 | ## Todo
9 | - [ ] Basic Instafeed
10 | - [ ] Expanding Cells to show comments
11 | - [ ] Implement Combine feature
12 | - [ ] Hook up Camera Capture
13 | - [ ] CoreData to store image objects
14 | - [ ] Location reporting on where images are taken
15 | - [ ] Fake Liking
16 | - [ ] Animatons on likeing
17 | - [ ] Randomly generated comments
18 |
--------------------------------------------------------------------------------
/Instagram-SWUI/CameraView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CameraView.swift
3 | // Instagram-SWUI
4 | //
5 | // Created by Steven Lee on 6/5/19.
6 | // Copyright © 2019 leavenstee llc. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 | import UIKit
11 |
12 | struct CameraView : UIViewControllerRepresentable {
13 | func makeUIViewController(context: UIViewControllerRepresentableContext) -> CameraViewController {
14 | return CameraViewController()
15 | }
16 |
17 | func updateUIViewController(_ uiViewController: CameraViewController, context: UIViewControllerRepresentableContext) {
18 |
19 | }
20 |
21 | typealias UIViewControllerType = CameraViewController
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/Instagram-SWUI/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 |
--------------------------------------------------------------------------------
/Instagram-SWUI/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 | }
--------------------------------------------------------------------------------
/Instagram-SWUI/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 | NSCameraUsageDescription
20 | Let me use your camer for pics
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UIApplicationSceneManifest
26 |
27 | UIApplicationSupportsMultipleScenes
28 |
29 | UISceneConfigurations
30 |
31 | UIWindowSceneSessionRoleApplication
32 |
33 |
34 | UILaunchStoryboardName
35 | LaunchScreen
36 | UISceneConfigurationName
37 | Default Configuration
38 | UISceneDelegateClassName
39 | $(PRODUCT_MODULE_NAME).SceneDelegate
40 |
41 |
42 |
43 |
44 | UILaunchStoryboardName
45 | LaunchScreen
46 | UIRequiredDeviceCapabilities
47 |
48 | armv7
49 |
50 | UISupportedInterfaceOrientations
51 |
52 | UIInterfaceOrientationPortrait
53 | UIInterfaceOrientationLandscapeLeft
54 | UIInterfaceOrientationLandscapeRight
55 |
56 | UISupportedInterfaceOrientations~ipad
57 |
58 | UIInterfaceOrientationPortrait
59 | UIInterfaceOrientationPortraitUpsideDown
60 | UIInterfaceOrientationLandscapeLeft
61 | UIInterfaceOrientationLandscapeRight
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/Instagram-SWUI/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // Instagram-SWUI
4 | //
5 | // Created by Steven Lee on 6/4/19.
6 | // Copyright © 2019 leavenstee llc. 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 | // Use a UIHostingController as window root view controller
23 | let window = UIWindow(frame: UIScreen.main.bounds)
24 | window.rootViewController = UIHostingController(rootView: ContentView(instaPhotos: [InstaPhoto(id: 0, username: "leavenstee", comments: ["Nice", "Cool","Lame"], likes: 100, image: "wwdc"),InstaPhoto(id: 0, username: "leavenstee", comments: ["Nice", "Cool","Lame","Nice", "Cool","Lame"], likes: 200, image: "pizza"),
25 | InstaPhoto(id: 0, username: "leavenstee", comments: ["Nice", "Cool","Lame","Nice", "Cool","Lame","Nice", "Cool","Lame","Nice", "Cool","Lame"], likes: 4440, image: "wwdc"),InstaPhoto(id: 0, username: "leavenstee", comments: ["Nice", "Cool"], likes: 20, image: "badge")]))
26 | self.window = window
27 | window.makeKeyAndVisible()
28 | }
29 |
30 | func sceneDidDisconnect(_ scene: UIScene) {
31 | // Called as the scene is being released by the system.
32 | // This occurs shortly after the scene enters the background, or when its session is discarded.
33 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
34 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
35 | }
36 |
37 | func sceneDidBecomeActive(_ scene: UIScene) {
38 | // Called when the scene has moved from an inactive state to an active state.
39 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
40 | }
41 |
42 | func sceneWillResignActive(_ scene: UIScene) {
43 | // Called when the scene will move from an active state to an inactive state.
44 | // This may occur due to temporary interruptions (ex. an incoming phone call).
45 | }
46 |
47 | func sceneWillEnterForeground(_ scene: UIScene) {
48 | // Called as the scene transitions from the background to the foreground.
49 | // Use this method to undo the changes made on entering the background.
50 | }
51 |
52 | func sceneDidEnterBackground(_ scene: UIScene) {
53 | // Called as the scene transitions from the foreground to the background.
54 | // Use this method to save data, release shared resources, and store enough scene-specific state information
55 | // to restore the scene back to its current state.
56 |
57 | // Save changes in the application's managed object context when the application transitions to the background.
58 | (UIApplication.shared.delegate as? AppDelegate)?.saveContext()
59 | }
60 |
61 |
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/Instagram-SWUI/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // Instagram-SWUI
4 | //
5 | // Created by Steven Lee on 6/4/19.
6 | // Copyright © 2019 leavenstee llc. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 | import AVKit
11 | import CoreLocation
12 |
13 | struct ContentView : View {
14 | var instaPhotos: [InstaPhoto]
15 |
16 | var body: some View {
17 | NavigationView {
18 | List {
19 | ForEach(instaPhotos.identified(by: \.id)) {
20 | ImageCell(photo: $0)
21 | }
22 | }.navigationBarTitle(Text("WWDC")).navigationBarItems(trailing: PresentationButton(Text("Camera"), destination: CameraView()))
23 | }
24 | }
25 |
26 | func takePhoto() {
27 | // Open Camera
28 |
29 | }
30 |
31 | }
32 |
33 | #if DEBUG
34 | struct ContentView_Previews : PreviewProvider {
35 | static var previews: some View {
36 | ContentView(instaPhotos: [InstaPhoto(id: 0, username: "leavenstee", comments: ["Nice", "Cool","Lame"], likes: 100, image: "wwdc"),InstaPhoto(id: 0, username: "leavenstee", comments: ["Nice", "Cool","Lame","Nice", "Cool","Lame"], likes: 200, image: "pizza"),
37 | InstaPhoto(id: 0, username: "leavenstee", comments: ["Nice", "Cool","Lame","Nice", "Cool","Lame","Nice", "Cool","Lame","Nice", "Cool","Lame"], likes: 4440, image: "wwdc"),InstaPhoto(id: 0, username: "leavenstee", comments: ["Nice", "Cool"], likes: 20, image: "badge")])
38 | }
39 | }
40 | #endif
41 |
42 | struct ImageCell : View {
43 | @State var expanded = false
44 | @State var liked = false
45 |
46 | var photo: InstaPhoto
47 |
48 | var body: some View {
49 | return VStack(alignment: .leading) {
50 | HStack {
51 | Image("badge").resizable().scaledToFit().cornerRadius(100)
52 | Text(photo.username)
53 | Button(action: {}, label: {
54 | Text("...")
55 | })
56 | }.frame(height: 40)
57 |
58 | Image(photo.image)
59 | .resizable()
60 | .scaledToFit()
61 | .cornerRadius(10)
62 | // Control Buttons
63 | HStack {
64 | Button(action: withAnimation { likeButtonPressed }, label: {
65 | Text( self.liked ? "❤️" :"💔")
66 | })
67 | Button(action: commentButtonPressed, label: {
68 | Text("🗣")
69 | })
70 | Button(action: likeButtonPressed, label: {
71 | Text("📪")
72 | })
73 | Spacer()
74 | Button(action: likeButtonPressed, label: {
75 | Text("📕")
76 | })
77 | }
78 | Text("\(photo.likes) Likes")
79 | .multilineTextAlignment(.leading)
80 | Text(photo.username)
81 | .multilineTextAlignment(.leading)
82 | Button(action: moreCommentsPressed, label: {
83 | Text("View All \(photo.comments.count) Comments")
84 | .fontWeight(.light)
85 | })
86 | if expanded {
87 | VStack {
88 | Text("Test Comment")
89 | Text("Test Comment")
90 | Text("Test Comment")
91 | Text("Test Comment")
92 | }
93 | }
94 | }
95 | }
96 |
97 | func moreCommentsPressed() {
98 | expanded.toggle()
99 | }
100 |
101 | func likeButtonPressed() {
102 | liked.toggle()
103 | }
104 |
105 | func commentButtonPressed() {
106 |
107 | }
108 |
109 | func shareButtonPressed() {
110 |
111 | }
112 |
113 | func bookMarkButtonPressed() {
114 |
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/Instagram-SWUI/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Instagram-SWUI
4 | //
5 | // Created by Steven Lee on 6/4/19.
6 | // Copyright © 2019 leavenstee llc. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import CoreData
11 |
12 | @UIApplicationMain
13 | class AppDelegate: UIResponder, UIApplicationDelegate {
14 |
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillTerminate(_ application: UIApplication) {
23 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
24 | // Saves changes in the application's managed object context before the application terminates.
25 | self.saveContext()
26 | }
27 |
28 | // MARK: UISceneSession Lifecycle
29 |
30 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
31 | // Called when a new scene session is being created.
32 | // Use this method to select a configuration to create the new scene with.
33 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
34 | }
35 |
36 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
37 | // Called when the user discards a scene session.
38 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
39 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
40 | }
41 |
42 | // MARK: - Core Data stack
43 |
44 | lazy var persistentContainer: NSPersistentContainer = {
45 | /*
46 | The persistent container for the application. This implementation
47 | creates and returns a container, having loaded the store for the
48 | application to it. This property is optional since there are legitimate
49 | error conditions that could cause the creation of the store to fail.
50 | */
51 | let container = NSPersistentContainer(name: "Instagram_SWUI")
52 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in
53 | if let error = error as NSError? {
54 | // Replace this implementation with code to handle the error appropriately.
55 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
56 |
57 | /*
58 | Typical reasons for an error here include:
59 | * The parent directory does not exist, cannot be created, or disallows writing.
60 | * The persistent store is not accessible, due to permissions or data protection when the device is locked.
61 | * The device is out of space.
62 | * The store could not be migrated to the current model version.
63 | Check the error message to determine what the actual problem was.
64 | */
65 | fatalError("Unresolved error \(error), \(error.userInfo)")
66 | }
67 | })
68 | return container
69 | }()
70 |
71 | // MARK: - Core Data Saving support
72 |
73 | func saveContext () {
74 | let context = persistentContainer.viewContext
75 | if context.hasChanges {
76 | do {
77 | try context.save()
78 | } catch {
79 | // Replace this implementation with code to handle the error appropriately.
80 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
81 | let nserror = error as NSError
82 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
83 | }
84 | }
85 | }
86 |
87 | }
88 |
89 |
--------------------------------------------------------------------------------
/Instagram-SWUI.xcodeproj/xcuserdata/leavenstee.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
9 |
22 |
23 |
24 |
26 |
39 |
40 |
41 |
43 |
55 |
56 |
70 |
71 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/Instagram-SWUI/CameraViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CameraViewController.swift
3 | // Instagram-SWUI
4 | //
5 | // Created by Steven Lee on 6/6/19.
6 | // Copyright © 2019 leavenstee llc. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | import AVFoundation
12 |
13 | class CameraViewController: UIViewController {
14 |
15 | var previewView: UIView!
16 | var captureButton: UIButton!
17 |
18 | var captureSession: AVCaptureSession?
19 | var videoPreviewLayer: AVCaptureVideoPreviewLayer?
20 | var capturePhotoOutput: AVCapturePhotoOutput?
21 | var qrCodeFrameView: UIView?
22 |
23 | override func viewDidLoad() {
24 | super.viewDidLoad()
25 |
26 | previewView = UIView(frame: view.frame)
27 | captureButton = UIButton(frame: CGRect(x: 100, y: 100, width: 300, height: 300))
28 | captureButton.backgroundColor = .green
29 |
30 | captureButton.layer.cornerRadius = captureButton.frame.size.width / 2
31 | captureButton.clipsToBounds = true
32 |
33 | // Get an instance of the AVCaptureDevice class to initialize a device object and provide the video as the media type parameter
34 | guard let captureDevice = AVCaptureDevice.default(for: .video) else {
35 | fatalError("No video device found")
36 | }
37 |
38 | do {
39 | // Get an instance of the AVCaptureDeviceInput class using the previous deivce object
40 | let input = try AVCaptureDeviceInput(device: captureDevice)
41 |
42 | // Initialize the captureSession object
43 | captureSession = AVCaptureSession()
44 |
45 | // Set the input devcie on the capture session
46 | captureSession?.addInput(input)
47 |
48 | // Get an instance of ACCapturePhotoOutput class
49 | capturePhotoOutput = AVCapturePhotoOutput()
50 | capturePhotoOutput?.isHighResolutionCaptureEnabled = true
51 |
52 | // Set the output on the capture session
53 | captureSession?.addOutput(capturePhotoOutput!)
54 |
55 | // Initialize a AVCaptureMetadataOutput object and set it as the input device
56 | let captureMetadataOutput = AVCaptureMetadataOutput()
57 | captureSession?.addOutput(captureMetadataOutput)
58 |
59 | //Initialise the video preview layer and add it as a sublayer to the viewPreview view's layer
60 | videoPreviewLayer = AVCaptureVideoPreviewLayer(session: captureSession!)
61 | videoPreviewLayer?.videoGravity = AVLayerVideoGravity.resizeAspectFill
62 | videoPreviewLayer?.frame = view.layer.bounds
63 | previewView.layer.addSublayer(videoPreviewLayer!)
64 |
65 | //start video capture
66 | captureSession?.startRunning()
67 |
68 | //Initialize QR Code Frame to highlight the QR code
69 | qrCodeFrameView = UIView()
70 |
71 | if let qrCodeFrameView = qrCodeFrameView {
72 | qrCodeFrameView.layer.borderColor = UIColor.green.cgColor
73 | qrCodeFrameView.layer.borderWidth = 2
74 | view.addSubview(qrCodeFrameView)
75 | view.bringSubviewToFront(qrCodeFrameView)
76 | }
77 | } catch {
78 | //If any error occurs, simply print it out
79 | print(error)
80 | return
81 | }
82 |
83 | }
84 |
85 | override func viewDidLayoutSubviews() {
86 | videoPreviewLayer?.frame = view.bounds
87 | if let previewLayer = videoPreviewLayer ,(previewLayer.connection?.isVideoOrientationSupported)! {
88 | previewLayer.connection?.videoOrientation = UIApplication.shared.statusBarOrientation.videoOrientation ?? .portrait
89 | }
90 | }
91 |
92 | override func didReceiveMemoryWarning() {
93 | super.didReceiveMemoryWarning()
94 | // Dispose of any resources that can be recreated.
95 | }
96 |
97 | @IBAction func onTapTakePhoto(_ sender: Any) {
98 | // Make sure capturePhotoOutput is valid
99 | guard let capturePhotoOutput = self.capturePhotoOutput else { return }
100 |
101 | // Get an instance of AVCapturePhotoSettings class
102 | let photoSettings = AVCapturePhotoSettings()
103 |
104 | // Set photo settings for our need
105 | photoSettings.isAutoStillImageStabilizationEnabled = true
106 | photoSettings.isHighResolutionPhotoEnabled = true
107 | photoSettings.flashMode = .auto
108 |
109 | // Call capturePhoto method by passing our photo settings and a delegate implementing AVCapturePhotoCaptureDelegate
110 | capturePhotoOutput.capturePhoto(with: photoSettings, delegate: self)
111 | }
112 | }
113 |
114 | extension CameraViewController : AVCapturePhotoCaptureDelegate {
115 | func photoOutput(_ captureOutput: AVCapturePhotoOutput,
116 | didFinishProcessingPhoto photoSampleBuffer: CMSampleBuffer?,
117 | previewPhoto previewPhotoSampleBuffer: CMSampleBuffer?,
118 | resolvedSettings: AVCaptureResolvedPhotoSettings,
119 | bracketSettings: AVCaptureBracketedStillImageSettings?,
120 | error: Error?) {
121 | // Make sure we get some photo sample buffer
122 | guard error == nil,
123 | let photoSampleBuffer = photoSampleBuffer else {
124 | print("Error capturing photo: \(String(describing: error))")
125 | return
126 | }
127 |
128 | // Convert photo same buffer to a jpeg image data by using AVCapturePhotoOutput
129 | guard let imageData = AVCapturePhotoOutput.jpegPhotoDataRepresentation(forJPEGSampleBuffer: photoSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) else {
130 | return
131 | }
132 |
133 | // Initialise an UIImage with our image data
134 | let capturedImage = UIImage.init(data: imageData , scale: 1.0)
135 | if let image = capturedImage {
136 | // Save our captured image to photos album
137 | UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
138 | }
139 | }
140 | }
141 |
142 | extension UIInterfaceOrientation {
143 | var videoOrientation: AVCaptureVideoOrientation? {
144 | switch self {
145 | case .portraitUpsideDown: return .portraitUpsideDown
146 | case .landscapeRight: return .landscapeRight
147 | case .landscapeLeft: return .landscapeLeft
148 | case .portrait: return .portrait
149 | default: return nil
150 | }
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/Instagram-SWUI.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | C313C0B822A6FBAC00FF2AFB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C313C0B722A6FBAC00FF2AFB /* AppDelegate.swift */; };
11 | C313C0BA22A6FBAC00FF2AFB /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C313C0B922A6FBAC00FF2AFB /* SceneDelegate.swift */; };
12 | C313C0BD22A6FBAC00FF2AFB /* Instagram_SWUI.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = C313C0BB22A6FBAC00FF2AFB /* Instagram_SWUI.xcdatamodeld */; };
13 | C313C0BF22A6FBAC00FF2AFB /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C313C0BE22A6FBAC00FF2AFB /* ContentView.swift */; };
14 | C313C0C122A6FBAE00FF2AFB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C313C0C022A6FBAE00FF2AFB /* Assets.xcassets */; };
15 | C313C0C422A6FBAE00FF2AFB /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C313C0C322A6FBAE00FF2AFB /* Preview Assets.xcassets */; };
16 | C313C0C722A6FBAE00FF2AFB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C313C0C522A6FBAE00FF2AFB /* LaunchScreen.storyboard */; };
17 | C313C0F422A727EE00FF2AFB /* InstaPhoto.swift in Sources */ = {isa = PBXBuildFile; fileRef = C313C0F322A727EE00FF2AFB /* InstaPhoto.swift */; };
18 | C313C10222A778D100FF2AFB /* PhotoLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = C313C10122A778D100FF2AFB /* PhotoLibrary.swift */; };
19 | C313C10822A8301D00FF2AFB /* CameraView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C313C10722A8301D00FF2AFB /* CameraView.swift */; };
20 | C34D712822A9B14700E60D50 /* CameraViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C34D712722A9B14700E60D50 /* CameraViewController.swift */; };
21 | /* End PBXBuildFile section */
22 |
23 | /* Begin PBXFileReference section */
24 | C313C0B422A6FBAC00FF2AFB /* Instagram-SWUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Instagram-SWUI.app"; sourceTree = BUILT_PRODUCTS_DIR; };
25 | C313C0B722A6FBAC00FF2AFB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
26 | C313C0B922A6FBAC00FF2AFB /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
27 | C313C0BC22A6FBAC00FF2AFB /* Instagram_SWUI.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Instagram_SWUI.xcdatamodel; sourceTree = ""; };
28 | C313C0BE22A6FBAC00FF2AFB /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
29 | C313C0C022A6FBAE00FF2AFB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
30 | C313C0C322A6FBAE00FF2AFB /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
31 | C313C0C622A6FBAE00FF2AFB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
32 | C313C0C822A6FBAE00FF2AFB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33 | C313C0F322A727EE00FF2AFB /* InstaPhoto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstaPhoto.swift; sourceTree = ""; };
34 | C313C10122A778D100FF2AFB /* PhotoLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoLibrary.swift; sourceTree = ""; };
35 | C313C10722A8301D00FF2AFB /* CameraView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraView.swift; sourceTree = ""; };
36 | C34D712722A9B14700E60D50 /* CameraViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraViewController.swift; sourceTree = ""; };
37 | C34D712922A9C1CF00E60D50 /* Instagram-SWUI.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Instagram-SWUI.entitlements"; sourceTree = ""; };
38 | /* End PBXFileReference section */
39 |
40 | /* Begin PBXFrameworksBuildPhase section */
41 | C313C0B122A6FBAC00FF2AFB /* Frameworks */ = {
42 | isa = PBXFrameworksBuildPhase;
43 | buildActionMask = 2147483647;
44 | files = (
45 | );
46 | runOnlyForDeploymentPostprocessing = 0;
47 | };
48 | /* End PBXFrameworksBuildPhase section */
49 |
50 | /* Begin PBXGroup section */
51 | C313C0AB22A6FBAC00FF2AFB = {
52 | isa = PBXGroup;
53 | children = (
54 | C313C0B622A6FBAC00FF2AFB /* Instagram-SWUI */,
55 | C313C0B522A6FBAC00FF2AFB /* Products */,
56 | );
57 | sourceTree = "";
58 | };
59 | C313C0B522A6FBAC00FF2AFB /* Products */ = {
60 | isa = PBXGroup;
61 | children = (
62 | C313C0B422A6FBAC00FF2AFB /* Instagram-SWUI.app */,
63 | );
64 | name = Products;
65 | sourceTree = "";
66 | };
67 | C313C0B622A6FBAC00FF2AFB /* Instagram-SWUI */ = {
68 | isa = PBXGroup;
69 | children = (
70 | C34D712922A9C1CF00E60D50 /* Instagram-SWUI.entitlements */,
71 | C313C0B722A6FBAC00FF2AFB /* AppDelegate.swift */,
72 | C313C0B922A6FBAC00FF2AFB /* SceneDelegate.swift */,
73 | C34D712722A9B14700E60D50 /* CameraViewController.swift */,
74 | C313C0BE22A6FBAC00FF2AFB /* ContentView.swift */,
75 | C313C10722A8301D00FF2AFB /* CameraView.swift */,
76 | C313C0F322A727EE00FF2AFB /* InstaPhoto.swift */,
77 | C313C10122A778D100FF2AFB /* PhotoLibrary.swift */,
78 | C313C0C022A6FBAE00FF2AFB /* Assets.xcassets */,
79 | C313C0C522A6FBAE00FF2AFB /* LaunchScreen.storyboard */,
80 | C313C0C822A6FBAE00FF2AFB /* Info.plist */,
81 | C313C0BB22A6FBAC00FF2AFB /* Instagram_SWUI.xcdatamodeld */,
82 | C313C0C222A6FBAE00FF2AFB /* Preview Content */,
83 | );
84 | path = "Instagram-SWUI";
85 | sourceTree = "";
86 | };
87 | C313C0C222A6FBAE00FF2AFB /* Preview Content */ = {
88 | isa = PBXGroup;
89 | children = (
90 | C313C0C322A6FBAE00FF2AFB /* Preview Assets.xcassets */,
91 | );
92 | path = "Preview Content";
93 | sourceTree = "";
94 | };
95 | /* End PBXGroup section */
96 |
97 | /* Begin PBXNativeTarget section */
98 | C313C0B322A6FBAC00FF2AFB /* Instagram-SWUI */ = {
99 | isa = PBXNativeTarget;
100 | buildConfigurationList = C313C0CB22A6FBAE00FF2AFB /* Build configuration list for PBXNativeTarget "Instagram-SWUI" */;
101 | buildPhases = (
102 | C313C0B022A6FBAC00FF2AFB /* Sources */,
103 | C313C0B122A6FBAC00FF2AFB /* Frameworks */,
104 | C313C0B222A6FBAC00FF2AFB /* Resources */,
105 | );
106 | buildRules = (
107 | );
108 | dependencies = (
109 | );
110 | name = "Instagram-SWUI";
111 | productName = "Instagram-SWUI";
112 | productReference = C313C0B422A6FBAC00FF2AFB /* Instagram-SWUI.app */;
113 | productType = "com.apple.product-type.application";
114 | };
115 | /* End PBXNativeTarget section */
116 |
117 | /* Begin PBXProject section */
118 | C313C0AC22A6FBAC00FF2AFB /* Project object */ = {
119 | isa = PBXProject;
120 | attributes = {
121 | LastSwiftUpdateCheck = 1100;
122 | LastUpgradeCheck = 1100;
123 | ORGANIZATIONNAME = "leavenstee llc";
124 | TargetAttributes = {
125 | C313C0B322A6FBAC00FF2AFB = {
126 | CreatedOnToolsVersion = 11.0;
127 | };
128 | };
129 | };
130 | buildConfigurationList = C313C0AF22A6FBAC00FF2AFB /* Build configuration list for PBXProject "Instagram-SWUI" */;
131 | compatibilityVersion = "Xcode 9.3";
132 | developmentRegion = en;
133 | hasScannedForEncodings = 0;
134 | knownRegions = (
135 | en,
136 | Base,
137 | );
138 | mainGroup = C313C0AB22A6FBAC00FF2AFB;
139 | productRefGroup = C313C0B522A6FBAC00FF2AFB /* Products */;
140 | projectDirPath = "";
141 | projectRoot = "";
142 | targets = (
143 | C313C0B322A6FBAC00FF2AFB /* Instagram-SWUI */,
144 | );
145 | };
146 | /* End PBXProject section */
147 |
148 | /* Begin PBXResourcesBuildPhase section */
149 | C313C0B222A6FBAC00FF2AFB /* Resources */ = {
150 | isa = PBXResourcesBuildPhase;
151 | buildActionMask = 2147483647;
152 | files = (
153 | C313C0C722A6FBAE00FF2AFB /* LaunchScreen.storyboard in Resources */,
154 | C313C0C422A6FBAE00FF2AFB /* Preview Assets.xcassets in Resources */,
155 | C313C0C122A6FBAE00FF2AFB /* Assets.xcassets in Resources */,
156 | );
157 | runOnlyForDeploymentPostprocessing = 0;
158 | };
159 | /* End PBXResourcesBuildPhase section */
160 |
161 | /* Begin PBXSourcesBuildPhase section */
162 | C313C0B022A6FBAC00FF2AFB /* Sources */ = {
163 | isa = PBXSourcesBuildPhase;
164 | buildActionMask = 2147483647;
165 | files = (
166 | C313C0B822A6FBAC00FF2AFB /* AppDelegate.swift in Sources */,
167 | C313C0BD22A6FBAC00FF2AFB /* Instagram_SWUI.xcdatamodeld in Sources */,
168 | C313C0F422A727EE00FF2AFB /* InstaPhoto.swift in Sources */,
169 | C313C10222A778D100FF2AFB /* PhotoLibrary.swift in Sources */,
170 | C313C0BF22A6FBAC00FF2AFB /* ContentView.swift in Sources */,
171 | C34D712822A9B14700E60D50 /* CameraViewController.swift in Sources */,
172 | C313C0BA22A6FBAC00FF2AFB /* SceneDelegate.swift in Sources */,
173 | C313C10822A8301D00FF2AFB /* CameraView.swift in Sources */,
174 | );
175 | runOnlyForDeploymentPostprocessing = 0;
176 | };
177 | /* End PBXSourcesBuildPhase section */
178 |
179 | /* Begin PBXVariantGroup section */
180 | C313C0C522A6FBAE00FF2AFB /* LaunchScreen.storyboard */ = {
181 | isa = PBXVariantGroup;
182 | children = (
183 | C313C0C622A6FBAE00FF2AFB /* Base */,
184 | );
185 | name = LaunchScreen.storyboard;
186 | sourceTree = "";
187 | };
188 | /* End PBXVariantGroup section */
189 |
190 | /* Begin XCBuildConfiguration section */
191 | C313C0C922A6FBAE00FF2AFB /* Debug */ = {
192 | isa = XCBuildConfiguration;
193 | buildSettings = {
194 | ALWAYS_SEARCH_USER_PATHS = NO;
195 | CLANG_ANALYZER_NONNULL = YES;
196 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
197 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
198 | CLANG_CXX_LIBRARY = "libc++";
199 | CLANG_ENABLE_MODULES = YES;
200 | CLANG_ENABLE_OBJC_ARC = YES;
201 | CLANG_ENABLE_OBJC_WEAK = YES;
202 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
203 | CLANG_WARN_BOOL_CONVERSION = YES;
204 | CLANG_WARN_COMMA = YES;
205 | CLANG_WARN_CONSTANT_CONVERSION = YES;
206 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
207 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
208 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
209 | CLANG_WARN_EMPTY_BODY = YES;
210 | CLANG_WARN_ENUM_CONVERSION = YES;
211 | CLANG_WARN_INFINITE_RECURSION = YES;
212 | CLANG_WARN_INT_CONVERSION = YES;
213 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
214 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
215 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
216 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
217 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
218 | CLANG_WARN_STRICT_PROTOTYPES = YES;
219 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
220 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
221 | CLANG_WARN_UNREACHABLE_CODE = YES;
222 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
223 | COPY_PHASE_STRIP = NO;
224 | DEBUG_INFORMATION_FORMAT = dwarf;
225 | ENABLE_STRICT_OBJC_MSGSEND = YES;
226 | ENABLE_TESTABILITY = YES;
227 | GCC_C_LANGUAGE_STANDARD = gnu11;
228 | GCC_DYNAMIC_NO_PIC = NO;
229 | GCC_NO_COMMON_BLOCKS = YES;
230 | GCC_OPTIMIZATION_LEVEL = 0;
231 | GCC_PREPROCESSOR_DEFINITIONS = (
232 | "DEBUG=1",
233 | "$(inherited)",
234 | );
235 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
236 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
237 | GCC_WARN_UNDECLARED_SELECTOR = YES;
238 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
239 | GCC_WARN_UNUSED_FUNCTION = YES;
240 | GCC_WARN_UNUSED_VARIABLE = YES;
241 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
242 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
243 | MTL_FAST_MATH = YES;
244 | ONLY_ACTIVE_ARCH = YES;
245 | SDKROOT = iphoneos;
246 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
247 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
248 | };
249 | name = Debug;
250 | };
251 | C313C0CA22A6FBAE00FF2AFB /* Release */ = {
252 | isa = XCBuildConfiguration;
253 | buildSettings = {
254 | ALWAYS_SEARCH_USER_PATHS = NO;
255 | CLANG_ANALYZER_NONNULL = YES;
256 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
257 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
258 | CLANG_CXX_LIBRARY = "libc++";
259 | CLANG_ENABLE_MODULES = YES;
260 | CLANG_ENABLE_OBJC_ARC = YES;
261 | CLANG_ENABLE_OBJC_WEAK = YES;
262 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
263 | CLANG_WARN_BOOL_CONVERSION = YES;
264 | CLANG_WARN_COMMA = YES;
265 | CLANG_WARN_CONSTANT_CONVERSION = YES;
266 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
267 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
268 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
269 | CLANG_WARN_EMPTY_BODY = YES;
270 | CLANG_WARN_ENUM_CONVERSION = YES;
271 | CLANG_WARN_INFINITE_RECURSION = YES;
272 | CLANG_WARN_INT_CONVERSION = YES;
273 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
274 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
275 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
276 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
277 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
278 | CLANG_WARN_STRICT_PROTOTYPES = YES;
279 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
280 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
281 | CLANG_WARN_UNREACHABLE_CODE = YES;
282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
283 | COPY_PHASE_STRIP = NO;
284 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
285 | ENABLE_NS_ASSERTIONS = NO;
286 | ENABLE_STRICT_OBJC_MSGSEND = YES;
287 | GCC_C_LANGUAGE_STANDARD = gnu11;
288 | GCC_NO_COMMON_BLOCKS = YES;
289 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
290 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
291 | GCC_WARN_UNDECLARED_SELECTOR = YES;
292 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
293 | GCC_WARN_UNUSED_FUNCTION = YES;
294 | GCC_WARN_UNUSED_VARIABLE = YES;
295 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
296 | MTL_ENABLE_DEBUG_INFO = NO;
297 | MTL_FAST_MATH = YES;
298 | SDKROOT = iphoneos;
299 | SWIFT_COMPILATION_MODE = wholemodule;
300 | SWIFT_OPTIMIZATION_LEVEL = "-O";
301 | VALIDATE_PRODUCT = YES;
302 | };
303 | name = Release;
304 | };
305 | C313C0CC22A6FBAE00FF2AFB /* Debug */ = {
306 | isa = XCBuildConfiguration;
307 | buildSettings = {
308 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
309 | CODE_SIGN_ENTITLEMENTS = "Instagram-SWUI/Instagram-SWUI.entitlements";
310 | CODE_SIGN_STYLE = Automatic;
311 | DEVELOPMENT_ASSET_PATHS = "Instagram-SWUI/Preview\\ Content";
312 | DEVELOPMENT_TEAM = D846Q7V7YL;
313 | ENABLE_PREVIEWS = YES;
314 | INFOPLIST_FILE = "Instagram-SWUI/Info.plist";
315 | LD_RUNPATH_SEARCH_PATHS = (
316 | "$(inherited)",
317 | "@executable_path/Frameworks",
318 | );
319 | PRODUCT_BUNDLE_IDENTIFIER = "leavenstee.Instagram-SWUI";
320 | PRODUCT_NAME = "$(TARGET_NAME)";
321 | SUPPORTS_UIKITFORMAC = NO;
322 | SWIFT_VERSION = 5.0;
323 | TARGETED_DEVICE_FAMILY = "1,2";
324 | };
325 | name = Debug;
326 | };
327 | C313C0CD22A6FBAE00FF2AFB /* Release */ = {
328 | isa = XCBuildConfiguration;
329 | buildSettings = {
330 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
331 | CODE_SIGN_ENTITLEMENTS = "Instagram-SWUI/Instagram-SWUI.entitlements";
332 | CODE_SIGN_STYLE = Automatic;
333 | DEVELOPMENT_ASSET_PATHS = "Instagram-SWUI/Preview\\ Content";
334 | DEVELOPMENT_TEAM = D846Q7V7YL;
335 | ENABLE_PREVIEWS = YES;
336 | INFOPLIST_FILE = "Instagram-SWUI/Info.plist";
337 | LD_RUNPATH_SEARCH_PATHS = (
338 | "$(inherited)",
339 | "@executable_path/Frameworks",
340 | );
341 | PRODUCT_BUNDLE_IDENTIFIER = "leavenstee.Instagram-SWUI";
342 | PRODUCT_NAME = "$(TARGET_NAME)";
343 | SUPPORTS_UIKITFORMAC = NO;
344 | SWIFT_VERSION = 5.0;
345 | TARGETED_DEVICE_FAMILY = "1,2";
346 | };
347 | name = Release;
348 | };
349 | /* End XCBuildConfiguration section */
350 |
351 | /* Begin XCConfigurationList section */
352 | C313C0AF22A6FBAC00FF2AFB /* Build configuration list for PBXProject "Instagram-SWUI" */ = {
353 | isa = XCConfigurationList;
354 | buildConfigurations = (
355 | C313C0C922A6FBAE00FF2AFB /* Debug */,
356 | C313C0CA22A6FBAE00FF2AFB /* Release */,
357 | );
358 | defaultConfigurationIsVisible = 0;
359 | defaultConfigurationName = Release;
360 | };
361 | C313C0CB22A6FBAE00FF2AFB /* Build configuration list for PBXNativeTarget "Instagram-SWUI" */ = {
362 | isa = XCConfigurationList;
363 | buildConfigurations = (
364 | C313C0CC22A6FBAE00FF2AFB /* Debug */,
365 | C313C0CD22A6FBAE00FF2AFB /* Release */,
366 | );
367 | defaultConfigurationIsVisible = 0;
368 | defaultConfigurationName = Release;
369 | };
370 | /* End XCConfigurationList section */
371 |
372 | /* Begin XCVersionGroup section */
373 | C313C0BB22A6FBAC00FF2AFB /* Instagram_SWUI.xcdatamodeld */ = {
374 | isa = XCVersionGroup;
375 | children = (
376 | C313C0BC22A6FBAC00FF2AFB /* Instagram_SWUI.xcdatamodel */,
377 | );
378 | currentVersion = C313C0BC22A6FBAC00FF2AFB /* Instagram_SWUI.xcdatamodel */;
379 | path = Instagram_SWUI.xcdatamodeld;
380 | sourceTree = "";
381 | versionGroupType = wrapper.xcdatamodel;
382 | };
383 | /* End XCVersionGroup section */
384 | };
385 | rootObject = C313C0AC22A6FBAC00FF2AFB /* Project object */;
386 | }
387 |
--------------------------------------------------------------------------------