diff options
author | Paul Beusterien <paulbeusterien@google.com> | 2018-04-09 09:11:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-09 09:11:21 -0700 |
commit | 42bc113754d2f9e2f0f6cf552916ae76149e717d (patch) | |
tree | 579d70312fe376cb657ea8c4dd5d96cc92b616f2 /Example/Messaging | |
parent | 21a6e1f930936eae1bca743430347288fa5e39c8 (diff) |
Travis static library testing (#1047)
* Add Objective C example app for Messaging
* Travis static library testing
* static lib build fixes
Diffstat (limited to 'Example/Messaging')
17 files changed, 251 insertions, 40 deletions
diff --git a/Example/Messaging/App/iOS/Base.lproj/LaunchScreen.storyboard b/Example/Messaging/App/iOS/Base.lproj/LaunchScreen.storyboard index fdf3f97..66a7681 100644 --- a/Example/Messaging/App/iOS/Base.lproj/LaunchScreen.storyboard +++ b/Example/Messaging/App/iOS/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,8 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM"> <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/> - <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> </dependencies> <scenes> <!--View Controller--> @@ -14,9 +14,9 @@ <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> </layoutGuides> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> </view> </viewController> <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> diff --git a/Example/Messaging/App/iOS/Base.lproj/Main.storyboard b/Example/Messaging/App/iOS/Base.lproj/Main.storyboard index 6df1a82..d164a23 100644 --- a/Example/Messaging/App/iOS/Base.lproj/Main.storyboard +++ b/Example/Messaging/App/iOS/Base.lproj/Main.storyboard @@ -1,48 +1,27 @@ -<?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="taE-sK-BOl"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="whP-gf-Uak"> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/> - <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/> </dependencies> <scenes> - <!--Firebase Cloud Messaging--> - <scene sceneID="tne-QT-ifu"> + <!--View Controller--> + <scene sceneID="wQg-tq-qST"> <objects> - <viewController id="BYZ-38-t0r" customClass="MessagingViewController" customModule="Messaging_Example" customModuleProvider="target" sceneMemberID="viewController"> + <viewController id="whP-gf-Uak" customClass="FIRViewController" sceneMemberID="viewController"> <layoutGuides> - <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> - <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> + <viewControllerLayoutGuide type="top" id="uEw-UM-LJ8"/> + <viewControllerLayoutGuide type="bottom" id="Mvr-aV-6Um"/> </layoutGuides> - <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> + <view key="view" contentMode="scaleToFill" id="TpU-gO-2f1"> + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> </view> - <navigationItem key="navigationItem" title="Firebase Cloud Messaging" id="z1u-kE-qKb"/> </viewController> - <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> + <placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> - <point key="canvasLocation" x="698" y="164"/> - </scene> - <!--Navigation Controller--> - <scene sceneID="rmF-xz-rwn"> - <objects> - <placeholder placeholderIdentifier="IBFirstResponder" id="Ju1-Bj-8eG" userLabel="First Responder" sceneMemberID="firstResponder"/> - <navigationController id="taE-sK-BOl" sceneMemberID="viewController"> - <navigationBar key="navigationBar" contentMode="scaleToFill" id="iTL-Kg-11w"> - <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> - <autoresizingMask key="autoresizingMask"/> - </navigationBar> - <connections> - <segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="04R-HZ-bi6"/> - </connections> - </navigationController> - </objects> - <point key="canvasLocation" x="-92" y="165"/> + <point key="canvasLocation" x="305" y="433"/> </scene> </scenes> </document> diff --git a/Example/Messaging/App/iOS/FIRAppDelegate.h b/Example/Messaging/App/iOS/FIRAppDelegate.h new file mode 100644 index 0000000..1eb5040 --- /dev/null +++ b/Example/Messaging/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 <UIApplicationDelegate> + +@property(strong, nonatomic) UIWindow *window; + +@end diff --git a/Example/Messaging/App/iOS/FIRAppDelegate.m b/Example/Messaging/App/iOS/FIRAppDelegate.m new file mode 100644 index 0000000..535e529 --- /dev/null +++ b/Example/Messaging/App/iOS/FIRAppDelegate.m @@ -0,0 +1,58 @@ +// 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" + +#import <FirebaseCore/FIRApp.h> + +@implementation FIRAppDelegate + +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [FIRApp configure]; + 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/Messaging/App/iOS/FIRViewController.h b/Example/Messaging/App/iOS/FIRViewController.h new file mode 100644 index 0000000..64b4b74 --- /dev/null +++ b/Example/Messaging/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/Messaging/App/iOS/FIRViewController.m b/Example/Messaging/App/iOS/FIRViewController.m new file mode 100644 index 0000000..027aabf --- /dev/null +++ b/Example/Messaging/App/iOS/FIRViewController.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 "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/Messaging/App/iOS/main.m b/Example/Messaging/App/iOS/main.m new file mode 100644 index 0000000..39c05a5 --- /dev/null +++ b/Example/Messaging/App/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 "FIRAppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([FIRAppDelegate class])); + } +} diff --git a/Example/Messaging/App/GoogleService-Info.plist b/Example/Messaging/Sample/GoogleService-Info.plist index 3f7547f..3f7547f 100644 --- a/Example/Messaging/App/GoogleService-Info.plist +++ b/Example/Messaging/Sample/GoogleService-Info.plist diff --git a/Example/Messaging/App/iOS/AppDelegate.swift b/Example/Messaging/Sample/iOS/AppDelegate.swift index 89a5120..89a5120 100644 --- a/Example/Messaging/App/iOS/AppDelegate.swift +++ b/Example/Messaging/Sample/iOS/AppDelegate.swift diff --git a/Example/Messaging/Sample/iOS/Base.lproj/LaunchScreen.storyboard b/Example/Messaging/Sample/iOS/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..fdf3f97 --- /dev/null +++ b/Example/Messaging/Sample/iOS/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="EHf-IW-A2E"> + <objects> + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="53" y="375"/> + </scene> + </scenes> +</document> diff --git a/Example/Messaging/Sample/iOS/Base.lproj/Main.storyboard b/Example/Messaging/Sample/iOS/Base.lproj/Main.storyboard new file mode 100644 index 0000000..6df1a82 --- /dev/null +++ b/Example/Messaging/Sample/iOS/Base.lproj/Main.storyboard @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="taE-sK-BOl"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <scenes> + <!--Firebase Cloud Messaging--> + <scene sceneID="tne-QT-ifu"> + <objects> + <viewController id="BYZ-38-t0r" customClass="MessagingViewController" customModule="Messaging_Example" customModuleProvider="target" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> + <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </view> + <navigationItem key="navigationItem" title="Firebase Cloud Messaging" id="z1u-kE-qKb"/> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="698" y="164"/> + </scene> + <!--Navigation Controller--> + <scene sceneID="rmF-xz-rwn"> + <objects> + <placeholder placeholderIdentifier="IBFirstResponder" id="Ju1-Bj-8eG" userLabel="First Responder" sceneMemberID="firstResponder"/> + <navigationController id="taE-sK-BOl" sceneMemberID="viewController"> + <navigationBar key="navigationBar" contentMode="scaleToFill" id="iTL-Kg-11w"> + <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> + <autoresizingMask key="autoresizingMask"/> + </navigationBar> + <connections> + <segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="04R-HZ-bi6"/> + </connections> + </navigationController> + </objects> + <point key="canvasLocation" x="-92" y="165"/> + </scene> + </scenes> +</document> diff --git a/Example/Messaging/App/iOS/Data+MessagingExtensions.swift b/Example/Messaging/Sample/iOS/Data+MessagingExtensions.swift index 99ded25..99ded25 100644 --- a/Example/Messaging/App/iOS/Data+MessagingExtensions.swift +++ b/Example/Messaging/Sample/iOS/Data+MessagingExtensions.swift diff --git a/Example/Messaging/App/iOS/Environment.swift b/Example/Messaging/Sample/iOS/Environment.swift index 5219c64..5219c64 100644 --- a/Example/Messaging/App/iOS/Environment.swift +++ b/Example/Messaging/Sample/iOS/Environment.swift diff --git a/Example/Messaging/App/iOS/Messaging-Info.plist b/Example/Messaging/Sample/iOS/Messaging-Info.plist index b43105e..b43105e 100644 --- a/Example/Messaging/App/iOS/Messaging-Info.plist +++ b/Example/Messaging/Sample/iOS/Messaging-Info.plist diff --git a/Example/Messaging/App/iOS/MessagingViewController.swift b/Example/Messaging/Sample/iOS/MessagingViewController.swift index 9bd07c1..9bd07c1 100644 --- a/Example/Messaging/App/iOS/MessagingViewController.swift +++ b/Example/Messaging/Sample/iOS/MessagingViewController.swift diff --git a/Example/Messaging/App/iOS/Messaging_Example.entitlements b/Example/Messaging/Sample/iOS/Messaging_Example.entitlements index 903def2..903def2 100644 --- a/Example/Messaging/App/iOS/Messaging_Example.entitlements +++ b/Example/Messaging/Sample/iOS/Messaging_Example.entitlements diff --git a/Example/Messaging/App/iOS/NotificationsController.swift b/Example/Messaging/Sample/iOS/NotificationsController.swift index 7545b44..7545b44 100644 --- a/Example/Messaging/App/iOS/NotificationsController.swift +++ b/Example/Messaging/Sample/iOS/NotificationsController.swift |