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 /
avatar image
0
Question by psykojello2 · Oct 16, 2015 at 07:19 PM · ioscrashfacebooksdk

Facebook LoginWithReadPermissions crashes on iOS9

I've been trying to solve this for 2 days with no luck, thought I'd just ask.

I'm using the Facebook 7.2.0 (also crashed with 7.1.0) sdk for unity. It works on most iPhone 4 and 5s with iOS 8 and below. But on two iPhone 6 with iOS9, it instantly crashes the app when I try to log in.

I've cleaned out the Facebook plugin and reinstalled the package. Here's the code I run.

 string[] scope = new string[]{"public_profilie","email", "user_friends"};
 FB.LogInWithReadPermissions(scope, OnFBLogin); 

 void OnFBLogin (IResult result)
 {
     if(FB.IsLoggedIn)
     {
         //do stuff
     }
 }

Works in the editor, works on Android, works on most iPhones. But on iOS9, it crashes without even bringing up the facebook login dialog.

Any help would be appreciated.

Comment
Add comment · Show 3
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 psykojello2 · Oct 17, 2015 at 04:38 AM 0
Share

This page : https://developers.facebook.com/docs/ios/ios9 mentions that I should use 7.0.3-ios9-preview . Is this still valid or does 7.2.0 contains the necessary changes?

avatar image swiese · Oct 19, 2015 at 06:22 PM 0
Share

Do you have a stack trace of the crash?

avatar image psykojello2 swiese · Oct 20, 2015 at 12:14 AM 0
Share

Hi, it took me all weekend but I was able to get it to work. I'll post an answer and close out the question.

1 Reply

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

Answer by psykojello2 · Oct 20, 2015 at 12:25 AM

It took me a while to figure this out as I hit a lot of false-negatives along the way.

Long story short, when I updated the Facebook SDK, I forgot to delete the info.plist file. As a result, I ended up with an info.plist and info 1.plist file which contained the necessary ios9 related changes.

Solution : when upgrading the SDK, delete all the old Facebook files in the SDK documentation AND Assets\Plugins\iOS\info.plist

On a side note, I still run into a bug with the callback for FB.Init() where it takes a few frames for FB.IsLoggedIn to be set to true. Details here: https://developers.facebook.com/bugs/1703008003264968 I work around it by polling for FB.IsLoggedIn

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 zzzzzz789 · Oct 30, 2015 at 09:32 PM 0
Share

Also, on the code you shared, you should use ILoginResult ins$$anonymous$$d of IResult for your callback. See: docs

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

33 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

Related Questions

My android game crashes 0 Answers

Unity ads Crashe on mobile 2 Answers

Why the feed stories of my facebook game attempt to open the canvas instead of launch the Android/iOS mobile application? 1 Answer

Facebook - Is it possible to logout other active sessions? 0 Answers

What might make an iOS game crash out without any Xcode error messages? 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