From 5c59342e6e19989c012877362af529b3d5d0abeb Mon Sep 17 00:00:00 2001 From: Mathew Huusko V Date: Fri, 2 Jun 2017 18:42:17 +0100 Subject: macOS (#38) * Example/Core: create macOS app/tests target * Example/Core: Core_Example/Tests -> Core_Example/Tests_iOS * Example/Core: macOS building/tests passing * Example/Database: separate iOS/macOS targets * BuildFrameworks: macOS * .travis.yml, test.sh: AllUnitTests -> AllUnitTests_iOS * test.sh: add AllUnitTests_macOS * Example/Storage: Example/Tests->_iOS * Example/Storage: macOS * test.sh: try to prevent double error 65 * test.sh: build before test * Example/Auth|Messaging: -> _iOS * Example/Auth: macOS build * Example/Auth: macOS passing * Example/Firebase: pod de/re-integrate; fix static DerivedData references; copy phase for OCMock * Example/Firebase: manually copied OCMock, Products Dir vs. Frameworks * Example/Firebase: copied OCMock, prevent header removal * Example/Storage: integration tests sdk fix * Example/Auth: macOS exclude FIRAuthAppCredentialManager; cleanup * Firebase/Core: remove nullability annotation * Firebase/Core|Database: correct TARGET_X usage for correctness and anticipation of OS_WATCH|TV branches * build.swift: style fix * Firebase/Core: FIRLogger: fix macOS intermittent va_list error --- .../Core/App/Base.lproj/LaunchScreen.storyboard | 27 - Example/Core/App/Base.lproj/Main.storyboard | 27 - Example/Core/App/Core-Info.plist | 49 -- Example/Core/App/FIRAppDelegate.h | 23 - Example/Core/App/FIRAppDelegate.m | 52 -- Example/Core/App/FIRViewController.h | 21 - Example/Core/App/FIRViewController.m | 35 -- .../App/iOS/Base.lproj/LaunchScreen.storyboard | 27 + Example/Core/App/iOS/Base.lproj/Main.storyboard | 27 + Example/Core/App/iOS/Core-Info.plist | 49 ++ Example/Core/App/iOS/FIRAppDelegate.h | 23 + Example/Core/App/iOS/FIRAppDelegate.m | 52 ++ Example/Core/App/iOS/FIRViewController.h | 21 + Example/Core/App/iOS/FIRViewController.m | 35 ++ Example/Core/App/iOS/main.m | 23 + Example/Core/App/macOS/Base.lproj/Main.storyboard | 693 +++++++++++++++++++++ Example/Core/App/macOS/Core-Info.plist | 32 + Example/Core/App/macOS/FIRAppDelegate.h | 23 + Example/Core/App/macOS/FIRAppDelegate.m | 35 ++ Example/Core/App/macOS/FIRViewController.h | 23 + Example/Core/App/macOS/FIRViewController.m | 35 ++ Example/Core/App/macOS/main.m | 21 + Example/Core/App/main.m | 23 - 23 files changed, 1119 insertions(+), 257 deletions(-) delete mode 100644 Example/Core/App/Base.lproj/LaunchScreen.storyboard delete mode 100644 Example/Core/App/Base.lproj/Main.storyboard delete mode 100644 Example/Core/App/Core-Info.plist delete mode 100644 Example/Core/App/FIRAppDelegate.h delete mode 100644 Example/Core/App/FIRAppDelegate.m delete mode 100644 Example/Core/App/FIRViewController.h delete mode 100644 Example/Core/App/FIRViewController.m create mode 100644 Example/Core/App/iOS/Base.lproj/LaunchScreen.storyboard create mode 100644 Example/Core/App/iOS/Base.lproj/Main.storyboard create mode 100644 Example/Core/App/iOS/Core-Info.plist create mode 100644 Example/Core/App/iOS/FIRAppDelegate.h create mode 100644 Example/Core/App/iOS/FIRAppDelegate.m create mode 100644 Example/Core/App/iOS/FIRViewController.h create mode 100644 Example/Core/App/iOS/FIRViewController.m create mode 100644 Example/Core/App/iOS/main.m create mode 100644 Example/Core/App/macOS/Base.lproj/Main.storyboard create mode 100644 Example/Core/App/macOS/Core-Info.plist create mode 100644 Example/Core/App/macOS/FIRAppDelegate.h create mode 100644 Example/Core/App/macOS/FIRAppDelegate.m create mode 100644 Example/Core/App/macOS/FIRViewController.h create mode 100644 Example/Core/App/macOS/FIRViewController.m create mode 100644 Example/Core/App/macOS/main.m delete mode 100644 Example/Core/App/main.m (limited to 'Example/Core') diff --git a/Example/Core/App/Base.lproj/LaunchScreen.storyboard b/Example/Core/App/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 66a7681..0000000 --- a/Example/Core/App/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Core/App/Base.lproj/Main.storyboard b/Example/Core/App/Base.lproj/Main.storyboard deleted file mode 100644 index d164a23..0000000 --- a/Example/Core/App/Base.lproj/Main.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Core/App/Core-Info.plist b/Example/Core/App/Core-Info.plist deleted file mode 100644 index 7576a0d..0000000 --- a/Example/Core/App/Core-Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Example/Core/App/FIRAppDelegate.h b/Example/Core/App/FIRAppDelegate.h deleted file mode 100644 index e3fba8f..0000000 --- a/Example/Core/App/FIRAppDelegate.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@import UIKit; - -@interface FIRAppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/Example/Core/App/FIRAppDelegate.m b/Example/Core/App/FIRAppDelegate.m deleted file mode 100644 index 0ecfdea..0000000 --- a/Example/Core/App/FIRAppDelegate.m +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2017 Google -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#import "FIRAppDelegate.h" - -@implementation FIRAppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - // Override point for customization after application launch. - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end diff --git a/Example/Core/App/FIRViewController.h b/Example/Core/App/FIRViewController.h deleted file mode 100644 index 64b4b74..0000000 --- a/Example/Core/App/FIRViewController.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@import UIKit; - -@interface FIRViewController : UIViewController - -@end diff --git a/Example/Core/App/FIRViewController.m b/Example/Core/App/FIRViewController.m deleted file mode 100644 index 901accf..0000000 --- a/Example/Core/App/FIRViewController.m +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2017 Google -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#import "FIRViewController.h" - -@interface FIRViewController () - -@end - -@implementation FIRViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/Example/Core/App/iOS/Base.lproj/LaunchScreen.storyboard b/Example/Core/App/iOS/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..66a7681 --- /dev/null +++ b/Example/Core/App/iOS/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Core/App/iOS/Base.lproj/Main.storyboard b/Example/Core/App/iOS/Base.lproj/Main.storyboard new file mode 100644 index 0000000..d164a23 --- /dev/null +++ b/Example/Core/App/iOS/Base.lproj/Main.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Core/App/iOS/Core-Info.plist b/Example/Core/App/iOS/Core-Info.plist new file mode 100644 index 0000000..7576a0d --- /dev/null +++ b/Example/Core/App/iOS/Core-Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Example/Core/App/iOS/FIRAppDelegate.h b/Example/Core/App/iOS/FIRAppDelegate.h new file mode 100644 index 0000000..e3fba8f --- /dev/null +++ b/Example/Core/App/iOS/FIRAppDelegate.h @@ -0,0 +1,23 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@import UIKit; + +@interface FIRAppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/Example/Core/App/iOS/FIRAppDelegate.m b/Example/Core/App/iOS/FIRAppDelegate.m new file mode 100644 index 0000000..0ecfdea --- /dev/null +++ b/Example/Core/App/iOS/FIRAppDelegate.m @@ -0,0 +1,52 @@ +// Copyright 2017 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import "FIRAppDelegate.h" + +@implementation FIRAppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + // Override point for customization after application launch. + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/Example/Core/App/iOS/FIRViewController.h b/Example/Core/App/iOS/FIRViewController.h new file mode 100644 index 0000000..64b4b74 --- /dev/null +++ b/Example/Core/App/iOS/FIRViewController.h @@ -0,0 +1,21 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@import UIKit; + +@interface FIRViewController : UIViewController + +@end diff --git a/Example/Core/App/iOS/FIRViewController.m b/Example/Core/App/iOS/FIRViewController.m new file mode 100644 index 0000000..901accf --- /dev/null +++ b/Example/Core/App/iOS/FIRViewController.m @@ -0,0 +1,35 @@ +// Copyright 2017 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import "FIRViewController.h" + +@interface FIRViewController () + +@end + +@implementation FIRViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/Example/Core/App/iOS/main.m b/Example/Core/App/iOS/main.m new file mode 100644 index 0000000..03b5c12 --- /dev/null +++ b/Example/Core/App/iOS/main.m @@ -0,0 +1,23 @@ +// Copyright 2017 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +@import UIKit; +#import "FIRAppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([FIRAppDelegate class])); + } +} diff --git a/Example/Core/App/macOS/Base.lproj/Main.storyboard b/Example/Core/App/macOS/Base.lproj/Main.storyboard new file mode 100644 index 0000000..1cd523a --- /dev/null +++ b/Example/Core/App/macOS/Base.lproj/Main.storyboard @@ -0,0 +1,693 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Core/App/macOS/Core-Info.plist b/Example/Core/App/macOS/Core-Info.plist new file mode 100644 index 0000000..6f7d78e --- /dev/null +++ b/Example/Core/App/macOS/Core-Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2017 Google. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + + diff --git a/Example/Core/App/macOS/FIRAppDelegate.h b/Example/Core/App/macOS/FIRAppDelegate.h new file mode 100644 index 0000000..e637ef9 --- /dev/null +++ b/Example/Core/App/macOS/FIRAppDelegate.h @@ -0,0 +1,23 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@interface FIRAppDelegate : NSObject + + +@end + diff --git a/Example/Core/App/macOS/FIRAppDelegate.m b/Example/Core/App/macOS/FIRAppDelegate.m new file mode 100644 index 0000000..9a363a6 --- /dev/null +++ b/Example/Core/App/macOS/FIRAppDelegate.m @@ -0,0 +1,35 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "FIRAppDelegate.h" + +@interface FIRAppDelegate () + +@end + +@implementation FIRAppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application +} + + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + +@end diff --git a/Example/Core/App/macOS/FIRViewController.h b/Example/Core/App/macOS/FIRViewController.h new file mode 100644 index 0000000..efee5d5 --- /dev/null +++ b/Example/Core/App/macOS/FIRViewController.h @@ -0,0 +1,23 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@interface FIRViewController : NSViewController + + +@end + diff --git a/Example/Core/App/macOS/FIRViewController.m b/Example/Core/App/macOS/FIRViewController.m new file mode 100644 index 0000000..08c5bb5 --- /dev/null +++ b/Example/Core/App/macOS/FIRViewController.m @@ -0,0 +1,35 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "FIRViewController.h" + +@implementation FIRViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Do any additional setup after loading the view. +} + + +- (void)setRepresentedObject:(id)representedObject { + [super setRepresentedObject:representedObject]; + + // Update the view, if already loaded. +} + + +@end diff --git a/Example/Core/App/macOS/main.m b/Example/Core/App/macOS/main.m new file mode 100644 index 0000000..e8858a6 --- /dev/null +++ b/Example/Core/App/macOS/main.m @@ -0,0 +1,21 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/Example/Core/App/main.m b/Example/Core/App/main.m deleted file mode 100644 index 03b5c12..0000000 --- a/Example/Core/App/main.m +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2017 Google -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -@import UIKit; -#import "FIRAppDelegate.h" - -int main(int argc, char * argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([FIRAppDelegate class])); - } -} -- cgit v1.2.3