Search Issue Tracker

By Design

Votes

0

Found in

5.6.0b7

Issue ID

879964

Regression

Yes

Build fails because PlayerSettings.applicationIdentifier is not set via script

Mobile

-

*Repo steps for command line:*
1.1 Download the attached project
1.2 Delete all but "Assets" folder in the project (This is a requirement for user for some other reasons)
1.3 Run command line (Unity.exe -projectPath "C:\dev\UnityProjects\Unity56\UnitySdk_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakeAndroidBuild -logFile "C:\dev\UnityProjects\Unity56\buildAndroidOutput.txt" <- make sure that project is in correct folder and cmd is in correct unity folder)
Result: <Build FAILS>

1.1 Open project in the same Unity version
1.2 Set the identifier to empty string
1.3 Save the project (File->save project (important)) Note:it's not actually set to "com.PlayFab.PlayFabTest" either
1.4 Run command line (as described before)
Result: <Build SUCCEEDS>

*Repo steps in Editor:*
2.1 Delete all but "Assets" folder in the project (This is a requirement for user for some other reasons)
2.2 Open project in editor (You can examine the Android identifier settings,just don't change anything or save)
2.3 Build on Android from PlayFab/Testing/AndroidTestBuild
Result: <Build FAILS>

2.1 Set the identifier to empty string
2.2 Save the project (File->save project (important)) Note:it's not actually set to "com.PlayFab.PlayFabTest" either
2.3 Build on Android from PlayFab/Testing/AndroidTestBuild
Result: <Build SUCCEEDS>

Reproducible: .5.6.0b6, 5.6.0b10, 2017.1.0a2
Not reproducible: 5.5.2p2, 5.6.0b5

Build fails because BundleIdentifier is not set before building, but it should be set in PlayFabPackage.cs line 123

By Design: the way application identifier works has been changed in Unity 5.6. Now it has to be set separately for every platform that uses it and you should use PlayerSettings.SetApplicationIdentifier(BuildTargetGroup, string) to do that.
from 5.6 there are basically two options:
- change the platform before setting the id by launching unity with '-buildTarget <name>' batch mode argument.
- use PlayerSettings.SetApplicationIdentifier to set the bundle id

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.