question

brendan avatar image
brendan asked

LoginWithIOSDeviceID failing

wtsoi
started a topic on Sun, 12 April 2015 at 11:23 AM

Hello,

I am having trouble figuring out what is wrong with logging in.

I haven't changed the login code, but it has stopped working on my iPhone,

The call back calls OnPlayFabError, with the error code "Success" when i try logging in on the phone, but its working fine from the PC.

The only recent changes I've done recently that might be related is:

Updated the project to use Unity5,

Updated iPhone to IOS 8,3

Updated mac, to Yosemite: Xcode 6.3

Many Thanks in advance,

Will

Login code:

 public void Start(){

  LoginWithIOSDeviceIDRequest request = new LoginWithIOSDeviceIDRequest();

  request.TitleId = PlayFabData.TitleId;

  request.DeviceId = SystemInfo.deviceUniqueIdentifier;

  request.CreateAccount = true;

  log.Add ("trying to login!");

  PlayFabClientAPI.LoginWithIOSDeviceID(request,OnIOSDeviceIDLoginResult,OnPlayFabError);

 }



 public void OnIOSDeviceIDLoginResult(LoginResult result ) {

  Debug.Log ("Loged in sucuessful with session ticket of: " + result.SessionTicket);

  log.Add ("Loged in sucuessful with session ticket of: " + result.SessionTicket);

 }



 void OnPlayFabError(PlayFabError error) {

  Debug.Log ("Got an error: " + error.Error);

  log.Add ("error: " + error.Error);

 }
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Best Answer
Brendan Vanous said on Sun, 12 April 2015 at 2:43 PM

With the same project, I take it? Since this is device specific, I'd have to recommend debugging this using Apple's info on this error. Here's one such thread: https://discussions.apple.com/thread/5079571?start=0&tstart=0


4 Comments
wtsoi said on Sun, 12 April 2015 at 11:41 AM

This is the related console log from Xcode when linked to the phone.

Loading /private/var/mobile/Containers/Bundle/Application/D22133A3-A542-4993-B85B-6127B78D3806/FruitSlingRescue.app/Data/Managed/UnityEngine.UI.dll into Unity Child Domain

Completed reload, in 0.105 seconds

The operation couldn?t be completed. (NSURLErrorDomain error -1012.)

UnityEngine.Debug:Internal_Log(Int32, String, Object)

UnityEngine.Debug:LogError(Object)

PlayFab.Internal.<MakeRequest>c__Iterator6:MoveNext()

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)

Got an error: Success

Details:

Message

HttpStats

UnityEngine.Debug:Internal_Log(Int32, String, Object)

UnityEngine.Debug:Log(Object)

PFLogin:OnPlayFabError(PlayFabError)

PlayFab.<LoginWithIOSDeviceID>c_AnonStoreyD:<>m_3(String, String)

PlayFab.Internal.<MakeRequest>c__Iterator6:MoveNext()

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)


Brendan Vanous said on Sun, 12 April 2015 at 2:25 PM

From researching the NSURLErrorDomain 1012 error online, the common causes of this appear to be issues with the device or the network connection. Do you have another device you can use for testing, to see if this reproduces on multiple devices or just this one?

Brendan


wtsoi said on Sun, 12 April 2015 at 2:31 PM

Not another mobile device, just my PC and Macbook.

It works fine on both of those.

Will


Brendan Vanous said on Sun, 12 April 2015 at 2:43 PM

With the same project, I take it? Since this is device specific, I'd have to recommend debugging this using Apple's info on this error. Here's one such thread: https://discussions.apple.com/thread/5079571?start=0&tstart=0

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.