Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by Markram · Dec 09, 2016 at 05:07 PM · ioscrashfacebooklogin

Facebook SDK Login crashes on iOS 10

Hi,

I am currently working on implementing facebook login, and I am using Unity 5.5.0f3 and Facebook SDK 7.9.0.

I can login to facebook and retrieve an AccessToken on Android without any problems. But when I am trying to login to facebook on iOS10 the application usually crashes whenever I confirm the login on the facebook site.

I managed to get it working on 1 iOS10 device, when the user could choose to login manually using his email and password, and now he can pretty much use the login without his application crashes.

In the log I get the output:

 'fb_mobile_login_native_app_switch_dialog_result'. Must be between 1 and 40 characters, and must be contain only alphanumerics, _, - or spaces, starting with alphanumeric or _.```

It seems to me, that the Facebook SDK needs to be updated according to the new changes in iOS10. Does anyone have a solution to this problem? I've checked various posts on similar problems, but without any luck for a solution.

Related questions and discussions:

  • http://stackoverflow.com/questions/40424887/cant-login-using-facebook-login-on-ios-10

  • https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/212

  • https://jira.appcelerator.org/browse/TIMOB-23890

  • http://stackoverflow.com/questions/39609908/facebook-login-crash-in-ios-10-when-build-is-installed-from-testflight-on-bitcod

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image voporak5 · Dec 09, 2016 at 08:48 PM 0
Share

We are seeing the same thing and I'm losing my $$anonymous$$d I'm submitting a bug report to Unity and Facebook

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by benzsuankularb · Dec 10, 2016 at 02:06 PM

I thought someone must got this before today. After running around Google. Here is a solution for me

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image scottstephan · Dec 11, 2016 at 07:45 PM 0
Share

This worked for me! Thanks a ton- Now on to all the other iOS headaches :(

avatar image voporak5 · Dec 12, 2016 at 03:21 PM 0
Share

Oh my gosh, thank-you so much

avatar image Markram · Dec 13, 2016 at 11:09 AM 0
Share

Great! It works :) Thanks a lot :)

avatar image
1

Answer by scottstephan · Dec 10, 2016 at 04:21 AM

I'm not alone! Same here, but on iOS 9 + 10. Been trying to debug it for days.

Basically, a user clicks my MP button. In the background, it uses the PrompForLogin function. It goes to the Facebook website, asks to give the App approval and then if the user clicks "Okay", it loads for about a second and then hard crashes.

According to the XCode debugger and my debug statements, it looks like it never makes it back to the app as the step immediately after granting FB authorization never runs.

I have to leads: One is a log error I've been seeing: "-canOpenURL: failed for URL: "fbauth2:/" - error: "(null)" , but, according to FB, this can be ignored if your Info.plist is properly configured (WHich it should be by the FB plugin)

The other is the XCode debugger keeps giving me a nil error. I thought it was unrelated until I saw this post on StackOverflow: http://stackoverflow.com/questions/40424887/cant-login-using-facebook-login-on-ios-10

It seems like maybe the returned token has a nil value and needs to be polled for a few frames? Dunno. Let us know what you find out!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Markram · Dec 10, 2016 at 10:25 AM 0
Share

Yes, I think it might be related to the link you also shared, where the accepted answer is:

It turns out that the access token can be nil immediately after. You have to wait for a notification before it can be used. I think this is a new requirement.

 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(checkLogIn) name: FBSD$$anonymous$$AccessTokenDidChangeNotification object:nil];

Since this is a pretty critical bug for apps using FacebookSD$$anonymous$$, I hope we can expect an update for the FacebookSD$$anonymous$$ soon.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

100 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Facebook SDK Login in using FB app rather than Safari browser 1 Answer

MarshalDirectiveException: Cannot marshal type 'System.Collections.Generic.IEnumerable`1' 4 Answers

iOS game crashes before launch because of too many image assets? 1 Answer

my ios app often crash on lauch,without unity logo show 0 Answers

Unity and Vuforia app crashes on iOS after reloading scene with ARCamera 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges