docs

a slatepencil documentail site

View on GitHub

flutter

# cache clean
dart pub cache repair
dart pub cache clean

development

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch

# open a simulator
open -a Simulator

flutter devices
adb devices -l

flutter create --template=package hello
# --android-language java/kotlin(default) --ios-language objc/swift(default)
# --platforms ios (default), android (default), windows (default), linux (default), macos (default), web (default)
flutter create --org com.example --template=plugin --platforms=android,ios,linux,macos,windows -a java -i objc hello
flutter create --org com.example --template=app --platforms=android,ios -a java -i swift myapp

# get dependencies
flutter pub get google_fonts

# remove dependencies
flutter pub remove dio
# run app
flutter run --no-enable-impeller -v

# remove android folder, recreate base on project
flutter create . --platform=android -a java

flutter template

MODEL GENERATE

dependencies:
  json_annotation: ^4.4.0

dev_dependencies:
  build_runner: ^2.0.0
  json_serializable: ^6.0.0

Intl

flutter pub pub run intl_translation:extract_to_arb --output-dir=i10n_arb lib/i10n/index.dart
flutter pub pub run intl_translation:generate_from_arb --ouput-dir=lib/i10n --no-use-deferred-loading lib/i10n/index.dart /home/username/Documents/project/i10n_arb/intl_*.arb

xcrun

xcrun simclt io booted recordvideo iPhone12.mp4

Version

default app directory

ios Cocopods install

sudo gem install -n /usr/local/bin cocoapods -v 1.15.2
sudo gem install cocoapods # to update cocoapods
sudo gem pristine ffi # to install/update de package
pod repo update # to update all repositories end dependencies
pod install # to install all repositories end dependencies

ios build

flutter build ipa --build-name CFBundleShortVersionString --build-number 1
rchiving com.example.app...
Automatically signing iOS for device deployment using specified development team in Xcode project: 32WVXXV78
Running pod install...                                             924ms
Running Xcode build...                                                  
 └─Compiling, linking and signing...                         6.6s
Xcode archive done.                                         55.0s
Built /Users/user/Documents/workspace/example/bno_app/build/ios/archive/Runner.xcarchive.

[✓] App Settings Validation
    • Version Number: 1.0.0
    • Build Number: 1
    • Display Name: Example
    • Deployment Target: 12.0
    • Bundle Identifier: com.example.app

[!] App Icon and Launch Image Assets Validation
    ! App icon is set to the default placeholder icon. Replace with unique icons.
    ! Launch image is set to the default placeholder icon. Replace with unique launch image.

To update the settings, please refer to https://docs.flutter.dev/deployment/ios

Building App Store IPA...                                         151.2s
Built IPA to /Users/user/Documents/workspace/example/bno_app/build/ios/ipa.
To upload to the App Store either:
    1. Drag and drop the "build/ios/ipa/*.ipa" bundle into the Apple Transporter macOS app https://apps.apple.com/us/app/transporter/id1450874784
    2. Run "xcrun altool --upload-app --type ios -f build/ios/ipa/*.ipa --apiKey your_api_key --apiIssuer your_issuer_id".
       See "man altool" for details about how to authenticate with the App Store Connect API key.

Android build (AppBundle)

Android build (APK)

Install an APK on a device

Connect your Android device to your computer with a USB cable.

ABI(Application Binary Interface) check

Deployment