Skip to content

Commit 25ec303

Browse files
authored
Merge pull request #1 from rees46/feature/demo-store
Feature/ Demo store
2 parents 1bce5c7 + f30e211 commit 25ec303

File tree

356 files changed

+26628
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+26628
-52
lines changed

.gitignore

+102-50
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,42 @@
1+
# Created by https://www.gitignore.io/api/xcode,swift,macos,objective-c
2+
3+
### macOS ###
4+
*.DS_Store
5+
.AppleDouble
6+
.LSOverride
7+
8+
# Icon must end with two \r
9+
Icon
10+
11+
# Thumbnails
12+
._*
13+
14+
# Files that might appear in the root of a volume
15+
.DocumentRevisions-V100
16+
.fseventsd
17+
.Spotlight-V100
18+
.TemporaryItems
19+
.Trashes
20+
.VolumeIcon.icns
21+
.com.apple.timemachine.donotpresent
22+
23+
# Directories potentially created on remote AFP share
24+
.AppleDB
25+
.AppleDesktop
26+
Network Trash Folder
27+
Temporary Items
28+
.apdisk
29+
30+
### Objective-C ###
131
# Xcode
232
#
333
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
434

5-
## User settings
6-
xcuserdata/
7-
8-
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9-
*.xcscmblueprint
10-
*.xccheckout
11-
12-
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
35+
## Build generated
1336
build/
1437
DerivedData/
15-
*.moved-aside
38+
39+
## Various settings
1640
*.pbxuser
1741
!default.pbxuser
1842
*.mode1v3
@@ -21,15 +45,59 @@ DerivedData/
2145
!default.mode2v3
2246
*.perspectivev3
2347
!default.perspectivev3
48+
xcuserdata/
49+
50+
## Other
51+
*.moved-aside
52+
*.xccheckout
53+
*.xcscmblueprint
2454

2555
## Obj-C/Swift specific
2656
*.hmap
27-
28-
## App packaging
2957
*.ipa
3058
*.dSYM.zip
3159
*.dSYM
3260

61+
# CocoaPods - Refactored to standalone file
62+
63+
64+
# Carthage - Refactored to standalone file
65+
66+
# fastlane
67+
#
68+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
69+
# screenshots whenever they are needed.
70+
# For more information about the recommended setup visit:
71+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
72+
73+
fastlane/report.xml
74+
fastlane/Preview.html
75+
fastlane/test_output
76+
fastlane/Match/
77+
.env.default
78+
79+
# Code Injection
80+
#
81+
# After new code Injection tools there's a generated folder /iOSInjectionProject
82+
# https://github.com/johnno1962/injectionforxcode
83+
84+
iOSInjectionProject/
85+
86+
### Objective-C Patch ###
87+
88+
### Swift ###
89+
# Xcode
90+
#
91+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
92+
93+
## Build generated
94+
95+
## Various settings
96+
97+
## Other
98+
99+
## Obj-C/Swift specific
100+
33101
## Playgrounds
34102
timeline.xctimeline
35103
playground.xcworkspace
@@ -39,52 +107,36 @@ playground.xcworkspace
39107
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40108
# Packages/
41109
# Package.pins
42-
# Package.resolved
43-
# *.xcodeproj
44-
#
45-
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
46-
# hence it is not needed unless you have added a package configuration file to your project
47-
# .swiftpm
48-
49110
.build/
50111

51-
# CocoaPods
52-
#
53-
# We recommend against adding the Pods directory to your .gitignore. However
54-
# you should judge for yourself, the pros and cons are mentioned at:
55-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
56-
#
57-
# Pods/
58-
#
59-
# Add this line if you want to avoid checking in source code from the Xcode workspace
60-
# *.xcworkspace
112+
# CocoaPods - Refactored to standalone file
61113

62-
# Carthage
114+
# Carthage - Refactored to standalone file
115+
116+
### Xcode ###
117+
# Xcode
63118
#
64-
# Add this line if you want to avoid checking in source code from Carthage dependencies.
65-
# Carthage/Checkouts
119+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
66120

67-
Carthage/Build/
121+
## Build generated
68122

69-
# Accio dependency management
70-
Dependencies/
71-
.accio/
123+
## Various settings
72124

73-
# fastlane
74-
#
75-
# It is recommended to not store the screenshots in the git repo.
76-
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
77-
# For more information about the recommended setup visit:
78-
# https://docs.fastlane.tools/best-practices/source-control/#source-control
125+
## Other
79126

