Skip to content

Commit

Permalink
update dynamic links m8 ios
Browse files Browse the repository at this point in the history
Change-Id: I37fb2882498fce69463981f7b1f1b0079e2e98a0
  • Loading branch information
ulukaya committed Apr 12, 2016
1 parent 2946d41 commit 1b0d6b8
Show file tree
Hide file tree
Showing 17 changed files with 160 additions and 216 deletions.
27 changes: 0 additions & 27 deletions durablelinks/DurableLinksExample/Base.lproj/Main.storyboard

This file was deleted.

40 changes: 0 additions & 40 deletions durablelinks/DurableLinksExampleTests/AppTests.m

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
//

#import "AppDelegate.h"
#import "GINDurableDeepLinkService/GoogleDurableDeepLinkService.h"

// [START import]
@import Firebase.DurableDeepLink;
@import Firebase.Core;
@import FirebaseAnalytics;
// [END import]

@implementation AppDelegate
Expand All @@ -27,17 +27,9 @@ @implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Use Firebase library to configure APIs
NSError *configureError;
BOOL status = [[FIRContext sharedInstance] configure:&configureError];
NSAssert(status, @"Error configuring Firebase services: %@", configureError);
[FIROptions defaultOptions].deepLinkURLScheme = @"gindeeplinkurl";
[FIRApp configure];

// Override point for customization after application launch.
[[GINDurableDeepLinkService sharedInstance]
setUpWithLaunchOptions:launchOptions
apiKey:[FIRContext sharedInstance].serviceInfo.apiKey
clientID:[FIRContext sharedInstance].serviceInfo.clientID
urlScheme:@"gindeeplinkurl"
userDefaults:nil];
[[GINDurableDeepLinkService sharedInstance] checkForPendingDeepLink];
return YES;
}
Expand Down
39 changes: 39 additions & 0 deletions dynamiclinks/DynamicLinksExample/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" 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="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="waiting to be opened with link" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gWe-jX-t4S">
<rect key="frame" x="186" y="289" width="228" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="gWe-jX-t4S" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="5Up-pt-OnE"/>
<constraint firstItem="gWe-jX-t4S" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="KS6-Xt-04f"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="312" y="446"/>
</scene>
</scenes>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>ddlurl</string>
<string>gindeeplinkurl</string>
<key>CFBundleURLSchemes</key>
<array>
<string>ddlurl</string>
<string>gindeeplinkurl</string>
</array>
</dict>
</array>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

import UIKit
// [START import]
import Firebase.DurableDeepLink
import Firebase.Core
import FirebaseAnalytics
// [END import]


Expand All @@ -29,17 +28,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// [START didfinishlaunching]
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Use Firebase library to configure APIs
do {
try FIRContext.sharedInstance().configure()
} catch let configureError as NSError{
print ("Error configuring Firebase services: \(configureError)")
}

// Override point for customization after application launch.
GINDurableDeepLinkService.sharedInstance().setUpWithLaunchOptions(launchOptions,
apiKey: FIRContext.sharedInstance().serviceInfo.apiKey,
clientID: FIRContext.sharedInstance().serviceInfo.clientID,
urlScheme: "gindeeplinkurl", userDefaults: nil)
FIROptions.defaultOptions().deepLinkURLScheme = "gindeeplinkurl"
FIRApp.configure()
GINDurableDeepLinkService.sharedInstance().checkForPendingDeepLink()

return true
Expand Down Expand Up @@ -93,7 +83,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

let deepLink = GINDurableDeepLinkService.sharedInstance().deepLinkFromUniversalLinkURL(userActivity.webpageURL!)
if (deepLink!.url != nil) {
self.application(application, openURL: deepLink!.url, sourceApplication: "com.apple.mobilesafari", annotation: [:])
self.application(application, openURL: deepLink!.url!, sourceApplication: "com.apple.mobilesafari", annotation: [:])
return true
}
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "GINDurableDeepLinkService/GoogleDurableDeepLinkService.h"
9 changes: 4 additions & 5 deletions durablelinks/Podfile → dynamiclinks/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DurableLinksExample
# DynamicLinksExample

# TODO (ulukaya): Remove EAP before after internal hackathon.
source 'https://cpdc-eap.googlesource.com/spec.git'
Expand All @@ -10,9 +10,8 @@ pod 'Firebase/DurableDeepLink'
# [END pod_ddl]

# If using CocoaPods 1.0.0+, use the new target syntax.
# target 'DurableLinksExample'
# target 'DurableLinksExampleSwift'
# target 'DurableLinksExampleTests'
# target 'DynamicLinksExample'
# target 'DynamicLinksExampleSwift'

# and delete the link_with command.
link_with 'DurableLinksExample', 'DurableLinksExampleSwift', 'DurableLinksExampleTests'
link_with 'DynamicLinksExample', 'DynamicLinksExampleSwift'
File renamed without changes.

0 comments on commit 1b0d6b8

Please sign in to comment.