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

Mirego-base-setup 6 of X: Analytics #41

4 changes: 2 additions & 2 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ inhibit_all_warnings!
target 'iosApp' do
use_frameworks!
platform :ios, $deploymentTarget
# Thirdo-party
# Third-party
pod 'AppCenter/Distribute'
pod 'FirebaseCore'
pod 'FirebaseAnalytics'

# Multiplatform
pod 'Shared', :path => '../shared'

Expand Down
17 changes: 15 additions & 2 deletions ios/iosApp/AppInitializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,26 @@ enum AppInitializer {

SharedAnalyticsConfiguration().analyticsManager = firebaseAnalyticsService
}

private static func initializeAppCenter() {
guard let appCenterSecret = Bundle.main.object(forInfoDictionaryKey: "APP_CENTER_APP_SECRET") as? String, !appCenterSecret.isEmpty else { return }
Distribute.updateTrack = .private
AppCenter.start(withAppSecret: appCenterSecret, services: [Distribute.self])
}

private static func initializeFirebase() {
FirebaseApp.configure()

let firebaseAnalyticsService = AnalyticsServiceImpl()
#if DEBUG
firebaseAnalyticsService.isEnabled = false
#else
firebaseAnalyticsService.isEnabled = true
#endif

SharedAnalyticsConfiguration().analyticsManager = firebaseAnalyticsService
}

private static func initializeCommon() {
TrikotKword.shared.setCurrentLanguage(Foundation.Locale.isPreferredLanguagesFrench ? "fr" : "en")
TrikotViewModelDeclarative.shared.initialize(
Expand All @@ -51,7 +64,7 @@ enum AppInitializer {
private static func initializeKingfisher() {
ImageCache.default.diskStorage.config.sizeLimit = 500 * 1_024 * 1_024 // 500 MB
}

private static func inititalizeKillSwitch() {
Task {
do {
Expand Down
32 changes: 32 additions & 0 deletions ios/iosApp/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANDROID_CLIENT_ID</key>
<string>123456789012-0cnvm52tlj4cn7rkfujdkuq3iq79v5ig.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyC3_0lgMdiPr41DjqzSWP2MqGIqIakley0</string>
<key>GCM_SENDER_ID</key>
<string>123456789012</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.mirego.kmp.boilerplate</string>
<key>PROJECT_ID</key>
<string>boilerplate-1234567890123</string>
<key>STORAGE_BUCKET</key>
<string>boilerplate-1234567890123.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:123456789012:ios:c930c9194f493843b44d0a</string>
</dict>
</plist>
Loading