Skip to content

Commit 573768a

Browse files
committed
Initial commit
1 parent 046defd commit 573768a

File tree

185 files changed

+3333
-1
lines changed

Some content is hidden

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

185 files changed

+3333
-1
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/config/registries.json
8+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9+
.netrc

GoodPersistence-Sample/GoodPersistence-Sample.xcodeproj/project.pbxproj

Lines changed: 569 additions & 0 deletions
Large diffs are not rendered by default.

GoodPersistence-Sample/GoodPersistence-Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

GoodPersistence-Sample/GoodPersistence-Sample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// AppDelegate.swift
3+
// GoodPersistence-Sample
4+
//
5+
// Created by GoodRequest on 09/02/2023.
6+
//
7+
8+
import UIKit
9+
10+
@main
11+
class AppDelegate: UIResponder, UIApplicationDelegate {
12+
13+
var window: UIWindow?
14+
15+
func application(
16+
_ application: UIApplication,
17+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
18+
) -> Bool {
19+
window = UIWindow()
20+
21+
UINavigationBar.configureAppearance()
22+
23+
AppCoordinator(window: window, di: DI()).start()
24+
25+
return true
26+
}
27+
28+
}
29+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7+
</dependencies>
8+
<scenes>
9+
<!--View Controller-->
10+
<scene sceneID="EHf-IW-A2E">
11+
<objects>
12+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
13+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16+
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
17+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
18+
</view>
19+
</viewController>
20+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
21+
</objects>
22+
<point key="canvasLocation" x="53" y="375"/>
23+
</scene>
24+
</scenes>
25+
</document>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDocumentTypes</key>
6+
<array>
7+
<dict>
8+
<key>CFBundleTypeRole</key>
9+
<string>Viewer</string>
10+
<key>LSItemContentTypes</key>
11+
<array>
12+
<string>com.example.plain-text</string>
13+
</array>
14+
</dict>
15+
</array>
16+
<key>UTImportedTypeDeclarations</key>
17+
<array>
18+
<dict>
19+
<key>UTTypeConformsTo</key>
20+
<array>
21+
<string>public.plain-text</string>
22+
</array>
23+
<key>UTTypeDescription</key>
24+
<string>Example Text</string>
25+
<key>UTTypeIdentifier</key>
26+
<string>com.example.plain-text</string>
27+
<key>UTTypeTagSpecification</key>
28+
<dict>
29+
<key>public.filename-extension</key>
30+
<array>
31+
<string>exampletext</string>
32+
</array>
33+
</dict>
34+
</dict>
35+
</array>
36+
</dict>
37+
</plist>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// AboutCoordinator.swift
3+
// GoodPersistence-Sample
4+
//
5+
// Created by Marek on 10/02/2023.
6+
//
7+
8+
import UIKit
9+
import SafariServices
10+
11+
class AboutCoordinator: Coordinator<AppStep> {
12+
13+
override func start() -> AboutViewController {
14+
15+
let aboutViewModel = AboutViewModel(coordinator: self)
16+
let aboutViewController = AboutViewController(viewModel: aboutViewModel)
17+
18+
if rootViewController == nil {
19+
rootViewController = aboutViewController
20+
}
21+
22+
return aboutViewController
23+
}
24+
25+
override func navigate(to stepper: AppStep) {
26+
switch stepper {
27+
case .safari(let url):
28+
let safariViewController = SFSafariViewController(url: url)
29+
navigationController?.present(safariViewController, animated: true)
30+
31+
case .home(_):
32+
break
33+
}
34+
}
35+
36+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// AppCoordinator.swift
3+
// GoodPersistence-Sample
4+
//
5+
// Created by Marek on 10/02/2023.
6+
//
7+
8+
import UIKit
9+
10+
enum AppStep {
11+
12+
case home(HomeStep)
13+
case safari(URL)
14+
15+
}
16+
17+
final class AppCoordinator: Coordinator<AppStep> {
18+
19+
private let window: UIWindow?
20+
private let di: DI
21+
22+
init(window: UIWindow?, di: DI) {
23+
self.window = window
24+
self.di = di
25+
}
26+
27+
@discardableResult
28+
override func start() -> UIViewController? {
29+
window?.rootViewController = HomeCoordinator(di: di).start()
30+
window?.makeKeyAndVisible()
31+
32+
return nil
33+
}
34+
35+
}

0 commit comments

Comments
 (0)