aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Core/third_party/FIRAppEnvironmentUtil.m
diff options
context:
space:
mode:
authorGravatar Ryan Wilson <wilsonryan@google.com>2018-01-02 18:43:04 -0500
committerGravatar GitHub <noreply@github.com>2018-01-02 18:43:04 -0500
commit7ab9c3c498a3cadb7a1d1a706642e10d228d4690 (patch)
tree89e2258be469a5dd12e24a62ccda2f348db1ff5a /Firebase/Core/third_party/FIRAppEnvironmentUtil.m
parentc4dcfaa49eca773a0ccc2ffa5514fb8ef8eaa4fb (diff)
Remove FIRAppEnvironmentUtil's sharedApplication (#603)
* Deprecate FIRAppEnvironmentUtil sharedApplication * Remove sharedApplication private API. This also allows us to remove an AppKit dependency. * Disable autolink when building FirebaseCore (#606) This prevents the dependencies of FirebaseCore's dependencies from bleeding into its interface. The proximate benefit of avoiding this is that FirebaseCore no longer ends up depending on ColorSync.framework which became a top-level system framework in 10.13. This makes it possible to build against the resulting FirebaseCore.framework on macOS 10.12 using Xcode 9 (with the macOS 10.13 SDK).
Diffstat (limited to 'Firebase/Core/third_party/FIRAppEnvironmentUtil.m')
-rw-r--r--Firebase/Core/third_party/FIRAppEnvironmentUtil.m22
1 files changed, 3 insertions, 19 deletions
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 {