Native Apps für iOS und Android (Capacitor) mit Push über Firebase
Apps (mobile/): - Capacitor-8-Hülle, lädt die Web-App von APP_URL – Inhalte ohne App-Update - Android- und iOS-Projekt (Swift Package Manager) mit Firebase Messaging, nativer Sprachausgabe, Teilen, App, Statusleiste, Startbildschirm - `npm run sync` überträgt APP_ID, Name, Adresse und Farbe aus mobile/.env in beide Projekte und richtet ein: App-Links (Android intent-filter, iOS Associated Domains), Push (Entitlements, Background Mode, AppDelegate, Benachrichtigungssymbol/-farbe), Offline-Seite; idempotent, prüft Eingaben, warnt bei fehlenden Firebase-Dateien - `npm run assets` erzeugt Symbole und Startbildschirme aus Logo und Markenfarbe der Redaktion, dazu das Android-Benachrichtigungssymbol - Schritt-für-Schritt-Anleitung für den Mac (mobile/README.md) Server: - Versand an App-Geräte über FCM HTTP v1 (signiertes JWT, ohne firebase-admin), eingebunden in alle Benachrichtigungen; abgemeldete Geräte werden entfernt (nur bei UNREGISTERED, nicht bei anderen Fehlern) - Firebase-Dienstkonto in den Einstellungen hochladen (verschlüsselt), App-ID, Team-ID, SHA-256, Store-Links; /.well-known/apple-app-site- association und assetlinks.json; Smart-App-Banner, Store-Hinweis - Server erkennt die App am User-Agent (kein Aufblitzen von „Als App installieren“); Datenschutz-Vorlage um Firebase ergänzt Web-App in der App: Push über Firebase statt Web-Push, Vorlesen nativ, Teilen nativ, Zurück-Taste (schließt erst Dialoge), Antippen einer Benachrichtigung und App-Links öffnen die Seite (nur eigene Adressen). Getestet mit nachgebauter Capacitor-Brücke und nachgebautem Firebase-Dienst. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
02171e4cfe
commit
856559f830
152 changed files with 7537 additions and 32 deletions
9
mobile/ios/App/CapApp-SPM/.gitignore
vendored
Normal file
9
mobile/ios/App/CapApp-SPM/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
.DS_Store
|
||||
/.build
|
||||
/Packages
|
||||
/*.xcodeproj
|
||||
xcuserdata/
|
||||
DerivedData/
|
||||
.swiftpm/config/registries.json
|
||||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
|
||||
.netrc
|
||||
37
mobile/ios/App/CapApp-SPM/Package.swift
Normal file
37
mobile/ios/App/CapApp-SPM/Package.swift
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// swift-tools-version: 5.9
|
||||
import PackageDescription
|
||||
|
||||
// DO NOT MODIFY THIS FILE - managed by Capacitor CLI commands
|
||||
let package = Package(
|
||||
name: "CapApp-SPM",
|
||||
platforms: [.iOS(.v15)],
|
||||
products: [
|
||||
.library(
|
||||
name: "CapApp-SPM",
|
||||
targets: ["CapApp-SPM"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", exact: "8.5.2"),
|
||||
.package(name: "CapacitorCommunityTextToSpeech", path: "../../../node_modules/@capacitor-community/text-to-speech"),
|
||||
.package(name: "CapacitorFirebaseMessaging", path: "symlinks/CapacitorFirebaseMessaging"),
|
||||
.package(name: "CapacitorApp", path: "../../../node_modules/@capacitor/app"),
|
||||
.package(name: "CapacitorShare", path: "../../../node_modules/@capacitor/share"),
|
||||
.package(name: "CapacitorSplashScreen", path: "../../../node_modules/@capacitor/splash-screen"),
|
||||
.package(name: "CapacitorStatusBar", path: "../../../node_modules/@capacitor/status-bar")
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "CapApp-SPM",
|
||||
dependencies: [
|
||||
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
||||
.product(name: "Cordova", package: "capacitor-swift-pm"),
|
||||
.product(name: "CapacitorCommunityTextToSpeech", package: "CapacitorCommunityTextToSpeech"),
|
||||
.product(name: "CapacitorFirebaseMessaging", package: "CapacitorFirebaseMessaging"),
|
||||
.product(name: "CapacitorApp", package: "CapacitorApp"),
|
||||
.product(name: "CapacitorShare", package: "CapacitorShare"),
|
||||
.product(name: "CapacitorSplashScreen", package: "CapacitorSplashScreen"),
|
||||
.product(name: "CapacitorStatusBar", package: "CapacitorStatusBar")
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
5
mobile/ios/App/CapApp-SPM/README.md
Normal file
5
mobile/ios/App/CapApp-SPM/README.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# CapApp-SPM
|
||||
|
||||
This package is used to host SPM dependencies for your Capacitor project
|
||||
|
||||
Do not modify the contents of it or there may be unintended consequences.
|
||||
|
|
@ -0,0 +1 @@
|
|||
public let isCapacitorApp = true
|
||||
Loading…
Add table
Add a link
Reference in a new issue