'UserAgent.h' file not found flutter firebase iOS - ios

I am working on flutter application with firebase, when i use the firebaseAuth plugin application give the following error
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 131.2s
Failed to build iOS app
Error output from Xcode build:
↳
2020-02-28 16:05:06.832 XCBBuildService[68423:382033] Failed to remove:
/Users/apple/Library/Developer/Xcode/DerivedData/Runner- hfqwisipukhnqobtbsvjhfltdbgs/Build/Intermediates.noindex/XCBuildData/1be627f6c729f1a388e5fec96804d392-manifest.xcbuild: unlink(/Users/apple/Library/Developer/Xcode/DerivedData/Runner-hfqwisipukhnqobtbsvjhfltdbgs/Build/Intermediates.noindex/XCBuildData/1be627f6c729f1a388e5fec96804d392-manifest.xcbuild): No such file or directory (2)
2020-02-28 16:05:07.269 XCBBuildService[68423:382033] Failed to remove: /Users/apple/Library/Developer/Xcode/DerivedData/Runner-hfqwisipukhnqobtbsvjhfltdbgs/Build/Intermediates.noindex/XCBuildData/1be627f6c729f1a388e5fec96804d392-desc.xcbuild: unlink(/Users/apple/Library/Developer/Xcode/DerivedData/Runner-hfqwisipukhnqobtbsvjhfltdbgs/Build/Intermediates.noindex/XCBuildData/1be627f6c729f1a388e5fec96804d392-desc.xcbuild): No such file or directory (2)
* BUILD FAILED *
Xcode's output:
↳
/Users/apple/Library/Android/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.15.5+2/darwin/Classes/FLTFirebaseAuthPlugin.m:7:9: fatal error: 'UserAgent.h' file not found
#import "UserAgent.h"
^~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
i am using these libraries-
firebase_auth: ^0.15.5+2
firebase_storage: ^3.1.1
cloud_firestore: ^0.13.4
anyone have idea how to solve this error?, i have already done following things
flutter clean
deleted podfile.lock
deleted pods folder
pod deintegrate
pod repo update
pod install
but don't help me to solve this error

We were struggling with the same error. It seems it's a firebase_auth dependency bug (firebase_core v0.4.4+2).
First, run flutter clean, then change your dependencies on pubspec.yaml to
dependencies:
firebase_auth: 0.15.4
dependency_overrides:
firebase_core: 0.4.4
Hope it helps!

Related

Eas build for ios: he `RNMlKit` pod failed to validate due to 1 error

When I run the project on an ios simulator everything seems to bo fine.
I want to build the project and generate an app to upload it on testflight using the command: eas build -p ios
When I run the command I get an error (from logs):
Using Expo modules
Auto-linking React Native modules for target XXXXX: RNCAsyncStorage, RNCCheckbox, RNCClipboard, RNCMaskedView, RNDateTimePicker, RNGestureHandler, RNLocalize, RNMlKit, RNReanimated, RNScreens, RNVectorIcons, react-native-camera, react-native-pager-view, react-native-safe-area-context, and react-native-webview
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for DoubleConversion from ../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
[Codegen] Found FBReactNativeSpec
Fetching podspec for RCT-Folly from ../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec
[!] The RNMlKit pod failed to validate due to 1 error:
- ERROR | attributes: Missing required attribute summary.
- WARN | source: The version should be included in the Git tag.
pod exited with non-zero code: 1
I have tried removing package-lock.json file but can not seem to find any solution about this.

XCode13.4 run old flutter project failed to build iOS app

