Search Unity

Facebook login after set Screen.orientation

Discussion in 'iOS and tvOS' started by gregory-tkach, Aug 13, 2017.

  1. gregory-tkach

    gregory-tkach

    Joined:
    May 20, 2013
    Posts:
    10
    Hi,

    For our cross platform game we are using the Facebook SDK.

    The mobile version of the game runs in portrait, and the tablet version of the game in landscape.

    We will detect the device runtime and after that we'll setup the right orientation (portrait or landscape) for the player.

    But after this, we will call this line:
    Screen.orientation = ScreenOrientation.Portrait;

    or:
    Screen.orientation = ScreenOrientation.Landscape;

    But Facebook login is not working anymore after this. It is related to showing UIWebView.

    Is there anyone over here that has the same issue, and solved it already somehow? Or anyone knows how to deal with it?

    P.S. We tried to setup only landscape for tablet and only portrait in XCode, but it seems Unity is ignoring this settings and will let rotate the app anyway.
     
  2. voporak5

    voporak5

    Joined:
    Jul 1, 2013
    Posts:
    31
    Having the same issue, can't figure out why.

    Edit* I posted a bug report in Unity but it would seem that this doesn't solely affect FB login but really any iOS Native Popup stuff. We are signing up our users with some Apple services that I can't disclose as well as a plugin that opens up the iOS Native Window for another thing and those will not work either.
     
    Last edited: Aug 31, 2017
  3. sidebolt

    sidebolt

    Joined:
    Oct 3, 2016
    Posts:
    10