I'm working on a game developed with Unity using Playfab and Photon. At that time, Playfab generated a photon app id and chat app id for the game.
(title: 890F, photon app id : 8ac0cca4-7166-4989-9b5a-c646286185e8)
The game was recently finished and versions uploaded to the play store. I began working on a second version of the same game. I created a new title id (now deleted) and followed the updated Playfab documentation to create my own, new photon app id. At first I just changed the title id and photon app id in a copy of my original game. Later I created a new unity project installing photon and playfab sdk and setting it up with the new photon app id created by me and the new playfab title id. I exported the original game and imported into the new unity project and changed the title id and photon app id where necessary. However, I began to get custom authentication errors and the app would log into Playfab but not photon. I decided to start again from scratch , deleted the project and deleted the new title. However when I opened the original game project(title : 890F) the game logged into playfab but disconnected from photon, with the console showing: PhotonApplicationNotFound. This is happening to all versions of the original game including the one on the playstore. It is only logging into Playfab and unable to log into Photon, though this version uses the Playfab generated photon app id. Please help.
public string playfabTitleID = "890F"; public string playfabID; public string applicationId = "8ac0cca4-7166-4989-9b5a-c646286185e8"; public string _gameVersion = "1"; void Start() { PlayFabSettings.TitleId = "890F"; } //**called from different script if not connected to photon public IEnumerator LoginToPlayfab() { yield return new WaitForSeconds(3); if (Application.platform == RuntimePlatform.Android) { print("Android"); LoginWithAndroidDeviceIDRequest req = new LoginWithAndroidDeviceIDRequest(); req.AndroidDeviceId = SystemInfo.deviceUniqueIdentifier; req.AndroidDevice = SystemInfo.deviceModel; req.TitleId = PlayFabSettings.TitleId; req.CreateAccount = true; PlayFabClientAPI.LoginWithAndroidDeviceID(req, PlayfabLoginSuccess, OnPlayFabError); } else if (Application.platform == RuntimePlatform.IPhonePlayer) { string playerIosUniqueId = GetUniqueIdentifier(); LoginWithCustomIDRequest req = new LoginWithCustomIDRequest(); req.CreateAccount = true; req.CustomId = playerIosUniqueId; req.TitleId = PlayFabSettings.TitleId; PlayFabClientAPI.LoginWithCustomID(req, PlayfabLoginSuccess, OnPlayFabError); } else { //**CURRENTLY ONLY TESTED WITH THIS // print("unityEditor"); LoginWithEmailAddressRequest r = new LoginWithEmailAddressRequest(); r.Email = "something@something.com"; r.Password = "something"; r.TitleId = PlayFabSettings.TitleId; PlayFabClientAPI.LoginWithEmailAddress(r, PlayfabLoginSuccess, OnPlayFabError); } } public static string GetUniqueIdentifier() { //some code } void PlayfabLoginSuccess(LoginResult res) { message.text = "logged into playfab requesting photon token"; Main.Instance.playfabID = res.PlayFabId; GetPhotonAuthenticationTokenRequest phReq = new GetPhotonAuthenticationTokenRequest(); phReq.PhotonApplicationId = "8ac0cca4-7166-4989-9b5a-c646286185e8"; //Main.Instance.applicationId; PlayFabClientAPI.GetPhotonAuthenticationToken(phReq, PhotonAuthenticcationSuccess, OnPlayFabAuthError); } void PhotonAuthenticcationSuccess(GetPhotonAuthenticationTokenResult res) { message.text = "sucess getting authen"; AuthenticationValues customAuth = new AuthenticationValues(); customAuth.AuthType = CustomAuthenticationType.Custom; customAuth.AddAuthParameter("username", Main.Instance.playfabID); // expected by PlayFab custom auth service customAuth.AddAuthParameter("token", res.PhotonCustomAuthenticationToken); // expected by PlayFab custom auth service PhotonNetwork.AuthValues = customAuth; Connect(); } public void Connect() { PhotonNetwork.ConnectUsingSettings(_gameVersion); },
Working on a Unity app using playfab and photon. Playfab generated photon app id and chat app id but now all versions of the game( including version on the playstore ) have stopped working. They log into Playfab but disconnect from photon. Error message : Photon application not associated with title.
Title is 890F and photon app id( generated by payfab ) is 8ac0cca4-7166-4989-9b5a-c646286185e8