Cannot run flutter project, facebook problem - facebook

I have a flutter project with facebook login but when I try to run it I got some errors.... I already update pods and Flutter plugins and also clean the project. Everything is good. These are the errors I got.
Launching lib/main.dart on iPhone Xʀ in debug mode...
Running pod install... 33,2s
Running Xcode build...
Xcode build done. 12,9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/eulalia/Downloads/flutter-login-screen-firebase-auth-facebook-login-master/ios/Pods/FB
SDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m:138:42: error: no known
class method for selector 'fbErrorWithDomain:code:message:underlyingError:'
NSError *wrappedError = [NSError fbErrorWithDomain:FBSDKLoginErrorDomain
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/eulalia/Downloads/flutter-login-screen-firebase-auth-facebook-login-master/ios/Pods/FB
SDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m:148:31: error: no known
class method for selector
'extractPermissionsFromResponse:grantedPermissions:declinedPermissions:'
[FBSDKInternalUtility extractPermissionsFromResponse:permissionResult
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/eulalia/Downloads/flutter-login-screen-firebase-auth-facebook-login-master/ios/Pods/FB
SDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m:151:67: error: no visible
#interface for 'FBSDKAccessToken' declares the selector
'initWithTokenString:permissions:declinedPermissions:appID:userID:expirationDate:refreshDate:
dataAccessExpirationDate:'
FBSDKAccessToken *accessToken = [[FBSDKAccessToken alloc]
initWithTokenString:tokenString
~~~~~~~~~~~~~~~~~~~~~~~~
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/eulalia/Downloads/flutter-login-screen-firebase-auth-facebook-login-master/ios/Pods/FB
SDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m:215:44: error: no known
class method for selector 'fbErrorWithDomain:code:message:'
NSError *unknownError = [NSError fbErrorWithDomain:FBSDKLoginErrorDomain
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
/Users/eulalia/Downloads/flutter-login-screen-firebase-auth-facebook-login-master/ios/Pods/FB
SDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.m:209:25: error: no known class
method for selector 'currentAccessTokenIsActive'
if ([FBSDKAccessToken currentAccessTokenIsActive]) {
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/eulalia/Downloads/flutter-login-screen-firebase-auth-facebook-login-master/ios/Pods/FB
SDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.m:315:47: error: no known class
method for selector 'currentAccessTokenIsActive'
BOOL accessTokenIsValid = [FBSDKAccessToken currentAccessTokenIsActive];
^~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
If someone can help me with this I appreciate..
Regards,
Thanks a lot.

Want to put your podfile and pubspec in here?
I've got the same problem now. My guess (based on how other things have gone with Firebase+flutter) is that you have conflicting Firebase packages/versions

Related

iOS Simulator build error after upgrade Flutter 3.7.0

Today, I upgrade my project version from 3.3.x to 3.7.0. and it has error below.
Launching lib/main.dart on iPhone 14 Pro in debug mode...
Running pod install... 13.0s
Running Xcode build...
Xcode build done. 131.3s
Failed to build iOS app
Error (Xcode): ../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/material_with_modal_page_route.dart:4:1: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro.
How can I solve this problem... can anyone help?
modal_bottom_sheet: ^3.0.0-pre
Error: 'ModalBottomSheetRoute' is imported from both
'package:flutter/src/material/bottom_sheet.dart' and
'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
Hide all conflicting classes that you don't use, so that the Compiler
only sees the class it should use.
import 'package:flutter/src/material/bottom_sheet.dart' hide ModalBottomSheetRoute
import 'package:modal_bottom_sheet/src/bottom_sheet_route.dart';
or
Use "as" keyword to provide the name to the class you want to use.
Then use this name as a prefix of the class.
import 'package:flutter/src/material/bottom_sheet.dart' as otherName;
import 'package:modal_bottom_sheet/src/bottom_sheet_route.dart';

failed iOS build from Codemagic

Im trying to build a iOS in codemagic.io and after try it, it return the error below
== Building for iOS ==
> flutter build ios --debug --no-codesign
Running "flutter pub get" in clone... 1,350ms
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.testing.correiosNovo for device (ios)...
Upgrading Info.plist
Running pod install... 1,296ms
Running Xcode build...
Xcode build done. 14.6s
Build failed :|
Failed to build for iOS
Failed to build iOS app
Error output from Xcode build:
↳
2022-09-23 23:19:22.708 xcodebuild[1114:7432] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-09-23 23:19:22.709 xcodebuild[1114:7432] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcodes output:
↳
Writing result bundle at path:
../programs/flutter_3_3_2/.pub-cache/hosted/pub.dartlang.org/win32-2.3.6/lib/src/structs.g.dart:661:31: Error: Member not found: 'UnicodeChar'.
int get UnicodeChar => Char.UnicodeChar;
^^^^^^^^^^^
../programs/flutter_3_3_2/.pub-cache/hosted/pub.dartlang.org/win32-2.3.6/lib/src/structs.g.dart:662:38: Error: Setter not found: 'UnicodeChar'.
set UnicodeChar(int value) => Char.UnicodeChar = value;
^^^^^^^^^^^
../programs/flutter_3_3_2/.pub-cache/hosted/pub.dartlang.org/win32-2.3.6/lib/src/structs.g.dart:664:29: Error: Member not found: 'AsciiChar'.
int get AsciiChar => Char.AsciiChar;
^^^^^^^^^
../programs/flutter_3_3_2/.pub-cache/hosted/pub.dartlang.org/win32-2.3.6/lib/src/structs.g.dart:665:36: Error: Setter not found: 'AsciiChar'.
set AsciiChar(int value) => Char.AsciiChar = value;
^^^^^^^^^
Failed to package /Users/builder/clone.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
Encountered error while building for device.
I do the process to build iOS in my computer
flutter build ios
after it, upload to Codemagic and start the process to generate app to iOS, but it return the error above, I try to find any solution to it, and can't, it returns the error every time I build it.
I think you use old Flutter version on your local machine and latest 3.3.2 when you building on Codemagic and some packages are not compatible with this version.
At Codemagic you can specify any Flutter version in build settings to reproduce your local environment and this should fix the error.
Alternative solution will be to upgrade your packages. Check this thread for more information https://github.com/flutter/flutter/issues/103565

GeneratedPluginRegistrant.m:12:9: fatal error: module 'device_info' not found when build flutter app

When I start build the flutter 2.10.x project in macOS 12.4, shows error like this:
"af": 5 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>
This will generate a JSON format file containing all messages that
need to be translated.
Launching lib/main_pro.dart on iPod touch (7th generation) in debug mode...
Running Xcode build...
Xcode build done. 7.1s
Failed to build iOS app
Error output from Xcode build:
↳
2022-06-29 22:18:45.452 xcodebuild[24800:2158061] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-29 22:18:45.452 xcodebuild[24800:2158061] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-29 22:18:45.573 xcodebuild[24800:2158072] apply_selection_policy_once: avoid use of removable GPUs (via com.apple.dt.xcodebuild:GPUSelectionPolicy->avoidRemovable)
** BUILD FAILED **
Xcode's output:
↳
/Users/xiaoqiangjiang/source/reddwarf/frontend/cruise-open/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'device_info' not found
#import device_info;
~~~~~~~^~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Could not build the application for the simulator.
Error launching application on iPod touch (7th generation).
anyone facing the similiar problem? what should I do to fixed this problem?

Flutter, trying to add shared_preference error

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
lib/main.dart:1
Xcode build done. 7.9s
Failed to build iOS app
Error output from Xcode build:
↳
objc[67482]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1faf938f0) and ?? (0x118b582b8). One of the two will be used. Which one is undefined.
objc[67482]: Class AMSupportURLSession is implemented in both ?? (0x1faf93940) and ?? (0x118b58308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
/Users/rafy/Desktop/change_to_evo/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'shared_preferences' not found
#import shared_preferences;
add 'shared_preferences: ^0.5.12+4' to your pubspec. and run following commands to use it.
flutter clean
flutter packages get

Flutter using cloud_firestore giving errors on IOS Simulator

It's my first time trying to use Firebase cloud_firestore together with Flutter. It works fine with the Android emulator. But I am getting the following errors, when trying to Run on the IOS Sim:
/Users/carsoncarbery/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ios/Classes/CloudFirestorePlugin.m:50:22: error: no visible #interface for 'FIRQuery' declares the selector 'queryWhereField:arrayContains:'
query = [query queryWhereField:fieldName arrayContains:value];
~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/carsoncarbery/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ios/Classes/CloudFirestorePlugin.m:221:29: error: no known class method for selector 'fieldValueForArrayUnion:'
return [FIRFieldValue fieldValueForArrayUnion:[self readValue]];
^~~~~~~~~~~~~~~~~~~~~~~
/Users/carsoncarbery/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ios/Classes/CloudFirestorePlugin.m:224:29: error: no known class method for selector 'fieldValueForArrayRemove:'
return [FIRFieldValue fieldValueForArrayRemove:[self readValue]];
^~~~~~~~~~~~~~~~~~~~~~~~
8 warnings and 3 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone 6s.
I've also tried running the Runner directly from Xcode and get the same three build errors. Unfortunately I haven't been able to find an answer to this, so am posting the question. Any help would be gratefully received.
Thanks
I just experienced the same thing.
Following these guys
https://github.com/flutter/flutter/issues/24395
I did
pod update Firebase/Firestore
And it worked for me.
I'm using latest version of cloud firestore: 0.9.0+1
I can compile from both Xcode and VS Code.
There are a lot of warning messages when running on simulator. some of them look pretty nasty, but it works.