-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 6.8.0 (complete release) (#59)
* Update with 6.8.0 files * Add missing files --------- Co-authored-by: Frank Schmitt <[email protected]>
- Loading branch information
Showing
7 changed files
with
178 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Localizable.strings diff text working-tree-encoding=UTF-16 | ||
Localizable.strings diff text working-tree-encoding=UTF-8 |
108 changes: 108 additions & 0 deletions
108
Operator/Operator/Manifests/AdvanceCustomerResearch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"interactions": [ | ||
{ | ||
"id": "548cc5dd49f63bb5c2000001", | ||
"type": "TextModal", | ||
"configuration": { | ||
"title": "Advance Customer Research - Web Links", | ||
"body": "Test links.", | ||
"actions": [ | ||
{ | ||
"id": "action_id_1", | ||
"label": "In-App Browser", | ||
"action": "interaction", | ||
"invokes": [ | ||
{ | ||
"interaction_id": "54a3437b7724c57cf6000042", | ||
"criteria": {} | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "action_id_2", | ||
"label": "System Browser", | ||
"action": "interaction", | ||
"invokes": [ | ||
{ | ||
"interaction_id": "54a3437b7724c57cf6000043", | ||
"criteria": {} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "54a3437b7724c57cf6000042", | ||
"type": "NavigateToLink", | ||
"configuration": { | ||
"url": "https://www.alchemer.com/", | ||
"target": "self" | ||
} | ||
}, | ||
{ | ||
"id": "54a3437b7724c57cf6000043", | ||
"type": "NavigateToLink", | ||
"configuration": { | ||
"url": "https://www.example.com/", | ||
"target": "new" | ||
} | ||
}, | ||
{ | ||
"id": "548cc5dd49f63bb5c2f00001", | ||
"type": "TextModal", | ||
"configuration": { | ||
"title": "Advance Customer Research - Mail/Tel", | ||
"body": "Test links.", | ||
"actions": [ | ||
{ | ||
"id": "action_id_1", | ||
"label": "Mail", | ||
"action": "interaction", | ||
"invokes": [ | ||
{ | ||
"interaction_id": "54a3437b7724c57cf6100042", | ||
"criteria": {} | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "action_id_2", | ||
"label": "Tel", | ||
"action": "interaction", | ||
"invokes": [ | ||
{ | ||
"interaction_id": "54a3437b7724c57cf6003043", | ||
"criteria": {} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "54a3437b7724c57cf6100042", | ||
"type": "NavigateToLink", | ||
"configuration": { | ||
"url": "mailto:[email protected]", | ||
"target": "new" | ||
} | ||
}, | ||
{ | ||
"id": "54a3437b7724c57cf6003043", | ||
"type": "NavigateToLink", | ||
"configuration": { | ||
"url": "tel:1234567890", | ||
"target": "new" | ||
} | ||
} | ||
], | ||
"targets": { | ||
"local#app#launch": [ | ||
{ | ||
"interaction_id": "548cc5dd49f63bb5c2000001", | ||
"criteria": {} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
Sources/ApptentiveKit/Interactions/NavigateToLink/WebVewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// | ||
// WebViewController.swift | ||
// ApptentiveKit | ||
// | ||
// Created by Frank Schmitt on 1/19/24. | ||
// Copyright © 2024 Apptentive, Inc. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import WebKit | ||
|
||
class WebViewController: UIViewController, WKNavigationDelegate { | ||
let webView: WKWebView | ||
let spinner: UIActivityIndicatorView | ||
let viewModel: NavigateToLinkController | ||
|
||
init(viewModel: NavigateToLinkController) { | ||
self.viewModel = viewModel | ||
|
||
self.webView = WKWebView(frame: .zero) | ||
self.spinner = UIActivityIndicatorView(style: .large) | ||
|
||
super.init(nibName: nil, bundle: nil) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
override func viewDidLoad() { | ||
self.webView.frame = self.view.bounds | ||
self.view.addSubview(self.webView) | ||
|
||
self.webView.navigationDelegate = self | ||
|
||
self.spinner.hidesWhenStopped = true | ||
self.view.addSubview(self.spinner) | ||
self.spinner.startAnimating() | ||
self.spinner.center = self.view.center | ||
|
||
self.navigationItem.rightBarButtonItem = .apptentiveClose | ||
self.navigationItem.rightBarButtonItem?.target = self | ||
self.navigationItem.rightBarButtonItem?.action = #selector(close) | ||
self.navigationItem.rightBarButtonItem?.accessibilityLabel = self.viewModel.closeButtonAccessibilityLabel | ||
self.navigationItem.rightBarButtonItem?.accessibilityHint = self.viewModel.closeButtonAccessibilityHint | ||
|
||
super.viewDidLoad() | ||
} | ||
|
||
override func viewWillAppear(_ animated: Bool) { | ||
super.viewWillAppear(animated) | ||
|
||
self.spinner.startAnimating() | ||
let request = URLRequest(url: self.viewModel.configuration.url) | ||
self.webView.load(request) | ||
} | ||
|
||
@objc func close() { | ||
self.dismiss(animated: true) | ||
} | ||
|
||
func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) { | ||
self.spinner.stopAnimating() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters