Skip to content

Commit f12e0a7

Browse files
Merge pull request #5 from Iterable/feature/ITBL-5295-sample-app-separate-project
[ITBL-5295] - Separate out Sample App In Separate Project
2 parents 5d49d76 + 1c6f9e3 commit f12e0a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+707
-434
lines changed

swift-sample-app/Podfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
platform :ios, '11.0'
2+
3+
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
4+
use_frameworks!
5+
6+
target 'swift-sample-app' do
7+
pod 'IterableSDK', :path => '../../swift-sdk'
8+
end
9+
10+
target 'swift-sample-app-notification-extension' do
11+
pod 'IterableAppExtensions', :path => '../../swift-sdk'
12+
end

swift-sample-app/swift-sample-app.xcodeproj/project.pbxproj

Lines changed: 655 additions & 0 deletions
Large diffs are not rendered by default.

swift-sample-app/swift-sample-app.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

swift-sample-app/swift-sample-app.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

swift-sample-app/AppDelegate.swift renamed to swift-sample-app/swift-sample-app/AppDelegate.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
124124
extension AppDelegate : IterableURLDelegate {
125125
// return true if we handled the url
126126
func handleIterableURL(_ url: URL, fromAction: IterableAction) -> Bool {
127-
return false
127+
DeeplinkHandler.handle(url: url)
128+
return DeeplinkHandler.canHandle(url: url)
128129
}
129130
}
130131

@@ -133,6 +134,11 @@ extension AppDelegate : IterableCustomActionDelegate {
133134
// handle the cutom action from push
134135
// return value true/false doesn't matter here, stored for future use
135136
func handleIterableCustomAction(_ action: IterableAction) -> Bool {
137+
if action.type == "handleFindCoffee" {
138+
if let query = action.userInput {
139+
DeeplinkHandler.handle(url: URL(string: "https://majumder.me/coffee?q=\(query)")!)
140+
}
141+
}
136142
return false
137143
}
138144
}

0 commit comments

Comments
 (0)