-0.4 C
New York
Saturday, February 22, 2025

ios – Why Do I Preserve Getting the Following Error When Working my Flutter app in Visible Code?


I’m attempting to create an app that requires a database to retailer person login info in addition to precise info the app goes to drag from. If it’s worthwhile to know the performance of the app let me know, nevertheless the database I’m trying to hook up with is Firebase. I hold getting the next error in my debug console after operating primary.dart:

Error: The pod “Firebase/CoreOnly” required by the plugin
“cloud_firestore” requires a better minimal macOS deployment model
than the plugin’s reported minimal model.
To construct, take away the plugin “cloud_firestore”, or contact the
plugin’s builders for help.
Error: Error operating pod set up

Right here is the related code in my iOS/Podfile:

platform :ios, '12.0'
 platform :macos, '11.0'


ENV['COCOAPODS_DISABLE_STATS'] = 'true'

venture 'Runner', {
  'Debug' => :debug,
  'Profile' => :launch,
  'Launch' => :launch,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.be part of('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  until File.exist?(generated_xcode_build_settings_path)
    elevate "#{generated_xcode_build_settings_path} should exist. In the event you're operating pod set up manually, make certain flutter pub get is executed first"
  finish

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT=(.*)/)
    return matches[1].strip if matches
  finish
  elevate "FLUTTER_ROOT not present in #{generated_xcode_build_settings_path}. Strive deleting Generated.xcconfig, then run flutter pub get"
finish

require File.expand_path(File.be part of('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

goal 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  goal 'RunnerTests' do
    inherit! :search_paths
  finish
finish

post_install do |installer|
  installer.pods_project.targets.every do |goal|
    
    subsequent if goal.title.start_with?("Pods")
    
    goal.build_configurations.every do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'     
      config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '11.0'
    finish
  finish
finish

And right here is my primary.dart file:

import 'bundle:flutter/materials.dart';
import 'screens/home_screen.dart'; // Guarantee this file exists
import 'providers/app_clock.dart';
import 'bundle:firebase_core/firebase_core.dart';

void primary() {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  print("Firebase initialized efficiently!"); // Debug message
    // Instantiate and begin the clock BEFORE calling runApp.
  closing appClock = AppClock(onNewDay: () {
    // Logic to deal with a brand new day.
    print("A brand new day has began! Replace streaks, and so on.");
  });
  appClock.begin();
  
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget construct(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Kratos App',
      theme: ThemeData(
        primarySwatch: Colours.blue,
      ),
      dwelling: HomeScreen(), // Navigates to the preliminary dwelling display
    );
  }
}

Please let me know if there’s anymore code you will want to see to assist me, and thanks upfront.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles