7

Here's the link of the documentation for the issue I'm facing: https://firebase.google.com/docs/app-check/flutter/debug-provider?hl=en&authuser=0

I'm following the steps to integrate AppCheck to my Flutter/Firebase application. I've already registered DeviceCheck and AppAttest in the Firebase console and now I want to test if everything works correctly during testing/debug. For this, I have to take additional steps which can be found in the link I've shared above.

I've already completed steps 1 & 2 (Apple platforms) and for #3, I'm not very familiar with XCode but this is what I've tried: Using Visual Studio Code, I've right clicked the 'ios' folder and then clicked on 'Open with XCode'. In XCode, I've simply clicked on 'Product' and then 'Run'. I'm not sure if this was the right thing to do. The documentation says to open ios/Runner.xcworkspace and then run your project but I'm not sure if I've done this step correctly because once the app opens in the simulator, I'm receiving this message:

AppCheck failed: 'The operation couldn't be completed. (com.apple.devicecheck.error error 1.)

If everything works correctly, I should instead receive a token like the example below:

[Firebase/AppCheck][I-FAA001001] Firebase App Check Debug Token:
123a4567-b89c-12d3-e456-789012345678

And here's the code in the main.dart file:

import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_app_check/firebase_app_check.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  await FirebaseAppCheck.instance.activate(
    androidProvider: AndroidProvider.debug,
  );
  runApp(App());
}
themag
  • 174
  • 1
  • 12
  • Hi @themag have checked this documentation https://firebase.flutter.dev/docs/app-check/debug-provider ? If not you need some configuration for apple. – MerdanDev Jan 12 '23 at 13:15
  • Hello my friend, you can let me know if I'm wrong but I believe that page is an older archived version on how to Use App Check with the debug provider, the one I linked (https://firebase.google.com/docs/app-check/flutter/debug-provider) is the most recently updated version. – themag Jan 12 '23 at 22:47
  • check this answer this may help. https://stackoverflow.com/questions/70809709/how-do-i-overcome-appcheck-failed-on-ios-15-2-firebase-v8-11-0 – Mashood .H Jan 17 '23 at 01:10
  • 1
    I've already followed/finished those steps (registered key on apple developer account) and the issue is still there. – themag Jan 17 '23 at 13:41

0 Answers0