Forum Xamarin Xamarin.Forms

Problem with Facebook Components Namespaces


I'm Having some problems when using Facebook components for iOS.

I use Facebook SDK (by The Outercurve Foundation) in Forms for some cross platform Facebook activities.

To get the access token from Facebook I was using Xamarin.Auth.
However It does not provide a good native facebook experience for login and after some research I saw this topic and decided to try it.

This way I decided to use just for get the access token the Facebook Android SDK (by Xamarin) for Android, and the Facebook iOS SDK (by Xamarin) for iOS

In Android all good, it worked very good since the Facebook Android SDK namespace was Xamarin.Facebook.

But for iOS Im having a lot of problems since the Facebook iOS SDK namespace is just Facebook.

Due this fact Im getting some conflicts with Facebook SDK (by The Outercurve Foundation) which also have the namespace Facebook.

I tried to use some extern alias to solve the conflicts between the assemblies namespace name but whithout success.

Someone could give some help?

How can I solve this problem??


  • Please Im really stuck in this...
    I can't continue my project...
    Anyone can give a hint?

  • Someone from Xamarin support or from the Facebook iOS SDK component developing team could help?
    Is possible to disponibilize a version with the different namespace?
    For what I could see in the comments and reviews in the component page, I'm not the only one having this problem!
    It would be very helpful!

  • @IsraelSoto I saw you posted on Facebook iOS SDK component Page and is from Xamarin Team.

    Looking in the other reviews in page I saw some guys with the same problem.

    "joaquin grech rates this with 1

    Serious bugs:

    1) It's on the Facebook namespace instead of Xamarin.Facebook which conflicts with all your other facebook stuff. (The android version is on Xamarin.Facebook, not sure why the iOS didn't follow the proper pattern). 2) Since ios9 it gets a IsCancelled on every try to login. Even after following instructions it won't log in. 3) It's not updated to the latest fb sdk.
    Posted on: October 7th / Version: 4.5.1"

    Any chance you can help?

    Thank you very much.

  • Amar_BaitAmar_Bait DZMember ✭✭✭✭✭
    edited November 2015


    Don't use Outercurve, try using another library (check Nuget repo)

  • Hello @Nad Thanks for the help.

    For some reason when I import one of them the other assembly lose the reference.
    And even if I switch the name of the file, I can only use one of them... the another one's classes dont appears.

    As I commented I tried extern alias, but seems like Xamarin Studio don't support it or I'm doing it wrong manually.

    I use Outercurve because of the easy cross platform code. I can use the same code for iOS and Android in Xamarin Forms this way.

  • Hello,

    I'm still struggling on this.
    If anyone end up with this issue and find a solution let me know, please! :)

    @JoaquinGrech I saw you posted on iOS Facebook component page about this issue too.
    Did you find a solution?
    Thanks very much :smiley:

  • IsraelSotoIsraelSoto MXXamarin Team Xamurai

    @RaphaelChiorlinRanieri sorry for not giving a reply sooner, I was out for a couple of weeks.

    Unfortunately, we cannot change the Facebook namespace for now but you can do this. We have available to the world the Facebook iOS binding located at monotouch-bindings repo:

    Change the namespace and build the binding to generate the dll.

    I will remove this branch soon and will merge it into master, so, please, keep an eye on master branch if you cannot find the facebookios-update branch.

  • Hello again @IsraelSoto ,

    I was doing some improvements in my app and remembered this issue.

    Last time I used your component I had to build the project and generate other dll with a different name than Facebook .

    This was on version 4.5.1 .

    Unfortunately due this I'm not getting the updates.

    I would like to know if you guys think about change the namespace so it can match the android version or if you will also push the last version in Bitbucket (I saw the last version released there, is 4.10 right? and in Nugget has 4.18)

  • @MigueldeIcaza , @AlexSoto , @IsraelSoto

    Hey guys did you progress on Facebook.iOS ?

    Any plans of changing the namespace?

  • AlexSotoAlexSoto MXXamarin Team Xamurai

    Hello @RaphaelChiorlinRanieri, The facebook namespace is not changing anytime soon since it would break a lot of customers already using this API. That being said you can find the Facebook component source here if you really need this change you can definitely build your own version out of it.

  • Tks @AlexSoto !

    That was what I was looking for :smile:

Sign In or Register to comment.