reis-mobile 0.3.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +24 -0
- package/README.md +175 -168
- package/THIRD_PARTY_NOTICES.md +224 -4
- package/agents/android-architect.md +89 -0
- package/agents/android-performance-engineer.md +92 -0
- package/agents/android-test-engineer.md +97 -0
- package/agents/flutter-test-engineer.md +2 -0
- package/agents/ios-architect.md +93 -0
- package/agents/ios-performance-engineer.md +92 -0
- package/agents/ios-test-engineer.md +95 -0
- package/agents/lead-mobile.md +10 -1
- package/agents/mobile-staff-engineer.md +1 -1
- package/agents/rn-architect.md +94 -0
- package/agents/rn-performance-engineer.md +92 -0
- package/agents/rn-test-engineer.md +98 -0
- package/bin/reis-mobile.mjs +59 -17
- package/commands/debate.md +10 -1
- package/commands/debug.md +60 -0
- package/commands/reis-mobile.md +7 -2
- package/core/config/project.mjs +59 -0
- package/core/registry/frontmatter.mjs +15 -4
- package/core/registry/registry.mjs +21 -1
- package/core/router/intents.mjs +2 -0
- package/core/router/router.mjs +10 -5
- package/package.json +1 -1
- package/skills/android-adaptive/SKILL.md +304 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/container-behavior.md +112 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/get-started.md +69 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/index.md +81 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/item-behavior.md +170 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/container-properties.md +415 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/get-started.md +51 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/index.md +73 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/item-properties.md +170 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/mediaquery/index.md +333 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/tooling/debug.md +114 -0
- package/skills/android-adaptive/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
- package/skills/android-agp-9-upgrade/SKILL.md +106 -0
- package/skills/android-agp-9-upgrade/references/android/build/migrate-to-built-in-kotlin.md +416 -0
- package/skills/android-agp-9-upgrade/references/android/build/releases/agp-9-0-0-release-notes.md +554 -0
- package/skills/android-agp-9-upgrade/references/buildconfig.md +54 -0
- package/skills/android-agp-9-upgrade/references/ksp-kapt.md +39 -0
- package/skills/android-agp-9-upgrade/references/paparazzi-gradle-9.md +30 -0
- package/skills/android-agp-9-upgrade/references/recipes.md +62 -0
- package/skills/android-appfunctions/SKILL.md +74 -0
- package/skills/android-appfunctions/references/adb-interaction-testing.md +95 -0
- package/skills/android-appfunctions/references/context.md +26 -0
- package/skills/android-appfunctions/references/feature-discovery-analysis.md +71 -0
- package/skills/android-appfunctions/references/implementation-configuration.md +282 -0
- package/skills/android-appfunctions/references/kdoc-refinement-optimization.md +75 -0
- package/skills/android-appfunctions/references/migrate-to-service-entry-point.md +226 -0
- package/skills/android-camerax/SKILL.md +135 -0
- package/skills/android-camerax/references/camera1-to-camerax.md +198 -0
- package/skills/android-camerax/references/camera2-to-camerax.md +193 -0
- package/skills/android-camerax/references/expert-blueprints.md +58 -0
- package/skills/android-camerax/references/foldables.md +83 -0
- package/skills/android-camerax/references/immutability.md +60 -0
- package/skills/android-camerax/references/low-light.md +124 -0
- package/skills/android-camerax/references/mlkit-spatial.md +75 -0
- package/skills/android-camerax/references/modern-apis.md +42 -0
- package/skills/android-camerax/references/testing.md +69 -0
- package/skills/android-camerax/references/thermals.md +85 -0
- package/skills/android-camerax/references/wear-os.md +76 -0
- package/skills/android-camerax/references/xr.md +54 -0
- package/skills/android-cli/SKILL.md +474 -0
- package/skills/android-cli/references/interact.md +113 -0
- package/skills/android-cli/references/journeys.md +120 -0
- package/skills/android-code-review/SKILL.md +58 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/SKILL.md +340 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/design/ui/ai-glasses/guides/interaction/inputs.md +67 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.md +388 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/buttons.md +139 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/cards.md +148 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/focus.md +107 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/icons.md +90 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/text.md +69 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/title-chips.md +82 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/request-hardware-permissions.md +213 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-samples-source.md +176 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-source.md +203 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-samples-source.md +296 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-source.md +515 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffect-source.md +224 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffectlevels-source.md +105 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmersansflextypography-source.md +270 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmertheme-source.md +182 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/icon-source.md +388 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconbutton-source.md +126 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconsizes-source.md +78 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/list-source.md +27 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/listitem-source.md +272 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/liststate-source.md +427 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/material-hct-source.md +217 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/projectedcontext-source.md +265 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stack-source.md +368 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackitemscope-source.md +440 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackstate-source.md +325 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/surface-source.md +1211 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-samples-source.md +101 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-source.md +131 -0
- package/skills/android-edge-to-edge/SKILL.md +429 -0
- package/skills/android-engage-sdk-integration/SKILL.md +130 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/faq.md +439 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/food.md +1149 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/healthandfitness.md +1055 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/listen.md +1050 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/otherverticals.md +1301 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/read.md +910 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/shopping.md +1224 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/social.md +719 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/travel.md +1413 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/continue-watching/index.md +19 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/entitlements.md +353 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/getting-started.md +202 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/recommendations.md +471 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/watch.md +1081 -0
- package/skills/android-engage-sdk-integration/references/clusters.md +154 -0
- package/skills/android-engage-sdk-integration/references/common.md +519 -0
- package/skills/android-engage-sdk-integration/references/patterns.md +527 -0
- package/skills/android-engage-sdk-integration/references/requests.md +260 -0
- package/skills/android-engage-sdk-integration/references/schemas/food.md +509 -0
- package/skills/android-engage-sdk-integration/references/schemas/listen.md +842 -0
- package/skills/android-engage-sdk-integration/references/schemas/other.md +220 -0
- package/skills/android-engage-sdk-integration/references/schemas/read.md +412 -0
- package/skills/android-engage-sdk-integration/references/schemas/shopping.md +357 -0
- package/skills/android-engage-sdk-integration/references/schemas/social.md +228 -0
- package/skills/android-engage-sdk-integration/references/schemas/travel.md +923 -0
- package/skills/android-engage-sdk-integration/references/schemas/tv.md +1226 -0
- package/skills/android-engage-sdk-integration/references/schemas/watch.md +1137 -0
- package/skills/android-engage-sdk-integration/references/troubleshooting.md +39 -0
- package/skills/android-gradle-build-debug/SKILL.md +71 -0
- package/skills/android-intent-security/SKILL.md +550 -0
- package/skills/android-leanback-to-compose-tv-migration/SKILL.md +743 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/get-started/navigation.md +372 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/browse.md +243 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/index.md +153 -0
- package/skills/android-media3-cast-integration/SKILL.md +236 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/create-castplayer.md +390 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/customize-castoptions.md +93 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/index.md +21 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/SKILL.md +127 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/analysis-of-the-project-and-layout.md +42 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/designsystems/migrate-xml-theme-to-compose.md +171 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/compose-in-views.md +299 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/views-in-compose.md +286 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/setup-compose-dependencies-and-compiler.md +197 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/identify-optimal-xml-candidate.md +31 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/xml-layout-migration.md +86 -0
- package/skills/android-ml-kit-genai-prompt-api/SKILL.md +124 -0
- package/skills/android-ml-kit-genai-prompt-api/references/get-started.md +272 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prefix-caching.md +146 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prompt-design.md +55 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prompt-optimization.md +74 -0
- package/skills/android-ml-kit-genai-prompt-api/references/structured-output.md +219 -0
- package/skills/android-ml-kit-genai-prompt-api/references/system-instructions.md +71 -0
- package/skills/android-navigation-3/SKILL.md +122 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/index.md +51 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/migration-guide.md +670 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/animations.md +147 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basic.md +89 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicdsl.md +85 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicsaveable.md +90 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/bottomsheet.md +195 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/common-ui.md +200 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional-transitions.md +182 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional.md +230 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-custommatcher.md +176 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-staticuri.md +140 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-syntheticbackstack.md +184 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/dialog.md +107 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/lifecycle-owner.md +185 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-supportingpane.md +145 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-hilt.md +283 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-koin.md +287 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/multiple-backstacks.md +468 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/passingarguments.md +371 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-event.md +273 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-state.md +266 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-listdetail.md +435 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-twopane.md +244 -0
- package/skills/android-navigation-3/references/android/guide/navigation/type-safe-destinations.md +129 -0
- package/skills/android-navigation-event/SKILL.md +312 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/dispatcher.md +134 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/handle-back.md +217 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/index.md +83 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/setup.md +32 -0
- package/skills/android-play-billing-library-version-upgrade/SKILL.md +96 -0
- package/skills/android-play-billing-library-version-upgrade/references/android/google/play/billing/release-notes.md +1240 -0
- package/skills/android-play-billing-library-version-upgrade/references/migration-logic.md +78 -0
- package/skills/android-play-billing-library-version-upgrade/references/version-checklist.md +54 -0
- package/skills/android-play-policy-insights/SKILL.md +172 -0
- package/skills/android-play-policy-insights/resources/common_mandates.md +100 -0
- package/skills/android-play-policy-insights/resources/compliance_report_template.md +59 -0
- package/skills/android-play-policy-insights/resources/critic.md +86 -0
- package/skills/android-play-policy-insights/resources/goal_data_safety.md +212 -0
- package/skills/android-play-policy-insights/resources/goal_permissions_and_apis.md +459 -0
- package/skills/android-play-policy-insights/resources/goal_user_account.md +106 -0
- package/skills/android-play-policy-insights/resources/policies.json +321 -0
- package/skills/android-play-policy-insights/resources/scanner_config.json +843 -0
- package/skills/android-play-policy-insights/scripts/generate_report.py +860 -0
- package/skills/android-play-policy-insights/scripts/orchestrator.py +1313 -0
- package/skills/android-play-policy-insights/scripts/play_store_scraper.py +410 -0
- package/skills/android-play-policy-insights/scripts/scanner.py +261 -0
- package/skills/android-play-policy-insights/scripts/template_engine.py +243 -0
- package/skills/android-profiler/SKILL.md +60 -0
- package/skills/android-profiler/analysis/analysis_orchestrator.md +32 -0
- package/skills/android-profiler/analysis/workflows/perfetto-sql/perfetto_sql.md +28 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/perfetto_trace_analysis.md +121 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/guiding_principles.md +51 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/domain_hints_template.md +7 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_cpu.md +56 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_graphics.md +51 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_io.md +46 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_ipc.md +41 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_memory.md +55 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_power.md +33 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/per_candidate_analysis.md +172 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/triage.md +94 -0
- package/skills/android-profiler/recording/recording_orchestrator.md +36 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/perfetto_trace_recording.md +148 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/app_jank.pftxt +43 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/cpu_profile.pftxt +35 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/java_heap_dump.pftxt +21 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/long_background.pftxt +37 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/memory_counters.pftxt +45 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/native_heap.pftxt +21 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/sched_cpu.pftxt +33 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/trace_config_reference.md +102 -0
- package/skills/android-profiler/references/env_setup.md +15 -0
- package/skills/android-profiler/references/perfetto/setup.md +29 -0
- package/skills/android-profiler/references/perfetto/sql.md +327 -0
- package/skills/android-r8-analyzer/SKILL.md +72 -0
- package/skills/android-r8-analyzer/references/CONFIGURATION-ANALYZER.md +287 -0
- package/skills/android-r8-analyzer/references/CONFIGURATION.md +44 -0
- package/skills/android-r8-analyzer/references/KEEP-RULES-IMPACT-HIERARCHY.md +83 -0
- package/skills/android-r8-analyzer/references/REDUNDANT-RULES.md +222 -0
- package/skills/android-r8-analyzer/references/REFLECTION-GUIDE.md +139 -0
- package/skills/android-r8-analyzer/references/REPORT_FORMAT.md +51 -0
- package/skills/android-r8-analyzer/references/android/topic/performance/app-optimization/enable-app-optimization.md +252 -0
- package/skills/android-r8-analyzer/references/android/training/testing/other-components/ui-automator.md +312 -0
- package/skills/android-restore-credentials/SKILL.md +359 -0
- package/skills/android-restore-credentials/references/android/guide/topics/manifest/application-element.md +832 -0
- package/skills/android-restore-credentials/references/android/identity/passkeys/create-passkeys.md +327 -0
- package/skills/android-restore-credentials/references/android/identity/passkeys/sign-in-with-passkeys.md +219 -0
- package/skills/android-styles/SKILL.md +229 -0
- package/skills/android-styles/references/android/develop/ui/compose/designsystems/custom.md +459 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/fundamentals.md +421 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/state-animations.md +461 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/styles-vs-modifiers.md +48 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/theming.md +269 -0
- package/skills/android-verified-email/SKILL.md +432 -0
- package/skills/android-verified-email/references/android/identity/credential-manager/index.md +67 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/credential-verifier.md +166 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification-implementation.md +313 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification.md +158 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/index.md +112 -0
- package/skills/android-verified-email/references/android/identity/passkeys/create-passkeys.md +327 -0
- package/skills/android-verified-email/references/android/identity/sign-in/credential-manager-webview.md +84 -0
- package/skills/android-wear-compose-m3/SKILL.md +365 -0
- package/skills/android-wear-compose-m3/references/android/training/wearables/compose/migrate-to-material3.md +677 -0
- package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md +123 -0
- package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md.txt +123 -0
- package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md +430 -0
- package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md.txt +430 -0
- package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md +99 -0
- package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md.txt +99 -0
- package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md +141 -0
- package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md.txt +141 -0
- package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md +56 -0
- package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md.txt +56 -0
- package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md +153 -0
- package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md.txt +153 -0
- package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md +131 -0
- package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md.txt +131 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md +169 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md.txt +169 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md +282 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md.txt +282 -0
- package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md +335 -0
- package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md.txt +335 -0
- package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md +377 -0
- package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md.txt +377 -0
- package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md +165 -0
- package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md.txt +165 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md +91 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md.txt +91 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md +496 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md.txt +496 -0
- package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md +470 -0
- package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md.txt +470 -0
- package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md +67 -0
- package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md.txt +67 -0
- package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md +162 -0
- package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md.txt +162 -0
- package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md +78 -0
- package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md.txt +78 -0
- package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md +131 -0
- package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md.txt +131 -0
- package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md +74 -0
- package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md.txt +74 -0
- package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md +63 -0
- package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md.txt +63 -0
- package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md +60 -0
- package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md.txt +60 -0
- package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md +125 -0
- package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md.txt +125 -0
- package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md +116 -0
- package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md.txt +116 -0
- package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md +68 -0
- package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md.txt +68 -0
- package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md +50 -0
- package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md.txt +50 -0
- package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md +177 -0
- package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md.txt +177 -0
- package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md +651 -0
- package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md.txt +651 -0
- package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md +57 -0
- package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md.txt +57 -0
- package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md +110 -0
- package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md.txt +110 -0
- package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md +204 -0
- package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md.txt +204 -0
- package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md +139 -0
- package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md.txt +139 -0
- package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md +111 -0
- package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md.txt +111 -0
- package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md +184 -0
- package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md.txt +184 -0
- package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md +263 -0
- package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md.txt +263 -0
- package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md +105 -0
- package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md.txt +105 -0
- package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md +146 -0
- package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md.txt +146 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md +97 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md.txt +97 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md +66 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md.txt +66 -0
- package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md +86 -0
- package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md.txt +86 -0
- package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md +148 -0
- package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md.txt +148 -0
- package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md +166 -0
- package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md.txt +166 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md +172 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md.txt +172 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md +367 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md.txt +367 -0
- package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md +66 -0
- package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md.txt +66 -0
- package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md +115 -0
- package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md.txt +115 -0
- package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md +71 -0
- package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md.txt +71 -0
- package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md +151 -0
- package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md.txt +151 -0
- package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md +65 -0
- package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md.txt +65 -0
- package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md +246 -0
- package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md.txt +246 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md +89 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md.txt +89 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md +309 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md.txt +309 -0
- package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md +205 -0
- package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md.txt +205 -0
- package/skills/{architecture-feature-first → flutter-architecture-feature-first}/SKILL.md +1 -1
- package/skills/{bloc → flutter-bloc}/SKILL.md +1 -1
- package/skills/flutter-build-debug/SKILL.md +66 -0
- package/skills/{code-review → flutter-code-review}/SKILL.md +1 -1
- package/skills/{dart-3-updates → flutter-dart-3-updates}/SKILL.md +1 -1
- package/skills/{dart-fix-runtime-errors → flutter-dart-fix-runtime-errors}/SKILL.md +1 -1
- package/skills/{dart-resolve-package-conflicts → flutter-dart-resolve-package-conflicts}/SKILL.md +1 -1
- package/skills/{dart-run-static-analysis → flutter-dart-run-static-analysis}/SKILL.md +1 -1
- package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/SKILL.md +1 -1
- package/skills/{effective-dart → flutter-effective-dart}/SKILL.md +1 -1
- package/skills/{provider → flutter-provider}/SKILL.md +1 -1
- package/skills/{riverpod → flutter-riverpod}/SKILL.md +1 -1
- package/skills/ios-cocoapods-debug/SKILL.md +65 -0
- package/skills/ios-code-review/SKILL.md +56 -0
- package/skills/ios-xcode-build-debug/SKILL.md +66 -0
- package/skills/{detect-mobile-stack → mobile-detect-stack}/SKILL.md +1 -1
- package/skills/mobile-firebase/SKILL.md +54 -0
- package/skills/mobile-firebase/references/android/ai-logic.md +31 -0
- package/skills/mobile-firebase/references/android/analytics.md +33 -0
- package/skills/mobile-firebase/references/android/app-check.md +36 -0
- package/skills/mobile-firebase/references/android/auth.md +44 -0
- package/skills/mobile-firebase/references/android/crashlytics.md +31 -0
- package/skills/mobile-firebase/references/android/firestore.md +44 -0
- package/skills/mobile-firebase/references/android/functions.md +33 -0
- package/skills/mobile-firebase/references/android/in-app-messaging.md +28 -0
- package/skills/mobile-firebase/references/android/messaging.md +41 -0
- package/skills/mobile-firebase/references/android/realtime-database.md +50 -0
- package/skills/mobile-firebase/references/android/remote-config.md +43 -0
- package/skills/mobile-firebase/references/android/sql-connect.md +31 -0
- package/skills/mobile-firebase/references/android/storage.md +39 -0
- package/skills/mobile-firebase/references/android.md +30 -0
- package/skills/{firebase-ai/SKILL.md → mobile-firebase/references/flutter/ai-logic.md} +2 -8
- package/skills/{firebase-analytics/SKILL.md → mobile-firebase/references/flutter/analytics.md} +2 -8
- package/skills/{firebase-app-check/SKILL.md → mobile-firebase/references/flutter/app-check.md} +2 -8
- package/skills/{firebase-auth/SKILL.md → mobile-firebase/references/flutter/auth.md} +2 -8
- package/skills/{firebase-crashlytics/SKILL.md → mobile-firebase/references/flutter/crashlytics.md} +2 -8
- package/skills/{firebase-cloud-firestore/SKILL.md → mobile-firebase/references/flutter/firestore.md} +2 -8
- package/skills/{firebase-cloud-functions/SKILL.md → mobile-firebase/references/flutter/functions.md} +2 -8
- package/skills/{firebase-in-app-messaging/SKILL.md → mobile-firebase/references/flutter/in-app-messaging.md} +2 -8
- package/skills/{firebase-messaging/SKILL.md → mobile-firebase/references/flutter/messaging.md} +2 -8
- package/skills/{firebase-database/SKILL.md → mobile-firebase/references/flutter/realtime-database.md} +2 -8
- package/skills/{firebase-remote-config/SKILL.md → mobile-firebase/references/flutter/remote-config.md} +2 -8
- package/skills/{flutterfire-configure/SKILL.md → mobile-firebase/references/flutter/setup-flutterfire.md} +1 -8
- package/skills/{firebase-data-connect/SKILL.md → mobile-firebase/references/flutter/sql-connect.md} +2 -8
- package/skills/{firebase-storage/SKILL.md → mobile-firebase/references/flutter/storage.md} +2 -8
- package/skills/mobile-firebase/references/flutter.md +36 -0
- package/skills/mobile-firebase/references/ios/ai-logic.md +30 -0
- package/skills/mobile-firebase/references/ios/analytics.md +33 -0
- package/skills/mobile-firebase/references/ios/app-check.md +36 -0
- package/skills/mobile-firebase/references/ios/auth.md +48 -0
- package/skills/mobile-firebase/references/ios/crashlytics.md +34 -0
- package/skills/mobile-firebase/references/ios/firestore.md +53 -0
- package/skills/mobile-firebase/references/ios/functions.md +35 -0
- package/skills/mobile-firebase/references/ios/in-app-messaging.md +26 -0
- package/skills/mobile-firebase/references/ios/messaging.md +45 -0
- package/skills/mobile-firebase/references/ios/realtime-database.md +49 -0
- package/skills/mobile-firebase/references/ios/remote-config.md +44 -0
- package/skills/mobile-firebase/references/ios/sql-connect.md +33 -0
- package/skills/mobile-firebase/references/ios/storage.md +36 -0
- package/skills/mobile-firebase/references/ios.md +28 -0
- package/skills/mobile-firebase/references/react-native/ai-logic.md +32 -0
- package/skills/mobile-firebase/references/react-native/analytics.md +43 -0
- package/skills/mobile-firebase/references/react-native/app-check.md +35 -0
- package/skills/mobile-firebase/references/react-native/auth.md +50 -0
- package/skills/mobile-firebase/references/react-native/crashlytics.md +36 -0
- package/skills/mobile-firebase/references/react-native/firestore.md +45 -0
- package/skills/mobile-firebase/references/react-native/functions.md +28 -0
- package/skills/mobile-firebase/references/react-native/in-app-messaging.md +27 -0
- package/skills/mobile-firebase/references/react-native/messaging.md +46 -0
- package/skills/mobile-firebase/references/react-native/realtime-database.md +46 -0
- package/skills/mobile-firebase/references/react-native/remote-config.md +32 -0
- package/skills/mobile-firebase/references/react-native/sql-connect.md +11 -0
- package/skills/mobile-firebase/references/react-native/storage.md +30 -0
- package/skills/mobile-firebase/references/react-native.md +29 -0
- package/skills/mobile-test/SKILL.md +63 -0
- package/skills/mobile-test/references/android/setup/GUIDE.md +183 -0
- package/skills/mobile-test/references/android/setup/references/android/develop/ui/compose/testing/common-patterns.md +181 -0
- package/skills/mobile-test/references/android/setup/references/android/studio/preview/compose-screenshot-testing.md +255 -0
- package/skills/mobile-test/references/android/setup/references/android/training/dependency-injection/hilt-testing.md +447 -0
- package/skills/mobile-test/references/android.md +83 -0
- package/skills/{dart-collect-coverage/SKILL.md → mobile-test/references/flutter/coverage.md} +2 -11
- package/skills/{dart-generate-test-mocks/SKILL.md → mobile-test/references/flutter/generate-mocks.md} +2 -11
- package/skills/{flutter-add-integration-test/SKILL.md → mobile-test/references/flutter/integration-tests.md} +2 -11
- package/skills/{dart-migrate-to-checks-package/SKILL.md → mobile-test/references/flutter/migrate-to-checks.md} +2 -13
- package/skills/{mockito/SKILL.md → mobile-test/references/flutter/mockito.md} +1 -8
- package/skills/{mocktail/SKILL.md → mobile-test/references/flutter/mocktail.md} +1 -8
- package/skills/{patrol-e2e-testing/SKILL.md → mobile-test/references/flutter/patrol.md} +1 -8
- package/skills/{testing/SKILL.md → mobile-test/references/flutter/testing-guidelines.md} +1 -8
- package/skills/{dart-add-unit-test/SKILL.md → mobile-test/references/flutter/unit-tests.md} +2 -11
- package/skills/{flutter-add-widget-test/SKILL.md → mobile-test/references/flutter/widget-tests.md} +2 -11
- package/skills/mobile-test/references/flutter.md +44 -0
- package/skills/mobile-test/references/ios.md +79 -0
- package/skills/mobile-test/references/react-native.md +62 -0
- /package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/examples/json_patterns.dart +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Cloud Functions for Firebase (callable functions) — native iOS (Swift)
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../ios.md](../ios.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package product
|
|
6
|
+
|
|
7
|
+
`FirebaseFunctions` — `import FirebaseFunctions`
|
|
8
|
+
|
|
9
|
+
## Call a function
|
|
10
|
+
|
|
11
|
+
```swift
|
|
12
|
+
private lazy var functions = Functions.functions(region: "europe-west1") // must match the deployed region
|
|
13
|
+
|
|
14
|
+
func addMessage(_ text: String) async throws -> String {
|
|
15
|
+
let result = try await functions.httpsCallable("addMessage").call(["text": text])
|
|
16
|
+
guard let data = result.data as? [String: Any], let id = data["id"] as? String else {
|
|
17
|
+
throw AppError.unexpectedResponse
|
|
18
|
+
}
|
|
19
|
+
return id
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- A region mismatch fails as not found; `Functions.functions()` without a region targets `us-central1`.
|
|
24
|
+
- Errors in the `FunctionsErrorDomain` carry a `FunctionsErrorCode` and the `details` sent by the function's `HttpsError`.
|
|
25
|
+
- The signed-in user's ID token and the App Check token are sent automatically; authorize in the function, never only in the app.
|
|
26
|
+
- `httpsCallable(_:requestAs:responseAs:)` decodes `Codable` types when both sides agree on the shape.
|
|
27
|
+
|
|
28
|
+
## Emulator
|
|
29
|
+
|
|
30
|
+
`functions.useEmulator(withHost: "localhost", port: 5001)` before calling.
|
|
31
|
+
|
|
32
|
+
## Verify
|
|
33
|
+
|
|
34
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
35
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Firebase In-App Messaging — native iOS (Swift)
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../ios.md](../ios.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package product
|
|
6
|
+
|
|
7
|
+
`FirebaseInAppMessaging-Beta` (the Swift package still labels the product beta) — `import FirebaseInAppMessaging`. Add `FirebaseAnalytics` too: campaigns are triggered by Analytics events.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```swift
|
|
12
|
+
InAppMessaging.inAppMessaging().messageDisplaySuppressed = true // during flows that must not be interrupted
|
|
13
|
+
InAppMessaging.inAppMessaging().messageDisplaySuppressed = false
|
|
14
|
+
InAppMessaging.inAppMessaging().triggerEvent("checkout_completed")
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Notes
|
|
18
|
+
|
|
19
|
+
- Messages display on the next foreground after they are fetched, not immediately after publishing a campaign.
|
|
20
|
+
- To preview a campaign, use **Test on device** in the console with the Firebase Installation ID (`try await Installations.installations().installationID()`).
|
|
21
|
+
- A custom look requires implementing `InAppMessagingDisplay` and setting it as the display component.
|
|
22
|
+
|
|
23
|
+
## Verify
|
|
24
|
+
|
|
25
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
26
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Firebase Cloud Messaging — native iOS (Swift)
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../ios.md](../ios.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package product
|
|
6
|
+
|
|
7
|
+
`FirebaseMessaging` — `import FirebaseMessaging`
|
|
8
|
+
|
|
9
|
+
## Project setup
|
|
10
|
+
|
|
11
|
+
- Enable the **Push Notifications** capability, and **Background Modes → Remote notifications** for data-only (silent) messages.
|
|
12
|
+
- Upload an APNs authentication key in the Firebase console (Project settings → Cloud Messaging).
|
|
13
|
+
|
|
14
|
+
## Registration
|
|
15
|
+
|
|
16
|
+
```swift
|
|
17
|
+
final class AppDelegate: NSObject, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate {
|
|
18
|
+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
|
19
|
+
FirebaseApp.configure()
|
|
20
|
+
Messaging.messaging().delegate = self
|
|
21
|
+
UNUserNotificationCenter.current().delegate = self
|
|
22
|
+
application.registerForRemoteNotifications()
|
|
23
|
+
return true
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
|
|
27
|
+
// send the token to your backend, associated with the signed-in user
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification) async -> UNNotificationPresentationOptions {
|
|
31
|
+
[.banner, .sound] // otherwise notifications are not shown while the app is in the foreground
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- Ask for permission with `UNUserNotificationCenter.current().requestAuthorization(options:)` at a moment the user understands why.
|
|
37
|
+
- Firebase swizzles the app delegate to pass the APNs token. If `FirebaseAppDelegateProxyEnabled` is `NO` in `Info.plist`, set `Messaging.messaging().apnsToken = deviceToken` in `application(_:didRegisterForRemoteNotificationsWithDeviceToken:)`.
|
|
38
|
+
- The FCM token depends on the APNs token; calling `Messaging.messaging().token()` before APNs registration completes fails.
|
|
39
|
+
- Rich notifications with images need a Notification Service Extension.
|
|
40
|
+
- Test on a real device; simulator support for remote notifications is limited.
|
|
41
|
+
|
|
42
|
+
## Verify
|
|
43
|
+
|
|
44
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
45
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Firebase Realtime Database — native iOS (Swift)
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../ios.md](../ios.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package product
|
|
6
|
+
|
|
7
|
+
`FirebaseDatabase` — `import FirebaseDatabase`
|
|
8
|
+
|
|
9
|
+
## Setup notes
|
|
10
|
+
|
|
11
|
+
- Enable disk persistence, if the app needs it, before creating any reference: `Database.database().isPersistenceEnabled = true`.
|
|
12
|
+
- A database outside the default region is addressed by URL: `Database.database(url: "https://<db>.<region>.firebasedatabase.app")`.
|
|
13
|
+
|
|
14
|
+
## Read and listen
|
|
15
|
+
|
|
16
|
+
```swift
|
|
17
|
+
private let ref = Database.database().reference().child("rooms").child(roomId).child("messages")
|
|
18
|
+
private var handle: DatabaseHandle?
|
|
19
|
+
|
|
20
|
+
func start() {
|
|
21
|
+
handle = ref.queryLimited(toLast: 50).observe(.value) { snapshot in
|
|
22
|
+
self.messages = snapshot.children.compactMap { ($0 as? DataSnapshot).flatMap { try? $0.data(as: Message.self) } }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
func stop() {
|
|
27
|
+
if let handle { ref.removeObserver(withHandle: handle) }
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Listen to the narrowest path the screen needs; an observer on a parent node downloads every child.
|
|
32
|
+
|
|
33
|
+
## Write
|
|
34
|
+
|
|
35
|
+
```swift
|
|
36
|
+
try ref.childByAutoId().setValue(from: message)
|
|
37
|
+
try await ref.child(id).updateChildValues(["text": edited])
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Use `ServerValue.timestamp()` for server time, and `runTransactionBlock` for counters.
|
|
41
|
+
|
|
42
|
+
## Emulator
|
|
43
|
+
|
|
44
|
+
`Database.database().useEmulator(withHost: "localhost", port: 9000)` before any other Database call.
|
|
45
|
+
|
|
46
|
+
## Verify
|
|
47
|
+
|
|
48
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
49
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Firebase Remote Config — native iOS (Swift)
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../ios.md](../ios.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package product
|
|
6
|
+
|
|
7
|
+
`FirebaseRemoteConfig` — `import FirebaseRemoteConfig`
|
|
8
|
+
|
|
9
|
+
## Setup and fetch
|
|
10
|
+
|
|
11
|
+
```swift
|
|
12
|
+
let remoteConfig = RemoteConfig.remoteConfig()
|
|
13
|
+
|
|
14
|
+
func initRemoteConfig() async throws {
|
|
15
|
+
let settings = RemoteConfigSettings()
|
|
16
|
+
#if DEBUG
|
|
17
|
+
settings.minimumFetchInterval = 0
|
|
18
|
+
#endif
|
|
19
|
+
remoteConfig.configSettings = settings
|
|
20
|
+
remoteConfig.setDefaults(fromPlist: "RemoteConfigDefaults")
|
|
21
|
+
try await remoteConfig.fetchAndActivate()
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var showNewCheckout: Bool { remoteConfig.configValue(forKey: "show_new_checkout").boolValue }
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- Ship in-app defaults for every key, so the app works offline and before the first fetch.
|
|
28
|
+
- Do not block launch on the fetch; the default minimum fetch interval is 12 hours, and lower intervals in production get throttled.
|
|
29
|
+
|
|
30
|
+
## Real-time updates
|
|
31
|
+
|
|
32
|
+
```swift
|
|
33
|
+
listenerRegistration = remoteConfig.addOnConfigUpdateListener { update, error in
|
|
34
|
+
guard error == nil else { return }
|
|
35
|
+
remoteConfig.activate()
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Keep the registration and call `remove()` when no longer needed.
|
|
40
|
+
|
|
41
|
+
## Verify
|
|
42
|
+
|
|
43
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
44
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Firebase SQL Connect (formerly Data Connect) — native iOS (Swift)
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../ios.md](../ios.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
Firebase Data Connect is now called **Firebase SQL Connect**; the APIs did not change.
|
|
6
|
+
|
|
7
|
+
## Generated Swift SDK
|
|
8
|
+
|
|
9
|
+
- The Swift SDK is a separate package: `https://github.com/firebase/data-connect-ios-sdk`.
|
|
10
|
+
- In the connector's `connector.yaml`, add a `swiftSdk` entry under `generate` with the output directory, then run `firebase dataconnect:sdk:generate`. Add the generated package to the Xcode project as a local package.
|
|
11
|
+
- Regenerate the SDK whenever the schema or the operations change.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```swift
|
|
16
|
+
let connector = DataConnect.moviesConnector // name generated from your connector
|
|
17
|
+
|
|
18
|
+
func loadMovies() async throws -> [ListMoviesQuery.Data.Movie] {
|
|
19
|
+
try await connector.listMoviesQuery.execute().data.movies
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The names above come from a sample connector; use the ones generated for your project. Generated query refs also expose observable results for SwiftUI.
|
|
24
|
+
|
|
25
|
+
## Notes
|
|
26
|
+
|
|
27
|
+
- Operations are defined and authorized on the server (`@auth` directives); the app cannot run arbitrary SQL.
|
|
28
|
+
- Point the connector at the emulator (default port 9399) in debug builds, as the generated SDK documentation shows.
|
|
29
|
+
|
|
30
|
+
## Verify
|
|
31
|
+
|
|
32
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
33
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Cloud Storage for Firebase — native iOS (Swift)
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../ios.md](../ios.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package product
|
|
6
|
+
|
|
7
|
+
`FirebaseStorage` — `import FirebaseStorage`
|
|
8
|
+
|
|
9
|
+
## Upload
|
|
10
|
+
|
|
11
|
+
```swift
|
|
12
|
+
func uploadAvatar(uid: String, data: Data) async throws -> URL {
|
|
13
|
+
let ref = Storage.storage().reference().child("users/\(uid)/avatar.jpg")
|
|
14
|
+
let metadata = StorageMetadata()
|
|
15
|
+
metadata.contentType = "image/jpeg"
|
|
16
|
+
_ = try await ref.putDataAsync(data, metadata: metadata)
|
|
17
|
+
return try await ref.downloadURL()
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- Compress and resize images before uploading; use `putFile(from:)` for large files instead of loading them into `Data`.
|
|
22
|
+
- For progress, keep the `StorageUploadTask` returned by `putFile`/`putData` and observe `.progress`; remove observers when done.
|
|
23
|
+
- Put user files under a path with the user id and enforce it in Storage security rules.
|
|
24
|
+
|
|
25
|
+
## Download
|
|
26
|
+
|
|
27
|
+
Prefer loading the download URL with an image loader that caches and downsamples. `getData(maxSize:)` loads the whole file in memory; use `write(toFile:)` for large files.
|
|
28
|
+
|
|
29
|
+
## Emulator
|
|
30
|
+
|
|
31
|
+
`Storage.storage().useEmulator(withHost: "localhost", port: 9199)` before any other Storage call.
|
|
32
|
+
|
|
33
|
+
## Verify
|
|
34
|
+
|
|
35
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
36
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Firebase in native iOS apps
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
- Register the iOS app in the Firebase console and add `GoogleService-Info.plist` to the app target.
|
|
6
|
+
- Add `https://github.com/firebase/firebase-ios-sdk` with Swift Package Manager and link only the products you use (listed below), or the matching pods if the project already uses CocoaPods.
|
|
7
|
+
- Call `FirebaseApp.configure()` once at launch: in `application(_:didFinishLaunchingWithOptions:)`, or in a SwiftUI `App` through `@UIApplicationDelegateAdaptor`.
|
|
8
|
+
- Check the Firebase version in `Package.resolved` or `Podfile.lock`, and the minimum iOS version it requires, before writing code against newer APIs.
|
|
9
|
+
|
|
10
|
+
## Products
|
|
11
|
+
|
|
12
|
+
Each guide names the Swift package product to link.
|
|
13
|
+
|
|
14
|
+
| Product | Guide |
|
|
15
|
+
|---|---|
|
|
16
|
+
| Authentication | [ios/auth.md](ios/auth.md) |
|
|
17
|
+
| Cloud Firestore | [ios/firestore.md](ios/firestore.md) |
|
|
18
|
+
| Realtime Database | [ios/realtime-database.md](ios/realtime-database.md) |
|
|
19
|
+
| Cloud Storage | [ios/storage.md](ios/storage.md) |
|
|
20
|
+
| Cloud Functions (callable) | [ios/functions.md](ios/functions.md) |
|
|
21
|
+
| Cloud Messaging (push) | [ios/messaging.md](ios/messaging.md) |
|
|
22
|
+
| Analytics | [ios/analytics.md](ios/analytics.md) |
|
|
23
|
+
| Crashlytics | [ios/crashlytics.md](ios/crashlytics.md) |
|
|
24
|
+
| Remote Config | [ios/remote-config.md](ios/remote-config.md) |
|
|
25
|
+
| App Check | [ios/app-check.md](ios/app-check.md) |
|
|
26
|
+
| In-App Messaging | [ios/in-app-messaging.md](ios/in-app-messaging.md) |
|
|
27
|
+
| AI Logic | [ios/ai-logic.md](ios/ai-logic.md) |
|
|
28
|
+
| SQL Connect (formerly Data Connect) | [ios/sql-connect.md](ios/sql-connect.md) |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Firebase AI Logic — React Native
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../react-native.md](../react-native.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@react-native-firebase/ai`
|
|
8
|
+
|
|
9
|
+
## Generate content
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { getApp } from '@react-native-firebase/app';
|
|
13
|
+
import { getAI, getGenerativeModel, GoogleAIBackend } from '@react-native-firebase/ai';
|
|
14
|
+
|
|
15
|
+
const ai = getAI(getApp(), { backend: new GoogleAIBackend() });
|
|
16
|
+
const model = getGenerativeModel(ai, { model: '<model name>' });
|
|
17
|
+
|
|
18
|
+
export async function summarize(text: string) {
|
|
19
|
+
const result = await model.generateContent(`Summarize in two sentences:\n${text}`);
|
|
20
|
+
return result.response.text();
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- The API mirrors the Firebase JS SDK's `firebase/ai`; confirm the exported names and backends against the installed version's documentation.
|
|
25
|
+
- Model names change and older ones are retired: take the name from the current Firebase AI Logic documentation and keep it in Remote Config.
|
|
26
|
+
- There is no API key in the app: requests go through Firebase. Enable App Check to keep others from calling the model at your cost.
|
|
27
|
+
- The older `@react-native-firebase/vertexai` package is the predecessor; do not add both.
|
|
28
|
+
|
|
29
|
+
## Verify
|
|
30
|
+
|
|
31
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
32
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Google Analytics for Firebase — React Native
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../react-native.md](../react-native.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@react-native-firebase/analytics`
|
|
8
|
+
|
|
9
|
+
## Events
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { getAnalytics, logEvent, logScreenView } from '@react-native-firebase/analytics';
|
|
13
|
+
|
|
14
|
+
await logEvent(getAnalytics(), 'select_item', { item_id: item.id, item_name: item.name });
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- Prefer recommended event names (`select_item`, `purchase`, `login`...) and parameters before custom ones.
|
|
18
|
+
- Never log personal data as parameters or user properties.
|
|
19
|
+
|
|
20
|
+
## Screens with React Navigation
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<NavigationContainer
|
|
24
|
+
ref={navigationRef}
|
|
25
|
+
onStateChange={async () => {
|
|
26
|
+
const current = navigationRef.getCurrentRoute()?.name;
|
|
27
|
+
if (current && current !== previousRouteName.current) {
|
|
28
|
+
await logScreenView(getAnalytics(), { screen_name: current, screen_class: current });
|
|
29
|
+
}
|
|
30
|
+
previousRouteName.current = current;
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- iOS advertising identifier and consent-mode flags are native build options (Podfile variables, or the analytics config plugin with Expo); set them to match App Tracking Transparency usage.
|
|
38
|
+
- DebugView uses the native methods: `adb shell setprop debug.firebase.analytics.app <application-id>` on Android and the `-FIRDebugEnabled` launch argument on iOS.
|
|
39
|
+
|
|
40
|
+
## Verify
|
|
41
|
+
|
|
42
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
43
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Firebase App Check — React Native
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../react-native.md](../react-native.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@react-native-firebase/app-check`
|
|
8
|
+
|
|
9
|
+
## Initialize early
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { getApp } from '@react-native-firebase/app';
|
|
13
|
+
import { initializeAppCheck, ReactNativeFirebaseAppCheckProvider } from '@react-native-firebase/app-check';
|
|
14
|
+
|
|
15
|
+
const provider = new ReactNativeFirebaseAppCheckProvider();
|
|
16
|
+
provider.configure({
|
|
17
|
+
android: { provider: __DEV__ ? 'debug' : 'playIntegrity', debugToken: process.env.APP_CHECK_DEBUG_TOKEN },
|
|
18
|
+
apple: { provider: __DEV__ ? 'debug' : 'appAttestWithDeviceCheckFallback', debugToken: process.env.APP_CHECK_DEBUG_TOKEN },
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
await initializeAppCheck(getApp(), { provider, isTokenAutoRefreshEnabled: true });
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Run it before the first call to a protected product, and check the provider names against the installed version.
|
|
25
|
+
|
|
26
|
+
## Notes
|
|
27
|
+
|
|
28
|
+
- The native requirements still apply: the Play Console link for Play Integrity and the App Attest capability on iOS.
|
|
29
|
+
- Debug tokens are secrets for your project; keep them out of the repository and out of release builds.
|
|
30
|
+
- Watch the App Check metrics before turning on enforcement.
|
|
31
|
+
|
|
32
|
+
## Verify
|
|
33
|
+
|
|
34
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
35
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Firebase Authentication — React Native
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../react-native.md](../react-native.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@react-native-firebase/auth`
|
|
8
|
+
|
|
9
|
+
## Auth state
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { getAuth, onAuthStateChanged, FirebaseAuthTypes } from '@react-native-firebase/auth';
|
|
13
|
+
|
|
14
|
+
function useCurrentUser() {
|
|
15
|
+
const [user, setUser] = useState<FirebaseAuthTypes.User | null>(null);
|
|
16
|
+
const [initializing, setInitializing] = useState(true);
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const unsubscribe = onAuthStateChanged(getAuth(), (next) => {
|
|
20
|
+
setUser(next);
|
|
21
|
+
setInitializing(false);
|
|
22
|
+
});
|
|
23
|
+
return unsubscribe;
|
|
24
|
+
}, []);
|
|
25
|
+
|
|
26
|
+
return { user, initializing };
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The listener fires once with the persisted state at startup; render a splash or loading state until then instead of flashing the login screen.
|
|
31
|
+
|
|
32
|
+
## Email and password
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword } from '@react-native-firebase/auth';
|
|
36
|
+
|
|
37
|
+
await createUserWithEmailAndPassword(getAuth(), email, password);
|
|
38
|
+
await signInWithEmailAndPassword(getAuth(), email, password);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Errors carry a `code` such as `auth/email-already-in-use`, `auth/weak-password` or `auth/invalid-credential`. With email enumeration protection enabled, do not tell the user whether the email or the password was wrong.
|
|
42
|
+
|
|
43
|
+
## Google and Apple
|
|
44
|
+
|
|
45
|
+
Get the ID token with a native sign-in library (for Google, `@react-native-google-signin/google-signin`; for Apple, a library such as `@invertase/react-native-apple-authentication`), then sign in with `GoogleAuthProvider.credential(idToken)` or `AppleAuthProvider.credential(identityToken, nonce)` and `signInWithCredential`. The native requirements of each platform still apply: SHA fingerprints on Android, URL schemes and the Sign in with Apple capability on iOS.
|
|
46
|
+
|
|
47
|
+
## Verify
|
|
48
|
+
|
|
49
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
50
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Firebase Crashlytics — React Native
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../react-native.md](../react-native.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@react-native-firebase/crashlytics`
|
|
8
|
+
|
|
9
|
+
## Setup notes
|
|
10
|
+
|
|
11
|
+
- Android: apply the `com.google.firebase.crashlytics` Gradle plugin in the app module, as the installation page describes.
|
|
12
|
+
- iOS: follow the installation page for the dSYM upload build phase and `DWARF with dSYM File`.
|
|
13
|
+
- Behavior flags such as `crashlytics_debug_enabled` and `crashlytics_auto_collection_enabled` live in `firebase.json` at the project root.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { getCrashlytics, log, recordError, setUserId, setAttributes } from '@react-native-firebase/crashlytics';
|
|
19
|
+
|
|
20
|
+
const crashlytics = getCrashlytics();
|
|
21
|
+
await setUserId(crashlytics, opaqueUserId); // an internal id, never an email
|
|
22
|
+
await setAttributes(crashlytics, { screen: 'checkout' });
|
|
23
|
+
log(crashlytics, 'payment started');
|
|
24
|
+
recordError(crashlytics, error); // non-fatal JavaScript error
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Notes
|
|
28
|
+
|
|
29
|
+
- Errors caught by an error boundary are not crashes; record them with `recordError` so they appear in the console.
|
|
30
|
+
- Keep development builds out of production reports (`crashlytics_debug_enabled` in `firebase.json`).
|
|
31
|
+
- Reports are sent on the next launch after a crash.
|
|
32
|
+
|
|
33
|
+
## Verify
|
|
34
|
+
|
|
35
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
36
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Cloud Firestore — React Native
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../react-native.md](../react-native.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@react-native-firebase/firestore`
|
|
8
|
+
|
|
9
|
+
## Read and listen
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { getFirestore, collection, query, where, orderBy, onSnapshot } from '@react-native-firebase/firestore';
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const q = query(collection(getFirestore(), 'orders'), where('userId', '==', uid), orderBy('createdAt', 'desc'));
|
|
16
|
+
const unsubscribe = onSnapshot(
|
|
17
|
+
q,
|
|
18
|
+
(snapshot) => setOrders(snapshot.docs.map((doc) => ({ id: doc.id, ...doc.data() }))),
|
|
19
|
+
(error) => setError(error),
|
|
20
|
+
);
|
|
21
|
+
return unsubscribe;
|
|
22
|
+
}, [uid]);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Always return the unsubscribe function from the effect; a forgotten listener keeps reading documents and billing reads.
|
|
26
|
+
|
|
27
|
+
## Write
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { getFirestore, doc, setDoc, serverTimestamp, runTransaction, writeBatch } from '@react-native-firebase/firestore';
|
|
31
|
+
|
|
32
|
+
await setDoc(doc(getFirestore(), 'orders', id), { userId: uid, total, createdAt: serverTimestamp() });
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use `writeBatch` or `runTransaction` when several documents must change together.
|
|
36
|
+
|
|
37
|
+
## Notes
|
|
38
|
+
|
|
39
|
+
- Offline persistence is on by default on both platforms; design UI for pending writes.
|
|
40
|
+
- A query that needs a composite index fails with an error containing a link that creates it.
|
|
41
|
+
|
|
42
|
+
## Verify
|
|
43
|
+
|
|
44
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
45
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Cloud Functions for Firebase (callable functions) — React Native
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../react-native.md](../react-native.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@react-native-firebase/functions`
|
|
8
|
+
|
|
9
|
+
## Call a function
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { getApp } from '@react-native-firebase/app';
|
|
13
|
+
import { getFunctions, httpsCallable } from '@react-native-firebase/functions';
|
|
14
|
+
|
|
15
|
+
const functions = getFunctions(getApp(), 'europe-west1'); // must match the deployed region
|
|
16
|
+
const addMessage = httpsCallable<{ text: string }, { id: string }>(functions, 'addMessage');
|
|
17
|
+
|
|
18
|
+
const { data } = await addMessage({ text });
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- A region mismatch fails as not found; without a region the client targets `us-central1`.
|
|
22
|
+
- Errors carry `code` (for example `functions/unauthenticated`) and `details` from the function's `HttpsError`.
|
|
23
|
+
- The signed-in user's ID token and the App Check token are sent automatically; authorize in the function, never only in the app.
|
|
24
|
+
|
|
25
|
+
## Verify
|
|
26
|
+
|
|
27
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
28
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Firebase In-App Messaging — React Native
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../react-native.md](../react-native.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@react-native-firebase/in-app-messaging` (with `@react-native-firebase/analytics`: campaigns are triggered by Analytics events)
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { getInAppMessaging, setMessagesDisplaySuppressed, triggerEvent } from '@react-native-firebase/in-app-messaging';
|
|
13
|
+
|
|
14
|
+
await setMessagesDisplaySuppressed(getInAppMessaging(), true); // during flows that must not be interrupted
|
|
15
|
+
await setMessagesDisplaySuppressed(getInAppMessaging(), false);
|
|
16
|
+
await triggerEvent(getInAppMessaging(), 'checkout_completed');
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Notes
|
|
20
|
+
|
|
21
|
+
- Messages use the native default display; the look is configured per campaign in the console.
|
|
22
|
+
- To preview a campaign on a device, use **Test on device** with the Firebase Installation ID (`@react-native-firebase/installations`).
|
|
23
|
+
|
|
24
|
+
## Verify
|
|
25
|
+
|
|
26
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
27
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Firebase Cloud Messaging — React Native
|
|
2
|
+
|
|
3
|
+
Project setup shared by every Firebase product is in [../react-native.md](../react-native.md). The concepts in `SKILL.md` — security rules, App Check, environments, the Local Emulator Suite — apply here too.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@react-native-firebase/messaging`
|
|
8
|
+
|
|
9
|
+
## Permission and token
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { getMessaging, requestPermission, getToken, onTokenRefresh, AuthorizationStatus } from '@react-native-firebase/messaging';
|
|
13
|
+
import { PermissionsAndroid, Platform } from 'react-native';
|
|
14
|
+
|
|
15
|
+
async function registerForPush() {
|
|
16
|
+
if (Platform.OS === 'android' && Platform.Version >= 33) {
|
|
17
|
+
await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS);
|
|
18
|
+
}
|
|
19
|
+
const status = await requestPermission(getMessaging()); // iOS prompt; Android returns authorized
|
|
20
|
+
if (status === AuthorizationStatus.AUTHORIZED || status === AuthorizationStatus.PROVISIONAL) {
|
|
21
|
+
await sendTokenToBackend(await getToken(getMessaging()));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
onTokenRefresh(getMessaging(), sendTokenToBackend);
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Handlers
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// index.js — register before AppRegistry.registerComponent, outside any component
|
|
32
|
+
import { getMessaging, setBackgroundMessageHandler } from '@react-native-firebase/messaging';
|
|
33
|
+
|
|
34
|
+
setBackgroundMessageHandler(getMessaging(), async (message) => {
|
|
35
|
+
// keep it short: the OS gives background handlers little time
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- Foreground messages arrive in `onMessage(getMessaging(), handler)` and are **not** shown as notifications automatically; display them with a local notification library if needed.
|
|
40
|
+
- Notification taps: `getInitialNotification` (app opened from quit state) and `onNotificationOpenedApp` (from background).
|
|
41
|
+
- The native requirements still apply: the Push Notifications capability and APNs key on iOS, notification channels on Android.
|
|
42
|
+
|
|
43
|
+
## Verify
|
|
44
|
+
|
|
45
|
+
- Check the SDK version the project uses before relying on an API shown here; names occasionally change between major versions.
|
|
46
|
+
- Security rules and App Check are the real protection: anything in the app binary can be read or modified.
|