feat: Switch to firebase messaging package
parent
097f9f02a0
commit
ab4fe415b1
@ -1,28 +0,0 @@
|
|||||||
/*package chat.fluffy.fluffychat
|
|
||||||
|
|
||||||
import com.famedly.fcm_shared_isolate.FcmSharedIsolateService
|
|
||||||
|
|
||||||
import io.flutter.embedding.engine.FlutterEngine
|
|
||||||
import io.flutter.embedding.engine.dart.DartExecutor.DartEntrypoint
|
|
||||||
import android.content.Context
|
|
||||||
|
|
||||||
class FcmPushService : FcmSharedIsolateService() {
|
|
||||||
override fun getEngine(): FlutterEngine {
|
|
||||||
return provideEngine(getApplicationContext())
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
fun provideEngine(context: Context): FlutterEngine {
|
|
||||||
var engine = MainActivity.engine
|
|
||||||
if (engine == null) {
|
|
||||||
engine = MainActivity.provideEngine(context)
|
|
||||||
engine.getLocalizationPlugin().sendLocalesToFlutter(
|
|
||||||
context.getResources().getConfiguration())
|
|
||||||
engine.getDartExecutor().executeDartEntrypoint(
|
|
||||||
DartEntrypoint.createDefault())
|
|
||||||
}
|
|
||||||
return engine
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
@ -0,0 +1 @@
|
|||||||
|
{"flutter":{"platforms":{"android":{"default":{"projectId":"fluffychat-ef3e8","appId":"1:865731724731:android:ec427b3b1dcd4a1e64309e","fileOutput":"android/app/google-services.json"}},"dart":{"lib/firebase_options.dart":{"projectId":"fluffychat-ef3e8","configurations":{"android":"1:865731724731:android:ec427b3b1dcd4a1e64309e","ios":"1:865731724731:ios:79fd983ce46cb40c64309e","macos":"1:865731724731:ios:6fb777cf513cdb6264309e","web":"1:865731724731:web:d367990bc625c24864309e","windows":"1:865731724731:web:06933086ac59630464309e"}}}}}}
|
@ -0,0 +1,30 @@
|
|||||||
|
<?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>API_KEY</key>
|
||||||
|
<string>AIzaSyA8ZUBcuny0HjPwF2Q2fvDyQTC5dG2VHlE</string>
|
||||||
|
<key>GCM_SENDER_ID</key>
|
||||||
|
<string>865731724731</string>
|
||||||
|
<key>PLIST_VERSION</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>BUNDLE_ID</key>
|
||||||
|
<string>im.fluffychat.fluffychat</string>
|
||||||
|
<key>PROJECT_ID</key>
|
||||||
|
<string>fluffychat-ef3e8</string>
|
||||||
|
<key>STORAGE_BUCKET</key>
|
||||||
|
<string>fluffychat-ef3e8.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:865731724731:ios:6fb777cf513cdb6264309e</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -1,12 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
flutter pub add fcm_shared_isolate
|
flutter pub add firebase_core
|
||||||
|
flutter pub add firebase_messaging
|
||||||
flutter pub get
|
flutter pub get
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
sed -i '' 's,//<GOOGLE_SERVICES>,,g' lib/main.dart
|
||||||
sed -i '' 's,//<GOOGLE_SERVICES>,,g' lib/utils/background_push.dart
|
sed -i '' 's,//<GOOGLE_SERVICES>,,g' lib/utils/background_push.dart
|
||||||
sed -i '' -e 's,^/\*,,' -e 's,\*/$,,' android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt
|
sed -i '' -e 's,^/\*,,' -e 's,\*/$,,' android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt
|
||||||
else
|
else
|
||||||
|
sed -i 's,//<GOOGLE_SERVICES>,,g' lib/main.dart
|
||||||
sed -i 's,//<GOOGLE_SERVICES>,,g' lib/utils/background_push.dart
|
sed -i 's,//<GOOGLE_SERVICES>,,g' lib/utils/background_push.dart
|
||||||
sed -i -e 's,^/\*,,' -e 's,\*/$,,' android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt
|
sed -i -e 's,^/\*,,' -e 's,\*/$,,' android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue