From 178dc27dcaae6b3292f3ef3893a272aaeacd9720 Mon Sep 17 00:00:00 2001 From: Elsie He Date: Tue, 10 Sep 2024 17:13:33 -0700 Subject: [PATCH 1/3] fix: local development patches in Podfile --- ios/Podfile | 11 +++++++++++ ios/Podfile.lock | 2 +- ios/patches/FlipperTransportTypes.patch | 7 +++++++ ios/patches/YGLayout.patch | 11 +++++++++++ package.json | 1 + 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ios/patches/FlipperTransportTypes.patch create mode 100644 ios/patches/YGLayout.patch diff --git a/ios/Podfile b/ios/Podfile index 0446240c5..57d1d33b9 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -87,5 +87,16 @@ abstract_target 'MindloggerMobileCommonPods' do config[:reactNativePath], :mac_catalyst_enabled => false ) + + if ENV['LOCAL_DEV_PATCHES'] == 'true' + puts '[Local Dev] Removing .xcode.env.local' + %x(rm -f #{Pod::Config.instance.installation_root}/.xcode.env.local) + + puts '[Local Dev] Patching YogaKit to fix YGMeasureView call signature' + %x(patch #{Pod::Config.instance.installation_root}/Pods/YogaKit/YogaKit/Source/YGLayout.m -N < #{Pod::Config.instance.installation_root}/patches/YGLayout.patch) + + puts '[Local Dev] Patching Flipper to fix FlipperTransportTypes' + %x(patch #{Pod::Config.instance.installation_root}/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h -N < #{Pod::Config.instance.installation_root}/patches/FlipperTransportTypes.patch) + end end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 7d3304897..14dffba12 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1749,6 +1749,6 @@ SPEC CHECKSUMS: YogaKit: f782866e155069a2cca2517aafea43200b01fd5a ZIPFoundation: d170fa8e270b2a32bef9dcdcabff5b8f1a5deced -PODFILE CHECKSUM: 407c2bad1f5a0b2a39e0f4ece4251ac7baf4239e +PODFILE CHECKSUM: d42abdc8fa507a4e3e735244c7602178c3fea946 COCOAPODS: 1.14.3 diff --git a/ios/patches/FlipperTransportTypes.patch b/ios/patches/FlipperTransportTypes.patch new file mode 100644 index 000000000..eb36dc965 --- /dev/null +++ b/ios/patches/FlipperTransportTypes.patch @@ -0,0 +1,7 @@ +--- ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h.orig 2024-07-30 10:35:01 ++++ ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h 2024-07-30 10:19:31 +@@ -8,3 +8,3 @@ + #pragma once ++#include +- + #include diff --git a/ios/patches/YGLayout.patch b/ios/patches/YGLayout.patch new file mode 100644 index 000000000..3dfb6f2ca --- /dev/null +++ b/ios/patches/YGLayout.patch @@ -0,0 +1,11 @@ +--- ios/Pods/YogaKit/YogaKit/Source/YGLayout.m.orig 2024-07-30 10:35:01 ++++ ios/Pods/YogaKit/YogaKit/Source/YGLayout.m 2024-07-30 10:19:31 +@@ -324,7 +324,7 @@ + #pragma mark - Private + + static YGSize YGMeasureView( +- YGNodeRef node, ++ YGNodeConstRef node, + float width, + YGMeasureMode widthMode, + float height, \ No newline at end of file diff --git a/package.json b/package.json index 81977d925..92741cf3a 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "prettier:check": "prettier '**/*.{js,jsx,ts,tsx}' --check", "prettier:fix": "prettier '**/*.{js,jsx,ts,tsx}' --write", "pods": "bundle exec pod install --project-directory=ios", + "pods:local": "LOCAL_DEV_PATCHES=true yarn pods", "prepare": "husky install", "postinstall": "yarn patch-package", "bump": "bundle exec fastlane bump_version", From bf910197d10d764c90d73e4d49f047cc95259360 Mon Sep 17 00:00:00 2001 From: felipeMetaLab Date: Wed, 18 Sep 2024 23:36:11 -0700 Subject: [PATCH 2/3] feat: removing wait from use upload progress M2-7771(#858) removing wait from use upload progress, removing artificial delay from upload progress. * chore/improving encrypt function and removing wait from useUploadProgress. * chore/turning notify into syncronous, removing artificial delay variables, and roll back to old encrypt * chore/removing async from useUploadProgress in onProgress change --------- Co-authored-by: Felipe Imperio --- src/shared/lib/hooks/useUploadProgress.ts | 5 ++--- .../lib/observables/uploadProgressObservable.ts | 15 ++------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/shared/lib/hooks/useUploadProgress.ts b/src/shared/lib/hooks/useUploadProgress.ts index ee59be018..b72edd3be 100644 --- a/src/shared/lib/hooks/useUploadProgress.ts +++ b/src/shared/lib/hooks/useUploadProgress.ts @@ -2,7 +2,7 @@ import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import { UploadProgressObservable, wait } from '../'; +import { UploadProgressObservable } from '../'; import { SecondLevelStep, UploadProgress } from '../observables/'; import { useForceUpdate } from './'; @@ -98,9 +98,8 @@ const useUploadProgress = (): UseUploadProgressResult => { } useEffect(() => { - const onProgressChange = async (delay: number) => { + const onProgressChange = () => { update(); - await wait(delay); }; UploadProgressObservable.addObserver(onProgressChange); diff --git a/src/shared/lib/observables/uploadProgressObservable.ts b/src/shared/lib/observables/uploadProgressObservable.ts index c06d7badd..0a447c1d2 100644 --- a/src/shared/lib/observables/uploadProgressObservable.ts +++ b/src/shared/lib/observables/uploadProgressObservable.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-nested-ternary */ import { CommonObservable } from '../utils'; export type SecondLevelStep = @@ -26,10 +25,6 @@ export interface IUploadProgressObservableSetters { reset(): void; } -const ShortDelay = 100; -const MiddleDelay = 200; -const LongFakeStepDelay = 500; - class UploadProgressObservable extends CommonObservable implements IUploadProgressObservableSetters @@ -61,19 +56,13 @@ class UploadProgressObservable public async setTotalFilesInActivity(value: number | null) { this.uploadProgress.totalFilesInActivity = value; - await this.notifyAsync(value === 0 ? LongFakeStepDelay : 0); + this.notify(); } public async setCurrentSecondLevelStepKey(value: SecondLevelStep | null) { this.uploadProgress.currentSecondLevelStepKey = value; - await this.notifyAsync( - value === 'upload_files' || value === 'encrypt_answers' - ? ShortDelay - : value === 'completed' - ? MiddleDelay - : 0, - ); + this.notify(); } public get totalActivities() { From 97e59ee8a72302ee9ff3b23d6885b6dc620c0e34 Mon Sep 17 00:00:00 2001 From: Carlos Chacon Date: Thu, 26 Sep 2024 08:44:31 -0600 Subject: [PATCH 3/3] chore: bump version --- android/app/build.gradle | 4 +- .../project.pbxproj | 48 +++++++++---------- package.json | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 855b4131e..f2f4e8d28 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -100,8 +100,8 @@ android { applicationId "lab.childmindinstitute.data" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1585 - versionName "2.2.2" + versionCode 1587 + versionName "2.3.0" resValue "string", "app_name", "Mindlogger" resValue "string", "build_config_package", "lab.childmindinstitute.data" manifestPlaceholders = [ diff --git a/ios/MindloggerMobile.xcodeproj/project.pbxproj b/ios/MindloggerMobile.xcodeproj/project.pbxproj index eef7eb0df..2a9a1af96 100644 --- a/ios/MindloggerMobile.xcodeproj/project.pbxproj +++ b/ios/MindloggerMobile.xcodeproj/project.pbxproj @@ -1667,7 +1667,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1679,7 +1679,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -1698,7 +1698,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; INFOPLIST_FILE = MindloggerMobileTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -1706,7 +1706,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -1728,7 +1728,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -1739,7 +1739,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1769,7 +1769,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobile/MindloggerMobileRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = MindloggerMobile/Info.plist; @@ -1779,7 +1779,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1979,7 +1979,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -1990,7 +1990,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2019,7 +2019,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileDevRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile dev-Info.plist"; @@ -2029,7 +2029,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2058,7 +2058,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2069,7 +2069,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2099,7 +2099,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile qa-Info.plist"; @@ -2109,7 +2109,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2136,7 +2136,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingDebug.entitlements; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2147,7 +2147,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2176,7 +2176,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile staging-Info.plist"; @@ -2186,7 +2186,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2215,7 +2215,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2226,7 +2226,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2256,7 +2256,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1585; + CURRENT_PROJECT_VERSION = 1587; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile uat-Info.plist"; @@ -2266,7 +2266,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.2; + MARKETING_VERSION = 2.3.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/package.json b/package.json index 92741cf3a..6b5e50dce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mindlogger-mobile", - "version": "2.2.2", + "version": "2.3.0", "private": true, "scripts": { "android": "yarn android:dev",