aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Core/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'Firebase/Core/third_party')
-rw-r--r--Firebase/Core/third_party/FIRAppEnvironmentUtil.h14
-rw-r--r--Firebase/Core/third_party/FIRAppEnvironmentUtil.m22
2 files changed, 3 insertions, 33 deletions
diff --git a/Firebase/Core/third_party/FIRAppEnvironmentUtil.h b/Firebase/Core/third_party/FIRAppEnvironmentUtil.h
index 7ae9827..09ee504 100644
--- a/Firebase/Core/third_party/FIRAppEnvironmentUtil.h
+++ b/Firebase/Core/third_party/FIRAppEnvironmentUtil.h
@@ -16,12 +16,6 @@
#import <Foundation/Foundation.h>
-#if TARGET_OS_IOS
-#import <UIKit/UIKit.h>
-#elif TARGET_OS_OSX
-#import <AppKit/AppKit.h>
-#endif
-
@interface FIRAppEnvironmentUtil : NSObject
/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator,
@@ -46,12 +40,4 @@
/// Indicates whether it is running inside an extension or an app.
+ (BOOL)isAppExtension;
-#if TARGET_OS_IOS
-/// Returns the [UIApplication sharedApplication] if it is running on an app, not an extension.
-+ (UIApplication *)sharedApplication;
-#elif TARGET_OS_OSX
-/// Returns the [NSApplication sharedApplication].
-+ (NSApplication *)sharedApplication;
-#endif
-
@end
diff --git a/Firebase/Core/third_party/FIRAppEnvironmentUtil.m b/Firebase/Core/third_party/FIRAppEnvironmentUtil.m
index fe4e23d..859c04e 100644
--- a/Firebase/Core/third_party/FIRAppEnvironmentUtil.m
+++ b/Firebase/Core/third_party/FIRAppEnvironmentUtil.m
@@ -13,6 +13,9 @@
// limitations under the License.
#import <Foundation/Foundation.h>
+#if TARGET_OS_IOS || TARGET_OS_TV
+#import <UIKit/UIKit.h>
+#endif
#import "FIRAppEnvironmentUtil.h"
@@ -221,25 +224,6 @@ static BOOL isAppEncrypted() {
#endif
}
-#if TARGET_OS_IOS
-+ (UIApplication *)sharedApplication {
- if ([FIRAppEnvironmentUtil isAppExtension]) {
- return nil;
- }
- id sharedApplication = nil;
- Class uiApplicationClass = NSClassFromString(@"UIApplication");
- if (uiApplicationClass &&
- [uiApplicationClass respondsToSelector:(NSSelectorFromString(@"sharedApplication"))]) {
- sharedApplication = [uiApplicationClass sharedApplication];
- }
- return sharedApplication;
-}
-#elif TARGET_OS_OSX
-+ (NSApplication *)sharedApplication {
- return [NSApplication sharedApplication];
-}
-#endif
-
#pragma mark - Helper methods
+ (BOOL)hasSCInfoFolder {