From 40305845b363c125e379f6e31b948b8ba196a873 Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 16 Oct 2023 20:56:40 +0900 Subject: [PATCH 1/5] Release candidate changes --- CHANGELOG.md | 5 +++++ MiniApp.podspec | 2 +- Sources/Classes/core/MiniApp.swift | 2 +- Tests/Unit/MiniAppScriptMessageHandlerTests.swift | 2 +- USERGUIDE.md | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14791a74..4c649f12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## CHANGELOG +### 5.5.0 (2023-10-16) +**SDK** +- **Fix:** Fix character escaping issue in Universal bridge (`sendJsonToMiniApp`) +--- + ### 5.4.0 (2023-08-28) **SDK** - **Feature:** Added a new interface `downloadMiniApp(appId:versionId:completionHandler:)` to download Miniapp from platform in background if needed. diff --git a/MiniApp.podspec b/MiniApp.podspec index 5d11ebb5..590dd60a 100644 --- a/MiniApp.podspec +++ b/MiniApp.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |miniapp| miniapp.name = 'MiniApp' - miniapp.version = '5.4.0' + miniapp.version = '5.5.0' miniapp.authors = "Rakuten Ecosystem Mobile" miniapp.summary = "Rakuten's Mini App SDK" miniapp.description = "This open-source library allows you to integrate Mini App ecosystem into your iOS applications. Mini App SDK also facilitates communication between a mini app and the host app via a message bridge." diff --git a/Sources/Classes/core/MiniApp.swift b/Sources/Classes/core/MiniApp.swift index fe43d4da..71afb0aa 100644 --- a/Sources/Classes/core/MiniApp.swift +++ b/Sources/Classes/core/MiniApp.swift @@ -3,7 +3,7 @@ import UIKit /// Mini App Public API methods public class MiniApp: NSObject { - public static let version = "5.4.0" + public static let version = "5.5.0" private static let shared = MiniApp() private let realMiniApp = RealMiniApp() public static var MAOrientationLock: UIInterfaceOrientationMask = [] diff --git a/Tests/Unit/MiniAppScriptMessageHandlerTests.swift b/Tests/Unit/MiniAppScriptMessageHandlerTests.swift index a731f727..1b8e3135 100644 --- a/Tests/Unit/MiniAppScriptMessageHandlerTests.swift +++ b/Tests/Unit/MiniAppScriptMessageHandlerTests.swift @@ -1106,7 +1106,7 @@ class MiniAppScriptMessageHandlerTests: QuickSpec { return } let environmentInfo = ResponseDecoder.decode(decodeType: MAHostEnvironmentInfo.self, data: responseData) - expect(environmentInfo?.sdkVersion).toEventually(equal("5.4.0")) + expect(environmentInfo?.sdkVersion).toEventually(equal("5.5.0")) expect(environmentInfo?.hostVersion).toEventually(equal(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String)) expect(environmentInfo?.hostLocale).toEventually(equal("en-US")) } diff --git a/USERGUIDE.md b/USERGUIDE.md index aad7c38b..09ce5b98 100644 --- a/USERGUIDE.md +++ b/USERGUIDE.md @@ -83,7 +83,7 @@ To integrate MiniApp SDK into your Xcode project using Swift Package Manager, ad ```ruby dependencies: [ - .package(url: "https://github.com/rakutentech/ios-miniapp.git", .upToNextMajor(from: "5.4.0")) + .package(url: "https://github.com/rakutentech/ios-miniapp.git", .upToNextMajor(from: "5.5.0")) ] ``` From bea7e13efc057e918909adb988d99a7eadd8b62e Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 16 Oct 2023 20:58:16 +0900 Subject: [PATCH 2/5] JS Changes --- Sources/Classes/js-miniapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Classes/js-miniapp b/Sources/Classes/js-miniapp index 63ab0dd1..079f8cbd 160000 --- a/Sources/Classes/js-miniapp +++ b/Sources/Classes/js-miniapp @@ -1 +1 @@ -Subproject commit 63ab0dd11e7f36dd62ddfabb37bc1ec839d4a9fd +Subproject commit 079f8cbdcc9fd4d597c5fa582d4264ff27c39e4d From 48462d5dac3ee7a70d1fc23d04d3b0835eb6fc02 Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 16 Oct 2023 23:55:05 +0900 Subject: [PATCH 3/5] v5.6.0 changes --- CHANGELOG.md | 4 ++++ MiniApp.podspec | 2 +- Sources/Classes/core/MiniApp.swift | 2 +- Sources/Classes/js-miniapp | 2 +- Tests/Unit/MiniAppScriptMessageHandlerTests.swift | 2 +- USERGUIDE.md | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c649f12..e1ef0de2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## CHANGELOG +### 5.6.0 (2023-10-17) +**SDK** +- **Fix:** Updated JS Bridge after fixing linting issues. + ### 5.5.0 (2023-10-16) **SDK** - **Fix:** Fix character escaping issue in Universal bridge (`sendJsonToMiniApp`) diff --git a/MiniApp.podspec b/MiniApp.podspec index 590dd60a..65be7238 100644 --- a/MiniApp.podspec +++ b/MiniApp.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |miniapp| miniapp.name = 'MiniApp' - miniapp.version = '5.5.0' + miniapp.version = '5.6.0' miniapp.authors = "Rakuten Ecosystem Mobile" miniapp.summary = "Rakuten's Mini App SDK" miniapp.description = "This open-source library allows you to integrate Mini App ecosystem into your iOS applications. Mini App SDK also facilitates communication between a mini app and the host app via a message bridge." diff --git a/Sources/Classes/core/MiniApp.swift b/Sources/Classes/core/MiniApp.swift index 71afb0aa..74fe6892 100644 --- a/Sources/Classes/core/MiniApp.swift +++ b/Sources/Classes/core/MiniApp.swift @@ -3,7 +3,7 @@ import UIKit /// Mini App Public API methods public class MiniApp: NSObject { - public static let version = "5.5.0" + public static let version = "5.6.0" private static let shared = MiniApp() private let realMiniApp = RealMiniApp() public static var MAOrientationLock: UIInterfaceOrientationMask = [] diff --git a/Sources/Classes/js-miniapp b/Sources/Classes/js-miniapp index 079f8cbd..39da455a 160000 --- a/Sources/Classes/js-miniapp +++ b/Sources/Classes/js-miniapp @@ -1 +1 @@ -Subproject commit 079f8cbdcc9fd4d597c5fa582d4264ff27c39e4d +Subproject commit 39da455a716d7953f85e34793ce97bc42f7bc162 diff --git a/Tests/Unit/MiniAppScriptMessageHandlerTests.swift b/Tests/Unit/MiniAppScriptMessageHandlerTests.swift index 1b8e3135..75281131 100644 --- a/Tests/Unit/MiniAppScriptMessageHandlerTests.swift +++ b/Tests/Unit/MiniAppScriptMessageHandlerTests.swift @@ -1106,7 +1106,7 @@ class MiniAppScriptMessageHandlerTests: QuickSpec { return } let environmentInfo = ResponseDecoder.decode(decodeType: MAHostEnvironmentInfo.self, data: responseData) - expect(environmentInfo?.sdkVersion).toEventually(equal("5.5.0")) + expect(environmentInfo?.sdkVersion).toEventually(equal("5.6.0")) expect(environmentInfo?.hostVersion).toEventually(equal(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String)) expect(environmentInfo?.hostLocale).toEventually(equal("en-US")) } diff --git a/USERGUIDE.md b/USERGUIDE.md index 09ce5b98..d06cd5d4 100644 --- a/USERGUIDE.md +++ b/USERGUIDE.md @@ -83,7 +83,7 @@ To integrate MiniApp SDK into your Xcode project using Swift Package Manager, ad ```ruby dependencies: [ - .package(url: "https://github.com/rakutentech/ios-miniapp.git", .upToNextMajor(from: "5.5.0")) + .package(url: "https://github.com/rakutentech/ios-miniapp.git", .upToNextMajor(from: "5.6.0")) ] ``` From def3efa9c7a94a455b5ee566c4812bded672fb7d Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 17 Oct 2023 00:09:20 +0900 Subject: [PATCH 4/5] Updated bridge --- CHANGELOG.md | 1 + Sources/Classes/js-miniapp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1ef0de2..575e4081 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### 5.6.0 (2023-10-17) **SDK** - **Fix:** Updated JS Bridge after fixing linting issues. +--- ### 5.5.0 (2023-10-16) **SDK** diff --git a/Sources/Classes/js-miniapp b/Sources/Classes/js-miniapp index 39da455a..fd8c038c 160000 --- a/Sources/Classes/js-miniapp +++ b/Sources/Classes/js-miniapp @@ -1 +1 @@ -Subproject commit 39da455a716d7953f85e34793ce97bc42f7bc162 +Subproject commit fd8c038cea11c54e975e99db23f2dc5bf8e1f464 From 21aeb179fbb31105374198aece3019a706663b7b Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 17 Oct 2023 13:18:22 +0900 Subject: [PATCH 5/5] Changes for v5.6.1 --- CHANGELOG.md | 5 +++++ MiniApp.podspec | 2 +- .../core/JavascriptBridge/MiniAppScriptMessageHandler.swift | 2 +- Sources/Classes/core/MiniApp.swift | 2 +- Sources/Classes/js-miniapp | 2 +- Tests/Unit/MiniAppScriptMessageHandlerTests.swift | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 575e4081..781546cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## CHANGELOG +### 5.6.1 (2023-10-17) +**SDK** +- **Fix:** Fixed `getUsername` unicode issue +--- + ### 5.6.0 (2023-10-17) **SDK** - **Fix:** Updated JS Bridge after fixing linting issues. diff --git a/MiniApp.podspec b/MiniApp.podspec index 65be7238..465805a7 100644 --- a/MiniApp.podspec +++ b/MiniApp.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |miniapp| miniapp.name = 'MiniApp' - miniapp.version = '5.6.0' + miniapp.version = '5.6.1' miniapp.authors = "Rakuten Ecosystem Mobile" miniapp.summary = "Rakuten's Mini App SDK" miniapp.description = "This open-source library allows you to integrate Mini App ecosystem into your iOS applications. Mini App SDK also facilitates communication between a mini app and the host app via a message bridge." diff --git a/Sources/Classes/core/JavascriptBridge/MiniAppScriptMessageHandler.swift b/Sources/Classes/core/JavascriptBridge/MiniAppScriptMessageHandler.swift index e6f7ed64..fb06e7a3 100644 --- a/Sources/Classes/core/JavascriptBridge/MiniAppScriptMessageHandler.swift +++ b/Sources/Classes/core/JavascriptBridge/MiniAppScriptMessageHandler.swift @@ -467,7 +467,7 @@ internal class MiniAppScriptMessageHandler: NSObject, WKScriptMessageHandler { self.executeJavaScriptCallback(responseStatus: .onError, messageId: callbackId, response: getMiniAppErrorMessage(MiniAppErrorType.hostAppError)) return } - self.executeJavaScriptCallback(responseStatus: .onSuccess, messageId: callbackId, response: userName) + self.executeJavaScriptCallback(responseStatus: .onSuccess, messageId: callbackId, response: userName.base64Encoded() ?? "") case .failure(let error): self.handleMASDKError(error: error, callbackId: callbackId) } diff --git a/Sources/Classes/core/MiniApp.swift b/Sources/Classes/core/MiniApp.swift index 74fe6892..3fdd43c2 100644 --- a/Sources/Classes/core/MiniApp.swift +++ b/Sources/Classes/core/MiniApp.swift @@ -3,7 +3,7 @@ import UIKit /// Mini App Public API methods public class MiniApp: NSObject { - public static let version = "5.6.0" + public static let version = "5.6.1" private static let shared = MiniApp() private let realMiniApp = RealMiniApp() public static var MAOrientationLock: UIInterfaceOrientationMask = [] diff --git a/Sources/Classes/js-miniapp b/Sources/Classes/js-miniapp index fd8c038c..c4e40088 160000 --- a/Sources/Classes/js-miniapp +++ b/Sources/Classes/js-miniapp @@ -1 +1 @@ -Subproject commit fd8c038cea11c54e975e99db23f2dc5bf8e1f464 +Subproject commit c4e400886536451979a1b0b617a31df8f402b5a0 diff --git a/Tests/Unit/MiniAppScriptMessageHandlerTests.swift b/Tests/Unit/MiniAppScriptMessageHandlerTests.swift index 75281131..419629bd 100644 --- a/Tests/Unit/MiniAppScriptMessageHandlerTests.swift +++ b/Tests/Unit/MiniAppScriptMessageHandlerTests.swift @@ -1106,7 +1106,7 @@ class MiniAppScriptMessageHandlerTests: QuickSpec { return } let environmentInfo = ResponseDecoder.decode(decodeType: MAHostEnvironmentInfo.self, data: responseData) - expect(environmentInfo?.sdkVersion).toEventually(equal("5.6.0")) + expect(environmentInfo?.sdkVersion).toEventually(equal("5.6.1")) expect(environmentInfo?.hostVersion).toEventually(equal(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String)) expect(environmentInfo?.hostLocale).toEventually(equal("en-US")) }