You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-270Lines changed: 0 additions & 270 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ A Cross Platform Tail Company gear control App
14
14
- Triggers for walking, shaking and other gestures
15
15
- Custom Actions
16
16
- Custom Sound Effects
17
-
- Joystick for manually moving gear
18
17
- Dark Mode (Based on system settings)
19
18
- Color Themes
20
19
- Background mode on IOS
@@ -37,272 +36,3 @@ Small or large, feel free to leave suggestions for new features, or changes to e
37
36
-[@leinir](https://github.com/leinir) for creating the Crumpet Android app
38
37
- The Tail Company Telegram Channel for motivating me over time.
39
38
40
-
## Development
41
-
42
-
### Requirements
43
-
44
-
> [!TIP]
45
-
> Follow the instructions [here](https://docs.flutter.dev/get-started/install/windows/mobile?tab=download#software-requirements) to set up a Flutter environment
46
-
47
-
#### Hardware
48
-
49
-
- 8GB of ram
50
-
- Dual Core CPU
51
-
- 80gb of unused storage (Required for Android Studio & XCode, Sources for IOS & Android apps, etc)
52
-
- 2018 or newer Apple Mac (For IOS) Older macs with [OpenCore-Legacy Patcher](https://dortania.github.io/OpenCore-Legacy-Patcher/) may work
53
-
54
-
#### Software
55
-
56
-
- Windows 11 Or MacOS Sonoma (Have not tried developing on linux)
-[Ruby](https://www.ruby-lang.org/en/) for FastLane
68
-
69
-
### Updating EN Localizations
70
-
71
-
To update EN localization strings, the file [`translation_string_definitions.dart`](lib/Frontend/translation_string_definitions.dart) needs to be updated.
72
-
73
-
```dart
74
-
String message() => Intl.message('Displayed Message', name: 'message', desc: 'A description of the string and where it is used');
75
-
```
76
-
77
-
The `Displayed Message` is the string that appears in the UI.
78
-
The `name` is the variable name. This must match the variable name used such as `message()` but without the `()`.
79
-
The `desc` is a description of the string for use by translators.
80
-
81
-
When [`translation_string_definitions.dart`](lib/Frontend/translation_string_definitions.dart) is updated, the job [`localization_strings_update.yml`](.github/workflows/localization_strings_update.yml) updates the generated localization file [`messages_en.arb`](lib/l10n/messages_en.arb) which makes the strings available to [Weblate](https://weblate.stargazer.at/projects/the-tailcompany-app/tailapp/).
82
-
83
-
When non EN translations are updated in [Weblate](https://weblate.stargazer.at/projects/the-tailcompany-app/tailapp/), A pull request will automatically open with the changes. This may take a few minutes.
84
-
85
-
### Building
86
-
87
-
#### Preparing for build
88
-
89
-
> [!TIP]
90
-
> A pre-made build script exists at [`scripts/build,sh`](Scripts/build.sh)
91
-
92
-
> [!IMPORTANT]
93
-
> These commands must be run before building or running.
94
-
>
95
-
> ```shell
96
-
># Install and enable required tools
97
-
> dart pub global activate intl_translation
98
-
>
99
-
> flutter pub get # Downloads Dependencies
100
-
> dart run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/Frontend/translation_string_definitions.dart lib/l10n/*.arb
> dart run intl_translation:extract_to_arb --locale=en --output-file='./lib/l10n/messages_en.arb' ./lib/Frontend/translation_string_definitions.dart
110
-
>```
111
-
>
112
-
> To build localization files, run
113
-
>
114
-
>```shell
115
-
> dart pub global activate intl_translation
116
-
> dart run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/Frontend/translation_string_definitions.dart lib/l10n/*.arb
117
-
>```
118
-
>
119
-
> To build generated `.g` files, run
120
-
>
121
-
>```shell
122
-
> flutter pub run build_runner build --delete-conflicting-outputs
123
-
>```
124
-
125
-
> [!TIP]
126
-
> If you get a flutter version error, run
127
-
>
128
-
>```shell
129
-
> flutter Upgrade
130
-
>```
131
-
>
132
-
>if you get an error similar to `Error: Couldn't resolve the package 'flutter_gen' in 'package:flutter_gen/gen_l10n/app_localizations.dart'` run
133
-
>
134
-
> ```
135
-
> flutter pub get
136
-
> ```
137
-
>
138
-
> if you get an error during riverpod generator such as `RangeError (index): Invalid value: Not in inclusive range 0..20491: 77535` try
139
-
>
140
-
> ```shell
141
-
> flutter clean
142
-
> flutter pub get
143
-
> flutter pub run build_runner build --delete-conflicting-outputs
144
-
> flutter pub get # fixes app_localizations error
145
-
> ```
146
-
147
-
#### Building for each platform
148
-
149
-
##### For IOS
150
-
151
-
The xcode project is configured to to use automatic code signing for develop builds. make sure to open xcode and sign in with your developer account. Check the Signing and Capabilities page of Runner to verify the signing configuration is correct. Release builds are set up to rely on Fastlane to provide the signing certificate.
152
-
153
-
```shell
154
-
cd ios
155
-
rm Podfile.lock # Handles a CocoaPods error about version management
156
-
cd ..
157
-
flutter build ipa --debug
158
-
```
159
-
160
-
> [!TIP]
161
-
> MacOS may display multiple permission prompts such as File Access, KeyChain Access, Device Access (iphone) & Controlling XCode. Accept them for the build to complete. These only need to be accepted once
162
-
>
163
-
> If you receive an error that IOS is not installed in XCode during build.
164
-
> 1. Go to XCode (In Top menu bar) -> Settings
165
-
> 2. Click Platforms
166
-
> 3. Click on IOS Simulator
167
-
> 4. Click the small `-` icon near the bottom of the settings window
168
-
> 5. Click Delete
169
-
>
170
-
> If CocoaPods returns a version error, delete [`ios/Podfile.lock`](ios/Podfile.lock)
171
-
>
172
-
> If Permissions are not working, revert any changes you may have done to [`ios/Podfile`](ios/Podfile)
173
-
174
-
##### For Android
175
-
176
-
Android looks for a [key.properties](android/key.example.properties) file.
177
-
If this file is missing the apk is not signed.
178
-
A keystore jks is also expected at the location specified in the keystore.properties file.
179
-
The Sentry plugin will run on release builds and expects the sentry env variables to be set
180
-
181
-
```shell
182
-
# Build APK
183
-
flutter build apk --debug
184
-
# build AppBundle
185
-
flutter build appbundle --debug
186
-
```
187
-
188
-
App packages can be found in [`build/app/output`](build/app/outputs/)
189
-
190
-
### Additional Commands
191
-
192
-
#### Updating app icon
193
-
194
-
Place the new icon in [Assets](assets/) then update `image_path` in the `icons_launcher` section in [pubspec.yml](pubspec.yml)
195
-
196
-
```shell
197
-
dart pub global activate icons_launcher # downloads the utility
198
-
dart pub global run icons_launcher:create
199
-
```
200
-
201
-
#### Updating splash screen
202
-
203
-
Make any changes to the 'flutter_native_splash' section in [pubspec.yml](pubspec.yml)
204
-
205
-
```shell
206
-
dart run flutter_native_splash:create
207
-
```
208
-
209
-
#### Detecting the environment
210
-
211
-
In order to filter sentry logs from testing and production, the 'Environment' is guessed
212
-
213
-
- debug: if the app was built in debug mode or if the app is in an emulator
214
-
- staging: if the app is on testflight or in firebase test lab
215
-
- production: everything else
216
-
217
-
### Fastlane
218
-
219
-
[Fastlane](https://docs.fastlane.tools/) is a tool to automatically upload apps to the Apple App Store and Google Play Store. Inside the [IOS](ios/) and [Android](android/) folders is a fastlane folder. Inside is the FastFile which contains the upload config. Secrets are JSON files passed through repository secrets. The script [fastlane.sh](Scripts/fastlane.sh) selects the fastlane folder to use and begins the upload.
220
-
221
-
### Repository Secrets
222
-
223
-
Some of these values aren't actually secret and can be shared. Specifically the sentry ones
| SENTRY_AUTH_TOKEN | sntrys_eyJpYXQiOjE3MTYyNTky... | Go to Sentry -> Settings -> Auth Token | Authenticate with sentry to upload symbols |
228
-
| SENTRY_ORG | Sentry | Listed at the top left of sentry when logged in| Which org to upload symbols to |
229
-
| SENTRY_PROJECT | tail_app | Whatever the project is named in sentry | Which project to upload symbols to |
230
-
| SENTRY_URL | https://sentry.io/ | The url to the sentry instance | Which instance to upload symbols to |
231
-
| SENTRY_DSN | https://sdfghjssdh.ingest.de.sentry.io/ | The dsn for the sentry project | Which instance to upload errors to |
232
-
| FASTLANE_GITHUB | JeqGFIV1yb7emBFLkBk/dA== |echo -n your_github_username:your_personal_access_token \| base64 -w 0 | Store certificates for fastlane match |
233
-
| APPLE | {"key_id": "D383SF739", "issuer_id": "6053b7fe-68a8-4acb-89be-165aa6465141", "key": "-----BEGIN PRIVATE KEY-----MIGTAgEAMB----END PRIVATE KEY-----", "in_house": false } | Json file of apple credentials https://docs.fastlane.tools/app-store-connect-api/ | Authenticate with Apple to upload to TestFlight |
234
-
| FASTLANE_PATCH_PASSWORD | hunter2 | Make a password | Encrypt match certificates |
235
-
| ANDROID_KEY_PROPERTIES | storePassword=hunter2 <br> keyPassword=hunter2 <br> keyAlias=upload <br> storeFile=key.jks | generate an android signing certificate and fill out [key.example.properties](android/key.example.properties) | sign apks |
236
-
| ANDROID_KEY_JKS | sdfsfasdFSDgjklsgklsjdfASGHSDLGHJFSD= | cat AndroidKeystoreCodel1417.jks \| base64 -w 0 | base64 form of the jks file |
237
-
| GOOGLE_SECRETS | {"type": "service_account", | Json file of google credentials https://docs.fastlane.tools/actions/upload_to_play_store/ | Authenticate to google to upload builds |
238
-
239
-
### Repository Integrations
240
-
241
-
#### Sentry
242
-
243
-
A github app which allows [Sentry](https://sentry.io) to authenticate with Github and this repo. It allows Source Code stack trace linking and Creating issues from the [Sentry](https://sentry.codel1417.xyz/organizations/sentry/projects/tail_app/?project=2) UI.
244
-
245
-
#### Weblate
246
-
247
-
A Webhook to notify [Weblate](https://weblate.stargazer.at/projects/the-tailcompany-app/tailapp/) that code was pushed to this repo.
248
-
249
-
A SSH key is installed in my account which allows [Weblate](https://weblate.stargazer.at/projects/the-tailcompany-app/tailapp/) to push translation changes to the repo.
250
-
251
-
### Developer Mode Features
252
-
253
-
- Gear console
254
-
- Manual OTA Updates
255
-
- Advanced state control for gear
256
-
- Access to app logs
257
-
- ~~Crime~~
258
-
259
-
<details>
260
-
261
-
<summary>Secret</summary>
262
-
263
-
To enter the in-app Developer Mode, follow these instructions
264
-
265
-
1. Go to `More`
266
-
2. Long press `Source Code` button, enter the following code
267
-
3. `🦊🐉🦦🦖`
268
-
269
-
To Turn off Developer Mode
270
-
271
-
1. go to More -> Settings -> Developer Mode
272
-
2. Turn off `showDebugging`
273
-
274
-
</details>
275
-
276
-
### Internal URLS
277
-
278
-
These services are self-hosted in a mini-pc on my tv stand in my apartment
> dart run intl_translation:extract_to_arb --locale=en --output-file='./lib/l10n/messages_en.arb' ./lib/Frontend/translation_string_definitions.dart
26
+
>```
27
+
>
28
+
> To build localization files, run
29
+
>
30
+
>```shell
31
+
> dart pub global activate intl_translation
32
+
> dart run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/Frontend/translation_string_definitions.dart lib/l10n/*.arb
33
+
>```
34
+
>
35
+
> To build generated `.g` and `.freezed` files, run
36
+
>
37
+
>```shell
38
+
> flutter pub run build_runner build --delete-conflicting-outputs
39
+
>```
40
+
41
+
> [!TIP]
42
+
> If you get a flutter version error, run
43
+
>
44
+
>```shell
45
+
> flutter upgrade
46
+
>```
47
+
>
48
+
>if you get an error similar to `Error: Couldn't resolve the package 'flutter_gen' in 'package:flutter_gen/gen_l10n/app_localizations.dart'` run
49
+
>
50
+
> ```
51
+
> flutter pub get
52
+
> ```
53
+
>
54
+
> if you get an error during riverpod generator such as `RangeError (index): Invalid value: Not in inclusive range 0..20491: 77535` try
55
+
>
56
+
> ```shell
57
+
> flutter clean
58
+
> flutter pub get
59
+
> flutter pub run build_runner build --delete-conflicting-outputs
60
+
> flutter pub get # fixes app_localizations error
61
+
> ```
62
+
63
+
## Firebase configuration is required for building
64
+
65
+
Follow the official flutter firebase guide [here](https://firebase.google.com/docs/flutter/
66
+
setup?platform=android)
67
+
68
+
The `google-services.json` (Android), `GoogleService-Info.plist` (IOS) files must be places in their correct location.
69
+
70
+
## Building for each platform
71
+
72
+
### For IOS
73
+
74
+
The xcode project is configured to to use automatic code signing for develop builds. make sure to open xcode and sign in with your developer account. Check the Signing and Capabilities page of Runner to verify the signing configuration is correct. Release builds are set up to rely on Fastlane to provide the signing certificate.
75
+
76
+
```shell
77
+
cd ios
78
+
rm Podfile.lock # Handles a CocoaPods error about version management
79
+
cd ..
80
+
flutter build ipa --debug
81
+
```
82
+
83
+
> [!TIP]
84
+
> MacOS may display multiple permission prompts such as File Access, KeyChain Access, Device Access (iphone) & Controlling XCode. Accept them for the build to complete. These only need to be accepted once
85
+
>
86
+
> If you receive an error that IOS is not installed in XCode during build.
87
+
> 1. Go to XCode (In Top menu bar) -> Settings
88
+
> 2. Click Platforms
89
+
> 3. Click on IOS Simulator
90
+
> 4. Click the small `-` icon near the bottom of the settings window
91
+
> 5. Click Delete
92
+
>
93
+
> If CocoaPods returns a version error, delete [`ios/Podfile.lock`](ios/Podfile.lock)
94
+
>
95
+
> If Permissions are not working, revert any changes you may have done to [`ios/Podfile`](ios/Podfile)
96
+
97
+
### For Android
98
+
99
+
Android looks for a [key.properties](android/key.example.properties) file.
100
+
If this file is missing the apk is not signed.
101
+
A keystore jks is also expected at the location specified in the keystore.properties file.
102
+
The Sentry plugin will run on release builds and expects the sentry env variables to be set
103
+
104
+
```shell
105
+
# Build APK
106
+
flutter build apk --debug
107
+
# build AppBundle
108
+
flutter build appbundle --debug
109
+
```
110
+
111
+
App packages can be found in [`build/app/output`](build/app/outputs/)
0 commit comments