80-
fastlane/report.xml
81-
fastlane/Preview.html
82-
fastlane/screenshots/**/*.png
83-
fastlane/test_output
127+
### Xcode Patch ###
128+
*.xcodeproj/*
129+
!*.xcodeproj/project.pbxproj
130+
!*.xcodeproj/xcshareddata/
131+
!*.xcworkspace/contents.xcworkspacedata
132+
*.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
133+
/*.gcno
134+
*.xcworkspacedata
135+
*.xcuserdata
84136

85-
# Code Injection
86-
#
87-
# After new code Injection tools there's a generated folder /iOSInjectionProject
88-
# https://github.com/johnno1962/injectionforxcode
137+
## Cocoapods ##
138+
Pods/
89139

90-
iOSInjectionProject/
140+
# End of https://www.gitignore.io/api/xcode,swift,macos,objective-c
141+
/fastlane/fastlane/Appfile
142+
/Gemfile.lock

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

App/DemoStoreApp.struct.swift

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import SwiftUI
2+
3+
@main
4+
struct DemoStoreApp: App {
5+
@StateObject private var appState = AppState()
6+
7+
init() {
8+
DependenciesInitialization.initialize()
9+
}
10+
11+
var body: some Scene {
12+
WindowGroup {
13+
if appState.showSplash {
14+
SplashScreenView()
15+
.environmentObject(appState)
16+
} else {
17+
ContentView()
18+
}
19+
}
20+
}
21+
}

App/Info.plist

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
4+
<plist version="1.0">
5+
<dict>
6+
7+
<key>NSAppTransportSecurity</key>
8+
<dict>
9+
<key>NSAllowsArbitraryLoads</key>
10+
<true/>
11+
</dict>
12+
13+
<key>UIRequiresPersistentWiFi</key>
14+
<false/>
15+
<key>NSAppTransportSecurity</key>
16+
<dict>
17+
<key>NSAllowsArbitraryLoads</key>
18+
<true/>
19+
</dict>
20+
21+
</dict>
22+
23+
</plist>

App/Models/RootScreenType.enum.swift

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
import Foundation
3+
4+
enum RootScreenType {
5+
case home
6+
case products
7+
case cart
8+
case settings
9+
case none
10+
}

App/Models/TabItem.struct.swift

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import SwiftUI
2+
3+
struct TabItem: Identifiable {
4+
let id = UUID()
5+
let image: String
6+
let screen: ScreenWrapper
7+
let type: RootScreenType
8+
}

App/Models/ViewState.enum.swift

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import Foundation
2+
3+
enum ViewState {
4+
case loading
5+
case error(String)
6+
case data
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Foundation
2+
3+
protocol ScreenTypeProvider {
4+
static var screenType: RootScreenType { get }
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}

App/UI/Colors/AppColors.struct.swift

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import SwiftUI
2+
3+
struct AppColors {
4+
static let selectedForeground = Color.white
5+
static let colorGray = Color.gray
6+
static let ratingColor = Color.yellow
7+
static let colorWhite = Color.white
8+
static let colorBlack = Color.black
9+
static let colorRed = Color.red
10+
}

App/UI/Fonts/Typography.struct.swift

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Foundation
2+
3+
struct Typography {
4+
struct FontSize {
5+
static let lineWidth: CGFloat = 1
6+
static let small: CGFloat = 12
7+
static let medium: CGFloat = 14
8+
static let standard: CGFloat = 16
9+
static let large: CGFloat = 17
10+
static let extraLarge: CGFloat = 18
11+
static let xxLarge: CGFloat = 20
12+
static let xxxLarge: CGFloat = 24
13+
static let enormous: CGFloat = 32
14+
}
15+
}

App/UI/Sizes/Sizes.struct.swift

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import SwiftUI
2+
3+
struct Sizes {
4+
5+
struct Padding {
6+
static let standard: CGFloat = 16
7+
static let medium: CGFloat = 8
8+
static let small: CGFloat = 5
9+
static let extraSmall: CGFloat = 2
10+
static let buttonHorizontal: CGFloat = 16
11+
static let large: CGFloat = 10
12+
static let xLarge: CGFloat = 12
13+
static let xxLarge: CGFloat = 20
14+
static let xxxLarge: CGFloat = 32
15+
}
16+
17+
struct Spacing {
18+
static let extraSmall: CGFloat = 2
19+
static let small: CGFloat = 5
20+
static let standard: CGFloat = 16
21+
static let large: CGFloat = 20
22+
static let medium: CGFloat = 12
23+
static let extraLarge: CGFloat = 36
24+
}
25+
26+
struct Size {
27+
static let xxLargeImageSize: CGFloat = 350
28+
static let smallIconSize: CGFloat = 24
29+
static let smallImageSize: CGFloat = 64
30+
static let largeImageSize: CGFloat = 300
31+
static let largeImageWidth: CGFloat = 280
32+
static let largeContainerHeight: CGFloat = 250
33+
static let storiesHeight: CGFloat = 200
34+
static let smallCircle: CGFloat = 10
35+
static let badge: CGFloat = 14
36+
static let buttonHeight: CGFloat = 50
37+
static let buttonWidth: CGFloat = 50
38+
static let bottomBarHeight: CGFloat = 50
39+
static let icon: CGFloat = 32
40+
static let mediumImage: CGFloat = 140
41+
static let largeImage: CGFloat = 170
42+
static let textFrameWidth: CGFloat = 46
43+
static let textFrameHeight: CGFloat = 14
44+
}
45+
46+
struct BorderWidth {
47+
static let standard: CGFloat = 1
48+
}
49+
50+
struct CornerRadius {
51+
static let small: CGFloat = 3
52+
static let medium: CGFloat = 5
53+
static let standard: CGFloat = 8
54+
static let large: CGFloat = 10
55+
}
56+
}

App/ViewModels/AppState.swift

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import SwiftUI
2+
3+
class AppState: ObservableObject {
4+
@Published var showSplash: Bool = true
5+
}

0 commit comments

Comments
 (0)