Skip to content

Commit

Permalink
removed unnecessary features
Browse files Browse the repository at this point in the history
  • Loading branch information
tpkowastaken committed Sep 25, 2024
1 parent e09c524 commit 70a2a59
Show file tree
Hide file tree
Showing 32 changed files with 111 additions and 1,174 deletions.
7 changes: 0 additions & 7 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,3 @@ android {
flutter {
source = "../.."
}

dependencies {
implementation("com.google.android.play:integrity:1.3.0")
}
configurations.all {
exclude group: 'com.google.android.gms', module: 'play-services-safetynet'
}
4 changes: 1 addition & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="github.core.appelevate.cz" />
<data android:scheme="http" android:host="firebase.core.appelevate.cz" />
<data android:scheme="http" android:host="core.appelevate.cz" />
<data android:scheme="http" android:host="aplikace.autojidelna.cz" />
<data android:scheme="https" />
</intent-filter>
<!-- Specifies an Android theme to apply to this Activity as soon as
Expand Down
34 changes: 3 additions & 31 deletions docs/novy_projekt.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,14 @@ sh scripts/deploy_macos.sh

### Github Pages

0. Povolte Github Pages v [deploy_everything.yml](../.github/workflows/deploy_everything.yml) - nahoře a potom nahraďte `if: false` za obsah za komentářem
1. Zapněte Github Pages v nastavení repozitáře.
2. Přidejte doménu do nastavení Github Pages
3. Nyní se vám automaticky vytvoří nový deployment při každém mergu do mainu

### Firebase Hosting

0. Povolte Firebase Hosting v [deploy_everything.yml](../.github/workflows/deploy_everything.yml) - nahoře a potom nahraďte `if: false` za obsah za komentářem
1. `firebase init`
2. Vyberte hosting
3. Vyberte projekt
Expand Down Expand Up @@ -254,44 +256,14 @@ Rulesets:
`main` - restrict updates + deletions, vše co `*` a require pull request reviews a status checks to pass before merging
`version` - vše co `*` a require pull request before merging

### [Firebase App Check](https://console.firebase.google.com/u/0/project/_/appcheck/apps)

1. Je potřeba nahrát klíč pro deviceCheck fo firebase. Tento klíč má tom v klíčence developer accountu. V opačném případě se dá vytvořit. Tento klíč se potom přidá do deviceCheck v firebase.
2. Je potřeba vzít sha-256 a sha-1 z google play a nahrát je [na firebase](https://console.firebase.google.com/u/0/project/_/settings/general/android) + Zapnout play Integrity v Google play. Potom ještě zapnout [zde v firebase](https://console.firebase.google.com/u/0/project/_/appcheck/apps).
3. Vytvořte captchu klíč pro web [zde pro recaptcha v3](https://www.google.com/recaptcha/admin/create) nebo ještě lépe [zde pro recaptcha enterprise](https://console.cloud.google.com/security/recaptcha)
4. Nahraďte klíč v [App.dart](../lib/src/_conf/tokens.dart) a [index.html](../web/index.html#L123) (v url - `https://www.google.com/recaptcha/enterprise.js?render=6LfrH50pAAAAAGCGbAnEQoYXcA8Q3AlGobmwnNt_`)

### Deep linking

1. Využijte automatického podepisování na google play a nahraďte první sha256 v (assetlinks.json)[web/.well-known/assetlinks.json]
2. přepište url v souboru [AndroidManifest.xml](../android/app/src/main/AndroidManifest.xml) na vaši doménu
3. Přepište url v souboru [ios/Runner/Runner.entitlements](../ios/Runner/Runner.entitlements) na vaši doménu
4. Nahrajte .well-known složku na váš webserver, aby byl dostupný na `https://vase-domena/.well-known/assetlinks.json`. Pokud nahrajete na daný web flutter web, tak je to automaticky dostupné.

### Google Sign In

1. Registrujte google ve [firebase auth](https://console.firebase.google.com/project/_/authentication/providers)
2. [Nastavte consent screen podle potřeb](https://console.cloud.google.com/apis/credentials/consent). Je potřeba nastavit i doménu, která bude používat google sign in. (Stačí pouze production domény)
3. [Stáhněte si Google-Service_info.plist](https://console.firebase.google.com/project/_/settings/general/ios) (nevkládejte do projektu)
4. [Postupujte dle instrukcí zde](https://pub.dev/packages/google_sign_in_ios#macos-setup) - je potřeba udělat všechny kroky pro iOS i MacOS.
5. [Získejte id Oauth klíče pro web](https://console.cloud.google.com/apis/credentials) a nahraďte již existující v [index.html](../web/index.html). Nezapomeňte sem přidat všechny domény, které budou používat google sign in.

```html
<meta
name="google-signin-client_id"
content="466976066624-flggbo7lv9782nok34diek7f3mg2c4mr.apps.googleusercontent.com"
/>
```

6. Spusťte `flutterfire configure` a ověřte, že macos zkompiluje
7. Ve firebase přidejte doménu všech webů, které budou používat google sign in: [zde](https://console.firebase.google.com/u/0/project/_/authentication/settings)

### Login with apple

1. [Nastavte si apple sign in](https://console.firebase.google.com/project/_/authentication/providers)
2. [Následujte instrukce zde](https://firebase.google.com/docs/auth/ios/apple?hl=en&authuser=0)

### Firebase Analytics
#### Firebase Analytics

1. Povolte Analytics a crashlytics ve Firebase
2. Přidejte dimenze, které naleznete v [analytics.dart](../lib/src/_conf/analytics.dart)
Expand Down
8 changes: 1 addition & 7 deletions ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:core.appelevate.cz</string>
<string>applinks:github.core.appelevate.cz</string>
<string>applinks:firebase.core.appelevate.cz</string>
<string>applinks:aplikace.autojidelna.cz</string>
</array>
</dict>
</plist>
8 changes: 1 addition & 7 deletions ios/Runner/RunnerRelease.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
<dict>
<key>aps-environment</key>
<string>production</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:core.appelevate.cz</string>
<string>applinks:github.core.appelevate.cz</string>
<string>applinks:firebase.core.appelevate.cz</string>
<string>applinks:aplikace.autojidelna.cz</string>
</array>
</dict>
</plist>
49 changes: 0 additions & 49 deletions lib/src/_auth/apple_sign_in_logic.dart

This file was deleted.

63 changes: 0 additions & 63 deletions lib/src/_auth/email_sign_in_logic.dart

This file was deleted.

42 changes: 0 additions & 42 deletions lib/src/_auth/google_sign_in_logic.dart

This file was deleted.

32 changes: 0 additions & 32 deletions lib/src/_auth/login_logic.dart

This file was deleted.

3 changes: 1 addition & 2 deletions lib/src/_conf/tokens.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
abstract class Tokens {
static const String sentryDsn = 'https://abbc9f4b6ca4a2a99d0ed41629cbc43c@o4507799131258880.ingest.de.sentry.io/4508014517616720';
static const String reCaptchaEnterprise = '6LcZHQ0qAAAAAMDHZjUfWBOkvKR_eqxFixd7WeR7';
static const String messagingVapidToken = 'BCA2GZa5SucDxk3knHVJ_ip_PDiVcqNnbTgnw2aT1kmdt9QtG2SvH7E91DrvfssjuNZhHqAbYCM4yRmI3BmnSes';
static const String messagingVapidToken = 'BMlG7F4kgEN7k_KzcsH79hh1NBa0lXqByEVec47HfkeD0T2kAjOzQbS3PRFzhOM19lSpkTjAkf9hlLJPaayzlNs';
}
Loading

0 comments on commit 70a2a59

Please sign in to comment.