Skip to content

Commit

Permalink
feat: Swift 6 appdebugmode
Browse files Browse the repository at this point in the history
- Added pulse logs
  • Loading branch information
plajdo authored and andrej-jasso committed Oct 14, 2024
1 parent 1dee4f0 commit 7ec3de2
Show file tree
Hide file tree
Showing 105 changed files with 4,440 additions and 3,114 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,70 +1,105 @@
{
"object": {
"pins": [
{
"package": "Alamofire",
"repositoryURL": "https://github.com/Alamofire/Alamofire.git",
"state": {
"branch": null,
"revision": "723fa5a6c65812aec4a0d7cc432ee198883b6e00",
"version": "5.9.0"
}
},
{
"package": "AlamofireImage",
"repositoryURL": "https://github.com/Alamofire/AlamofireImage.git",
"state": {
"branch": null,
"revision": "1eaf3b6c6882bed10f6e7b119665599dd2329aa1",
"version": "4.3.0"
}
},
{
"package": "CombineExt",
"repositoryURL": "https://github.com/CombineCommunity/CombineExt.git",
"state": {
"branch": null,
"revision": "d7b896fa9ca8b47fa7bcde6b43ef9b70bf8c1f56",
"version": "1.8.1"
}
},
{
"package": "GoodNetworking",
"repositoryURL": "https://github.com/GoodRequest/GoodNetworking.git",
"state": {
"branch": null,
"revision": "47b616af6b839166cdac357d02cbce6b65c959c0",
"version": "2.5.0"
}
},
{
"package": "GoodPersistence",
"repositoryURL": "https://github.com/GoodRequest/GoodPersistence.git",
"state": {
"branch": null,
"revision": "841f777b44a6061e3a6f4e01ffb1e36af2dfe13f",
"version": "2.1.0"
}
},
{
"package": "KeychainAccess",
"repositoryURL": "https://github.com/kishikawakatsumi/KeychainAccess.git",
"state": {
"branch": null,
"revision": "84e546727d66f1adc5439debad16270d0fdd04e7",
"version": "4.2.2"
}
},
{
"package": "swiftui-introspect",
"repositoryURL": "https://github.com/siteline/swiftui-introspect",
"state": {
"branch": null,
"revision": "0cd2a5a5895306bc21d54a2254302d24a9a571e4",
"version": "1.1.3"
}
"originHash" : "11e672e30d756c2fc3f7ae187f2eeb3995eb992a570a647e92d895d6d9451cf0",
"pins" : [
{
"identity" : "alamofire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire.git",
"state" : {
"revision" : "ea6a94b7dddffd0ca4d0f29252d95310b84dec84",
"version" : "5.10.0"
}
]
},
"version": 1
},
{
"identity" : "alamofireimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/AlamofireImage.git",
"state" : {
"revision" : "1eaf3b6c6882bed10f6e7b119665599dd2329aa1",
"version" : "4.3.0"
}
},
{
"identity" : "chronometer",
"kind" : "remoteSourceControl",
"location" : "https://github.com/KittyMac/Chronometer.git",
"state" : {
"revision" : "d21b89e5cb5929b5175bdb3ad710a52cbf497eaa",
"version" : "0.1.12"
}
},
{
"identity" : "factory",
"kind" : "remoteSourceControl",
"location" : "https://github.com/hmlongco/Factory.git",
"state" : {
"revision" : "587995f7d5cc667951d635fbf6b4252324ba0439",
"version" : "2.3.2"
}
},
{
"identity" : "goodlogger",
"kind" : "remoteSourceControl",
"location" : "https://github.com/GoodRequest/GoodLogger.git",
"state" : {
"revision" : "3c1ef9289d23154fab9124f58c356a61917646d2",
"version" : "1.2.3"
}
},
{
"identity" : "goodnetworking",
"kind" : "remoteSourceControl",
"location" : "https://github.com/GoodRequest/GoodNetworking.git",
"state" : {
"revision" : "a9c89c3713bf88b425935f2ccfbb807b24d2d5ac",
"version" : "3.2.0"
}
},
{
"identity" : "hitch",
"kind" : "remoteSourceControl",
"location" : "https://github.com/KittyMac/Hitch.git",
"state" : {
"revision" : "d6c147a1d70992db39a141cb5bf9cf8fbb776250",
"version" : "0.4.148"
}
},
{
"identity" : "pulse",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kean/Pulse.git",
"state" : {
"revision" : "d6793206824303ccf19228bdce77d0f270867cd4",
"version" : "5.1.1"
}
},
{
"identity" : "sextant",
"kind" : "remoteSourceControl",
"location" : "https://github.com/KittyMac/Sextant.git",
"state" : {
"revision" : "52a77d0bce0210cf9557faef7fd0adb9a6da02fb",
"version" : "0.4.31"
}
},
{
"identity" : "spanker",
"kind" : "remoteSourceControl",
"location" : "https://github.com/KittyMac/Spanker.git",
"state" : {
"revision" : "d4b439bf76a40fb45d86a24d13b9c26e7d630eee",
"version" : "0.2.49"
}
},
{
"identity" : "swiftui-introspect",
"kind" : "remoteSourceControl",
"location" : "https://github.com/siteline/swiftui-introspect",
"state" : {
"revision" : "807f73ce09a9b9723f12385e592b4e0aaebd3336",
"version" : "1.3.0"
}
}
],
"version" : 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import SwiftUI
#if DEBUG
import AppDebugMode
#endif
import Factory

@main
@MainActor
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
private var dependencyContainer = DependencyContainer()

#if DEBUG
var model: CustomControlsModel = CustomControlsModel()
Expand All @@ -28,15 +29,35 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
window = UIWindow()

#if DEBUG
AppDebugModeProvider.shared.setup(
serversCollections: Constants.ServersCollections.allClases,
onServerChange: { debugPrint("Server has been changed") },
cacheManager: dependencyContainer.cacheManager,
customControls: { CustomControlsView(model: model) }
)
Task {
let providers = [
DebugSelectableServerProvider(
apiServerPickerConfiguration: .init(
serversCollections: Constants.devServerCollection,
onSelectedServerChange: nil
)
),
DebugSelectableServerProvider(
apiServerPickerConfiguration: .init(
serversCollections: Constants.testServerCollection,
onSelectedServerChange: nil
)
)
]

await PackageManager.shared.setup(
serverProviders: providers,
configurableProxySessionProvider: Container.shared.configurableSessionProvider.resolve(),
customControls: CustomControlsView(model: model),
showDebugSwift: true
)
}

#endif

AppCoordinator(window: window, di: dependencyContainer).start()

Task {
await AppCoordinator(window: window).start()
}
return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@

import UIKit

enum AppStep {
enum AppStep: Sendable {

case home(HomeStep)

}

@MainActor
final class AppCoordinator: Coordinator<AppStep> {

private let window: UIWindow?
private let di: DependencyContainer

init(window: UIWindow?, di: DependencyContainer) {
init(window: UIWindow?) {
self.window = window
self.di = di
}

@discardableResult
override func start() -> UIViewController? {
window?.rootViewController = HomeCoordinator(di: di).start()
override func start() async -> UIViewController? {
window?.rootViewController = await HomeCoordinator().start()
window?.makeKeyAndVisible()

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

import UIKit

class Coordinator<Step> {
@MainActor
class Coordinator<Step: Sendable> {

var rootViewController: UIViewController?

Expand All @@ -19,14 +20,14 @@ class Coordinator<Step> {
return rootViewController as? UINavigationController
}

func start() -> UIViewController? {
func start() async -> UIViewController? {
return rootViewController
}

init(rootViewController: UIViewController? = nil) {
self.rootViewController = rootViewController
}

func navigate(to stepper: Step) {}
func navigate(to stepper: Step) async {}

}

This file was deleted.

Loading

0 comments on commit 7ec3de2

Please sign in to comment.