Skip to content

Commit eb3e240

Browse files
jdeeE-B-Smith
authored andcommitted
Webview example (#606)
* Added a WebView example with a table view, * Added README.md (adapted from RN webview_example). * Comments and some refactoring. * Use a font that actually exists. * Use initSession callback with BUO, BranchLinkProperties. Added initializer PlanetData(branchUniversalObject: BranchUniversalObject). * Added comments in Podfile. * Added App Icon and Launch Screen. * Registered view event in viewDidAppear: as recommended in docs.
1 parent 113a1ce commit eb3e240

File tree

74 files changed

+1609
-0
lines changed

Some content is hidden

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

74 files changed

+1609
-0
lines changed

Examples/WebViewExample/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!Podfile.lock

Examples/WebViewExample/Podfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use_frameworks!
2+
3+
# ----- Branch pod
4+
#
5+
# Take the Branch pod from this repo rather than CocoaPods.
6+
# Don't use the path: argument if you want the production
7+
# release from CocoaPods., e.g.:
8+
#
9+
# pod "Branch"
10+
11+
pod "Branch", path: "../.."
12+
13+
# ----- Other app dependencies
14+
15+
pod "Cartography"
16+
pod "MBProgressHUD"
17+
pod "TextAttributes"
18+
19+
# ----- Application target
20+
21+
target "WebViewExample"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
PODS:
2+
- Branch (0.14.5):
3+
- Branch/Core (= 0.14.5)
4+
- Branch/without-IDFA (= 0.14.5)
5+
- Branch/Core (0.14.5)
6+
- Branch/without-IDFA (0.14.5)
7+
- Cartography (1.1.0)
8+
- MBProgressHUD (1.0.0)
9+
- TextAttributes (1.0)
10+
11+
DEPENDENCIES:
12+
- Branch (from `../..`)
13+
- Cartography
14+
- MBProgressHUD
15+
- TextAttributes
16+
17+
EXTERNAL SOURCES:
18+
Branch:
19+
:path: "../.."
20+
21+
SPEC CHECKSUMS:
22+
Branch: 4b96dfb74b92d2b947a6395172ef37af0dba1e2b
23+
Cartography: '0538ccb4044acbbda2266335fc58cb4228794d90'
24+
MBProgressHUD: 4890f671c94e8a0f3cf959aa731e9de2f036d71a
25+
TextAttributes: 45b2713a1d174c377d320b51129c304eac381638
26+
27+
PODFILE CHECKSUM: a645defd0626cadd6dd3834330eb3482cf7b2c6c
28+
29+
COCOAPODS: 1.2.0

Examples/WebViewExample/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# webview_example
2+
3+
This app presents a list of the planets in a UITableView. When each
4+
row is tapped, a custom ArticleView is displayed using the a UINavigationController.
5+
6+
The ArticleView contains a WKWebView and displays the Wikipedia page for the
7+
selected planet. The ArticleViewController creates a Branch Universal Object in
8+
`viewDidLoad` and registers a view event. A large Share button at the
9+
bottom of the ArticleView calls `showShareSheet` on the BUO.
10+
11+
In the app delegate, the `Branch.getInstance().initSession()` callback routes
12+
inbound links and pushes an ArticleViewController for the appropriate article when
13+
a link is opened.
14+
15+
## Building
16+
17+
Just run `pod install` to install all pod dependencies.

0 commit comments

Comments
 (0)