From c586dc8747882770973b6488c9f5f9e6e3f08d6c Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 12 Jul 2018 12:03:50 -0700 Subject: Separate Xcode project and tests for GoogleUtilities (#1521) --- GoogleUtilities/Example/iOS/AppDelegate.h | 21 +++++ GoogleUtilities/Example/iOS/AppDelegate.m | 55 ++++++++++++ .../Example/iOS/Base.lproj/LaunchScreen.storyboard | 27 ++++++ .../Example/iOS/Base.lproj/Main.storyboard | 27 ++++++ .../Example/iOS/GoogleUtilities-Info.plist | 54 ++++++++++++ .../AppIcon.appiconset/Contents.json | 98 ++++++++++++++++++++++ GoogleUtilities/Example/iOS/ViewController.h | 19 +++++ GoogleUtilities/Example/iOS/ViewController.m | 33 ++++++++ GoogleUtilities/Example/iOS/main.m | 22 +++++ 9 files changed, 356 insertions(+) create mode 100644 GoogleUtilities/Example/iOS/AppDelegate.h create mode 100644 GoogleUtilities/Example/iOS/AppDelegate.m create mode 100644 GoogleUtilities/Example/iOS/Base.lproj/LaunchScreen.storyboard create mode 100644 GoogleUtilities/Example/iOS/Base.lproj/Main.storyboard create mode 100644 GoogleUtilities/Example/iOS/GoogleUtilities-Info.plist create mode 100644 GoogleUtilities/Example/iOS/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 GoogleUtilities/Example/iOS/ViewController.h create mode 100644 GoogleUtilities/Example/iOS/ViewController.m create mode 100644 GoogleUtilities/Example/iOS/main.m (limited to 'GoogleUtilities/Example/iOS') diff --git a/GoogleUtilities/Example/iOS/AppDelegate.h b/GoogleUtilities/Example/iOS/AppDelegate.h new file mode 100644 index 0000000..aaabd8f --- /dev/null +++ b/GoogleUtilities/Example/iOS/AppDelegate.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 AppDelegate : UIResponder + +@property(strong, nonatomic) UIWindow *window; + +@end diff --git a/GoogleUtilities/Example/iOS/AppDelegate.m b/GoogleUtilities/Example/iOS/AppDelegate.m new file mode 100644 index 0000000..395e235 --- /dev/null +++ b/GoogleUtilities/Example/iOS/AppDelegate.m @@ -0,0 +1,55 @@ +// 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 "AppDelegate.h" + +@implementation AppDelegate + +- (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/GoogleUtilities/Example/iOS/Base.lproj/LaunchScreen.storyboard b/GoogleUtilities/Example/iOS/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..66a7681 --- /dev/null +++ b/GoogleUtilities/Example/iOS/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GoogleUtilities/Example/iOS/Base.lproj/Main.storyboard b/GoogleUtilities/Example/iOS/Base.lproj/Main.storyboard new file mode 100644 index 0000000..d164a23 --- /dev/null +++ b/GoogleUtilities/Example/iOS/Base.lproj/Main.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GoogleUtilities/Example/iOS/GoogleUtilities-Info.plist b/GoogleUtilities/Example/iOS/GoogleUtilities-Info.plist new file mode 100644 index 0000000..fc26896 --- /dev/null +++ b/GoogleUtilities/Example/iOS/GoogleUtilities-Info.plist @@ -0,0 +1,54 @@ + + + + + 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 + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/GoogleUtilities/Example/iOS/Images.xcassets/AppIcon.appiconset/Contents.json b/GoogleUtilities/Example/iOS/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/GoogleUtilities/Example/iOS/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GoogleUtilities/Example/iOS/ViewController.h b/GoogleUtilities/Example/iOS/ViewController.h new file mode 100644 index 0000000..5db7982 --- /dev/null +++ b/GoogleUtilities/Example/iOS/ViewController.h @@ -0,0 +1,19 @@ +// 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 ViewController : UIViewController + +@end diff --git a/GoogleUtilities/Example/iOS/ViewController.m b/GoogleUtilities/Example/iOS/ViewController.m new file mode 100644 index 0000000..6d4676b --- /dev/null +++ b/GoogleUtilities/Example/iOS/ViewController.m @@ -0,0 +1,33 @@ +// 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 "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (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/GoogleUtilities/Example/iOS/main.m b/GoogleUtilities/Example/iOS/main.m new file mode 100644 index 0000000..266ff2d --- /dev/null +++ b/GoogleUtilities/Example/iOS/main.m @@ -0,0 +1,22 @@ +// 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 "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} -- cgit v1.2.3