I just upgraded to Xcode 13.4 in macOS Monterey 12.4, running a flutter project got this error:
Unhandled exception:
ProcessException: No such file or directory
Command: /Users/taoli-blue/fvm/versions/2.10.3/bin/flutter assemble --no-version-check --output=/Users/taoli-blue/Library/Developer/Xcode/DerivedData/Runner-fjqqglukmistzcemtudzjrvxvsvk/Build/Products/Debug-dev-iphoneos/ -dTargetPlatform=ios -dTargetFile=/Users/taoli-blue/taoli/flutter_taoli_app/lib/main_dev.dart -dBuildMode=debug -dIosArchs=arm64 -dSdkRoot=/Applications/Xcode13.3/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk -dSplitDebugInfo= -dTreeShakeIcons=false -dTrackWidgetCreation=true -dDartObfuscation= -dEnableBitcode= --ExtraGenSnapshotOptions= --DartDefines= --ExtraFrontEndOptions= -dCodesignIdentity=21E6A88880ED32FA5B3525F5134308364DAB1434 debug_ios_bundle_flutter_assets
_ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:487:7)
_runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:632:18)
Process.runSync (dart:io-patch/process_patch.dart:68:12)
Context.runSync (file:///Users/taoli-blue/fvm/versions/2.10.3/packages/flutter_tools/bin/xcode_backend.dart:92:42)
Context.buildApp (file:///Users/taoli-blue/fvm/versions/2.10.3/packages/flutter_tools/bin/xcode_backend.dart:448:34)
Context.run (file:///Users/taoli-blue/fvm/versions/2.10.3/packages/flutter_tools/bin/xcode_backend.dart:51:9)
main (file:///Users/taoli-blue/fvm/versions/2.10.3/packages/flutter_tools/bin/xcode_backend.dart:17:5)
delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
Command PhaseScriptExecution failed with a nonzero exit code
And I totally don't know how to resolve this error.
Any one could help me?

Unable to run Flutter App on iOS when using Firebase. Android seems to be working but iOS throws multiple errors

So I followed the instructions on adding Firebase to Flutter and although things work on Android, I am unable to build on the ios emulator. I get some xcode errors. I have tried deleting both ios/Pods directory and the Podfile.lock file, then using the flutter clean command. But I still get these errors. I have tried doing research but nothing I have found has helped. Here are the errors i get when I try to test on the iOS emulator.
Thank you in advance for the help.
Errors From Flutter Run:
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 130.2s
Failed to build iOS app
Error output from Xcode build:
↳
2021-03-26 18:45:52.768 xcodebuild[15465:79135] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-17705/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
Details: (null) deviceType from 00008101-001945163408001E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f963f7d3f80>
Method: -platform
Thread: <NSThread: 0x7f963b713cc0>{number = 3, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
2021-03-26 18:45:52.947 xcodebuild[15465:79134] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-17705/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
Details: (null) deviceType from 00008101-001945163408001E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f963f7d3f80>
Method: -platform
Thread: <NSThread: 0x7f963f725360>{number = 7, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
Xcode's output:
↳
While building module 'firebase_core' imported from /Users/dev/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-1.0.1/ios/Classes/FLTFirebaseAuthPlugin.m:5:
In file included from <module-includes>:1:
In file included from /Users/dev/AndroidStudioProjects/aul/ios/Pods/Target Support Files/firebase_core/firebase_core-umbrella.h:13:
In file included from /Users/dev/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.0.2/ios/Classes/FLTFirebaseCorePlugin.h:11:
/Users/dev/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.0.2/ios/Classes/FLTFirebasePlugin.h:9:9: error: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin': '/Users/dev/AndroidStudioProjects/aul/ios/Pods/Headers/Public/FirebaseCore/FirebaseCore.h' [-Werror,-Wnon-modular-include-in-framework-module]
#import <FirebaseCore/FirebaseCore.h>
^
1 error generated.
/Users/dev/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-1.0.1/ios/Classes/FLTFirebaseAuthPlugin.m:5:9: fatal error: could not build module 'firebase_core'
#import <firebase_core/FLTFirebasePluginRegistry.h>
~~~~~~~^
2 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Errors from Xcode:
/Users/dev/AndroidStudioProjects/aul/build/ios/Debug-iphonesimulator/firebase_core/firebase_core.framework/Headers/FLTFirebasePlugin.h:9:9: Include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin': '/Users/dev/AndroidStudioProjects/aul/ios/Pods/Headers/Public/FirebaseCore/FirebaseCore.h'
/Users/dev/AndroidStudioProjects/aul/build/ios/Debug-iphonesimulator/firebase_auth/firebase_auth.framework/Headers/FLTFirebaseAuthPlugin.h:12:9: Could not build module 'firebase_core'
/Users/dev/AndroidStudioProjects/aul/ios/Runner/GeneratedPluginRegistrant.m:8:9: Could not build module 'firebase_auth'
In my iOS/Runner/AppDelegate.swift file I was initiating Firebase there, which is not needed. I also added the the firebase pod plugins to my Podfile. Once I removed these things it started to work.

Has anyone seen this compile error with stripe_payments on iOS flutter?

I am running a flutter app on iOS with stripe_payment ^0.1.0.
The demo run with only stripe_payment package builds and runs fine.
It doesn't compile when I have multiple packages in my pubspec.
Tried clearing the pub cache and run flutter packages get, tried deleting pod file and run pod install again
Error:
/Users/../flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-0.1.0/ios/Classes/STPAddSourceViewController.m:42:32: error: property 'managedAccountCurrency' not found on object of type 'STPAddSourceViewController *' cardParams.currency = self.managedAccountCurrency; ^ 6 warnings and 1 error generated. Could not build the application for the simulator. Error launching application on iPhone Xs. Exited (sigterm)
My pubspec has the following dependencies:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_local_notifications:
cupertino_icons: ^0.1.2
firebase_auth: ^0.14.0
firebase_core: ^0.4.0+8
cloud_firestore: ^0.12.9
google_sign_in: ^4.0.6
firebase_messaging: ^5.1.2
url_launcher: ^5.0.1
flutter_auth_buttons: ^0.3.1
geolocator: ^5.1.1
stripe_payment: ^0.1.0
cloud_functions: ^0.4.1
Does anyone know where this error is coming from?
I think it a conflict with one of the other packages, but not sure how to find that
I just updated the plugin to support the latest Stripe plugins on Android and iOS, which should have fixed your issue:
https://pub.dev/packages/stripe_payment/versions/0.1.1
I've changed my Podfile with:
platform :ios, '10.0'
And after flutter clean I can compile my project.

Flutter.io (dart) app fails to launch on iOS simulator

I have up-to-date OSX Sierra, up-to-date XCode with applicable plugins, and an iPhone 6 simulator open and ready.
I have followed all the directions at https://flutter.io/setup-macos/#ios-setup.
When I "flutter run" from Terminal, the app fails to install on the simulator with message:
Could not build the application for the simulator.
Error launching application on iPhone 6.
Here is what Terminal said...
Launching lib/main.dart on iPhone 6 in debug mode...
Running pod install... 8.5s
Running Xcode build... 24.1s
Failed to build iOS app
Error output from Xcode build:
↳
2017-11-22 13:13:38.122 xcodebuild[47659:25935636] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-13510/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/Runtime/PBXTargetBuildContext.mm:757
Details: unexpected successful exit code from cancelled command <C0009:'CpResource app.flx':P12>
Object: <PBXTargetBuildContext: 0x7fccf1235200>
Method: -createCommandInvocationRecordFromInvocation:
Thread: <NSThread: 0x7fccf2847ea0>{number = 16, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
The following build commands failed:
CopyPlistFile /Users/deborah/Desktop/chq_emulator/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist Runner/GoogleService-Info.plist
(1 failure)
Xcode's output:
↳
Build settings from command line:
ARCHS = x86_64
BUILD_DIR = /Users/deborah/Desktop/chq_emulator/build/ios
ONLY_ACTIVE_ARCH = YES
SDKROOT = iphonesimulator11.1
=== CLEAN TARGET leveldb-library OF PROJECT Pods WITH CONFIGURATION Debug ===
... list of subsidiary infomation ...
Could not build the application for the simulator.
Error launching application on iPhone 6.
Anyone else out there with advice for how to get Flutter going on the simulator?
Try running your Xcode first and make sure that it's up-to-date. Open the {flutter_project}/ios build on Xcode then try to run the iOS project on the Simulator from there.
If you're still having issues, you can run this command on your Terminal. This should set the path for the active developer directory.
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

Resources