@@ -18,13 +18,16 @@ func getDependencies(_ config: Configuration) -> [TargetDependency] {
1818 PresentationLayer . UIs. ReportSurcharge,
1919 PresentationLayer . UIs. SurchargeStatusHelp,
2020 PresentationLayer . UIs. Toast,
21+ Shared . Google. FirebaseSDKs,
2122 ]
2223
2324 switch config {
2425 case . dev:
2526 projects. append ( DataSource . DevelopmentEndpoint)
27+ projects. append ( Shared . Services. DevelopmentAdsService)
2628 case . prod:
2729 projects. append ( DataSource . ProductionEndpoint)
30+ projects. append ( Shared . Services. ProductionAdsService)
2831 }
2932
3033 return projects. map {
@@ -41,9 +44,7 @@ let developmentDependencies: [TargetDependency] = getDependencies(.dev)
4144
4245// MARK: External Dependencies
4346let externalDependencies : [ TargetDependency ] = [
44- ExternalPackages . Firebase. Core,
45- ExternalPackages . Firebase. Analytics,
46- ExternalPackages . Firebase. Crashlytics,
47+
4748]
4849
4950// MARK: Target - Infomation
@@ -54,16 +55,16 @@ let baseSetting = SettingsDictionary()
5455 . swiftVersion ( " 6.0 " )
5556 . bitcodeEnabled ( false )
5657 . marketingVersion ( appVersion)
57- . otherLinkerFlags ( [ " -ObjC " ] )
5858 . automaticCodeSigning ( devTeam: developmentTeam)
5959
6060let debugSetting = SettingsDictionary ( )
6161
6262let releaseSetting = SettingsDictionary ( )
6363
6464// MARK: Plist
65- let infoPlist : InfoPlist = . extendingDefault(
66- with: [
65+ func getInfoPlist( _ config: Configuration , appVersion: String ) -> InfoPlist {
66+
67+ var infoPlist : [ String : Plist . Value ] = [
6768 " UILaunchScreen " : [
6869 " UIColorName " : " " ,
6970 " UIImageName " : " " ,
@@ -73,9 +74,19 @@ let infoPlist: InfoPlist = .extendingDefault(
7374 " NSLocationWhenInUseUsageDescription " : . string( " Surcharges uses your location to provide nearest places to you. " ) ,
7475 " NSCameraUsageDescription " : . string( " Surcharges uses your camera to take your receipt. " ) ,
7576 " ITSAppUsesNonExemptEncryption " : . boolean( false ) ,
76- " UISupportedInterfaceOrientations " : . array( [ . string( " UIInterfaceOrientationPortrait " ) ] )
77+ " UISupportedInterfaceOrientations " : . array( [ . string( " UIInterfaceOrientationPortrait " ) ] ) ,
7778 ]
78- )
79+
80+ switch config {
81+ case . dev:
82+ infoPlist. updateValue ( . string( " ca-app-pub-2719055739020811~8730306210 " ) , forKey: " GADApplicationIdentifier " )
83+ case . prod:
84+ infoPlist. updateValue ( . string( " ca-app-pub-2719055739020811~5366340920 " ) , forKey: " GADApplicationIdentifier " )
85+ }
86+
87+ return . extendingDefault( with: infoPlist)
88+
89+ }
7990
8091// MARK: Target - Prod
8192let surcharges = Target . target (
@@ -84,7 +95,7 @@ let surcharges = Target.target(
8495 product: . app,
8596 bundleId: " nz.surcharges " ,
8697 deploymentTargets: . iOS( " 17.0 " ) ,
87- infoPlist: infoPlist ,
98+ infoPlist: getInfoPlist ( . prod , appVersion : appVersion ) ,
8899 sources: [ " Sources/Commons/** " , " Sources/Prod/** " ] ,
89100 resources: . resources(
90101 [
@@ -112,7 +123,7 @@ let surchargesDev = Target.target(
112123 product: . app,
113124 bundleId: " nz.surcharges.development " ,
114125 deploymentTargets: . iOS( " 17.0 " ) ,
115- infoPlist: infoPlist ,
126+ infoPlist: getInfoPlist ( . dev , appVersion : appVersion ) ,
116127 sources: [ " Sources/Commons/** " , " Sources/Dev/** " ] ,
117128 resources: . resources(
118129 [
0 commit comments