Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmp #25

Open
fs-yuta-nakamura opened this issue Sep 14, 2020 · 0 comments
Open

tmp #25

fs-yuta-nakamura opened this issue Sep 14, 2020 · 0 comments

Comments

@fs-yuta-nakamura
Copy link
Collaborator

--- 20200812_BDash-Mobile-SDK_v2.4.1_iOS/本番/Swift4.0/BDashWebReception.swift	2020-08-12 18:32:13.000000000 +0900
+++ 20200911_BDash-Mobile-SDK_v2.4.1_iOS/本番/Swift5.0/BDashWebReception.swift	2020-09-10 16:15:04.000000000 +0900
@@ -1,6 +1,9 @@
 import Foundation
 import UIKit
 import WebKit
+//import SwifterSwift
+
+let waitSwitchKey = "waitSwitchKey"
 
 // swiftlint:disable trailing_whitespace
 // swiftlint:disable vertical_whitespace
@@ -15,9 +18,8 @@
 // swiftlint:disable void_return
 // swiftlint:disable weak_delegate
 
-let waitSwitchKey = "waitSwitchKey"
-
 //MARK: - struct
+
 struct ConstStruct {
     static let isDebug: Bool = false
     
@@ -56,7 +58,8 @@
     static let horizontalMargin: String = "horizontalMargin" // 横のマージン
     static let width: String = "width" // 横幅
     static let height: String = "height" // 縦幅
-    static let forceShow: String = "forceShow" 
+    
+    static let forceShow: String = "forceShow"
 }
 
 /// レイアウト指定 key
@@ -352,7 +355,6 @@
 // swiftlint:disable type_body_length
 // swiftlint:disable closure_parameter_position
 // swiftlint:disable unused_closure_parameter
-// swiftlint:disable legacy_constructor
 // swiftlint:disable opening_brace
 
 @objcMembers
@@ -411,14 +413,14 @@
         // BDashWebReception生成時画面回転確認用Notificationを設定する
         NotificationCenter.default.addObserver(self,
                                                selector:#selector(didChangeOrientation(_:)),
-                                               name: .UIDeviceOrientationDidChange,
+                                               name: UIDevice.orientationDidChangeNotification,
                                                object: nil)
     }
     
     deinit {
         BDashWebReception.wrLog("BDashWebReception deinit")
         // 解放時登録していたNotification情報を削除
-        NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)
+        NotificationCenter.default.removeObserver(self, name: UIDevice.orientationDidChangeNotification, object: nil)
     }
     
     /// 関数仕様書 (F)Web接客/showMessage
@@ -1020,12 +1022,12 @@
     /// - Parameter url: url
     /// - Returns: scheme以降の文字(internal://aiueo、というものであれば最初のコロンから三文字分先にインデックスを進め、そこから最後までを返します)
     fileprivate func getUrlParameter(url: String) -> String? {
-        if let index: String.Index = url.firstIndex(of: ":") {
+        if let index = url.firstIndex(of: ":") {
             let addedIndex = url.index(index, offsetBy: 3)
             /// Swift5.0 より前の場合
-            return url.substring(addedIndex.encodedOffset...)
+//            return url.substring(addedIndex.encodedOffset...)
             /// Swift5.0 以降の場合
-//            return url.substring(addedIndex.utf16Offset(in: url)...)
+            return url.substring(addedIndex.utf16Offset(in: url)...)
         }
         return nil
     }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant