diff --git a/dydx/Podfile.lock b/dydx/Podfile.lock index 499ddc2c..d1b1f9a2 100644 --- a/dydx/Podfile.lock +++ b/dydx/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - Abacus (1.7.84) + - Abacus (1.8.12) - Amplitude-iOS (4.10.0) - AppsFlyerFramework (6.14.4): - AppsFlyerFramework/Main (= 6.14.4) @@ -19,21 +19,21 @@ PODS: - EasyTipView (2.1.0) - EFQRCode (6.2.1): - swift_qrcodejs (~> 2.2.2) - - Firebase/AnalyticsWithoutAdIdSupport (10.28.0): + - Firebase/AnalyticsWithoutAdIdSupport (10.28.1): - Firebase/CoreOnly - FirebaseAnalytics/WithoutAdIdSupport (~> 10.28.0) - - Firebase/Core (10.28.0): + - Firebase/Core (10.28.1): - Firebase/CoreOnly - FirebaseAnalytics (~> 10.28.0) - - Firebase/CoreOnly (10.28.0): - - FirebaseCore (= 10.28.0) - - Firebase/Messaging (10.28.0): + - Firebase/CoreOnly (10.28.1): + - FirebaseCore (= 10.28.1) + - Firebase/Messaging (10.28.1): - Firebase/CoreOnly - FirebaseMessaging (~> 10.28.0) - - Firebase/Performance (10.28.0): + - Firebase/Performance (10.28.1): - Firebase/CoreOnly - FirebasePerformance (~> 10.28.0) - - Firebase/RemoteConfig (10.28.0): + - Firebase/RemoteConfig (10.28.1): - Firebase/CoreOnly - FirebaseRemoteConfig (~> 10.28.0) - FirebaseABTesting (10.28.0): @@ -65,7 +65,7 @@ PODS: - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30911.0, >= 2.30908.0) - - FirebaseCore (10.28.0): + - FirebaseCore (10.28.1): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.12) - GoogleUtilities/Logger (~> 7.12) @@ -73,7 +73,7 @@ PODS: - FirebaseCore (~> 10.0) - FirebaseCoreInternal (10.28.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseCrashlytics (10.28.0): + - FirebaseCrashlytics (10.28.1): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseRemoteConfigInterop (~> 10.23) @@ -231,10 +231,10 @@ PODS: - GoogleUtilities/UserDefaults (7.13.3): - GoogleUtilities/Logger - GoogleUtilities/Privacy - - GTMSessionFetcher (3.4.1): - - GTMSessionFetcher/Full (= 3.4.1) - - GTMSessionFetcher/Core (3.4.1) - - GTMSessionFetcher/Full (3.4.1): + - GTMSessionFetcher (3.5.0): + - GTMSessionFetcher/Full (= 3.5.0) + - GTMSessionFetcher/Core (3.5.0) + - GTMSessionFetcher/Full (3.5.0): - GTMSessionFetcher/Core - HMSegmentedControl (1.5.6) - iCarousel (1.8.3) @@ -263,7 +263,7 @@ PODS: - SDWebImage/Core (5.19.2) - SDWebImageSVGCoder (1.7.0): - SDWebImage/Core (~> 5.6) - - SDWebImageSwiftUI (3.0.4): + - SDWebImageSwiftUI (3.1.0): - SDWebImage (~> 5.10) - SimpleKeychain (0.12.5) - SnapKit (5.7.1) @@ -386,7 +386,7 @@ CHECKOUT OPTIONS: :git: https://github.com/dydxprotocol/Charts.git SPEC CHECKSUMS: - Abacus: f17b954538274c2d035cddc0b20f95462ded88a7 + Abacus: f971f5b6033961390897f301bfc8cd6f4dc1d2a9 Amplitude-iOS: 7d8cdc3408ba35c2e68368fc7c692cd104606b94 AppsFlyerFramework: 4d7e8c7a6d8487e2ec84b63ba3603ec985308ac4 Atributika: ecedf5259e4aa3c6278d840b6c18d60c1a8b6ca0 @@ -399,13 +399,13 @@ SPEC CHECKSUMS: DrawerMenu: f6ca91901e2b21086e3c19bcca278d3d3127e85f EasyTipView: a92b6edc377b81c5ac18e9fd35d5ee78e9409488 EFQRCode: a4d39ec3466b68dffa71de3b5caef7c9ceefdc53 - Firebase: 5121c624121af81cbc81df3bda414b3c28c4f3c3 + Firebase: 49e62242b3ae422a002ab647a7e62a332a8c3ec1 FirebaseABTesting: 589bc28c0ab3e5554336895a34aa262e24276665 FirebaseAnalytics: 1e06fe7d246af7230b08d1d9cdca54a4624dd461 - FirebaseCore: 857dc1c6dd1255675047404d8466f7dfaac5d779 + FirebaseCore: dfc33f0dffba05f76181da9cc0151171ebb3bd10 FirebaseCoreExtension: f63147b723e2a700fe0f34ec6fb7f358d6fe83e0 FirebaseCoreInternal: 58d07f1362fddeb0feb6a857d1d1d1c5e558e698 - FirebaseCrashlytics: d3cffa6e6eb4fa9234162dff3ba62e37b93252a6 + FirebaseCrashlytics: f51e12b93f8e1134bbed602ed22df33804d55ccf FirebaseInstallations: 60c1d3bc1beef809fd1ad1189a8057a040c59f2e FirebaseMessaging: 087a7c7cadef7b9239f005bc4db823894844f323 FirebasePerformance: a4077b92b1d5e338dbbfac136ce2c4021a14f055 @@ -418,7 +418,7 @@ SPEC CHECKSUMS: GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a GoogleToolboxForMac: d1a2cbf009c453f4d6ded37c105e2f67a32206d8 GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 - GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd + GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352 iCarousel: d782f635afac190c49bb8ee455882284cff8b85f JTCalendar: 1b326e0d59dd1855b52c5f3feb059d2ff953805d @@ -436,7 +436,7 @@ SPEC CHECKSUMS: ReachabilitySwift: 7f151ff156cea1481a8411701195ac6a984f4979 SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c - SDWebImageSwiftUI: 824628d8220906aa101f62b39a7492edd138449d + SDWebImageSwiftUI: 6a6e87226afef5a5e30e47c5be8a77a4557933fc SimpleKeychain: 8193a9e40967eccac933c1fde82de46c07a5ae26 SnapKit: d612e99e678a2d3b95bf60b0705ed0a35c03484a SVGKit: 1ad7513f8c74d9652f94ed64ddecda1a23864dea diff --git a/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m b/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m index 40cbcedb..0c081df9 100644 --- a/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m +++ b/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m @@ -438,8 +438,6 @@ - (NSString *)getSignalName:(NSNumber *)signalCode { return @"SIGSYS"; case SIGTRAP: return @"SIGTRAP"; - case SIGTERM: - return @"SIGTERM"; default: return @"UNKNOWN"; } diff --git a/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c b/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c index 0b71808e..92bc830e 100644 --- a/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c +++ b/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c @@ -150,8 +150,6 @@ exception_mask_t FIRCLSMachExceptionMaskForSignal(int signal) { return EXC_MASK_CRASH; case SIGFPE: return EXC_MASK_ARITHMETIC; - case SIGTERM: - return EXC_MASK_CRASH; } return 0; diff --git a/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c b/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c index 0e745932..1fcdbf22 100644 --- a/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c +++ b/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c @@ -21,17 +21,8 @@ #include #if CLS_SIGNAL_SUPPORTED -static const int FIRCLSFatalSignals[FIRCLSSignalCount] = { - SIGABRT, SIGBUS, SIGFPE, SIGILL, - SIGSEGV, SIGSYS, SIGTRAP, - // SIGTERM can be caught and is usually sent by iOS and variants - // when Apple wants to try and gracefully shutdown the app - // before sending a SIGKILL (which can't be caught). - // Some areas I've seen this happen are: - // - When the OS updates an app. - // - In some circumstances for Watchdog Events. - // - Resource overuse (CPU, Disk, ...). - SIGTERM}; +static const int FIRCLSFatalSignals[FIRCLSSignalCount] = {SIGABRT, SIGBUS, SIGFPE, SIGILL, + SIGSEGV, SIGSYS, SIGTRAP}; #if CLS_USE_SIGALTSTACK static void FIRCLSSignalInstallAltStack(FIRCLSSignalReadContext *roContext); @@ -246,9 +237,6 @@ void FIRCLSSignalNameLookup(int number, int code, const char **name, const char case SIGTRAP: *name = "SIGTRAP"; break; - case SIGTERM: - *name = "SIGTERM"; - break; default: *name = "UNKNOWN"; break; diff --git a/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h b/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h index e9e0478c..17d14810 100644 --- a/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h +++ b/dydx/Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h @@ -30,8 +30,7 @@ #endif #if CLS_SIGNAL_SUPPORTED -// keep in sync with the list in _FIRCLSFatalSignals_. -#define FIRCLSSignalCount (8) +#define FIRCLSSignalCount (7) typedef struct { const char* path; diff --git a/dydx/Pods/GTMSessionFetcher/Sources/Core/GTMSessionUploadFetcher.m b/dydx/Pods/GTMSessionFetcher/Sources/Core/GTMSessionUploadFetcher.m index 73f720f1..bb5aacbc 100644 --- a/dydx/Pods/GTMSessionFetcher/Sources/Core/GTMSessionUploadFetcher.m +++ b/dydx/Pods/GTMSessionFetcher/Sources/Core/GTMSessionUploadFetcher.m @@ -790,7 +790,15 @@ - (void)generateChunkSubdataFromFileURL:(NSURL *)fileURL } if (offset > 0 || length < fullUploadLength) { NSRange range = NSMakeRange((NSUInteger)offset, (NSUInteger)length); - resultData = [mappedData subdataWithRange:range]; + @try { + resultData = [mappedData subdataWithRange:range]; + } @catch (NSException *exception) { + NSString *errorMessage = exception.description; + GTMSESSION_ASSERT_DEBUG(NO, @"%@", errorMessage); + response(nil, kGTMSessionUploadFetcherUnknownFileSize, + [self uploadChunkUnavailableErrorWithDescription:errorMessage]); + return; + } } else { resultData = mappedData; } diff --git a/dydx/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h b/dydx/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h index 3dd80c08..e01f7dad 100644 --- a/dydx/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h +++ b/dydx/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h @@ -605,6 +605,13 @@ NSData *_Nullable GTMDataFromInputStream(NSInputStream *inputStream, NSError **o #endif // Completion handler passed to -[GTMFetcherDecoratorProtocol fetcherWillStart:completionHandler:]. + +// TODO(https://github.com/google/gtm-session-fetcher/issues/398): Uncomment this when the next +// major version bump happens, since this is an API breaking change for Swift clients. +// +// typedef void (^GTMFetcherDecoratorFetcherWillStartCompletionHandler)(NSURLRequest *_Nullable_result, +// NSError *_Nullable); + typedef void (^GTMFetcherDecoratorFetcherWillStartCompletionHandler)(NSURLRequest *_Nullable, NSError *_Nullable); diff --git a/dydx/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionUploadFetcher.h b/dydx/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionUploadFetcher.h index 3537ccc9..64d44ae2 100644 --- a/dydx/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionUploadFetcher.h +++ b/dydx/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionUploadFetcher.h @@ -161,7 +161,7 @@ typedef void (^GTMSessionUploadFetcherCancellationHandler)(GTMSessionFetcher *_N // // Unlike other callbacks, since this is related specifically to the stopFetching flow it is not // cleared by stopFetching. It will instead clear itself after it is invoked or if the completion -// has occured before stopFetching is called. +// has occurred before stopFetching is called. @property(atomic, copy, nullable) GTMSessionUploadFetcherCancellationHandler cancellationHandler; // Exposed for testing only. diff --git a/dydx/Pods/Local Podspecs/abacus.podspec.json b/dydx/Pods/Local Podspecs/abacus.podspec.json index dbcd0961..3ec7ce66 100644 --- a/dydx/Pods/Local Podspecs/abacus.podspec.json +++ b/dydx/Pods/Local Podspecs/abacus.podspec.json @@ -1,10 +1,10 @@ { "name": "Abacus", - "version": "1.7.84", + "version": "1.8.12", "homepage": "https://github.com/dydxprotocol/v4-abacus", "source": { "git": "git@github.com:dydxprotocol/v4-abacus.git", - "tag": "v1.7.84" + "tag": "v1.8.12" }, "authors": "", "license": "", @@ -20,7 +20,7 @@ "name": "Build abacus", "execution_position": "before_compile", "shell_path": "/bin/sh", - "script": " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -evx\n \n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \n if [ ! -f $REPO_ROOT/gradlew ]; then\n rm -rf $PRODUCT_MODULE_NAME\n git clone git@github.com:dydxprotocol/v4-abacus.git --branch v1.7.84 $PRODUCT_MODULE_NAME\n \n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n \n # We will need to overwrite the dummy framework generated by cocoapods with the actual one from Kotlin\n \n TARGET_FRAMEWORK=\"${TARGET_BUILD_DIR}/${TARGET_NAME}.framework\"\n ABACUS_FRAMEWORK=\"$REPO_ROOT/build/cocoapods/framework/$PRODUCT_MODULE_NAME.framework\"\n rm -rf $TARGET_FRAMEWORK\n mkdir $TARGET_FRAMEWORK\n cp -rf $ABACUS_FRAMEWORK/* $TARGET_FRAMEWORK\n else\n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n fi\n" + "script": " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -evx\n \n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \n if [ ! -f $REPO_ROOT/gradlew ]; then\n rm -rf $PRODUCT_MODULE_NAME\n git clone git@github.com:dydxprotocol/v4-abacus.git --branch v1.8.12 $PRODUCT_MODULE_NAME\n \n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n \n # We will need to overwrite the dummy framework generated by cocoapods with the actual one from Kotlin\n \n TARGET_FRAMEWORK=\"${TARGET_BUILD_DIR}/${TARGET_NAME}.framework\"\n ABACUS_FRAMEWORK=\"$REPO_ROOT/build/cocoapods/framework/$PRODUCT_MODULE_NAME.framework\"\n rm -rf $TARGET_FRAMEWORK\n mkdir $TARGET_FRAMEWORK\n cp -rf $ABACUS_FRAMEWORK/* $TARGET_FRAMEWORK\n else\n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n fi\n" } ], "platforms": { diff --git a/dydx/Pods/Manifest.lock b/dydx/Pods/Manifest.lock index 499ddc2c..d1b1f9a2 100644 --- a/dydx/Pods/Manifest.lock +++ b/dydx/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - Abacus (1.7.84) + - Abacus (1.8.12) - Amplitude-iOS (4.10.0) - AppsFlyerFramework (6.14.4): - AppsFlyerFramework/Main (= 6.14.4) @@ -19,21 +19,21 @@ PODS: - EasyTipView (2.1.0) - EFQRCode (6.2.1): - swift_qrcodejs (~> 2.2.2) - - Firebase/AnalyticsWithoutAdIdSupport (10.28.0): + - Firebase/AnalyticsWithoutAdIdSupport (10.28.1): - Firebase/CoreOnly - FirebaseAnalytics/WithoutAdIdSupport (~> 10.28.0) - - Firebase/Core (10.28.0): + - Firebase/Core (10.28.1): - Firebase/CoreOnly - FirebaseAnalytics (~> 10.28.0) - - Firebase/CoreOnly (10.28.0): - - FirebaseCore (= 10.28.0) - - Firebase/Messaging (10.28.0): + - Firebase/CoreOnly (10.28.1): + - FirebaseCore (= 10.28.1) + - Firebase/Messaging (10.28.1): - Firebase/CoreOnly - FirebaseMessaging (~> 10.28.0) - - Firebase/Performance (10.28.0): + - Firebase/Performance (10.28.1): - Firebase/CoreOnly - FirebasePerformance (~> 10.28.0) - - Firebase/RemoteConfig (10.28.0): + - Firebase/RemoteConfig (10.28.1): - Firebase/CoreOnly - FirebaseRemoteConfig (~> 10.28.0) - FirebaseABTesting (10.28.0): @@ -65,7 +65,7 @@ PODS: - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30911.0, >= 2.30908.0) - - FirebaseCore (10.28.0): + - FirebaseCore (10.28.1): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.12) - GoogleUtilities/Logger (~> 7.12) @@ -73,7 +73,7 @@ PODS: - FirebaseCore (~> 10.0) - FirebaseCoreInternal (10.28.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseCrashlytics (10.28.0): + - FirebaseCrashlytics (10.28.1): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseRemoteConfigInterop (~> 10.23) @@ -231,10 +231,10 @@ PODS: - GoogleUtilities/UserDefaults (7.13.3): - GoogleUtilities/Logger - GoogleUtilities/Privacy - - GTMSessionFetcher (3.4.1): - - GTMSessionFetcher/Full (= 3.4.1) - - GTMSessionFetcher/Core (3.4.1) - - GTMSessionFetcher/Full (3.4.1): + - GTMSessionFetcher (3.5.0): + - GTMSessionFetcher/Full (= 3.5.0) + - GTMSessionFetcher/Core (3.5.0) + - GTMSessionFetcher/Full (3.5.0): - GTMSessionFetcher/Core - HMSegmentedControl (1.5.6) - iCarousel (1.8.3) @@ -263,7 +263,7 @@ PODS: - SDWebImage/Core (5.19.2) - SDWebImageSVGCoder (1.7.0): - SDWebImage/Core (~> 5.6) - - SDWebImageSwiftUI (3.0.4): + - SDWebImageSwiftUI (3.1.0): - SDWebImage (~> 5.10) - SimpleKeychain (0.12.5) - SnapKit (5.7.1) @@ -386,7 +386,7 @@ CHECKOUT OPTIONS: :git: https://github.com/dydxprotocol/Charts.git SPEC CHECKSUMS: - Abacus: f17b954538274c2d035cddc0b20f95462ded88a7 + Abacus: f971f5b6033961390897f301bfc8cd6f4dc1d2a9 Amplitude-iOS: 7d8cdc3408ba35c2e68368fc7c692cd104606b94 AppsFlyerFramework: 4d7e8c7a6d8487e2ec84b63ba3603ec985308ac4 Atributika: ecedf5259e4aa3c6278d840b6c18d60c1a8b6ca0 @@ -399,13 +399,13 @@ SPEC CHECKSUMS: DrawerMenu: f6ca91901e2b21086e3c19bcca278d3d3127e85f EasyTipView: a92b6edc377b81c5ac18e9fd35d5ee78e9409488 EFQRCode: a4d39ec3466b68dffa71de3b5caef7c9ceefdc53 - Firebase: 5121c624121af81cbc81df3bda414b3c28c4f3c3 + Firebase: 49e62242b3ae422a002ab647a7e62a332a8c3ec1 FirebaseABTesting: 589bc28c0ab3e5554336895a34aa262e24276665 FirebaseAnalytics: 1e06fe7d246af7230b08d1d9cdca54a4624dd461 - FirebaseCore: 857dc1c6dd1255675047404d8466f7dfaac5d779 + FirebaseCore: dfc33f0dffba05f76181da9cc0151171ebb3bd10 FirebaseCoreExtension: f63147b723e2a700fe0f34ec6fb7f358d6fe83e0 FirebaseCoreInternal: 58d07f1362fddeb0feb6a857d1d1d1c5e558e698 - FirebaseCrashlytics: d3cffa6e6eb4fa9234162dff3ba62e37b93252a6 + FirebaseCrashlytics: f51e12b93f8e1134bbed602ed22df33804d55ccf FirebaseInstallations: 60c1d3bc1beef809fd1ad1189a8057a040c59f2e FirebaseMessaging: 087a7c7cadef7b9239f005bc4db823894844f323 FirebasePerformance: a4077b92b1d5e338dbbfac136ce2c4021a14f055 @@ -418,7 +418,7 @@ SPEC CHECKSUMS: GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a GoogleToolboxForMac: d1a2cbf009c453f4d6ded37c105e2f67a32206d8 GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 - GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd + GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352 iCarousel: d782f635afac190c49bb8ee455882284cff8b85f JTCalendar: 1b326e0d59dd1855b52c5f3feb059d2ff953805d @@ -436,7 +436,7 @@ SPEC CHECKSUMS: ReachabilitySwift: 7f151ff156cea1481a8411701195ac6a984f4979 SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c - SDWebImageSwiftUI: 824628d8220906aa101f62b39a7492edd138449d + SDWebImageSwiftUI: 6a6e87226afef5a5e30e47c5be8a77a4557933fc SimpleKeychain: 8193a9e40967eccac933c1fde82de46c07a5ae26 SnapKit: d612e99e678a2d3b95bf60b0705ed0a35c03484a SVGKit: 1ad7513f8c74d9652f94ed64ddecda1a23864dea diff --git a/dydx/Pods/Pods.xcodeproj/project.pbxproj b/dydx/Pods/Pods.xcodeproj/project.pbxproj index 4948fad7..3b650d6e 100644 --- a/dydx/Pods/Pods.xcodeproj/project.pbxproj +++ b/dydx/Pods/Pods.xcodeproj/project.pbxproj @@ -9,10 +9,10 @@ /* Begin PBXAggregateTarget section */ 2B2AD932AF1A90828B4DFC5AC6955ADA /* Abacus */ = { isa = PBXAggregateTarget; - buildConfigurationList = 86956128E665F81383D773F5E42D23A9 /* Build configuration list for PBXAggregateTarget "Abacus" */; + buildConfigurationList = 1CB8E76D69265C4CB77AC911684C124F /* Build configuration list for PBXAggregateTarget "Abacus" */; buildPhases = ( - 3A174A6A7CD5E4D6721B84902339E0F6 /* [CP-User] Build abacus */, - 18D10D65DFCD6C59B223394838C3156B /* [CP] Copy dSYMs */, + 76D319F55FEBE08C7DA28208A108E068 /* [CP-User] Build abacus */, + 9F0BB6A406B1C718F2E3A1E2D2D84EBF /* [CP] Copy dSYMs */, ); dependencies = ( ); @@ -24506,7 +24506,17 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 18D10D65DFCD6C59B223394838C3156B /* [CP] Copy dSYMs */ = { + 76D319F55FEBE08C7DA28208A108E068 /* [CP-User] Build abacus */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + name = "[CP-User] Build abacus"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -evx\n \n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \n if [ ! -f $REPO_ROOT/gradlew ]; then\n rm -rf $PRODUCT_MODULE_NAME\n git clone git@github.com:dydxprotocol/v4-abacus.git --branch v1.8.12 $PRODUCT_MODULE_NAME\n \n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n \n # We will need to overwrite the dummy framework generated by cocoapods with the actual one from Kotlin\n \n TARGET_FRAMEWORK=\"${TARGET_BUILD_DIR}/${TARGET_NAME}.framework\"\n ABACUS_FRAMEWORK=\"$REPO_ROOT/build/cocoapods/framework/$PRODUCT_MODULE_NAME.framework\"\n rm -rf $TARGET_FRAMEWORK\n mkdir $TARGET_FRAMEWORK\n cp -rf $ABACUS_FRAMEWORK/* $TARGET_FRAMEWORK\n else\n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n fi\n"; + }; + 9F0BB6A406B1C718F2E3A1E2D2D84EBF /* [CP] Copy dSYMs */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -24523,16 +24533,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Abacus/Abacus-copy-dsyms.sh\"\n"; showEnvVarsInLog = 0; }; - 3A174A6A7CD5E4D6721B84902339E0F6 /* [CP-User] Build abacus */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - name = "[CP-User] Build abacus"; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -evx\n \n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \n if [ ! -f $REPO_ROOT/gradlew ]; then\n rm -rf $PRODUCT_MODULE_NAME\n git clone git@github.com:dydxprotocol/v4-abacus.git --branch v1.7.84 $PRODUCT_MODULE_NAME\n \n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n \n # We will need to overwrite the dummy framework generated by cocoapods with the actual one from Kotlin\n \n TARGET_FRAMEWORK=\"${TARGET_BUILD_DIR}/${TARGET_NAME}.framework\"\n ABACUS_FRAMEWORK=\"$REPO_ROOT/build/cocoapods/framework/$PRODUCT_MODULE_NAME.framework\"\n rm -rf $TARGET_FRAMEWORK\n mkdir $TARGET_FRAMEWORK\n cp -rf $ABACUS_FRAMEWORK/* $TARGET_FRAMEWORK\n else\n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n fi\n"; - }; B1176D71CA1D75BF5D4C95994F09DA88 /* [CP] Copy XCFrameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -36182,24 +36182,6 @@ }; name = Debug; }; - 670B57C612ED31041CFE9AA63A72C240 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4170BD5336E5EA635EB281E3CFCFD7E2 /* Abacus.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; 675C5C4BC4299628AB30F105209CE60C /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 117095D98A43BA5228734A6F5CE40B1C /* FirebasePerformance.debug.xcconfig */; @@ -36878,23 +36860,6 @@ }; name = Debug; }; - 823211375AA2E461CCDEFF2290385B2E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8F05F14038FDD9DB47A257FF06AE195D /* Abacus.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; 82587DA83804208C387453BAD7CF2FCB /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = FB8F3E4FB8FDA860321335A3ABDE5CDF /* Pods-iOS-dydxCarteraTests.debug.xcconfig */; @@ -37533,6 +37498,24 @@ }; name = Debug; }; + 939592E10427A377FA7DC6E459CB445A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4170BD5336E5EA635EB281E3CFCFD7E2 /* Abacus.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; 942177120F5D805AA50FD2398B1F2B3B /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 19C6BE560C56D5C70FC1802E7E5FD3BC /* FirebaseCoreInternal.release.xcconfig */; @@ -40231,6 +40214,23 @@ }; name = Release; }; + E316F8100B3ACBDCFF1CD4B33B2BDB66 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8F05F14038FDD9DB47A257FF06AE195D /* Abacus.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; E3F9F68815E64D3451A4719C00A29BBB /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = BCCE8CCB6A50B45C140E51E625AD15EF /* SnapKit.debug.xcconfig */; @@ -41504,6 +41504,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 1CB8E76D69265C4CB77AC911684C124F /* Build configuration list for PBXAggregateTarget "Abacus" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E316F8100B3ACBDCFF1CD4B33B2BDB66 /* Debug */, + 939592E10427A377FA7DC6E459CB445A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 1CBD4A8525E8F96EB6B48E83A7C545E5 /* Build configuration list for PBXNativeTarget "EFQRCode" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -41990,15 +41999,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 86956128E665F81383D773F5E42D23A9 /* Build configuration list for PBXAggregateTarget "Abacus" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 823211375AA2E461CCDEFF2290385B2E /* Debug */, - 670B57C612ED31041CFE9AA63A72C240 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 8752DFD40999434AF560001A1946A07A /* Build configuration list for PBXNativeTarget "FirebaseSharedSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/dydx/Pods/SDWebImageSwiftUI/README.md b/dydx/Pods/SDWebImageSwiftUI/README.md index dd3bf8be..b092b5c5 100644 --- a/dydx/Pods/SDWebImageSwiftUI/README.md +++ b/dydx/Pods/SDWebImageSwiftUI/README.md @@ -117,7 +117,7 @@ For downstream framework author, you should create a `Package.swift` file into y ```swift let package = Package( dependencies: [ - .package(url: "https://github.com/SDWebImage/SDWebImageSwiftUI.git", from: "2.0.0") + .package(url: "https://github.com/SDWebImage/SDWebImageSwiftUI.git", from: "3.0.0") ], ) ``` @@ -655,7 +655,7 @@ class ViewController: UIViewController { } // ContentView.swift -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) struct ContentView : View { var body: some View { Group { diff --git a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/AnimatedImage.swift b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/AnimatedImage.swift index 6c1b3ba4..66543720 100644 --- a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/AnimatedImage.swift +++ b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/AnimatedImage.swift @@ -12,7 +12,7 @@ import SDWebImage #if !os(watchOS) /// A coordinator object used for `AnimatedImage`native view bridge for UIKit/AppKit. -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public final class AnimatedImageCoordinator: NSObject { /// Any user-provided object for actual coordinator, such as delegate method, taget-action @@ -25,7 +25,7 @@ public final class AnimatedImageCoordinator: NSObject { } /// Data Binding Object, only properties in this object can support changes from user with @State and refresh -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) final class AnimatedImageModel : ObservableObject { enum Kind { case url @@ -53,7 +53,7 @@ final class AnimatedImageModel : ObservableObject { } /// Loading Binding Object, only properties in this object can support changes from user with @State and refresh -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) final class AnimatedLoadingModel : ObservableObject { @Published var image: PlatformImage? // loaded image, note when progressive loading, this will published multiple times with different partial image @Published var isLoading: Bool = false // whether network is loading or cache is querying, should only be used for indicator binding @@ -66,7 +66,7 @@ final class AnimatedLoadingModel : ObservableObject { } /// Completion Handler Binding Object, supports dynamic @State changes -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) final class AnimatedImageHandler: ObservableObject { // Completion Handler @Published var successBlock: ((PlatformImage, Data?, SDImageCacheType) -> Void)? @@ -78,7 +78,7 @@ final class AnimatedImageHandler: ObservableObject { } /// Layout Binding Object, supports dynamic @State changes -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) final class AnimatedImageLayout : ObservableObject { var contentMode: ContentMode? var aspectRatio: CGFloat? @@ -90,7 +90,7 @@ final class AnimatedImageLayout : ObservableObject { } /// Configuration Binding Object, supports dynamic @State changes -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) final class AnimatedImageConfiguration: ObservableObject { var incrementalLoad: Bool? var maxBufferSize: UInt? @@ -106,7 +106,7 @@ final class AnimatedImageConfiguration: ObservableObject { } /// A Image View type to load image from url, data or bundle. Supports animated and static image format. -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public struct AnimatedImage : PlatformViewRepresentable { @ObservedObject var imageModel: AnimatedImageModel @ObservedObject var imageHandler = AnimatedImageHandler() @@ -275,6 +275,8 @@ public struct AnimatedImage : PlatformViewRepresentable { self.imageModel.placeholderView?.isHidden = false self.imageHandler.failureBlock?(error ?? NSError()) } + // Finished loading, async + finishUpdateView(view, context: context, image: image) } } @@ -361,22 +363,9 @@ public struct AnimatedImage : PlatformViewRepresentable { break // impossible } - #if os(macOS) - if self.isAnimating != view.wrapped.animates { - view.wrapped.animates = self.isAnimating - } - #else - if self.isAnimating != view.wrapped.isAnimating { - if self.isAnimating { - view.wrapped.startAnimating() - } else { - view.wrapped.stopAnimating() - } - } - #endif + // Finished loading, sync + finishUpdateView(view, context: context, image: view.wrapped.image) - configureView(view, context: context) - layoutView(view, context: context) if let viewUpdateBlock = imageHandler.viewUpdateBlock { viewUpdateBlock(view.wrapped, context) } @@ -394,6 +383,17 @@ public struct AnimatedImage : PlatformViewRepresentable { } } + func finishUpdateView(_ view: AnimatedImageViewWrapper, context: Context, image: PlatformImage?) { + // Finished loading + if let imageSize = image?.size { + view.imageSize = imageSize + } else { + view.imageSize = nil + } + configureView(view, context: context) + layoutView(view, context: context) + } + func layoutView(_ view: AnimatedImageViewWrapper, context: Context) { // AspectRatio && ContentMode #if os(macOS) @@ -442,9 +442,7 @@ public struct AnimatedImage : PlatformViewRepresentable { #endif // Resizable - if let _ = imageLayout.resizingMode { - view.resizable = true - } + view.resizingMode = imageLayout.resizingMode // Animated Image does not support resizing mode and rendering mode if let image = view.wrapped.image { @@ -587,11 +585,26 @@ public struct AnimatedImage : PlatformViewRepresentable { } else { view.wrapped.playbackMode = .normal } + + // Animation + #if os(macOS) + if self.isAnimating != view.wrapped.animates { + view.wrapped.animates = self.isAnimating + } + #else + if self.isAnimating != view.wrapped.isAnimating { + if self.isAnimating { + view.wrapped.startAnimating() + } else { + view.wrapped.stopAnimating() + } + } + #endif } } // Layout -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension AnimatedImage { /// Configurate this view's image with the specified cap insets and options. @@ -630,70 +643,8 @@ extension AnimatedImage { } } -// Aspect Ratio -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) -extension AnimatedImage { - func setImageLayoutAspectRatio(_ aspectRatio: CGFloat?, contentMode: ContentMode) { - self.imageLayout.aspectRatio = aspectRatio - self.imageLayout.contentMode = contentMode - } - - /// Constrains this view's dimensions to the specified aspect ratio. - /// - Parameters: - /// - aspectRatio: The ratio of width to height to use for the resulting - /// view. If `aspectRatio` is `nil`, the resulting view maintains this - /// view's aspect ratio. - /// - contentMode: A flag indicating whether this view should fit or - /// fill the parent context. - /// - Returns: A view that constrains this view's dimensions to - /// `aspectRatio`, using `contentMode` as its scaling algorithm. - @ViewBuilder - public func aspectRatio(_ aspectRatio: CGFloat? = nil, contentMode: ContentMode) -> some View { - // The `SwifUI.View.aspectRatio(_:contentMode:)` says: - // If `aspectRatio` is `nil`, the resulting view maintains this view's aspect ratio - // But 1: there are no public API to declare what `this view's aspect ratio` is - // So, if we don't override this method, SwiftUI ignore the content mode on actual ImageView - // To workaround, we want to call the default `SwifUI.View.aspectRatio(_:contentMode:)` method - // But 2: there are no way to call a Protocol Extention default implementation in Swift 5.1 - // So, we directly call the implementation detail modifier instead - // Fired Radar: FB7413534 - let _ = self.setImageLayoutAspectRatio(aspectRatio, contentMode: contentMode) - if let aspectRatio { - self.modifier(_AspectRatioLayout(aspectRatio: aspectRatio, contentMode: contentMode)) - } else { - self - } - } - - /// Constrains this view's dimensions to the aspect ratio of the given size. - /// - Parameters: - /// - aspectRatio: A size specifying the ratio of width to height to use - /// for the resulting view. - /// - contentMode: A flag indicating whether this view should fit or - /// fill the parent context. - /// - Returns: A view that constrains this view's dimensions to - /// `aspectRatio`, using `contentMode` as its scaling algorithm. - public func aspectRatio(_ aspectRatio: CGSize, contentMode: ContentMode) -> some View { - return self.aspectRatio(aspectRatio.width / aspectRatio.height, contentMode: contentMode) - } - - /// Scales this view to fit its parent. - /// - Returns: A view that scales this view to fit its parent, - /// maintaining this view's aspect ratio. - public func scaledToFit() -> some View { - return self.aspectRatio(nil, contentMode: .fit) - } - - /// Scales this view to fill its parent. - /// - Returns: A view that scales this view to fit its parent, - /// maintaining this view's aspect ratio. - public func scaledToFill() -> some View { - return self.aspectRatio(nil, contentMode: .fill) - } -} - // AnimatedImage Modifier -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension AnimatedImage { /// Total loop count for animated image rendering. Defaults to nil. @@ -770,7 +721,7 @@ extension AnimatedImage { } // Completion Handler -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension AnimatedImage { /// Provide the action when image load fails. @@ -802,7 +753,7 @@ extension AnimatedImage { } // View Coordinator Handler -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension AnimatedImage { /// Provide the action when view representable create the native view. @@ -839,7 +790,7 @@ extension SDWebImageIndicator where Self == SDWebImageProgressIndicator { } // Web Image convenience, based on UIKit/AppKit API -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension AnimatedImage { /// Associate a indicator when loading image with url @@ -860,7 +811,7 @@ extension AnimatedImage { } #if DEBUG -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) struct AnimatedImage_Previews : PreviewProvider { static var previews: some View { Group { diff --git a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Image.swift b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Image.swift index 2d8400ed..8978df72 100644 --- a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Image.swift +++ b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Image.swift @@ -9,7 +9,7 @@ import Foundation import SwiftUI -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension Image { @inlinable init(platformImage: PlatformImage) { #if os(macOS) @@ -20,13 +20,13 @@ extension Image { } } -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension PlatformImage { static var empty = PlatformImage() } #if !os(macOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension PlatformImage.Orientation { @inlinable var toSwiftUI: Image.Orientation { switch self { @@ -52,7 +52,7 @@ extension PlatformImage.Orientation { } } -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension Image.Orientation { @inlinable var toPlatform: PlatformImage.Orientation { switch self { diff --git a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageManager.swift b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageManager.swift index dd2bb8c1..f42eccb7 100644 --- a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageManager.swift +++ b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageManager.swift @@ -12,7 +12,7 @@ import SDWebImage /// A Image observable object for handle image load process. This drive the Source of Truth for image loading status. /// You can use `@ObservedObject` to associate each instance of manager to your View type, which update your view's body from SwiftUI framework when image was loaded. -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public final class ImageManager : ObservableObject { /// loaded image, note when progressive loading, this will published multiple times with different partial image public var image: PlatformImage? { @@ -136,7 +136,7 @@ public final class ImageManager : ObservableObject { } // Completion Handler -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension ImageManager { /// Provide the action when image load fails. /// - Parameters: diff --git a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImagePlayer.swift b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImagePlayer.swift index 8e5820c8..1548744f 100644 --- a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImagePlayer.swift +++ b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImagePlayer.swift @@ -11,7 +11,7 @@ import Combine import SDWebImage /// A Image observable object for handle aniamted image playback. This is used to avoid `@State` update may capture the View struct type and cause memory leak. -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public final class ImagePlayer : ObservableObject { var player: SDAnimatedImagePlayer? diff --git a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageViewWrapper.swift b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageViewWrapper.swift index b0d6ac35..e019881f 100644 --- a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageViewWrapper.swift +++ b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageViewWrapper.swift @@ -8,17 +8,19 @@ import Foundation import SDWebImage +import SwiftUI #if !os(watchOS) /// Use wrapper to solve tne `UIImageView`/`NSImageView` frame size become image size issue (SwiftUI's Bug) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public class AnimatedImageViewWrapper : PlatformView { /// The wrapped actual image view, using SDWebImage's aniamted image view public var wrapped = SDAnimatedImageView() var interpolationQuality = CGInterpolationQuality.default var shouldAntialias = false - var resizable = false + var resizingMode: Image.ResizingMode? + var imageSize: CGSize? public override func draw(_ rect: CGRect) { #if os(macOS) @@ -48,11 +50,27 @@ public class AnimatedImageViewWrapper : PlatformView { public override var intrinsicContentSize: CGSize { /// Match the behavior of SwiftUI.Image, only when image is resizable, use the super implementation to calculate size - if resizable { - return super.intrinsicContentSize + var contentSize = wrapped.intrinsicContentSize + /// Sometimes, like during the transaction, the wrapped.image == nil, which cause contentSize invalid + /// Use image size as backup + /// TODO: This mixed use of UIKit/SwiftUI animation will cause visial issue because the intrinsicContentSize during animation may be changed + if let imageSize = imageSize { + if contentSize != imageSize { + contentSize = imageSize + } + } + if let _ = resizingMode { + /// Keep aspect ratio + if contentSize.width > 0 && contentSize.height > 0 { + let ratio = contentSize.width / contentSize.height + let size = CGSize(width: ratio, height: 1) + return size + } else { + return contentSize + } } else { /// Not resizable, always use image size, like SwiftUI.Image - return wrapped.intrinsicContentSize + return contentSize } } @@ -67,7 +85,7 @@ public class AnimatedImageViewWrapper : PlatformView { } } -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension PlatformView { /// Adds constraints to this `UIView` instances `superview` object to make sure this always has the same size as the superview. /// Please note that this has no effect if its `superview` is `nil` – add this `UIView` instance as a subview before calling this. diff --git a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/Indicator.swift b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/Indicator.swift index 739212e1..bf6cc6b3 100644 --- a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/Indicator.swift +++ b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/Indicator.swift @@ -10,7 +10,7 @@ import SwiftUI import Combine /// A type to build the indicator -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public struct Indicator where T : View { var content: (Binding, Binding) -> T @@ -25,7 +25,7 @@ public struct Indicator where T : View { } /// A observable model to report indicator loading status -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public class IndicatorStatus : ObservableObject { /// whether indicator is loading or not var isLoading: Bool = false { @@ -48,7 +48,7 @@ public class IndicatorStatus : ObservableObject { /// A implementation detail View Modifier with indicator /// SwiftUI View Modifier construced by using a internal View type which modify the `body` /// It use type system to represent the view hierarchy, and Swift `some View` syntax to hide the type detail for users -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public struct IndicatorViewModifier : ViewModifier where T : View { /// The loading status @@ -72,7 +72,7 @@ public struct IndicatorViewModifier : ViewModifier where T : View { } } -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension Indicator where T == AnyView { /// Activity Indicator public static var activity: Indicator { @@ -90,7 +90,7 @@ extension Indicator where T == AnyView { } } -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension Indicator where T == AnyView { /// Progress Indicator public static var progress: Indicator { diff --git a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SDWebImageSwiftUI.swift b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SDWebImageSwiftUI.swift index a16d356a..adc40690 100644 --- a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SDWebImageSwiftUI.swift +++ b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SDWebImageSwiftUI.swift @@ -11,53 +11,53 @@ import SwiftUI @_exported import SDWebImage // Automatically import SDWebImage #if os(macOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public typealias PlatformImage = NSImage #else -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public typealias PlatformImage = UIImage #endif #if os(macOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public typealias PlatformView = NSView #endif #if os(iOS) || os(tvOS) || os(visionOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public typealias PlatformView = UIView #endif #if os(watchOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public typealias PlatformView = WKInterfaceObject #endif #if os(macOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public typealias PlatformViewRepresentable = NSViewRepresentable #endif #if os(iOS) || os(tvOS) || os(visionOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public typealias PlatformViewRepresentable = UIViewRepresentable #endif #if os(watchOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public typealias PlatformViewRepresentable = WKInterfaceObjectRepresentable #endif #if os(macOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension NSViewRepresentable { typealias PlatformViewType = NSViewType } #endif #if os(iOS) || os(tvOS) || os(visionOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension UIViewRepresentable { typealias PlatformViewType = UIViewType } #endif #if os(watchOS) -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension WKInterfaceObjectRepresentable { typealias PlatformViewType = WKInterfaceObjectType } diff --git a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Transition/Transition.swift b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Transition/Transition.swift index e42503c5..fa3ca48c 100644 --- a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Transition/Transition.swift +++ b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Transition/Transition.swift @@ -8,7 +8,7 @@ import SwiftUI -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension AnyTransition { /// Fade-in transition diff --git a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/WebImage.swift b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/WebImage.swift index 19b47798..7cc6fbe2 100644 --- a/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/WebImage.swift +++ b/dydx/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/WebImage.swift @@ -47,7 +47,7 @@ public enum WebImagePhase { } /// Data Binding Object, only properties in this object can support changes from user with @State and refresh -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) final class WebImageModel : ObservableObject { /// URL image @Published var url: URL? @@ -56,7 +56,7 @@ final class WebImageModel : ObservableObject { } /// Completion Handler Binding Object, supports dynamic @State changes -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) final class WebImageHandler: ObservableObject { // Completion Handler @Published var successBlock: ((PlatformImage, Data?, SDImageCacheType) -> Void)? @@ -65,7 +65,7 @@ final class WebImageHandler: ObservableObject { } /// Configuration Binding Object, supports dynamic @State changes -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) final class WebImageConfiguration: ObservableObject { var retryOnAppear: Bool = true var cancelOnDisappear: Bool = true @@ -79,7 +79,7 @@ final class WebImageConfiguration: ObservableObject { } /// A Image View type to load image from url. Supports static/animated image format. -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) public struct WebImage : View where Content: View { var transaction: Transaction @@ -108,16 +108,17 @@ public struct WebImage : View where Content: View { /// Create a web image with url, placeholder, custom options and context. Optional can support animated image using Binding. /// - Parameter url: The image url + /// - Parameter scale: The scale to use for the image. The default is 1. Set a different value when loading images designed for higher resolution displays. For example, set a value of 2 for an image that you would name with the @2x suffix if stored in a file on disk. /// - Parameter options: The options to use when downloading the image. See `SDWebImageOptions` for the possible values. /// - Parameter context: A context contains different options to perform specify changes or processes, see `SDWebImageContextOption`. This hold the extra objects which `options` enum can not hold. /// - Parameter isAnimating: The binding for animation control. The binding value should be `true` when initialized to setup the correct animated image class. If not, you must provide the `.animatedImageClass` explicitly. When the animation started, this binding can been used to start / stop the animation. - public init(url: URL?, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]? = nil, isAnimating: Binding = .constant(true)) where Content == Image { + public init(url: URL?, scale: CGFloat = 1, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]? = nil, isAnimating: Binding = .constant(true)) where Content == Image { self.init(url: url, options: options, context: context, isAnimating: isAnimating) { phase in phase.image ?? Image(platformImage: .empty) } } - public init(url: URL?, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]? = nil, isAnimating: Binding = .constant(true), @ViewBuilder content: @escaping (Image) -> I, @ViewBuilder placeholder: @escaping () -> P) where Content == _ConditionalContent, I: View, P: View { + public init(url: URL?, scale: CGFloat = 1, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]? = nil, isAnimating: Binding = .constant(true), @ViewBuilder content: @escaping (Image) -> I, @ViewBuilder placeholder: @escaping () -> P) where Content == _ConditionalContent, I: View, P: View { self.init(url: url, options: options, context: context, isAnimating: isAnimating) { phase in if let i = phase.image { content(i) @@ -127,9 +128,12 @@ public struct WebImage : View where Content: View { } } - public init(url: URL?, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]? = nil, isAnimating: Binding = .constant(true), transaction: Transaction = Transaction(), @ViewBuilder content: @escaping (WebImagePhase) -> Content) { + public init(url: URL?, scale: CGFloat = 1, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]? = nil, isAnimating: Binding = .constant(true), transaction: Transaction = Transaction(), @ViewBuilder content: @escaping (WebImagePhase) -> Content) { self._isAnimating = isAnimating var context = context ?? [:] + if context[.imageScaleFactor] == nil { + context[.imageScaleFactor] = scale + } // provide animated image class if the initialized `isAnimating` is true, user can still custom the image class if they want if isAnimating.wrappedValue { if context[.animatedImageClass] == nil { @@ -344,7 +348,7 @@ public struct WebImage : View where Content: View { } // Layout -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension WebImage { func configure(_ block: @escaping (Image) -> Image) -> WebImage { var result = self @@ -382,7 +386,7 @@ extension WebImage { } // Completion Handler -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension WebImage { /// Provide the action when image load fails. @@ -414,7 +418,7 @@ extension WebImage { } // WebImage Modifier -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension WebImage { /// Control the behavior to retry the failed loading when view become appears again /// - Parameter flag: Whether or not to retry the failed loading @@ -432,7 +436,7 @@ extension WebImage { } // Indicator -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension WebImage { /// Associate a indicator when loading image with url @@ -449,7 +453,7 @@ extension WebImage { } // Animated Image -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) extension WebImage { /// Total loop count for animated image rendering. Defaults to nil. @@ -517,7 +521,7 @@ extension WebImage { } #if DEBUG -@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *) +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) struct WebImage_Previews : PreviewProvider { static var previews: some View { Group { diff --git a/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore-Info.plist b/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore-Info.plist index 064f8117..7452320d 100644 --- a/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore-Info.plist +++ b/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 10.28.0 + 10.28.1 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore.debug.xcconfig b/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore.debug.xcconfig index 05163012..88e9dfee 100644 --- a/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore.debug.xcconfig +++ b/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore.debug.xcconfig @@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal" "${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" GCC_C_LANGUAGE_STANDARD = c99 -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 Firebase_VERSION=10.28.0 +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 Firebase_VERSION=10.28.1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_TARGET_SRCROOT}" LD_RUNPATH_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal" "${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" OTHER_CFLAGS = $(inherited) -fno-autolink diff --git a/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore.release.xcconfig b/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore.release.xcconfig index 05163012..88e9dfee 100644 --- a/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore.release.xcconfig +++ b/dydx/Pods/Target Support Files/FirebaseCore/FirebaseCore.release.xcconfig @@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal" "${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" GCC_C_LANGUAGE_STANDARD = c99 -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 Firebase_VERSION=10.28.0 +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 Firebase_VERSION=10.28.1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_TARGET_SRCROOT}" LD_RUNPATH_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal" "${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" OTHER_CFLAGS = $(inherited) -fno-autolink diff --git a/dydx/Pods/Target Support Files/FirebaseCore/ResourceBundle-FirebaseCore_Privacy-FirebaseCore-Info.plist b/dydx/Pods/Target Support Files/FirebaseCore/ResourceBundle-FirebaseCore_Privacy-FirebaseCore-Info.plist index 3f8fb7d1..f6631e5b 100644 --- a/dydx/Pods/Target Support Files/FirebaseCore/ResourceBundle-FirebaseCore_Privacy-FirebaseCore-Info.plist +++ b/dydx/Pods/Target Support Files/FirebaseCore/ResourceBundle-FirebaseCore_Privacy-FirebaseCore-Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 10.28.0 + 10.28.1 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/Pods/Target Support Files/FirebaseCrashlytics/FirebaseCrashlytics-Info.plist b/dydx/Pods/Target Support Files/FirebaseCrashlytics/FirebaseCrashlytics-Info.plist index 064f8117..7452320d 100644 --- a/dydx/Pods/Target Support Files/FirebaseCrashlytics/FirebaseCrashlytics-Info.plist +++ b/dydx/Pods/Target Support Files/FirebaseCrashlytics/FirebaseCrashlytics-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 10.28.0 + 10.28.1 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/Pods/Target Support Files/FirebaseCrashlytics/ResourceBundle-FirebaseCrashlytics_Privacy-FirebaseCrashlytics-Info.plist b/dydx/Pods/Target Support Files/FirebaseCrashlytics/ResourceBundle-FirebaseCrashlytics_Privacy-FirebaseCrashlytics-Info.plist index 3f8fb7d1..f6631e5b 100644 --- a/dydx/Pods/Target Support Files/FirebaseCrashlytics/ResourceBundle-FirebaseCrashlytics_Privacy-FirebaseCrashlytics-Info.plist +++ b/dydx/Pods/Target Support Files/FirebaseCrashlytics/ResourceBundle-FirebaseCrashlytics_Privacy-FirebaseCrashlytics-Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 10.28.0 + 10.28.1 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-Info.plist b/dydx/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-Info.plist index 727eee8a..ff918829 100644 --- a/dydx/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-Info.plist +++ b/dydx/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.4.1 + 3.5.0 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/Pods/Target Support Files/GTMSessionFetcher/ResourceBundle-GTMSessionFetcher_Core_Privacy-GTMSessionFetcher-Info.plist b/dydx/Pods/Target Support Files/GTMSessionFetcher/ResourceBundle-GTMSessionFetcher_Core_Privacy-GTMSessionFetcher-Info.plist index 2cf88892..864707dd 100644 --- a/dydx/Pods/Target Support Files/GTMSessionFetcher/ResourceBundle-GTMSessionFetcher_Core_Privacy-GTMSessionFetcher-Info.plist +++ b/dydx/Pods/Target Support Files/GTMSessionFetcher/ResourceBundle-GTMSessionFetcher_Core_Privacy-GTMSessionFetcher-Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 3.4.1 + 3.5.0 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/Pods/Target Support Files/GTMSessionFetcher/ResourceBundle-GTMSessionFetcher_Full_Privacy-GTMSessionFetcher-Info.plist b/dydx/Pods/Target Support Files/GTMSessionFetcher/ResourceBundle-GTMSessionFetcher_Full_Privacy-GTMSessionFetcher-Info.plist index 2cf88892..864707dd 100644 --- a/dydx/Pods/Target Support Files/GTMSessionFetcher/ResourceBundle-GTMSessionFetcher_Full_Privacy-GTMSessionFetcher-Info.plist +++ b/dydx/Pods/Target Support Files/GTMSessionFetcher/ResourceBundle-GTMSessionFetcher_Full_Privacy-GTMSessionFetcher-Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 3.4.1 + 3.5.0 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/Pods/Target Support Files/SDWebImageSwiftUI/ResourceBundle-SDWebImageSwiftUI-SDWebImageSwiftUI-Info.plist b/dydx/Pods/Target Support Files/SDWebImageSwiftUI/ResourceBundle-SDWebImageSwiftUI-SDWebImageSwiftUI-Info.plist index 4461472f..bfff448e 100644 --- a/dydx/Pods/Target Support Files/SDWebImageSwiftUI/ResourceBundle-SDWebImageSwiftUI-SDWebImageSwiftUI-Info.plist +++ b/dydx/Pods/Target Support Files/SDWebImageSwiftUI/ResourceBundle-SDWebImageSwiftUI-SDWebImageSwiftUI-Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 3.0.4 + 3.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-Info.plist b/dydx/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-Info.plist index 4e508d1f..362a435d 100644 --- a/dydx/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-Info.plist +++ b/dydx/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.0.4 + 3.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/MarketInfo/Components/dydxMarketPositionViewPresenter.swift b/dydx/dydxPresenters/dydxPresenters/_v4/MarketInfo/Components/dydxMarketPositionViewPresenter.swift index 6afc80f1..59f75841 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/MarketInfo/Components/dydxMarketPositionViewPresenter.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/MarketInfo/Components/dydxMarketPositionViewPresenter.swift @@ -118,7 +118,7 @@ class dydxMarketPositionViewPresenter: HostedViewPresenter 0 { - let maxLeverage = 1.0 / imf + if let effectiveInitialMarginFraction = market.configs?.effectiveInitialMarginFraction?.doubleValue, effectiveInitialMarginFraction > 0 { + let maxLeverage = 1.0 / effectiveInitialMarginFraction viewModel.leverageOptions = [1, 2, 3, 5, 10] .filter { $0 < maxLeverage } .map { dydxTargetLeverageViewModel.LeverageTextAndValue(text: dydxFormatter.shared.multiplier(number: Double($0)) ?? "", value: $0) } diff --git a/dydx/dydxStateManager/dydxStateManager/AbacusStateManager.swift b/dydx/dydxStateManager/dydxStateManager/AbacusStateManager.swift index 0aaaf670..72ad8468 100644 --- a/dydx/dydxStateManager/dydxStateManager/AbacusStateManager.swift +++ b/dydx/dydxStateManager/dydxStateManager/AbacusStateManager.swift @@ -136,35 +136,30 @@ public final class AbacusStateManager: NSObject { UIImplementations.reset(language: nil) let deployment: String - let appConfigsV2: AppConfigsV2 + let appConfigs = AppConfigsV2.companion.forAppWithIsolatedMargins if dydxBoolFeatureFlag.force_mainnet.isEnabled { deployment = "MAINNET" - appConfigsV2 = AppConfigsV2.companion.forAppWithIsolatedMargins } else { // Expose more options for Testflight build switch Installation.source { case .appStore: deployment = "MAINNET" - appConfigsV2 = AppConfigsV2.companion.forAppWithIsolatedMargins case .debug: // For debugging only deployment = "DEV" - appConfigsV2 = AppConfigsV2.companion.forAppWithIsolatedMargins case .jailBroken: deployment = "TESTNET" - appConfigsV2 = AppConfigsV2.companion.forAppWithIsolatedMargins case .testFlight: deployment = "TESTFLIGHT" - appConfigsV2 = AppConfigsV2.companion.forAppWithIsolatedMargins } } - appConfigsV2.onboardingConfigs.squidVersion = OnboardingConfigs.SquidVersion.v2 + appConfigs.onboardingConfigs.squidVersion = OnboardingConfigs.SquidVersion.v2 return AsyncAbacusStateManagerV2( deploymentUri: deploymentUri, deployment: deployment, - appConfigs: appConfigsV2, + appConfigs: appConfigs, ioImplementations: IOImplementations.shared, uiImplementations: UIImplementations.shared!, stateNotification: self, diff --git a/dydx/dydxViews/dydxViews/_v4/MarketInfo/Components/Position/dydxMarketPositionView.swift b/dydx/dydxViews/dydxViews/_v4/MarketInfo/Components/Position/dydxMarketPositionView.swift index 389aff87..8acbfe5f 100644 --- a/dydx/dydxViews/dydxViews/_v4/MarketInfo/Components/Position/dydxMarketPositionView.swift +++ b/dydx/dydxViews/dydxViews/_v4/MarketInfo/Components/Position/dydxMarketPositionView.swift @@ -94,11 +94,10 @@ public class dydxMarketPositionViewModel: PlatformViewModel { self.createPendingPositionsHeader(parentStyle: style) pendingPosition.createView(parentStyle: style) } - .frame(width: UIScreen.main.bounds.width - 32) } } .themeColor(background: .layer2) - .frame(width: UIScreen.main.bounds.width - 16) + .frame(width: UIScreen.main.bounds.width - 32) ) } } @@ -213,40 +212,46 @@ public class dydxMarketPositionViewModel: PlatformViewModel { private func createPositionTab(parentStyle: ThemeStyle) -> some View { Group { - VStack(alignment: .leading, spacing: 4) { + VStack(alignment: .leading, spacing: 0) { HStack { PlatformIconViewModel(type: .url(url: logoUrl), clip: .defaultCircle, - size: CGSize(width: 32, height: 32)) + size: CGSize(width: 36, height: 36)) .createView(parentStyle: parentStyle) - Spacer() - - side?.createView(parentStyle: parentStyle.themeFont(fontSize: .small)) - } + Spacer(minLength: 4) - Spacer() - - VStack(alignment: .leading, spacing: 2) { - HStack { + VStack(alignment: .trailing, spacing: 2) { Text(size ?? "") .lineLimit(1) .minimumScaleFactor(0.5) - token?.createView(parentStyle: parentStyle.themeFont(fontSize: .smallest)) + Text(amount ?? "") + .themeFont(fontSize: .small) + .themeColor(foreground: .textTertiary) + .lineLimit(1) + .minimumScaleFactor(0.5) } - Text(amount ?? "") + } + + Spacer() + + HStack(spacing: 0) { + side?.createView(parentStyle: parentStyle.themeFont(fontSize: .small)) + Spacer(minLength: 4) + Text(marginMode ?? "") + .padding(.horizontal, 6) + .padding(.vertical, 4) .themeFont(fontSize: .small) - .themeColor(foreground: .textTertiary) - .lineLimit(1) - .minimumScaleFactor(0.5) + .themeColor(foreground: .textSecondary) + .themeColor(background: .layer7) + .clipShape(.rect(cornerRadius: 4)) } } - .padding(20) + .padding(16) } - .frame(minWidth: 0, maxWidth: .infinity) - .frame(height: 152) + .frame(width: 162, height: 142) .themeGradient(background: .layer3, gradientType: gradientType) - .cornerRadius(16) + .cornerRadius(12) } private func createCollectionItem(parentStyle: ThemeStyle, title: String?, stringValue: String?) -> some View { diff --git a/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginCtaButtonView.swift b/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginCtaButtonView.swift index e40f98c0..8c37824b 100644 --- a/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginCtaButtonView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginCtaButtonView.swift @@ -12,7 +12,7 @@ import Utilities public class dydxAdjustMarginCtaButtonViewModel: PlatformViewModel { public enum State { - case enabled(String? = nil) + case enabled(String) case disabled(String? = nil) case thinking } @@ -43,7 +43,7 @@ public class dydxAdjustMarginCtaButtonViewModel: PlatformViewModel { let state: PlatformButtonState switch ctaButtonState { case .enabled(let title): - buttonTitle = title ?? DataLocalizer.localize(path: "APP.TRADE.ADD_MARGIN") + buttonTitle = title state = .primary case .disabled(let title): buttonTitle = title ?? DataLocalizer.localize(path: "APP.TRADE.ENTER_AMOUNT") diff --git a/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginDirectionView.swift b/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginDirectionView.swift index 96391a74..21244ff9 100644 --- a/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginDirectionView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginDirectionView.swift @@ -35,7 +35,7 @@ public class dydxAdjustMarginDirectionViewModel: PlatformViewModel { } } - @Published public var marginDirection: MarginDirection = .add + @Published public var marginDirection: MarginDirection? @Published public var marginDirectionAction: ((MarginDirection) -> Void)? public init() { } @@ -63,7 +63,7 @@ public class dydxAdjustMarginDirectionViewModel: PlatformViewModel { let view = ScrollView(.horizontal, showsIndicators: false) { TabGroupModel(items: items, selectedItems: selectedItems, - currentSelection: self.marginDirection.index, + currentSelection: self.marginDirection?.index, onSelectionChanged: { index in PlatformView.hideKeyboard() self.marginDirectionAction?(MarginDirection(index: index)) diff --git a/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginLiquidationPriceView.swift b/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginLiquidationPriceView.swift index 5c9118c9..7baf96bc 100644 --- a/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginLiquidationPriceView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Trade/Margin/Components/dydxAdjustMarginLiquidationPriceView.swift @@ -62,7 +62,7 @@ public class dydxAdjustMarginLiquidationPriceViewModel: PlatformViewModel { if self.after == nil { Text(self.before ?? "") .themeFont(fontSize: .large) - .themeColor(foreground: .textPrimary) + .themeColor(foreground: .textSecondary) } else { Text(self.before ?? "") .themeFont(fontSize: .small) diff --git a/podspecs/Abacus.podspec b/podspecs/Abacus.podspec index 82dca33a..c43f69a9 100644 --- a/podspecs/Abacus.podspec +++ b/podspecs/Abacus.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Abacus' -spec.version = '1.7.84' +spec.version = '1.8.12' spec.homepage = 'https://github.com/dydxprotocol/v4-abacus' spec.source = { :git => "git@github.com:dydxprotocol/v4-abacus.git", :tag => "v#{spec.version}" } spec.authors = ''