Skip to content

Commit d10f72e

Browse files
Update Demo Screens for Previews. Add forced dynamic product.
1 parent 872a269 commit d10f72e

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

Demo/PowerSyncExample.xcodeproj/project.pbxproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939
B666587C2C63B88700159A81 /* SwiftUINavigationCore in Frameworks */ = {isa = PBXBuildFile; productRef = B666587B2C63B88700159A81 /* SwiftUINavigationCore */; };
4040
B69F7D862C8EE27400565448 /* AnyCodable in Frameworks */ = {isa = PBXBuildFile; productRef = B69F7D852C8EE27400565448 /* AnyCodable */; };
4141
B6B3698A2C64F4B30033C307 /* Navigation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6B369892C64F4B30033C307 /* Navigation.swift */; };
42-
B6FFD5322D06DA8000EEE60F /* PowerSync in Frameworks */ = {isa = PBXBuildFile; productRef = B6FFD5312D06DA8000EEE60F /* PowerSync */; };
4342
BE2F26EC2DA54B2F0080F1AE /* SupabaseRemoteStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE2F26EB2DA54B2A0080F1AE /* SupabaseRemoteStorage.swift */; };
43+
BEDBE19C2E5F0299004E1AB5 /* PowerSyncDynamic in Frameworks */ = {isa = PBXBuildFile; productRef = BEDBE19B2E5F0299004E1AB5 /* PowerSyncDynamic */; };
44+
BEDBE19D2E5F0299004E1AB5 /* PowerSyncDynamic in Embed Frameworks */ = {isa = PBXBuildFile; productRef = BEDBE19B2E5F0299004E1AB5 /* PowerSyncDynamic */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
4445
BEE4708B2E3BBB2500140D11 /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEE4708A2E3BBB2500140D11 /* Secrets.swift */; };
4546
/* End PBXBuildFile section */
4647

@@ -51,6 +52,7 @@
5152
dstPath = "";
5253
dstSubfolderSpec = 10;
5354
files = (
55+
BEDBE19D2E5F0299004E1AB5 /* PowerSyncDynamic in Embed Frameworks */,
5456
);
5557
name = "Embed Frameworks";
5658
runOnlyForDeploymentPostprocessing = 0;
@@ -120,11 +122,11 @@
120122
B66658772C63B7BB00159A81 /* IdentifiedCollections in Frameworks */,
121123
B69F7D862C8EE27400565448 /* AnyCodable in Frameworks */,
122124
B666587C2C63B88700159A81 /* SwiftUINavigationCore in Frameworks */,
123-
B6FFD5322D06DA8000EEE60F /* PowerSync in Frameworks */,
124125
6A9669022B9EE69500B05DCF /* Supabase in Frameworks */,
125126
6A9669002B9EE4FE00B05DCF /* PostgREST in Frameworks */,
126127
6A9668FE2B9EE4FE00B05DCF /* Auth in Frameworks */,
127128
B666587A2C63B88700159A81 /* SwiftUINavigation in Frameworks */,
129+
BEDBE19C2E5F0299004E1AB5 /* PowerSyncDynamic in Frameworks */,
128130
);
129131
runOnlyForDeploymentPostprocessing = 0;
130132
};
@@ -487,7 +489,7 @@
487489
B66658792C63B88700159A81 /* SwiftUINavigation */,
488490
B666587B2C63B88700159A81 /* SwiftUINavigationCore */,
489491
B69F7D852C8EE27400565448 /* AnyCodable */,
490-
B6FFD5312D06DA8000EEE60F /* PowerSync */,
492+
BEDBE19B2E5F0299004E1AB5 /* PowerSyncDynamic */,
491493
);
492494
productName = PowerSyncExample;
493495
productReference = 6A7315842B9854220004CB17 /* PowerSyncExample.app */;
@@ -885,10 +887,10 @@
885887
package = B69F7D842C8EE27300565448 /* XCRemoteSwiftPackageReference "AnyCodable" */;
886888
productName = AnyCodable;
887889
};
888-
B6FFD5312D06DA8000EEE60F /* PowerSync */ = {
890+
BEDBE19B2E5F0299004E1AB5 /* PowerSyncDynamic */ = {
889891
isa = XCSwiftPackageProductDependency;
890892
package = 18F30B282CCA4B3B00A58917 /* XCLocalSwiftPackageReference "../../powersync-swift" */;
891-
productName = PowerSync;
893+
productName = PowerSyncDynamic;
892894
};
893895
/* End XCSwiftPackageProductDependency section */
894896
};

Demo/PowerSyncExample/Screens/HomeScreen.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ struct HomeScreen: View {
3333
NavigationStack{
3434
HomeScreen()
3535
.environment(SystemManager())
36+
.environment(NavigationModel())
3637
}
3738
}

Demo/PowerSyncExample/Screens/SignInScreen.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@ struct SignInScreen: View {
7878
NavigationStack {
7979
SignInScreen()
8080
.environment(SystemManager())
81+
.environment(NavigationModel())
8182
}
8283
}

Demo/PowerSyncExample/Screens/SignUpScreen.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@ struct SignUpScreen: View {
7878
NavigationStack {
7979
SignUpScreen()
8080
.environment(SystemManager())
81+
.environment(NavigationModel())
8182
}
8283
}

Package.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ let package = Package(
6161
.library(
6262
name: packageName,
6363
targets: ["PowerSync"]
64+
),
65+
.library(
66+
name: "\(packageName)Dynamic",
67+
// The default value normally specifies that the library is compatible with both static and dynamic linking,
68+
// where the value used is typically specified by the consumer - which is usually defaulted to static linking.
69+
// It's not straight forward to configure the linking option used by XCode consumers - specifying
70+
// this additional product allows consumers to add it to their project, forcing dynamic linking.
71+
// Dynamic linking is particularly important for XCode previews.
72+
type: .dynamic,
73+
targets: ["PowerSync"]
6474
)
6575
],
6676
dependencies: conditionalDependencies,

0 commit comments

Comments
 (0)