Skip to content

Commit fbdf861

Browse files
committed
certain features are not available on tvOS
1 parent 3691b7e commit fbdf861

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

testing/sample_framework/src/ios/ios_app_framework.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,9 @@ - (BOOL)application:(UIApplication*)application
329329
g_text_view = [[UITextView alloc] initWithFrame:g_view_controller.view.bounds];
330330

331331
g_text_view.accessibilityIdentifier = @"Logger";
332+
#if TARGET_OS_IOS
332333
g_text_view.editable = NO;
334+
#endif //TARGET_OS_IOS
333335
g_text_view.scrollEnabled = YES;
334336
g_text_view.userInteractionEnabled = YES;
335337
g_text_view.font = [UIFont fontWithName:@"Courier" size:10];

testing/test_framework/src/ios/ios_firebase_test_framework.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ static bool SendHttpRequest(const char* method, const char* url,
9898
}
9999

100100
bool FirebaseTest::OpenUrlInBrowser(const char* url) {
101+
#if TARGET_OS_IOS
101102
if (strncmp(url, "data:", strlen("data:")) == 0) {
102103
// Workaround because Safari can't load data: URLs by default.
103104
// Instead, copy the URL to the clipboard and ask the user to paste it into Safari.
@@ -148,6 +149,9 @@ static bool SendHttpRequest(const char* method, const char* url,
148149
dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
149150
return succeeded ? true : false;
150151
}
152+
#else // Non-iOS Apple platforms (eg:tvOS)
153+
return false;
154+
#endif //TARGET_OS_IOS
151155
}
152156

153157
bool FirebaseTest::SetPersistentString(const char* key, const char* value) {

0 commit comments

Comments
 (0)