From ba7eee98a736495493d981df68c0d9a3d829ad7b Mon Sep 17 00:00:00 2001 From: tatthangcntt Date: Wed, 5 Jun 2024 09:49:35 +0700 Subject: [PATCH 1/4] Fix issue: Repeat to create LPC connect/disconnect --- ios/BrekekeLPC/Settings/SettingsManager.swift | 7 +- .../BrekekeLPCExtension.entitlements | 25 ++++--- ios/BrekekePhone/BrekekePhone.entitlements | 69 +++++++++---------- 3 files changed, 52 insertions(+), 49 deletions(-) diff --git a/ios/BrekekeLPC/Settings/SettingsManager.swift b/ios/BrekekeLPC/Settings/SettingsManager.swift index 630884f44..d40319c01 100644 --- a/ios/BrekekeLPC/Settings/SettingsManager.swift +++ b/ios/BrekekeLPC/Settings/SettingsManager.swift @@ -18,8 +18,11 @@ class SettingsManager: NSObject { .eraseToAnyPublisher() private let settingsWillWriteSubject = PassthroughSubject() private static let settingsKey = "settings" + static var appGroupName = Settings + .bundleIdentifier == "com.brekeke.phonedev" ? "group.com.brekeke.lpcdev" : + "group.com.brekeke.lpc" private static let userDefaults = - UserDefaults(suiteName: "group.com.brekeke.lpc")! + UserDefaults(suiteName: appGroupName)! private let settingsSubject: CurrentValueSubject private static let logger = Logger( prependString: "SettingsManager", @@ -29,6 +32,8 @@ class SettingsManager: NSObject { override init() { var settings = Self.fetch() SettingsManager.logger.log("settings init(): \(settings)") + SettingsManager.logger + .log("settings init()::appGroupName:: \(SettingsManager.appGroupName)") if settings == nil { settings = Settings( token: "", diff --git a/ios/BrekekeLPCExtension/BrekekeLPCExtension.entitlements b/ios/BrekekeLPCExtension/BrekekeLPCExtension.entitlements index d1ecc84d7..275143f4c 100644 --- a/ios/BrekekeLPCExtension/BrekekeLPCExtension.entitlements +++ b/ios/BrekekeLPCExtension/BrekekeLPCExtension.entitlements @@ -1,15 +1,14 @@ - - + + - - com.apple.developer.networking.networkextension - - app-push-provider - - com.apple.security.application-groups - - group.com.brekeke.lpc - - + + com.apple.developer.networking.networkextension + + app-push-provider + + com.apple.security.application-groups + + group.com.brekeke.lpcdev + + diff --git a/ios/BrekekePhone/BrekekePhone.entitlements b/ios/BrekekePhone/BrekekePhone.entitlements index 69ad167f5..f443457ca 100644 --- a/ios/BrekekePhone/BrekekePhone.entitlements +++ b/ios/BrekekePhone/BrekekePhone.entitlements @@ -1,37 +1,36 @@ - - + + - - aps-environment - production - com.apple.developer.icloud-container-identifiers - - iCloud.$(CFBundleIdentifier) - - com.apple.developer.icloud-services - - CloudDocuments - - com.apple.developer.networking.networkextension - - app-push-provider - - com.apple.developer.networking.wifi-info - - com.apple.developer.ubiquity-container-identifiers - - iCloud.$(CFBundleIdentifier) - - com.apple.developer.ubiquity-kvstore-identifier - $(TeamIdentifierPrefix)$(CFBundleIdentifier) - com.apple.security.application-groups - - group.com.brekeke.lpc - - keychain-access-groups - - $(AppIdentifierPrefix)com.brekeke.phonedev - - + + aps-environment + production + com.apple.developer.icloud-container-identifiers + + iCloud.$(CFBundleIdentifier) + + com.apple.developer.icloud-services + + CloudDocuments + + com.apple.developer.networking.networkextension + + app-push-provider + + com.apple.developer.networking.wifi-info + + com.apple.developer.ubiquity-container-identifiers + + iCloud.$(CFBundleIdentifier) + + com.apple.developer.ubiquity-kvstore-identifier + $(TeamIdentifierPrefix)$(CFBundleIdentifier) + com.apple.security.application-groups + + group.com.brekeke.lpcdev + + keychain-access-groups + + $(AppIdentifierPrefix)com.brekeke.phonedev + + From 2356de5576fe125368110705744683a274d09b1f Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Mon, 7 Oct 2024 18:03:40 +0700 Subject: [PATCH 2/4] nam --- .../java/com/brekeke/phonedev/IncomingCallActivity.java | 4 ++-- ios/BrekekeLPC/Settings/Settings.swift | 2 ++ ios/BrekekeLPC/Settings/SettingsManager.swift | 7 +------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/android/app/src/main/java/com/brekeke/phonedev/IncomingCallActivity.java b/android/app/src/main/java/com/brekeke/phonedev/IncomingCallActivity.java index d734e2e43..93c2028ce 100644 --- a/android/app/src/main/java/com/brekeke/phonedev/IncomingCallActivity.java +++ b/android/app/src/main/java/com/brekeke/phonedev/IncomingCallActivity.java @@ -878,14 +878,14 @@ public void onClick(View v) { case R.id.btn_back: onRequestUnlock(v); break; - // vIncomingCall + // vIncomingCall case R.id.btn_answer: onBtnAnswerClick(v); break; case R.id.btn_reject: onBtnRejectClick(v); break; - // vCallManage + // vCallManage case R.id.view_call_manage: onViewCallManageClick(v); break; diff --git a/ios/BrekekeLPC/Settings/Settings.swift b/ios/BrekekeLPC/Settings/Settings.swift index c7182c87b..e600cf354 100644 --- a/ios/BrekekeLPC/Settings/Settings.swift +++ b/ios/BrekekeLPC/Settings/Settings.swift @@ -16,6 +16,8 @@ public struct Settings: Codable, Equatable { } static var bundleIdentifier = "com.brekeke.phonedev" + static var lpcBundleIdentifier = "group.com.brekeke.lpcdev" + var pushManagerSettings = PushManagerSettings() var token: String var tokenVoip: String diff --git a/ios/BrekekeLPC/Settings/SettingsManager.swift b/ios/BrekekeLPC/Settings/SettingsManager.swift index d40319c01..47e73ec9e 100644 --- a/ios/BrekekeLPC/Settings/SettingsManager.swift +++ b/ios/BrekekeLPC/Settings/SettingsManager.swift @@ -18,11 +18,8 @@ class SettingsManager: NSObject { .eraseToAnyPublisher() private let settingsWillWriteSubject = PassthroughSubject() private static let settingsKey = "settings" - static var appGroupName = Settings - .bundleIdentifier == "com.brekeke.phonedev" ? "group.com.brekeke.lpcdev" : - "group.com.brekeke.lpc" private static let userDefaults = - UserDefaults(suiteName: appGroupName)! + UserDefaults(suiteName: Settings.lpcBundleIdentifier)! private let settingsSubject: CurrentValueSubject private static let logger = Logger( prependString: "SettingsManager", @@ -32,8 +29,6 @@ class SettingsManager: NSObject { override init() { var settings = Self.fetch() SettingsManager.logger.log("settings init(): \(settings)") - SettingsManager.logger - .log("settings init()::appGroupName:: \(SettingsManager.appGroupName)") if settings == nil { settings = Settings( token: "", From d7db8364c25a5b52ca4edc17ebf1904df6020c38 Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Mon, 7 Oct 2024 17:54:28 +0700 Subject: [PATCH 3/4] nam (cherry picked from commit 012a0c472373fa33768f833d79f299f0bf209874) --- CHANGELOG.md | 4 ++++ android/app/build.gradle | 4 ++-- ios/BrekekePhone.xcodeproj/project.pbxproj | 4 ++-- ios/BrekekePhone/Info.plist | 2 +- package.json | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dd05f177..1bb3424e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +#### 2.15.1 + +- Fix it should show "answered by " in call history (issue 862) + #### 2.14.10 - Implement runtime permissions request diff --git a/android/app/build.gradle b/android/app/build.gradle index d2e80cc43..0ef32375d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -64,8 +64,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled true - versionCode 214010 - versionName "2.14.10" + versionCode 215001 + versionName "2.15.1" } signingConfigs { diff --git a/ios/BrekekePhone.xcodeproj/project.pbxproj b/ios/BrekekePhone.xcodeproj/project.pbxproj index a30a723c9..891d846a4 100644 --- a/ios/BrekekePhone.xcodeproj/project.pbxproj +++ b/ios/BrekekePhone.xcodeproj/project.pbxproj @@ -816,7 +816,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 16.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift$(inherited)"; - MARKETING_VERSION = 2.14.10; + MARKETING_VERSION = 2.15.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.brekeke.phonedev.BrekekeLPCExtension; @@ -858,7 +858,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 16.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift$(inherited)"; - MARKETING_VERSION = 2.14.10; + MARKETING_VERSION = 2.15.1; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.brekeke.phonedev.BrekekeLPCExtension; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/ios/BrekekePhone/Info.plist b/ios/BrekekePhone/Info.plist index 15d3353ab..d22e30914 100644 --- a/ios/BrekekePhone/Info.plist +++ b/ios/BrekekePhone/Info.plist @@ -23,7 +23,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.14.10 + 2.15.1 CFBundleSignature ???? CFBundleURLTypes diff --git a/package.json b/package.json index ea0535bbd..b653537e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "brekekephone", - "version": "2.14.10", + "version": "2.15.1", "private": true, "homepage": "./", "scripts": { From 70fe22febf6fadddbed9e8d5966d5970c6601c3f Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Mon, 7 Oct 2024 18:07:08 +0700 Subject: [PATCH 4/4] nam --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bb3424e9..0cbee8ac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ #### 2.15.1 - Fix it should show "answered by " in call history (issue 862) +- Fix ios it should not connect lpc multiple (issue 853, 881) #### 2.14.10