Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Integrate Listing module in the iOS Scene #19

Merged
merged 1 commit into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions PKDex-App/PKDex.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
AE555549263CAC5600373A01 /* SceneiOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE555548263CAC5600373A01 /* SceneiOS.swift */; };
AE55554F263CB70500373A01 /* Resolver in Frameworks */ = {isa = PBXBuildFile; productRef = AE55554E263CB70500373A01 /* Resolver */; };
AE555551263CB79500373A01 /* Core in Frameworks */ = {isa = PBXBuildFile; productRef = AE555550263CB79500373A01 /* Core */; };
AE6A19C2263F845A000B0F6D /* Listing in Frameworks */ = {isa = PBXBuildFile; productRef = AE6A19C1263F845A000B0F6D /* Listing */; };
AEF48438263B090C0012F640 /* PKDexApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEF48425263B090A0012F640 /* PKDexApp.swift */; };
AEF4843C263B090C0012F640 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AEF48427263B090C0012F640 /* Assets.xcassets */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -40,6 +41,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AE6A19C2263F845A000B0F6D /* Listing in Frameworks */,
AE55554F263CB70500373A01 /* Resolver in Frameworks */,
AE555551263CB79500373A01 /* Core in Frameworks */,
);
Expand Down Expand Up @@ -127,6 +129,7 @@
packageProductDependencies = (
AE55554E263CB70500373A01 /* Resolver */,
AE555550263CB79500373A01 /* Core */,
AE6A19C1263F845A000B0F6D /* Listing */,
);
productName = "PKDex (iOS)";
productReference = AEF4842C263B090C0012F640 /* PKDex.app */;
Expand Down Expand Up @@ -391,6 +394,10 @@
isa = XCSwiftPackageProductDependency;
productName = Core;
};
AE6A19C1263F845A000B0F6D /* Listing */ = {
isa = XCSwiftPackageProductDependency;
productName = Listing;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = AEF48420263B090A0012F640 /* Project object */;
Expand Down
2 changes: 2 additions & 0 deletions PKDex-App/Shared/PKDexApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
//

import Core
import Listing
import SwiftUI

@main
struct PKDexApp: App {

init() {
Core.DIComponents.bind()
Listing.DIComponents.bind()
}

var body: some Scene {
Expand Down
4 changes: 3 additions & 1 deletion PKDex-App/iOS/SceneiOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@

import Core
import SwiftUI
import Listing
import Resolver

struct SceneiOS: Scene {
@Environment(\.scenePhase) private var phase
@State private var sceneId = UUID()

@StateObject private var sceneStore: SceneStore = Resolver.resolve()
@StateObject private var listingStore: ListingStore = Resolver.resolve()

var body: some Scene {
WindowGroup {
Text("Welcome to iOS Scene")
ListingUI().environmentObject(listingStore)
}
.onChange(of: phase) { newPhase in
switch newPhase {
Expand Down