flutter_jailbreak_guard 0.1.0 copy "flutter_jailbreak_guard: ^0.1.0" to clipboard
flutter_jailbreak_guard: ^0.1.0 copied to clipboard

Detects jailbroken iOS devices and rooted Android devices. Supports Swift Package Manager and CocoaPods.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_jailbreak_guard/flutter_jailbreak_guard.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _status = 'Checking';

  @override
  void initState() {
    super.initState();
    _checkJailbreak();
  }

  Future<void> _checkJailbreak() async {
    String status;
    try {
      status = await FlutterJailbreakGuard.isJailbroken ? 'Jailbroken' : 'Not jailbroken';
    } on PlatformException catch (e) {
      status = 'Failed: ${e.code}';
    }

    if (!mounted) return;

    setState(() {
      _status = status;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('flutter_jailbreak_guard')),
        body: Center(child: Text('Status: $_status')),
      ),
    );
  }
}
0
likes
0
points
91
downloads

Publisher

verified publisherteddyyeung.is-a.dev

Weekly Downloads

Detects jailbroken iOS devices and rooted Android devices. Supports Swift Package Manager and CocoaPods.

Repository (GitHub)
View/report issues

Topics

#security #jailbreak #root-detection #swift-package-manager

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_jailbreak_guard

Packages that implement flutter_jailbreak_guard