diff --git a/AgileWorks/AgileWorks/WebView/View/WebViewController.swift b/AgileWorks/AgileWorks/WebView/View/WebViewController.swift index 4fb707d4ce9590e0957208403e5e66acaf9482d4..ca3043b505ccf53dbcbf54cd85d0b83b51412cc8 100644 --- a/AgileWorks/AgileWorks/WebView/View/WebViewController.swift +++ b/AgileWorks/AgileWorks/WebView/View/WebViewController.swift @@ -30,6 +30,9 @@ class WebViewController: UIViewController { private let queue = DispatchQueue(label: "jp.atled.agileworks") var isShowDoc = false + // 現在表示中のURL + var nowURL: String! + // Title を設定する URL を定義 let urlToTitle: [String: String] = [ "Mobile#home": localizadString(key: "HomeTitle", comment: ""), @@ -53,6 +56,7 @@ class WebViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.navigationItem.title = naviTitle + self.tabBarController?.delegate = self } // WebView セットアップ @@ -101,7 +105,7 @@ class WebViewController: UIViewController { // WebView ロード処理 private func loadWebView() { - let sesstionid = "JSESSIONID=" + sessionId! + let sesstionid = "JSESSIONID=" + self.sessionId! let url = URL(string: self.loadURL)! var request = URLRequest(url: url, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 30.0) @@ -235,6 +239,7 @@ class WebViewController: UIViewController { case "URL"?: if let url = change![NSKeyValueChangeKey.newKey] as? URL { let urlString: String = url.absoluteString + self.nowURL = urlString for (key, value) in self.urlToTitle { if urlString.contains(key) { // タイトルの再設定 @@ -369,3 +374,12 @@ extension WebViewController: UIScrollViewDelegate { scrollView.pinchGestureRecognizer?.isEnabled = false } } + +extension WebViewController: UITabBarControllerDelegate { + func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) { + if loadURL != nowURL { + setWebView() + loadWebView() + } + } +} diff --git a/AgileWorks/ShareExtension/Info.plist b/AgileWorks/ShareExtension/Info.plist index 6295e57744b124d9bfbc2be9a669020de0136016..5cf7a1c12f2b8fb06d8e6fa774aced677dc71593 100644 --- a/AgileWorks/ShareExtension/Info.plist +++ b/AgileWorks/ShareExtension/Info.plist @@ -2,15 +2,6 @@ - AppIdentifierPrefix - $(AppIdentifierPrefix) - AppConfig - - OAUTH_CLIENTID - $(OAUTH_CLIENTID) - AGILE_WORKS_SHARE_BUNDLE_IDENTIFIER - $(AGILE_WORKS_SHARE_BUNDLE_IDENTIFIER) - CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName @@ -40,7 +31,7 @@ SUBQUERY ( $extensionItem.attachments, $attachment, - ( ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.rsa.pkcs-12" ) + ( ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.rsa.pkcs-12" ) ).@count == 1 ).@count == 1 diff --git a/AgileWorks/ShareExtension/View/Base.lproj/MainInterface.storyboard b/AgileWorks/ShareExtension/View/Base.lproj/MainInterface.storyboard index f14373f3f1fb8632d2a4e1158e1dc2dbf13a413a..830121a55503eba68b055911d50ce0c2aa3abe53 100644 --- a/AgileWorks/ShareExtension/View/Base.lproj/MainInterface.storyboard +++ b/AgileWorks/ShareExtension/View/Base.lproj/MainInterface.storyboard @@ -1,9 +1,9 @@ - + - + @@ -22,7 +22,7 @@ - +