Skip to content

Commit

Permalink
tvOS Storage iTest now properly uses Caches directory (#601)
Browse files Browse the repository at this point in the history
* automated testapps check for UNITY_TVOS

* add TVOS_UNITY detection to XcodeCapabilities.cs

* disable storage tests

* revert changes to dynamic links

* first draft

* testapps uses a platform config to test supplied target list

* JSON formatting

* python script formatting

* removed new line

* add storage test again
  • Loading branch information
DellaBitta authored Jan 25, 2023
1 parent e867f90 commit ffc921e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 5 additions & 1 deletion storage/testapp/Assets/Firebase/Sample/Storage/UIHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ public class UIHandler : MonoBehaviour {
// the required dependencies to use Firebase, and if not,
// add them if possible.
protected virtual void Start() {
persistentDataPath = Application.persistentDataPath;
#if (UNITY_TVOS)
persistentDataPath = Application.temporaryCachePath;
#else
persistentDataPath = Application.persistentDataPath;
#endif
FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task => {
dependencyStatus = task.Result;
if (dependencyStatus == DependencyStatus.Available) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,12 @@ protected override void Start() {
TestUploadBytesSmallFileThenUpdateMetadata,
TestUploadStreamLargeFile,
TestUploadStreamSmallFile,
#if !(UNITY_TVOS)
// Tests which require file access don't work on tvOS.
TestUploadFromFileLargeFile,
TestUploadFromFileSmallFile,
#endif
TestUploadFromNonExistantFile,
TestUploadBytesWithCancelation,
TestUploadStreamWithCancelation,
#if !(UNITY_TVOS)
// Tests which require file access don't work on tvOS.
TestUploadFromFileWithCancelation,
#endif
TestUploadSmallFileGetDownloadUrl,
TestGetDownloadUrlNonExistantFile,
TestUploadSmallFileGetMetadata,
Expand All @@ -143,12 +137,9 @@ protected override void Start() {
TestUploadSmallFileAndDownloadUsingStreamCallback,
TestUploadLargeFileAndDownloadUsingStreamCallback,
TestUploadLargeFileAndDownloadUsingStreamCallbackWithCancelation,
#if !(UNITY_TVOS)
// Tests which require file access don't work on tvOS.
TestUploadSmallFileAndDownloadToFile,
TestUploadLargeFileAndDownloadToFile,
TestUploadLargeFileAndDownloadToFileWithCancelation,
#endif
};

testRunner = AutomatedTestRunner.CreateTestRunner(
Expand Down

0 comments on commit ffc921e

Please sign in to comment.