This repository has been archived on 2026-02-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
breakpilot-pwa/consent-sdk/src/mobile
Benjamin Admin 21a844cb8a fix: Restore all files lost during destructive rebase
A previous `git pull --rebase origin main` dropped 177 local commits,
losing 3400+ files across admin-v2, backend, studio-v2, website,
klausur-service, and many other services. The partial restore attempt
(660295e2) only recovered some files.

This commit restores all missing files from pre-rebase ref 98933f5e
while preserving post-rebase additions (night-scheduler, night-mode UI,
NightModeWidget dashboard integration).

Restored features include:
- AI Module Sidebar (FAB), OCR Labeling, OCR Compare
- GPU Dashboard, RAG Pipeline, Magic Help
- Klausur-Korrektur (8 files), Abitur-Archiv (5+ files)
- Companion, Zeugnisse-Crawler, Screen Flow
- Full backend, studio-v2, website, klausur-service
- All compliance SDKs, agent-core, voice-service
- CI/CD configs, documentation, scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:51:32 +01:00
..

Mobile SDKs - @breakpilot/consent-sdk

Übersicht

Die Mobile SDKs bieten native Integration für iOS, Android und Flutter.

SDK Übersicht

Platform Sprache Min Version Status
iOS Swift 5.9+ iOS 15.0+ 📋 Spec
Android Kotlin API 26+ 📋 Spec
Flutter Dart 3.0+ Flutter 3.16+ 📋 Spec

Architektur

Mobile SDK
├── Core (shared)
│   ├── ConsentManager
│   ├── ConsentStorage (Keychain/SharedPrefs)
│   ├── API Client
│   └── Device Fingerprint
├── UI Components
│   ├── ConsentBanner
│   ├── ConsentSettings
│   └── ConsentGate
└── Platform-specific
    ├── iOS: SwiftUI + UIKit
    ├── Android: Jetpack Compose + XML
    └── Flutter: Widgets

Feature-Parität mit Web SDK

Feature iOS Android Flutter
Consent Storage Keychain SharedPrefs SecureStorage
Banner UI SwiftUI Compose Widget
Settings Modal
Category Control
Vendor Control
Offline Support
Google Consent Mode
ATT Integration - ✓ (iOS)
TCF 2.2

Installation

iOS (Swift Package Manager)

// Package.swift
dependencies: [
    .package(url: "https://github.com/breakpilot/consent-sdk-ios.git", from: "1.0.0")
]

Android (Gradle)

// build.gradle.kts
dependencies {
    implementation("com.breakpilot:consent-sdk:1.0.0")
}

Flutter

# pubspec.yaml
dependencies:
  breakpilot_consent_sdk: ^1.0.0

Quick Start

iOS

import BreakpilotConsentSDK

// AppDelegate.swift
ConsentManager.shared.configure(
    apiEndpoint: "https://consent.example.com/api/v1",
    siteId: "site_abc123"
)

// ContentView.swift (SwiftUI)
struct ContentView: View {
    @EnvironmentObject var consent: ConsentManager

    var body: some View {
        VStack {
            if consent.hasConsent(.analytics) {
                AnalyticsView()
            }
        }
        .consentBanner()
    }
}

Android

import com.breakpilot.consent.ConsentManager
import com.breakpilot.consent.ui.ConsentBanner

// Application.kt
class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        ConsentManager.configure(
            context = this,
            apiEndpoint = "https://consent.example.com/api/v1",
            siteId = "site_abc123"
        )
    }
}

// MainActivity.kt (Jetpack Compose)
@Composable
fun MainScreen() {
    val consent = ConsentManager.current

    if (consent.hasConsent(ConsentCategory.ANALYTICS)) {
        AnalyticsComponent()
    }

    ConsentBanner()
}

Flutter

import 'package:breakpilot_consent_sdk/consent_sdk.dart';

// main.dart
void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await ConsentManager.configure(
    apiEndpoint: 'https://consent.example.com/api/v1',
    siteId: 'site_abc123',
  );

  runApp(MyApp());
}

// Widget
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ConsentProvider(
      child: MaterialApp(
        home: Scaffold(
          body: Column(
            children: [
              ConsentGate(
                category: ConsentCategory.analytics,
                child: AnalyticsWidget(),
                placeholder: Text('Analytics nicht aktiviert'),
              ),
            ],
          ),
          bottomSheet: ConsentBanner(),
        ),
      ),
    );
  }
}

Dateien

Siehe die einzelnen Platform-SDKs: