Flutter_facebook_login: Version 3.0.0 doesn't work on iOS

Created on 11 Dec 2019  Â·  13Comments  Â·  Source: roughike/flutter_facebook_login

Created clean project add version 3.0.0
added all configurations in plist.info
try to run and getting:

Running pod install...
Running Xcode build...
Xcode build done.                                            7.0s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Undefined symbols for architecture arm64:
      "_vDSP_mmul", referenced from:
          mat1::dense(float*, float*, float*, int, int, int) in FBSDKAddressInferencer.o
          mat1::dense(float*, float*, float*, int, int, int) in FBSDKEventInferencer.o
      "_vDSP_vclip", referenced from:
          mat1::relu(float*, int) in FBSDKAddressInferencer.o
          mat1::relu(float*, int) in FBSDKEventInferencer.o
      "_vDSP_dotpr", referenced from:
          mat1::conv1D(float*, float*, int, int, int, int, int) in FBSDKAddressInferencer.o
          mat1::conv1D(float*, float*, int, int, int, int, int) in FBSDKEventInferencer.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the precompiled application for the device.

Update: version 2.0.1 works.
Update 2: i can run version 2 0.1 but nothing happens when i call loginWithPermmisions()
Update 3: By adding Accelerate.framwork to FBSDKCoreKit i solve the issue but i still cant build release

Most helpful comment

Finally, I solved the issue by below steps:

  1. Run: flutter clean
  2. Go to ios folder, delete Podfile, Podfile.lock, Pods folder, Runner.xcworkspace
  3. Run project again

All 13 comments

I get same issue with "architecture arm64". Anyone solved it?

I managed to get the Facebook sdk working on ios (not the plugin) by just downloading the framework from Facebook sdk github and adding it to the project. If you do that remember to add the accelerate.framework.
Now you can create a plugin and expose the api you need. I need only login so its quite easy.
I still haven't tested the creation of local plugin but i know for sure the project compiled and run with now issues when i added the framework manually

Hi,
I just start a clean project (come from react native :) ) and I have no issue compiling (debug) on IOS 13 simulator.
I just changed the default ios target from 8 to 9 (on project and target), did a flutter clean, flutter pub get (again in case) and that's all.
I'll try on a real device.

Hi @rphlmr

What is your Flutter version?

@phuc-koli :

[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G95, locale fr-FR)

You should check in your xcode project.
You need to provide Other linker flags :

$(inherited)
-ObjC
etc ..

image

https://developers.facebook.com/docs/facebook-login/ios/ ==> part 4b (in case you didn't have this in your project build settings)

Hi @rphlmr

I tried your instruction but now I'm getting this error: module 'FBSDKCoreKit' not found
Do you have any idea?

Finally, I solved the issue by below steps:

  1. Run: flutter clean
  2. Go to ios folder, delete Podfile, Podfile.lock, Pods folder, Runner.xcworkspace
  3. Run project again

Yeah !
That's the point. Sometimes cocoapods is crazy and we need to clean everything 😅

Hi~
I am not sure but I solved this issue in this way.

Cause:
Current flutter_facebook_login(3.0.0) is using Facebook SDK v5.11.0.
But Facebook SDK v5.11.0. has small issue.
Screen Shot 2019-12-26 at 17 45 15
(https://github.com/facebook/facebook-ios-sdk/releases)

Solution:
As Facebook page says "manually add the Accelerate framework to their targets under the the "Frameworks, Libraries, and Embedded Content" section of the "General" tab."
Screen Shot 2019-12-26 at 17 52 16

I hope you can solve this issue.
Have a nice day~ and Happy new year~~^^/

Hi~
I am not sure but I solved this issue in this way.

Cause:
Current flutter_facebook_login(3.0.0) is using Facebook SDK v5.11.0.
But Facebook SDK v5.11.0. has small issue.
Screen Shot 2019-12-26 at 17 45 15
(https://github.com/facebook/facebook-ios-sdk/releases)

Solution:
As Facebook page says "manually add the Accelerate framework to their targets under the the "Frameworks, Libraries, and Embedded Content" section of the "General" tab."
Screen Shot 2019-12-26 at 17 52 16

I hope you can solve this issue.
Have a nice day~ and Happy new year~~^^/

this doesnt solve the problem because once you hit flutter build ios it will run pod install and all your changes will be lost.
i got to your solution before but it doesnt work eventually

I've been around the houses and back with this and have eventually got this to work with the 5.13.1 Podfiles on iOS (by work, I mean compiling, linking and installing onto a real iPhone - I don't actually use Facebook but it's required as part of the firebase-ui login package :-D )

Firstly, do the clean mentioned in https://github.com/roughike/flutter_facebook_login/issues/222#issuecomment-568164311

After building I got errors regarding:

fatal error: module 'FBSDKCoreKit' not found
    @import FBSDKCoreKit;

I then added the modular headers override into the ios/podspec file mentioned here https://github.com/roughike/flutter_facebook_login/issues/214#issuecomment-565166295

The start of the podfile looks like this:

platform :ios, '12.0'

use_modular_headers!

I did note that linking errors, about missing Facebook libraries, were due to a spurious entry in the Frameworks section. Attached is a picture of my current config.

image

Finally, I solved the issue by below steps:

  1. Run: flutter clean
  2. Go to ios folder, delete Podfile, Podfile.lock, Pods folder, Runner.xcworkspace
  3. Run project again

and then run this command open ios/Runner.xcworkspace from the root of the project

thank you very much that worked I have been trying to build the archive since a month,thanks a tonne,

My workaround was to update post_install method in Podfile like this:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'FBSDKCoreKit'
        frameworks_build_phase = target.build_phases.find { |build_phase| build_phase.to_s == 'FrameworksBuildPhase' }
        frameworks_group = target.project.groups.find { |group| group.display_name == 'Frameworks' }
        framework_ref = frameworks_group.new_file("Accelerate.framework")
        frameworks_build_phase.add_file_reference(framework_ref)
    end

    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

to remove the manual step of adding framework and allow for automated builds to succeed. Of course it's only temporary until this issue is addressed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mis0025033 picture mis0025033  Â·  8Comments

kotlincodes picture kotlincodes  Â·  8Comments

brianschardt picture brianschardt  Â·  7Comments

happyharis picture happyharis  Â·  8Comments

fayaz07 picture fayaz07  Â·  4Comments