Textguard docs
v1.0.0
Get help
● Start

Rename and rebrand
name, ids, App Group, icon, colours, fonts.

Make the app yours before you publish. Everything is a small, listed edit; do all of them, because the store will refuse a bundle id that already belongs to someone else.

brand.dartpackage idbundle idsApp Groupicon

011. lib/brand.dart

Open app/lib/brand.dart. It holds:

ConstantWhat it does
appName, taglineName and tagline shown inside the app.
accentMain colour (default deep teal 0xFF0F766E). The server's brand.accent may override it.
flagSecond colour, used for the flagged words in a message (amber).
displayFont, bodyFontFont family names (Newsreader, Atkinson Hyperlegible Next). To change fonts, add the font files to app/assets/fonts/, register them in pubspec.yaml under fonts:, then change these names. Keep each font's licence file.
supportUrl, privacyUrl, termsUrlLinks shown in Settings. Empty hides the row. Fill them in before you publish.
lifetimeIos, lifetimeAndroid, yearlyIos, yearlyAndroidStore product ids. See Store products.
apiBaseUrlRead from --dart-define=API_BASE_URL=... at build time. Do not edit.
appGroupThe App Group shared by the app and the iOS filter extension. The value in the source, group.com.example.textguard, is a placeholder: replace it with your own (see step 3).
methodChannelName shared with MainActivity.kt (the Android share-in) and the Swift code. Change all together.

022. Android application id

  1. build.gradle.kts: in app/android/app/build.gradle.kts change applicationId and namespace from com.mikodes.textguard to yours, for example com.yourcompany.yourapp.
  2. Kotlin folder: rename the folders app/android/app/src/main/kotlin/com/mikodes/textguard to match the new id.
  3. Package line: change the package line at the top of MainActivity.kt, and the channel name if you changed it in brand.dart.
  4. App label: in app/android/app/src/main/AndroidManifest.xml change android:label.
  5. Check: flutter build apk --release must still finish.

033. iOS bundle identifiers and App Group

The project has two iOS targets: Runner (the app, com.mikodes.textguard) and TextguardFilter (the extension, com.mikodes.textguard.filter). The extension's id must start with the app's id. No Apple team id ships in the source.

  1. Open app/ios/Runner.xcworkspace in Xcode.
  2. For Runner and for TextguardFilter, open Signing & Capabilities and set your Team and a Bundle Identifier you own (for example com.yourcompany.yourapp and com.yourcompany.yourapp.filter).
  3. App Group. In your Apple developer account create an App Group such as group.com.yourcompany.yourapp, add it under Capabilities, App Groups for both targets, then replace the placeholder group.com.example.textguard in all five places: ios/Runner/Runner.entitlements, ios/TextguardFilter/TextguardFilter.entitlements, ios/Runner/NativeBridge.swift, ios/TextguardFilter/MessageFilterExtension.swift and lib/brand.dart. Without a matching group the extension cannot read the rule pack the app hands over and falls back to the rules bundled in the extension.
  4. The home-screen name is CFBundleDisplayName in app/ios/Runner/Info.plist.

044. App icon

Windows users

Flutter runs natively on Windows: use PowerShell for the flutter commands and Android builds (iOS builds need a Mac). For the server, either install Node.js 22.12+ for Windows and use PowerShell (replace cp .env.example .env with Copy-Item .env.example .env; there is no openssl by default, so use WSL or any random 64-character hex string), or run the commands in WSL 2 (Ubuntu) or Docker. macOS and Linux users can ignore this note.

  1. Open app/tool/make_icon.py and change the colour lines at the top. The icon has no text.
  2. Run it (needs Pillow, pip install pillow):
    cd app
    /usr/bin/python3 tool/make_icon.py
    dart run flutter_launcher_icons
  3. Or skip the script and replace the icon PNGs under app/assets/icon/ with your own 1024 px images, then run the second command.

055. Rules, report contacts and lessons

The starter content lives in server/seed/*.json (46 rules, 9 report offices, 6 lessons). To change what ships inside the app, edit those files, then copy them to app/assets/defaults/ (tool/sync_defaults.sh) and the rules to app/ios/TextguardFilter/default-rules.json. With a server you manage the same content in the console (Rule packs). Every report office and lesson needs an https source link and a review date. Add only facts you can point to, and have someone who knows each country read the lessons.

06Before you publish

  • New name, application id, bundle id, icon.
  • Your own Apple team, App Group (placeholder replaced in five places) and Android signing key (Release).
  • Support, privacy and terms URLs filled in.
  • Product ids set, or the paywall switched off.
  • Search the project for the original name and ids to be sure none are left: grep -ri textguard app/lib app/android app/ios (and rename what remains).