6.6 C
New York
Friday, April 11, 2025

Firebase in a Flutter iOS utility


I’ve prior to now already construct flutter apps with firebase however in the meanwhile I’m operating in some issues that stop me from even constructing something firebase-related for iOS.

The machine is operating:

  • macOS Sequoia 1.54
  • Flutter 3.29.2 • channel secure
  • XCode Model 16.3
  • iOS 18.4 Simulator

This specific construct is operating on a digital machine however I attempted the identical course of on an apple silicon.

$ flutter physician
Physician abstract (to see all particulars, run flutter physician -v):
[✓] Flutter (Channel secure, 3.29.2, on macOS 15.4 24E248 darwin-x64, locale en-US)
[!] Android toolchain - develop for Android gadgets (Android SDK model 35.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 16.3)
[✗] Chrome - develop for the online (Can not discover Chrome executable at /Functions/Google Chrome.app/Contents/MacOS/Google Chrome)
[✓] Android Studio (model 2024.3)
[✓] Related system (2 accessible)
[✓] Community sources

I’m creating the straightforward flutter commonplace app and it’s operating with none issues:

flutter create fb_test
cd fb_test
flutter run

After including the firebase package deal as a dependency and with out altering the code:

flutter pub add firebase_core
cd ios
pod setup
cd ..
flutter run

the run fails as firebase requires iOS 13.0. According to the documentation I’m altering:

Podfile:

platform :ios, '13.0'

ios/Flutter/AppFrameworkInfo.plist:

  MinimumOSVersion
  13.0

After these adjustments I run

pod repo replace
pod set up --repo-update

and set in XCode the configuration to Pods-Runner.profile.xcconfig

Working the app once more leads to the next error messages:

Launching lib/essential.dart on iPhone 16 Plus in debug mode...
Working Xcode construct...                                          
 └─Compiling, linking and signing...                      2,657ms
Xcode construct executed.                                            9.7s
Didn't construct iOS app
Error output from Xcode construct:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing consequence bundle at path:
        /var/folders/5n/nb08vdn15sn4yq0m22p2rfp00000gn/T/flutter_tools.m6NMQZ/flutter_ios_build_temp_dir5PbqqT/temporary_xcresult_bundle

    ld: warning: object file (/Customers/oliver/fb_test/construct/ios/Debug-iphonesimulator/firebase_core/firebase_core.framework/firebase_core[x86_64][4](firebase_core-dummy.o)) was constructed for newer 'iOS-simulator' model (13.0) than being linked (12.0)
    ld: warning: object file (/Customers/oliver/fb_test/construct/ios/Debug-iphonesimulator/firebase_core/firebase_core.framework/firebase_core[x86_64][5](FLTFirebaseCorePlugin.o)) was constructed for newer 'iOS-simulator' model (13.0) than being linked (12.0)
    ld: warning: object file (/Customers/oliver/fb_test/construct/ios/Debug-iphonesimulator/firebase_core/firebase_core.framework/firebase_core[x86_64][6](FLTFirebasePlugin.o)) was constructed for newer 'iOS-simulator' model (13.0) than being linked (12.0)
    ld: warning: object file (/Customers/oliver/fb_test/construct/ios/Debug-iphonesimulator/firebase_core/firebase_core.framework/firebase_core[x86_64][7](FLTFirebasePluginRegistry.o)) was constructed for newer 'iOS-simulator' model (13.0) than being linked (12.0)
    ld: warning: object file (/Customers/oliver/fb_test/construct/ios/Debug-iphonesimulator/firebase_core/firebase_core.framework/firebase_core[x86_64][8](messages.g.o)) was constructed for newer 'iOS-simulator' model (13.0) than being linked (12.0)
    ld: warning: object file (/Customers/oliver/fb_test/construct/ios/Debug-iphonesimulator/Pods_Runner.framework/Pods_Runner[x86_64][3](Pods-Runner-dummy.o)) was constructed for newer 'iOS-simulator' model (13.0) than being linked (12.0)
    Unhandled exception:
    Null test operator used on a null worth
    #0      Context.embedFlutterFrameworks (file:///usr/native/Caskroom/flutter/3.29.2/flutter/packages/flutter_tools/bin/xcode_backend.dart:220:68)
    #1      Context.run (file:///usr/native/Caskroom/flutter/3.29.2/flutter/packages/flutter_tools/bin/xcode_backend.dart:58:9)
    #2      essential (file:///usr/native/Caskroom/flutter/3.29.2/flutter/packages/flutter_tools/bin/xcode_backend.dart:17:5)
    #3      _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:313:33)
    #4      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:194:12)
    Command PhaseScriptExecution failed with a nonzero exit code
    observe: Run script construct section 'Skinny Binary' will likely be run throughout each construct as a result of the choice to run the script section "Primarily based on dependency evaluation" is unchecked. (in goal 'Runner' from venture 'Runner')
    observe: Run script construct section 'Run Script' will likely be run throughout each construct as a result of the choice to run the script section "Primarily based on dependency evaluation" is unchecked. (in goal 'Runner' from venture 'Runner')

I might admire any assist or tips about what to alter.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles