From f2e202204b346e7c4d54049e3fbe22cfecd9e812 Mon Sep 17 00:00:00 2001 From: Sam Odom Date: Fri, 26 Aug 2022 08:27:29 -0700 Subject: [PATCH] Temporarily expose CoreKit types for Swift conversion (3/n) Reviewed By: josueBrizuelaXD Differential Revision: D38997117 fbshipit-source-id: e12c4fb691cd4c6603a344bae27685c75beddcf5 --- FBAEMKit/FBAEMKit/FBAEMReporter.h | 16 +- .../FBSDKCoreKit/AppEvents/FBSDKAppEvents.m | 3 - .../Internal/AAM/FBSDKMetadataIndexer.m | 2 - .../Codeless/FBSDKCodelessIndexer+Internal.h | 12 - .../Internal/Codeless/FBSDKCodelessIndexer.h | 28 -- .../Internal/Codeless/FBSDKCodelessIndexer.m | 4 +- .../FBSDKEventDeactivationManager.m | 3 +- .../Internal/FBSDKAppEvents+Internal.h | 3 - .../Internal/FBSDKAppEventsATEPublisher.m | 4 +- .../FBSDKAppEventsConfigurationManager.m | 2 +- .../Internal/FBSDKAppEventsDeviceInfo.m | 5 +- .../AppEvents/Internal/FBSDKAppEventsState.m | 2 +- .../Internal/FBSDKAppEventsStateFactory.m | 3 +- .../Internal/FBSDKAppEventsStateManager.h | 2 - .../Internal/FBSDKAppEventsStateManager.m | 5 +- .../Internal/FBSDKAppEventsUtility.m | 2 - ...FBSDKHybridAppEventsScriptMessageHandler.h | 2 +- .../Integrity/FBSDKIntegrityManager.m | 2 - .../FBSDKRestrictiveDataFilterManager.m | 2 - .../SKAdNetwork/FBSDKSKAdNetworkReporter.m | 2 +- .../SuggestedEvents/FBSDKFeatureExtractor.m | 2 - .../FBSDKSuggestedEventsIndexer.m | 1 - .../ViewHierarchy/FBSDKViewHierarchy.m | 2 +- .../AppLink/FBSDKAppLinkNavigation+Internal.h | 5 - .../FBSDKServerConfigurationProvider.m | 2 +- .../FBSDKShareDialogConfiguration.m | 3 +- .../BridgeAPI/FBSDKBridgeAPIRequest+Private.h | 4 - .../FBSDKBridgeAPIProtocolWebV2.m | 1 - .../BridgeAPI/_BridgeAPIRequestFactory.swift | 2 +- .../Configuration/FBSDKCoreKitComponents.m | 6 - .../Configuration/FBSDKCoreKitConfigurator.m | 1 - .../Internal/FBSDKAccessToken+Internal.h | 5 - .../Internal/FBSDKAppLinkUtility+Internal.h | 14 - .../Internal/FBSDKErrorFactory+Internal.h | 5 - .../Internal/FBSDKInternalUtility+Internal.h | 5 - .../Internal/FBSDKProfile+Internal.h | 9 - .../Internal/FBSDKSettings+Internal.h | 8 - .../FBSDKCoreKit/Internal/FBSDKURL+Internal.h | 8 - .../Internal/FBSDKWebDialogView+Internal.h | 7 - .../CrashReport/FBSDKCrashObserver.m | 2 +- .../Instrument/CrashReport/FBSDKCrashShield.h | 20 -- .../Instrument/CrashReport/FBSDKCrashShield.m | 2 - .../FBSDKGraphRequestConnection+Internal.h | 13 - .../FBSDKGraphRequestPiggybackManager.m | 2 +- .../FBSDKErrorConfigurationProvider.m | 2 +- .../FBSDKServerConfigurationManager.m | 3 +- .../Internal/UI/FBSDKButton+Internal.h | 4 - .../FBSDKImpressionLoggingButton+Internal.h | 3 - .../FBSDKCoreKit/include/FBSDKAccessToken.h | 17 + .../FBSDKCoreKit/include/FBSDKAppEvents.h | 5 +- .../FBSDKAppEventsConfigurationManager.h | 8 +- .../include/FBSDKAppEventsConfiguring.h | 3 +- .../FBSDKAppEventsDeviceInfo.h | 14 +- .../FBSDKAppEventsState.h | 10 +- .../FBSDKAppEventsUtility.h | 18 +- .../FBSDKAppEventsUtilityProtocol.h | 14 +- .../include/FBSDKAppLinkNavigation.h | 13 + .../include/FBSDKAppLinkUtility.h | 23 ++ .../FBSDKAuthenticationStatusUtility.h | 3 +- .../include/FBSDKBridgeAPIRequest.h | 17 +- .../FBSDKCoreKit/include/FBSDKButton.h | 13 + .../include/FBSDKCodelessIndexer.h | 51 +++ .../FBSDKCoreKit/include/FBSDKCoreKit.h | 13 + .../include/FBSDKCoreKitComponents.h | 2 +- .../FBSDKCrashShield.h} | 16 +- .../FBSDKCoreKit/include/FBSDKErrorFactory.h | 11 + .../FBSDKFeatureExtractor.h | 11 +- .../include/FBSDKGateKeeperManager.h | 4 +- .../include/FBSDKGraphRequestConnection.h | 39 +++ .../include/FBSDKImpressionLoggingButton.h | 6 + .../FBSDKIntegrityProcessing.h | 0 .../include/FBSDKInternalUtility.h | 17 + .../FBSDKLoggingNotifying.h | 8 +- .../ML => include}/FBSDKModelManager.h | 14 +- .../FBSDKCoreKit/include/FBSDKProfile.h | 19 ++ .../FBSDKServerConfigurationManager.h | 10 +- .../FBSDKCoreKit/include/FBSDKSettings.h | 19 ++ FBSDKCoreKit/FBSDKCoreKit/include/FBSDKURL.h | 14 + .../FBSDKCoreKit/include/FBSDKWebDialogView.h | 13 + .../FBSDKCoreKitTests/AccessTokenTests.swift | 2 +- .../ApplicationDelegateTests.swift | 2 +- .../DefaultCoreKitComponentsTests.swift | 22 +- .../FBSDKCoreKitTests-Bridging-Header.h | 6 - .../GraphRequestConnectionTests.swift | 2 +- ...SDKAppEventsConfigurationManager+Testing.h | 2 +- .../FBSDKAppEventsUtility+Testing.h | 3 +- .../Interfaces/FBSDKCodelessIndexer+Testing.h | 2 +- .../Interfaces/FBSDKCrashShield+Testing.h | 2 +- .../FBSDKFeatureExtractor+Testing.h | 2 - .../FBSDKIntegrityManager+Testing.h | 1 - .../FBSDKServerConfigurationManager+Testing.h | 2 +- .../Interfaces/FBSDKViewHierarchy+Testing.h | 2 +- .../AppEventsConfigurationManagerTests.swift | 4 +- .../AppEvents/AppEventsPublishATETests.swift | 2 +- .../AppEventsStateManagerTests.swift | 2 +- .../AppEvents/AppEventsStateTests.swift | 56 ++-- .../Internal/AppEvents/AppEventsTests.swift | 2 +- .../AppEvents/AppEventsUtilityTests.swift | 4 +- .../Codeless/CodelessIndexerTests.swift | 170 +++++----- .../AppEvents/ML/ModelManagerTests.swift | 28 +- .../FeatureExtractorTests.swift | 32 +- .../Internal/AppEventsDeviceInfoTests.swift | 8 +- .../AuthenticationStatusUtilityTests.swift | 2 +- .../BridgeAPI+ApplicationOpenUrlTests.swift | 4 +- .../BridgeAPI/BridgeAPIRequestTests.swift | 20 +- .../BridgeAPIProtocolWebV2Tests.swift | 2 +- .../CoreKitConfiguratorTests.swift | 316 +++++++++--------- .../Configuration/TestCoreKitComponents.swift | 2 +- .../Internal/Helpers/TestAppEvents.swift | 6 +- .../Internal/Helpers/TestAppEventsState.swift | 2 +- .../Helpers/TestAppEventsStateProvider.swift | 2 +- .../Helpers/TestAppEventsStateStore.swift | 2 +- .../Helpers/TestAppEventsUtility.swift | 2 +- .../Helpers/TestLoggingNotifier.swift | 2 +- .../Instrument/CrashShieldTests.swift | 44 +-- .../Internal/InternalUtilityTests.swift | 2 +- .../ServerConfigurationManagerTests.swift | 28 +- .../ShareDialogConfigurationTests.swift | 4 +- .../GameRequestDialog.swift | 2 +- .../GameRequestDialogTests.swift | 2 +- .../ShareBridgeAPIRequestFactory.swift | 2 +- .../FBSDKTVOSKit/FBSDKButton+Internal.h | 4 - 122 files changed, 818 insertions(+), 660 deletions(-) delete mode 100644 FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer.h delete mode 100644 FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield.h rename FBSDKCoreKit/FBSDKCoreKit/{AppEvents/Internal => include}/FBSDKAppEventsConfigurationManager.h (87%) rename FBSDKCoreKit/FBSDKCoreKit/{AppEvents/Internal => include}/FBSDKAppEventsDeviceInfo.h (62%) rename FBSDKCoreKit/FBSDKCoreKit/{AppEvents/Internal => include}/FBSDKAppEventsState.h (86%) rename FBSDKCoreKit/FBSDKCoreKit/{Internal => include}/FBSDKAppEventsUtility.h (85%) rename FBSDKCoreKit/FBSDKCoreKit/{AppEvents/Internal => include}/FBSDKAppEventsUtilityProtocol.h (78%) create mode 100644 FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCodelessIndexer.h rename FBSDKCoreKit/FBSDKCoreKit/{Internal/Instrument/CrashReport/FBSDKCrashShield+Internal.h => include/FBSDKCrashShield.h} (57%) rename FBSDKCoreKit/FBSDKCoreKit/{AppEvents/Internal/SuggestedEvents => include}/FBSDKFeatureExtractor.h (75%) rename FBSDKCoreKit/FBSDKCoreKit/{Internal => include}/FBSDKIntegrityProcessing.h (100%) rename FBSDKCoreKit/FBSDKCoreKit/{Internal => include}/FBSDKLoggingNotifying.h (70%) rename FBSDKCoreKit/FBSDKCoreKit/{AppEvents/Internal/ML => include}/FBSDKModelManager.h (82%) rename FBSDKCoreKit/FBSDKCoreKit/{Internal/ServerConfiguration => include}/FBSDKServerConfigurationManager.h (87%) diff --git a/FBAEMKit/FBAEMKit/FBAEMReporter.h b/FBAEMKit/FBAEMKit/FBAEMReporter.h index db797f749..00bb4f382 100644 --- a/FBAEMKit/FBAEMKit/FBAEMReporter.h +++ b/FBAEMKit/FBAEMKit/FBAEMReporter.h @@ -22,6 +22,11 @@ NS_SWIFT_NAME(AEMReporter) @interface FBAEMReporter : NSObject /** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + Configure networker used for calling Facebook AEM Graph API endpoint Facebook App ID and SKAdNetwork reporter @@ -35,9 +40,15 @@ NS_SWIFT_NAME(AEMReporter) */ + (void)configureWithNetworker:(nullable id)networker appID:(nullable NSString *)appID - reporter:(nullable id)reporter; + reporter:(nullable id)reporter +NS_SWIFT_NAME(configure(networker:appID:reporter:)); /** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + Configure networker used for calling Facebook AEM Graph API endpoint Facebook App ID, SKAdNetwork reporter and Analytics App ID @@ -53,7 +64,8 @@ NS_SWIFT_NAME(AEMReporter) + (void)configureWithNetworker:(nullable id)networker appID:(nullable NSString *)appID reporter:(nullable id)reporter - analyticsAppID:(nullable NSString *)analyticsAppID; + analyticsAppID:(nullable NSString *)analyticsAppID +NS_SWIFT_NAME(configure(networker:appID:reporter:analyticsAppID:)); /** Enable AEM reporting diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m index dd21d6c8b..d3a27834f 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m @@ -26,9 +26,6 @@ #import "FBSDKAppEventParameterProduct+Internal.h" #import "FBSDKAppEventUserDataType.h" #import "FBSDKAppEventsConfiguration.h" -#import "FBSDKAppEventsDeviceInfo.h" -#import "FBSDKAppEventsState.h" -#import "FBSDKAppEventsUtility.h" #import "FBSDKAppEventsWKWebViewKeys.h" #import "FBSDKAtePublishing.h" #import "FBSDKConstants.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/AAM/FBSDKMetadataIndexer.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/AAM/FBSDKMetadataIndexer.m index 55a2f7384..62ee2e50a 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/AAM/FBSDKMetadataIndexer.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/AAM/FBSDKMetadataIndexer.m @@ -19,8 +19,6 @@ #import #import "FBSDKAppEventUserDataType.h" -#import "FBSDKAppEventsUtility.h" -#import "FBSDKServerConfigurationManager.h" #import "FBSDKUtility.h" #import "FBSDKViewHierarchy.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer+Internal.h index 4ebabc6e8..762523ff4 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer+Internal.h @@ -13,7 +13,6 @@ #import #import -#import "FBSDKCodelessIndexer.h" #import "FBSDKGraphRequestConnectionFactoryProtocol.h" #import "FBSDKGraphRequestFactoryProtocol.h" #import "FBSDKSettingsProtocol.h" @@ -22,17 +21,6 @@ NS_ASSUME_NONNULL_BEGIN @interface FBSDKCodelessIndexer (Internal) -// UNCRUSTIFY_FORMAT_OFF -+ (void)configureWithGraphRequestFactory:(id)graphRequestFactory - serverConfigurationProvider:(id)serverConfigurationProvider - dataStore:(id)dataStore - graphRequestConnectionFactory:(id)graphRequestConnectionFactory - swizzler:(Class)swizzler - settings:(id)settings - advertiserIDProvider:(id)advertisingIDProvider -NS_SWIFT_NAME(configure(graphRequestFactory:serverConfigurationProvider:dataStore:graphRequestConnectionFactory:swizzler:settings:advertiserIDProvider:)); -// UNCRUSTIFY_FORMAT_ON - @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer.h b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer.h deleted file mode 100644 index d0d454531..000000000 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under the license found in the - * LICENSE file in the root directory of this source tree. - */ - -#if !TARGET_OS_TV - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef void (^FBSDKCodelessSettingLoadBlock)(BOOL isCodelessSetupEnabled, NSError *_Nullable error); - -NS_SWIFT_NAME(CodelessIndexer) -@interface FBSDKCodelessIndexer : NSObject - -@property (class, nonatomic, readonly, copy) NSString *extInfo; - -+ (void)enable; - -@end - -NS_ASSUME_NONNULL_END - -#endif diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer.m index 4bb5959e4..d550f9d6b 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKCodelessIndexer.m @@ -8,7 +8,7 @@ #if !TARGET_OS_TV -#import "FBSDKCodelessIndexer.h" +#import "FBSDKCodelessIndexer+Internal.h" #import @@ -18,7 +18,6 @@ #import #import -#import "FBSDKAppEventsUtility.h" #import "FBSDKGraphRequestConnecting.h" #import "FBSDKGraphRequestConnectionFactoryProtocol.h" #import "FBSDKGraphRequestFactoryProtocol.h" @@ -27,7 +26,6 @@ #import "FBSDKInternalUtility+Internal.h" #import "FBSDKObjectDecoding.h" #import "FBSDKServerConfiguration.h" -#import "FBSDKServerConfigurationManager.h" #import "FBSDKSettings+Internal.h" #import "FBSDKSettingsProtocol.h" #import "FBSDKUnarchiverProvider.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/EventDeactivation/FBSDKEventDeactivationManager.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/EventDeactivation/FBSDKEventDeactivationManager.m index 01024eaf9..6ab07d3f2 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/EventDeactivation/FBSDKEventDeactivationManager.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/EventDeactivation/FBSDKEventDeactivationManager.m @@ -8,10 +8,9 @@ #import "FBSDKEventDeactivationManager.h" +#import #import -#import "FBSDKServerConfigurationManager.h" - static NSString *const DEPRECATED_PARAM_KEY = @"deprecated_param"; static NSString *const DEPRECATED_EVENT_KEY = @"is_deprecated_event"; diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEvents+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEvents+Internal.h index 053b1b04c..c11321c16 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEvents+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEvents+Internal.h @@ -10,9 +10,7 @@ #import -#import "FBSDKAppEventsUtilityProtocol.h" #import "FBSDKEventLogging.h" -#import "FBSDKLoggingNotifying.h" NS_ASSUME_NONNULL_BEGIN @@ -22,7 +20,6 @@ FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogOutcomeValue_Completed; FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogOutcomeValue_Failed; @interface FBSDKAppEvents (Internal) < - FBSDKAppEventsConfiguring, FBSDKApplicationActivating, FBSDKApplicationLifecycleObserving, FBSDKApplicationStateSetting, diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsATEPublisher.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsATEPublisher.m index 813739fac..c9281e6d2 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsATEPublisher.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsATEPublisher.m @@ -8,11 +8,9 @@ #import "FBSDKAppEventsATEPublisher.h" -#import -#import +#import #import -#import "FBSDKAppEventsDeviceInfo.h" #import "FBSDKGraphRequestConnecting.h" #import "FBSDKGraphRequestFactoryProtocol.h" #import "FBSDKGraphRequestProtocol.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsConfigurationManager.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsConfigurationManager.m index b14d4529a..d59fcfaac 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsConfigurationManager.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsConfigurationManager.m @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKAppEventsConfigurationManager.h" +#import #import diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsDeviceInfo.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsDeviceInfo.m index d6b2f2974..34fc01d14 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsDeviceInfo.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsDeviceInfo.m @@ -6,7 +6,8 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKAppEventsDeviceInfo.h" +#import +#import #import #import @@ -19,8 +20,6 @@ #import #import -#import - #import "FBSDKDynamicFrameworkLoader.h" #import "FBSDKInternalUtility+Internal.h" #import "FBSDKSettings+Internal.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsState.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsState.m index 9c42fe665..91c108fc7 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsState.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsState.m @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKAppEventsState.h" +#import #import diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateFactory.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateFactory.m index 2fe3150de..c99c277f3 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateFactory.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateFactory.m @@ -8,10 +8,9 @@ #import "FBSDKAppEventsStateFactory.h" +#import #import -#import "FBSDKAppEventsState.h" - @implementation FBSDKAppEventsStateFactory - (FBSDKAppEventsState *)createStateWithToken:(NSString *)tokenString appID:(NSString *)appID diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager.h b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager.h index d86a14004..7d5076abc 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager.h +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager.h @@ -9,8 +9,6 @@ #import #import -#import "FBSDKAppEventsState.h" - NS_ASSUME_NONNULL_BEGIN NS_SWIFT_NAME(AppEventsStateManager) diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager.m index 354693f74..7e8f09131 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager.m @@ -8,11 +8,10 @@ #import "FBSDKAppEventsStateManager.h" -#import - +#import #import +#import -#import "FBSDKAppEventsState.h" #import "FBSDKLogger.h" #import "FBSDKUnarchiverProvider.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsUtility.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsUtility.m index 9df3d481d..92def7c8a 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsUtility.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsUtility.m @@ -6,8 +6,6 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKAppEventsUtility.h" - #import #import diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKHybridAppEventsScriptMessageHandler.h b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKHybridAppEventsScriptMessageHandler.h index d34941277..5f914d24f 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKHybridAppEventsScriptMessageHandler.h +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKHybridAppEventsScriptMessageHandler.h @@ -8,11 +8,11 @@ #if !TARGET_OS_TV +#import #import #import #import "FBSDKEventLogging.h" -#import "FBSDKLoggingNotifying.h" NS_ASSUME_NONNULL_BEGIN diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Integrity/FBSDKIntegrityManager.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Integrity/FBSDKIntegrityManager.m index 4a96c225e..c1821d087 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Integrity/FBSDKIntegrityManager.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Integrity/FBSDKIntegrityManager.m @@ -13,8 +13,6 @@ #import #import -#import "FBSDKIntegrityProcessing.h" - @interface FBSDKIntegrityManager () @property (nonatomic) Class gateKeeperManager; diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Integrity/FBSDKRestrictiveDataFilterManager.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Integrity/FBSDKRestrictiveDataFilterManager.m index 23807a3ee..edf932f89 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Integrity/FBSDKRestrictiveDataFilterManager.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Integrity/FBSDKRestrictiveDataFilterManager.m @@ -11,8 +11,6 @@ #import #import -#import "FBSDKServerConfigurationManager.h" - @interface FBSDKRestrictiveEventFilter : NSObject @property (nonatomic, readonly, copy) NSString *eventName; diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SKAdNetwork/FBSDKSKAdNetworkReporter.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SKAdNetwork/FBSDKSKAdNetworkReporter.m index 16d7504a7..a8a0d461f 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SKAdNetwork/FBSDKSKAdNetworkReporter.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SKAdNetwork/FBSDKSKAdNetworkReporter.m @@ -12,10 +12,10 @@ #import +#import #import #import -#import "FBSDKAppEventsUtility.h" #import "FBSDKConversionValueUpdating.h" #import "FBSDKGraphRequestFactoryProtocol.h" #import "FBSDKGraphRequestProtocol.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKFeatureExtractor.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKFeatureExtractor.m index 76e850282..bf3df3594 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKFeatureExtractor.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKFeatureExtractor.m @@ -8,8 +8,6 @@ #if !TARGET_OS_TV -#import "FBSDKFeatureExtractor.h" - #import #import diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKSuggestedEventsIndexer.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKSuggestedEventsIndexer.m index 45e30c177..55d9cca3e 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKSuggestedEventsIndexer.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKSuggestedEventsIndexer.m @@ -19,7 +19,6 @@ #import #import "FBSDKAppEvents+Internal.h" -#import "FBSDKAppEventsUtility.h" #import "FBSDKInternalUtility+Internal.h" #import "FBSDKMLMacros.h" #import "FBSDKModelUtility.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ViewHierarchy/FBSDKViewHierarchy.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ViewHierarchy/FBSDKViewHierarchy.m index 8048e4f66..82b22b942 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ViewHierarchy/FBSDKViewHierarchy.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ViewHierarchy/FBSDKViewHierarchy.m @@ -12,10 +12,10 @@ #import +#import #import #import -#import "FBSDKAppEventsUtility.h" #import "FBSDKCodelessPathComponent.h" #import "FBSDKSafeCast.h" #import "FBSDKUtility.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppLink/FBSDKAppLinkNavigation+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/AppLink/FBSDKAppLinkNavigation+Internal.h index a8e3d8ecb..5bb311252 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppLink/FBSDKAppLinkNavigation+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/AppLink/FBSDKAppLinkNavigation+Internal.h @@ -19,11 +19,6 @@ NS_ASSUME_NONNULL_BEGIN @property (class, nullable, nonatomic) id appLinkEventPoster; @property (class, nullable, nonatomic) id appLinkResolver; -+ (void)configureWithSettings:(id)settings - urlOpener:(id)urlOpener - appLinkEventPoster:(id)appLinkEventPoster - appLinkResolver:(id)appLinkResolver; - @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/FBSDKServerConfigurationProvider.m b/FBSDKCoreKit/FBSDKCoreKit/FBSDKServerConfigurationProvider.m index 2861e8f4f..447b83a63 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/FBSDKServerConfigurationProvider.m +++ b/FBSDKCoreKit/FBSDKCoreKit/FBSDKServerConfigurationProvider.m @@ -8,7 +8,7 @@ #import "FBSDKServerConfigurationProvider.h" -#import "FBSDKServerConfigurationManager.h" +#import @implementation FBSDKServerConfigurationProvider diff --git a/FBSDKCoreKit/FBSDKCoreKit/FBSDKShareDialogConfiguration.m b/FBSDKCoreKit/FBSDKCoreKit/FBSDKShareDialogConfiguration.m index b7a3de2d3..f39230fbe 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/FBSDKShareDialogConfiguration.m +++ b/FBSDKCoreKit/FBSDKCoreKit/FBSDKShareDialogConfiguration.m @@ -10,8 +10,9 @@ #import "FBSDKShareDialogConfiguration.h" +#import + #import "FBSDKServerConfiguration.h" -#import "FBSDKServerConfigurationManager.h" @interface FBSDKShareDialogConfiguration () diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest+Private.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest+Private.h index d4d9dfd1a..b4634468b 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest+Private.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest+Private.h @@ -25,10 +25,6 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readwrite) id protocol; -+ (void)configureWithInternalURLOpener:(id)internalURLOpener - internalUtility:(id)internalUtility - settings:(id)settings; - // UNCRUSTIFY_FORMAT_OFF - (nullable instancetype)initWithProtocol:(nullable id)protocol protocolType:(FBSDKBridgeAPIProtocolType)protocolType diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.m b/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.m index 186b3b5a7..028ad3456 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.m +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.m @@ -16,7 +16,6 @@ #import "FBSDKErrorFactory+Internal.h" #import "FBSDKErrorReporter.h" #import "FBSDKInternalUtility+Internal.h" -#import "FBSDKServerConfigurationManager.h" @implementation FBSDKBridgeAPIProtocolWebV2 diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/_BridgeAPIRequestFactory.swift b/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/_BridgeAPIRequestFactory.swift index 2be23246c..26114a10b 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/_BridgeAPIRequestFactory.swift +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/_BridgeAPIRequestFactory.swift @@ -26,7 +26,7 @@ public final class _BridgeAPIRequestFactory: NSObject, BridgeAPIRequestCreating parameters: [String: Any]?, userInfo: [String: Any]? = nil ) -> BridgeAPIRequestProtocol? { - BridgeAPIRequest( + _BridgeAPIRequest( protocolType: protocolType, scheme: URLScheme(rawValue: scheme), methodName: methodName, diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration/FBSDKCoreKitComponents.m b/FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration/FBSDKCoreKitComponents.m index 2b88275ab..0290a6fa5 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration/FBSDKCoreKitComponents.m +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration/FBSDKCoreKitComponents.m @@ -13,23 +13,18 @@ #import "FBSDKAEMNetworker.h" #import "FBSDKATEPublisherFactory.h" #import "FBSDKAppEvents+Internal.h" -#import "FBSDKAppEventsConfigurationManager.h" -#import "FBSDKAppEventsDeviceInfo.h" #import "FBSDKAppEventsStateFactory.h" #import "FBSDKAppEventsStateManager.h" -#import "FBSDKAppEventsUtility.h" #import "FBSDKAppLinkFactory.h" #import "FBSDKAppLinkTargetFactory.h" #import "FBSDKAppLinkURLFactory.h" #import "FBSDKBackgroundEventLogger.h" -#import "FBSDKCodelessIndexer.h" #import "FBSDKCrashObserver.h" #import "FBSDKDialogConfigurationMapBuilder.h" #import "FBSDKErrorConfigurationProvider.h" #import "FBSDKErrorFactory+Internal.h" #import "FBSDKErrorReporter.h" #import "FBSDKEventDeactivationManager.h" -#import "FBSDKFeatureExtractor.h" #import "FBSDKGateKeeperManager.h" #import "FBSDKGraphRequestPiggybackManager.h" #import "FBSDKImpressionLoggerFactory.h" @@ -42,7 +37,6 @@ #import "FBSDKProductRequestFactory.h" #import "FBSDKRestrictiveDataFilterManager.h" #import "FBSDKSKAdNetworkReporter.h" -#import "FBSDKServerConfigurationManager.h" #import "FBSDKSuggestedEventsIndexer.h" #import "FBSDKSwizzler.h" #import "FBSDKTimeSpentData.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration/FBSDKCoreKitConfigurator.m b/FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration/FBSDKCoreKitConfigurator.m index c5e4e7bd2..510d616e9 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration/FBSDKCoreKitConfigurator.m +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration/FBSDKCoreKitConfigurator.m @@ -22,7 +22,6 @@ #import "FBSDKBridgeAPIRequest+Private.h" #import "FBSDKButton+Internal.h" #import "FBSDKCodelessIndexer+Internal.h" -#import "FBSDKCrashShield+Internal.h" #import "FBSDKErrorFactory+Internal.h" #import "FBSDKFeatureExtractor.h" #import "FBSDKGateKeeperManager.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAccessToken+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAccessToken+Internal.h index 840c6c880..d1da233c9 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAccessToken+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAccessToken+Internal.h @@ -20,11 +20,6 @@ NS_ASSUME_NONNULL_BEGIN @property (class, nullable, nonatomic) id graphRequestPiggybackManager; @property (class, nullable, nonatomic) id errorFactory; -+ (void)configureWithTokenCache:(id)tokenCache - graphRequestConnectionFactory:(id)graphRequestConnectionFactory - graphRequestPiggybackManager:(id)graphRequestPiggybackManager - errorFactory:(id)errorFactory; - + (void)resetTokenCache; + (void)setCurrentAccessToken:(nullable FBSDKAccessToken *)token diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLinkUtility+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLinkUtility+Internal.h index e74269292..7391f5203 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLinkUtility+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLinkUtility+Internal.h @@ -37,20 +37,6 @@ NS_ASSUME_NONNULL_BEGIN @property (class, nullable, nonatomic) id userIDProvider; @property (class, nullable, nonatomic) id userDataStore; -// UNCRUSTIFY_FORMAT_OFF -+ (void)configureWithGraphRequestFactory:(id)graphRequestFactory - infoDictionaryProvider:(id)infoDictionaryProvider - settings:(id)settings - appEventsConfigurationProvider:(id)appEventsConfigurationProvider - advertiserIDProvider:(id)advertiserIDProvider - appEventsDropDeterminer:(id)appEventsDropDeterminer - appEventParametersExtractor:(id)appEventParametersExtractor - appLinkURLFactory:(id)appLinkURLFactory - userIDProvider:(id)userIDProvider - userDataStore:(id)userDataStore -NS_SWIFT_NAME(configure(graphRequestFactory:infoDictionaryProvider:settings:appEventsConfigurationProvider:advertiserIDProvider:appEventsDropDeterminer:appEventParametersExtractor:appLinkURLFactory:userIDProvider:userDataStore:)); -// UNCRUSTIFY_FORMAT_ON - @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKErrorFactory+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKErrorFactory+Internal.h index af424f917..aa11e0d94 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKErrorFactory+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKErrorFactory+Internal.h @@ -17,11 +17,6 @@ NS_ASSUME_NONNULL_BEGIN @property (class, nullable, nonatomic) id defaultReporter; @property (nullable, nonatomic) id reporter; -// UNCRUSTIFY_FORMAT_OFF -+ (void)configureWithDefaultReporter:(id)defaultReporter -NS_SWIFT_NAME(configure(defaultReporter:)); -// UNCRUSTIFY_FORMAT_ON - #if DEBUG + (void)resetClassDependencies; #endif diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility+Internal.h index 15de5981b..2ef71caee 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility+Internal.h @@ -39,11 +39,6 @@ NS_SWIFT_NAME(InvalidObjectHandler); /// The version of the operating system on which the process is executing. @property (nonatomic, readonly, assign) NSOperatingSystemVersion operatingSystemVersion; -- (void)configureWithInfoDictionaryProvider:(id)infoDictionaryProvider - loggerFactory:(id<__FBSDKLoggerCreating>)loggerFactory - settings:(id)settings - errorFactory:(id)errorFactory; - /** Constructs a Facebook URL. @param hostPrefix The prefix for the host, such as 'm', 'graph', etc. diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKProfile+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKProfile+Internal.h index ddfd8d124..3ad09d19a 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKProfile+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKProfile+Internal.h @@ -36,15 +36,6 @@ typedef void (^FBSDKParseProfileBlock)(id result, FBSDKProfile *_Nonnull *_Nulla + (void)observeChangeAccessTokenChange:(NSNotification *)notification; -// UNCRUSTIFY_FORMAT_OFF -+ (void)configureWithDataStore:(id)dataStore - accessTokenProvider:(Class)accessTokenProvider - notificationCenter:(id<_FBSDKNotificationPosting, FBSDKNotificationDelivering>)notificationCenter - settings:(id)settings - urlHoster:(id)urlHoster -NS_SWIFT_NAME(configure(dataStore:accessTokenProvider:notificationCenter:settings:urlHoster:)); -// UNCRUSTIFY_FORMAT_ON - @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSettings+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSettings+Internal.h index 41e1cf091..c0c8238d5 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSettings+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSettings+Internal.h @@ -29,14 +29,6 @@ NS_ASSUME_NONNULL_BEGIN @property (class, nullable, nonatomic, readonly, copy) NSString *graphAPIDebugParamValue; @property (nonatomic) BOOL shouldUseTokenOptimizations; -// UNCRUSTIFY_FORMAT_OFF -- (void) configureWithStore:(id)store - appEventsConfigurationProvider:(id)provider - infoDictionaryProvider:(id)infoDictionaryProvider - eventLogger:(id)eventLogger -NS_SWIFT_NAME(configure(store:appEventsConfigurationProvider:infoDictionaryProvider:eventLogger:)); -// UNCRUSTIFY_FORMAT_ON - + (nullable NSObject *)tokenCache; + (void)setTokenCache:(nullable NSObject *)tokenCache; diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKURL+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKURL+Internal.h index 83dc9ad00..a4c1253a4 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKURL+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKURL+Internal.h @@ -19,14 +19,6 @@ NS_ASSUME_NONNULL_BEGIN @property (class, nullable, nonatomic, readonly) id appLinkTargetFactory; @property (class, nullable, nonatomic, readonly) id appLinkEventPoster; -// UNCRUSTIFY_FORMAT_OFF -+ (void)configureWithSettings:(id)settings - appLinkFactory:(id)appLinkFactory - appLinkTargetFactory:(id)appLinkTargetFactory - appLinkEventPoster:(id)appLinkEventPoster -NS_SWIFT_NAME(configure(settings:appLinkFactory:appLinkTargetFactory:appLinkEventPoster:)); -// UNCRUSTIFY_FORMAT_ON - + (FBSDKURL *)URLForRenderBackToReferrerBarURL:(NSURL *)url; #if DEBUG diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKWebDialogView+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKWebDialogView+Internal.h index 780bd0b39..b1c6336a4 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKWebDialogView+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKWebDialogView+Internal.h @@ -20,13 +20,6 @@ NS_ASSUME_NONNULL_BEGIN @property (class, nullable, nonatomic) id urlOpener; @property (class, nullable, nonatomic) id errorFactory; -// UNCRUSTIFY_FORMAT_OFF -+ (void)configureWithWebViewProvider:(id)webViewProvider - urlOpener:(id)urlOpener - errorFactory:(id)errorFactory -NS_SWIFT_NAME(configure(webViewProvider:urlOpener:errorFactory:)); -// UNCRUSTIFY_FORMAT_ON - @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashObserver.m b/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashObserver.m index 5a1b4dc40..b63b102b4 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashObserver.m +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashObserver.m @@ -8,9 +8,9 @@ #import "FBSDKCrashObserver+Internal.h" +#import #import -#import "FBSDKCrashShield.h" #import "FBSDKFeatureChecking.h" #import "FBSDKGraphRequestFactoryProtocol.h" #import "FBSDKGraphRequestHTTPMethod.h" diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield.h deleted file mode 100644 index c6bc7d24c..000000000 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under the license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -NS_SWIFT_NAME(CrashShield) -@interface FBSDKCrashShield : NSObject - -+ (void)analyze:(NSArray *> *)crashLogs; - -@end - -NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield.m b/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield.m index f2be6a858..5d172e134 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield.m +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield.m @@ -6,8 +6,6 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKCrashShield.h" - #import #import diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestConnection+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestConnection+Internal.h index e441b4708..99e340cd7 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestConnection+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestConnection+Internal.h @@ -53,19 +53,6 @@ typedef NS_ENUM(NSUInteger, FBSDKGraphRequestConnectionState) { #endif + (BOOL)canMakeRequests; -+ (void)setCanMakeRequests; - -+ (void)configureWithURLSessionProxyFactory:(nonnull id)proxyFactory - errorConfigurationProvider:(nonnull id)errorConfigurationProvider - piggybackManager:(nonnull id)piggybackManager - settings:(nonnull id)settings - graphRequestConnectionFactory:(nonnull id)factory - eventLogger:(nonnull id)eventLogger - operatingSystemVersionComparer:(nonnull id)operatingSystemVersionComparer - macCatalystDeterminator:(nonnull id)macCatalystDeterminator - accessTokenProvider:(nonnull Class)accessTokenProvider - errorFactory:(nonnull id)errorFactory - authenticationTokenProvider:(nonnull Class)authenticationTokenProvider; - (NSMutableURLRequest *)requestWithBatch:(NSArray *)requests timeout:(NSTimeInterval)timeout; diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.m b/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.m index 94c2959f2..52a696d79 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.m +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.m @@ -8,11 +8,11 @@ #import "FBSDKGraphRequestPiggybackManager.h" +#import #import #import "FBSDKGraphRequestConnecting+Internal.h" #import "FBSDKGraphRequestMetadata.h" -#import "FBSDKServerConfigurationManager.h" @implementation FBSDKGraphRequestPiggybackManager diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfigurationProvider.m b/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfigurationProvider.m index 9559d3458..b196e1394 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfigurationProvider.m +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfigurationProvider.m @@ -8,7 +8,7 @@ #import "FBSDKErrorConfigurationProvider.h" -#import "FBSDKServerConfigurationManager.h" +#import @implementation FBSDKErrorConfigurationProvider diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.m b/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.m index b915b6c36..472a66007 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.m +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.m @@ -6,10 +6,9 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKServerConfigurationManager.h" - #import #import +#import #import #import #import diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKButton+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKButton+Internal.h index 69eae03e5..a75d68096 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKButton+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKButton+Internal.h @@ -27,10 +27,6 @@ NS_ASSUME_NONNULL_BEGIN + (void)resetClassDependencies; #endif -+ (void)configureWithApplicationActivationNotifier:(id)applicationActivationNotifier - eventLogger:(id)eventLogger - accessTokenProvider:(Class)accessTokenProvider; - - (void)configureButton; - (void) configureWithIcon:(FBSDKIcon *)icon title:(NSString *)title diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKImpressionLoggingButton+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKImpressionLoggingButton+Internal.h index 70e19c104..4a6ccadd7 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKImpressionLoggingButton+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKImpressionLoggingButton+Internal.h @@ -15,9 +15,6 @@ NS_ASSUME_NONNULL_BEGIN @property (class, nullable, nonatomic, readonly) id impressionLoggerFactory; -+ (void)configureWithImpressionLoggerFactory:(id)impressionLoggerFactory -NS_SWIFT_NAME(configure(impressionLoggerFactory:)); - #if DEBUG + (void)resetClassDependencies; #endif diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAccessToken.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAccessToken.h index 5efc6898e..3422be59e 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAccessToken.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAccessToken.h @@ -12,6 +12,10 @@ #import #import +@protocol FBSDKGraphRequestConnectionFactory; +@protocol FBSDKGraphRequestPiggybackManaging; +@protocol FBSDKErrorCreating; + NS_ASSUME_NONNULL_BEGIN /** @@ -184,6 +188,19 @@ NS_SWIFT_NAME(hasGranted(permission:)); */ + (void)refreshCurrentAccessTokenWithCompletion:(nullable FBSDKGraphRequestCompletion)completion; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ ++ (void)configureWithTokenCache:(id)tokenCache + graphRequestConnectionFactory:(id)graphRequestConnectionFactory + graphRequestPiggybackManager:(id)graphRequestPiggybackManager + errorFactory:(id)errorFactory +NS_SWIFT_NAME(configure(tokenCache:graphRequestConnectionFactory:graphRequestPiggybackManager:errorFactory:)); + + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEvents.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEvents.h index 0a160948a..157a5a75d 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEvents.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEvents.h @@ -14,8 +14,9 @@ #import #import -#import +#import #import +#import #import #import #import @@ -75,7 +76,7 @@ NS_SWIFT_NAME(AppEventsOverrideAppIDBundleKey); + The length of each parameter value can be no more than on the order of 100 characters. */ NS_SWIFT_NAME(AppEvents) -@interface FBSDKAppEvents : NSObject +@interface FBSDKAppEvents : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsConfigurationManager.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsConfigurationManager.h similarity index 87% rename from FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsConfigurationManager.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsConfigurationManager.h index 1f3c4dda1..7752943d9 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsConfigurationManager.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsConfigurationManager.h @@ -19,7 +19,13 @@ typedef void (^FBSDKAppEventsConfigurationManagerBlock)(void); NS_ASSUME_NONNULL_BEGIN -NS_SWIFT_NAME(AppEventsConfigurationManager) +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_AppEventsConfigurationManager) @interface FBSDKAppEventsConfigurationManager : NSObject @property (class, nonatomic, readonly) FBSDKAppEventsConfigurationManager *shared; diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsConfiguring.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsConfiguring.h index c14dd42a2..7ecffa81f 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsConfiguring.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsConfiguring.h @@ -72,7 +72,8 @@ NS_SWIFT_NAME(_AppEventsConfiguring) userDataStore:(id)userDataStore appEventsUtility:(id)appEventsUtility internalUtility:(id)internalUtility - capiReporter:(id)capiReporter; + capiReporter:(id)capiReporter +NS_SWIFT_NAME(configure(gateKeeperManager:appEventsConfigurationProvider:serverConfigurationProvider:graphRequestFactory:featureChecker:primaryDataStore:logger:settings:paymentObserver:timeSpentRecorder:appEventsStateStore:eventDeactivationParameterProcessor:restrictiveDataFilterParameterProcessor:atePublisherFactory:appEventsStateProvider:advertiserIDProvider:userDataStore:appEventsUtility:internalUtility:capiReporter:)); #if !TARGET_OS_TV diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsDeviceInfo.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsDeviceInfo.h similarity index 62% rename from FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsDeviceInfo.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsDeviceInfo.h index 6d753c8eb..3919753f2 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsDeviceInfo.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsDeviceInfo.h @@ -6,12 +6,19 @@ * LICENSE file in the root directory of this source tree. */ -#import +#import +#import #import NS_ASSUME_NONNULL_BEGIN -NS_SWIFT_NAME(AppEventsDeviceInfo) +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_AppEventsDeviceInfo) @interface FBSDKAppEventsDeviceInfo : NSObject @property (class, nonnull, nonatomic, readonly) FBSDKAppEventsDeviceInfo *shared; @@ -23,7 +30,8 @@ NS_SWIFT_NAME(AppEventsDeviceInfo) + (instancetype)new NS_UNAVAILABLE; #endif -- (void)configureWithSettings:(id)settings; +- (void)configureWithSettings:(id)settings +NS_SWIFT_NAME(configure(settings:)); #if DEBUG - (void)resetDependencies; diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsState.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsState.h similarity index 86% rename from FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsState.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsState.h index 232404325..814ee30a6 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsState.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsState.h @@ -6,13 +6,19 @@ * LICENSE file in the root directory of this source tree. */ -#import +#import #import NS_ASSUME_NONNULL_BEGIN +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ // this type is not thread safe. -NS_SWIFT_NAME(AppEventsState) +NS_SWIFT_NAME(_AppEventsState) @interface FBSDKAppEventsState : NSObject @property (class, nullable, nonatomic) NSArray> *eventProcessors; diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppEventsUtility.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsUtility.h similarity index 85% rename from FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppEventsUtility.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsUtility.h index 309f3260b..4dd572fce 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppEventsUtility.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsUtility.h @@ -6,17 +6,21 @@ * LICENSE file in the root directory of this source tree. */ -#import - -#import - +#import #import -#import "FBSDKAppEventsUtilityProtocol.h" -#import "FBSDKLoggingNotifying.h" +#import +#import +#import NS_ASSUME_NONNULL_BEGIN -NS_SWIFT_NAME(AppEventsUtility) +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_AppEventsUtility) @interface FBSDKAppEventsUtility : NSObject #if !DEBUG diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsUtilityProtocol.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsUtilityProtocol.h similarity index 78% rename from FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsUtilityProtocol.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsUtilityProtocol.h index 280764f5f..0c5be47a9 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsUtilityProtocol.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppEventsUtilityProtocol.h @@ -6,15 +6,19 @@ * LICENSE file in the root directory of this source tree. */ -#import - -#import - +#import #import +#import NS_ASSUME_NONNULL_BEGIN -NS_SWIFT_NAME(AppEventsUtilityProtocol) +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_AppEventsUtilityProtocol) @protocol FBSDKAppEventsUtility @property (nonatomic, readonly) NSTimeInterval unixTimeNow; diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppLinkNavigation.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppLinkNavigation.h index bfc1bbfc0..853e13347 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppLinkNavigation.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppLinkNavigation.h @@ -13,6 +13,7 @@ #import #import +@protocol FBSDKInternalURLOpener; @protocol FBSDKSettings; NS_ASSUME_NONNULL_BEGIN @@ -130,6 +131,18 @@ NS_SWIFT_NAME(callbackAppLinkData(forApp:url:)); resolver:(id)resolver handler:(FBSDKAppLinkNavigationBlock)handler; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ ++ (void)configureWithSettings:(id)settings + urlOpener:(id)urlOpener + appLinkEventPoster:(id)appLinkEventPoster + appLinkResolver:(id)appLinkResolver +NS_SWIFT_NAME(configure(settings:urlOpener:appLinkEventPoster:appLinkResolver:)); + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppLinkUtility.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppLinkUtility.h index cc886b5e6..3f3c776d3 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppLinkUtility.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAppLinkUtility.h @@ -10,6 +10,9 @@ #import +@protocol FBSDKInfoDictionaryProviding; +@protocol FBSDKUserIDProviding; + NS_ASSUME_NONNULL_BEGIN /** @@ -68,6 +71,26 @@ NS_SWIFT_NAME(AppLinkUtility) */ + (BOOL)isMatchURLScheme:(NSString *)scheme; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +// UNCRUSTIFY_FORMAT_OFF ++ (void)configureWithGraphRequestFactory:(id)graphRequestFactory + infoDictionaryProvider:(id)infoDictionaryProvider + settings:(id)settings + appEventsConfigurationProvider:(id)appEventsConfigurationProvider + advertiserIDProvider:(id)advertiserIDProvider + appEventsDropDeterminer:(id)appEventsDropDeterminer + appEventParametersExtractor:(id)appEventParametersExtractor + appLinkURLFactory:(id)appLinkURLFactory + userIDProvider:(id)userIDProvider + userDataStore:(id)userDataStore +NS_SWIFT_NAME(configure(graphRequestFactory:infoDictionaryProvider:settings:appEventsConfigurationProvider:advertiserIDProvider:appEventsDropDeterminer:appEventParametersExtractor:appLinkURLFactory:userIDProvider:userDataStore:)); +// UNCRUSTIFY_FORMAT_ON + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAuthenticationStatusUtility.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAuthenticationStatusUtility.h index 172dd180e..3ddba1459 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAuthenticationStatusUtility.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKAuthenticationStatusUtility.h @@ -38,7 +38,8 @@ NS_SWIFT_NAME(_AuthenticationStatusUtility) + (void)configureWithProfileSetter:(Class)profileSetter sessionDataTaskProvider:(id)sessionDataTaskProvider accessTokenWallet:(Class)accessTokenWallet - authenticationTokenWallet:(Class)authenticationWallet; + authenticationTokenWallet:(Class)authenticationWallet +NS_SWIFT_NAME(configure(profileSetter:sessionDataTaskProvider:accessTokenWallet:authenticationTokenWallet:)); /** Fetches the latest authentication status from server. This will invalidate diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKBridgeAPIRequest.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKBridgeAPIRequest.h index b55f87042..2c32e9c3e 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKBridgeAPIRequest.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKBridgeAPIRequest.h @@ -15,6 +15,10 @@ #import #import +@protocol FBSDKInternalURLOpener; +@protocol FBSDKInternalUtility; +@protocol FBSDKSettings; + NS_ASSUME_NONNULL_BEGIN /** @@ -23,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN @warning INTERNAL - DO NOT USE */ -NS_SWIFT_NAME(BridgeAPIRequest) +NS_SWIFT_NAME(_BridgeAPIRequest) @interface FBSDKBridgeAPIRequest : NSObject - (instancetype)init NS_UNAVAILABLE; @@ -43,6 +47,17 @@ NS_SWIFT_NAME(BridgeAPIRequest) - (nullable NSURL *)requestURL:(NSError *_Nullable *)errorRef; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ ++ (void)configureWithInternalURLOpener:(id)internalURLOpener + internalUtility:(id)internalUtility + settings:(id)settings +NS_SWIFT_NAME(configure(internalURLOpener:internalUtility:settings:)); + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKButton.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKButton.h index beae11a18..3ab3b226e 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKButton.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKButton.h @@ -13,6 +13,7 @@ #import @class FBSDKIcon; +@protocol FBSDKEventLogging; NS_ASSUME_NONNULL_BEGIN @@ -75,6 +76,18 @@ NS_SWIFT_NAME(FBButton) */ - (void)logTapEventWithEventName:(FBSDKAppEventName)eventName parameters:(nullable NSDictionary *)parameters; + +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ ++ (void)configureWithApplicationActivationNotifier:(id)applicationActivationNotifier + eventLogger:(id)eventLogger + accessTokenProvider:(Class)accessTokenProvider +NS_SWIFT_NAME(configure(applicationActivationNotifier:eventLogger:accessTokenProvider:)); + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCodelessIndexer.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCodelessIndexer.h new file mode 100644 index 000000000..8969da823 --- /dev/null +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCodelessIndexer.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under the license found in the + * LICENSE file in the root directory of this source tree. + */ + +#if !TARGET_OS_TV + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +typedef void (^FBSDKCodelessSettingLoadBlock)(BOOL isCodelessSetupEnabled, NSError *_Nullable error); + +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_CodelessIndexer) +@interface FBSDKCodelessIndexer : NSObject + +@property (class, nonatomic, readonly, copy) NSString *extInfo; + ++ (void)enable; + +// UNCRUSTIFY_FORMAT_OFF ++ (void)configureWithGraphRequestFactory:(id)graphRequestFactory + serverConfigurationProvider:(id)serverConfigurationProvider + dataStore:(id)dataStore + graphRequestConnectionFactory:(id)graphRequestConnectionFactory + swizzler:(Class)swizzler + settings:(id)settings + advertiserIDProvider:(id)advertisingIDProvider +NS_SWIFT_NAME(configure(graphRequestFactory:serverConfigurationProvider:dataStore:graphRequestConnectionFactory:swizzler:settings:advertiserIDProvider:)); +// UNCRUSTIFY_FORMAT_ON + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCoreKit.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCoreKit.h index 15af9b77d..28160cbbf 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCoreKit.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCoreKit.h @@ -21,16 +21,21 @@ #import #import #import +#import #import #import +#import #import #import #import #import #import +#import #import #import #import +#import +#import #import #import #import @@ -66,11 +71,14 @@ #import #import #import +#import #import #import #import #import +#import #import +#import #import #import #import @@ -93,6 +101,7 @@ #import #import #import +#import #import #import #import @@ -112,6 +121,7 @@ #import #import #import +#import #import #import #import @@ -124,6 +134,7 @@ #import #import #import +#import #import #import #import @@ -131,6 +142,7 @@ #import #import #import +#import #import #import #import @@ -144,6 +156,7 @@ #import #import #import +#import #import #import #import diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCoreKitComponents.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCoreKitComponents.h index c12178439..5c3f5c2b2 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCoreKitComponents.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCoreKitComponents.h @@ -99,7 +99,7 @@ NS_SWIFT_NAME(default); @property (nonatomic, readonly) id appEventsConfigurationProvider; @property (nonatomic, readonly) id appEventsStateProvider; @property (nonatomic, readonly) id appEventsStateStore; -@property (nullable, nonatomic) id appEventsUtility; +@property (nonatomic, readonly) id appEventsUtility; @property (nonatomic, readonly) id (^getApplicationActivationNotifier)(void); @property (nonatomic, readonly) id atePublisherFactory; @property (nonatomic, readonly) Class authenticationTokenWallet; diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield+Internal.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCrashShield.h similarity index 57% rename from FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield+Internal.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCrashShield.h index 223425778..597d58e23 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/Instrument/CrashReport/FBSDKCrashShield+Internal.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKCrashShield.h @@ -8,17 +8,25 @@ #import -#import "FBSDKCrashShield.h" +@protocol FBSDKFeatureDisabling; NS_ASSUME_NONNULL_BEGIN -@protocol FBSDKFeatureDisabling; +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_CrashShield) +@interface FBSDKCrashShield : NSObject -@interface FBSDKCrashShield (Internal) ++ (void)analyze:(NSArray *> *)crashLogs; + (void)configureWithSettings:(id)settings graphRequestFactory:(id)graphRequestFactory - featureChecking:(id)featureChecking; + featureChecking:(id)featureChecking +NS_SWIFT_NAME(configure(settings:graphRequestFactory:featureChecking:)); @end diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKErrorFactory.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKErrorFactory.h index 14f73e36b..ab1e15546 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKErrorFactory.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKErrorFactory.h @@ -22,6 +22,17 @@ NS_SWIFT_NAME(ErrorFactory) */ - (instancetype)initWithReporter:(id)reporter; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +// UNCRUSTIFY_FORMAT_OFF ++ (void)configureWithDefaultReporter:(id)defaultReporter +NS_SWIFT_NAME(configure(defaultReporter:)); +// UNCRUSTIFY_FORMAT_ON + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKFeatureExtractor.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKFeatureExtractor.h similarity index 75% rename from FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKFeatureExtractor.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKFeatureExtractor.h index 52222e765..72a66593f 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SuggestedEvents/FBSDKFeatureExtractor.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKFeatureExtractor.h @@ -13,12 +13,19 @@ NS_ASSUME_NONNULL_BEGIN -NS_SWIFT_NAME(FeatureExtractor) +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_FeatureExtractor) @interface FBSDKFeatureExtractor : NSObject @property (class, nullable, nonatomic) id rulesFromKeyProvider; -+ (void)configureWithRulesFromKeyProvider:(id)rulesFromKeyProvider; ++ (void)configureWithRulesFromKeyProvider:(id)rulesFromKeyProvider +NS_SWIFT_NAME(configure(rulesFromKeyProvider:)); + (void)loadRulesForKey:(NSString *)useCaseKey; diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKGateKeeperManager.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKGateKeeperManager.h index 018b251dc..d0374d722 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKGateKeeperManager.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKGateKeeperManager.h @@ -41,11 +41,11 @@ NS_SWIFT_NAME(_GateKeeperManager) - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; -/// Configures the manager with various dependencies that are required to load the gate keepers + (void) configureWithSettings:(id)settings graphRequestFactory:(id)graphRequestFactory graphRequestConnectionFactory:(id)graphRequestConnectionFactory - store:(id)store; + store:(id)store +NS_SWIFT_NAME(configure(settings:graphRequestFactory:graphRequestConnectionFactory:store:)); /// Returns the locally cached configuration. + (BOOL)boolForKey:(NSString *)key defaultValue:(BOOL)defaultValue; diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKGraphRequestConnection.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKGraphRequestConnection.h index 99966bf1e..4882c97f1 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKGraphRequestConnection.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKGraphRequestConnection.h @@ -11,6 +11,18 @@ #import #import +@protocol FBSDKURLSessionProxyProviding; +@protocol FBSDKErrorConfigurationProviding; +@protocol FBSDKGraphRequestPiggybackManaging; +@protocol FBSDKSettings; +@protocol FBSDKGraphRequestConnectionFactory; +@protocol FBSDKEventLogging; +@protocol FBSDKOperatingSystemVersionComparing; +@protocol FBSDKMacCatalystDetermining; +@protocol FBSDKAccessTokenProviding; +@protocol FBSDKErrorCreating; +@protocol FBSDKAuthenticationTokenProviding; + NS_ASSUME_NONNULL_BEGIN /** @@ -168,6 +180,33 @@ NS_SWIFT_NAME(GraphRequestConnection) */ - (void)overrideGraphAPIVersion:(NSString *)version; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ ++ (void)setCanMakeRequests; + +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ ++ (void)configureWithURLSessionProxyFactory:(nonnull id)proxyFactory + errorConfigurationProvider:(nonnull id)errorConfigurationProvider + piggybackManager:(nonnull id)piggybackManager + settings:(nonnull id)settings + graphRequestConnectionFactory:(nonnull id)factory + eventLogger:(nonnull id)eventLogger + operatingSystemVersionComparer:(nonnull id)operatingSystemVersionComparer + macCatalystDeterminator:(nonnull id)macCatalystDeterminator + accessTokenProvider:(nonnull Class)accessTokenProvider + errorFactory:(nonnull id)errorFactory + authenticationTokenProvider:(nonnull Class)authenticationTokenProvider +NS_SWIFT_NAME(configure(urlSessionProxyFactory:errorConfigurationProvider:piggybackManager:settings:graphRequestConnectionFactory:eventLogger:operatingSystemVersionComparer:macCatalystDeterminator:accessTokenProvider:errorFactory:authenticationTokenProvider:)); + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKImpressionLoggingButton.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKImpressionLoggingButton.h index 4202de70e..3c4b8b2f6 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKImpressionLoggingButton.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKImpressionLoggingButton.h @@ -8,6 +8,8 @@ #import +@protocol FBSDKImpressionLoggerFactory; + NS_ASSUME_NONNULL_BEGIN /** @@ -18,6 +20,10 @@ NS_ASSUME_NONNULL_BEGIN */ NS_SWIFT_NAME(ImpressionLoggingButton) @interface FBSDKImpressionLoggingButton : UIButton + ++ (void)configureWithImpressionLoggerFactory:(id)impressionLoggerFactory +NS_SWIFT_NAME(configure(impressionLoggerFactory:)); + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKIntegrityProcessing.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKIntegrityProcessing.h similarity index 100% rename from FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKIntegrityProcessing.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKIntegrityProcessing.h diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKInternalUtility.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKInternalUtility.h index c48e086bf..9c1f25e6e 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKInternalUtility.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKInternalUtility.h @@ -18,6 +18,11 @@ #import #endif +@protocol FBSDKErrorCreating; +@protocol FBSDKInfoDictionaryProviding; +@protocol FBSDKSettings; +@protocol __FBSDKLoggerCreating; + NS_ASSUME_NONNULL_BEGIN NS_SWIFT_NAME(InternalUtility) @@ -78,6 +83,18 @@ NS_SWIFT_NAME(InternalUtility) - (BOOL)isRegisteredCanOpenURLScheme:(NSString *)urlScheme; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +- (void)configureWithInfoDictionaryProvider:(id)infoDictionaryProvider + loggerFactory:(id<__FBSDKLoggerCreating>)loggerFactory + settings:(id)settings + errorFactory:(id)errorFactory +NS_SWIFT_NAME(configure(infoDictionaryProvider:loggerFactory:settings:errorFactory:)); + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLoggingNotifying.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKLoggingNotifying.h similarity index 70% rename from FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLoggingNotifying.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKLoggingNotifying.h index 7c8fe7058..0230cbc42 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLoggingNotifying.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKLoggingNotifying.h @@ -10,7 +10,13 @@ NS_ASSUME_NONNULL_BEGIN -NS_SWIFT_NAME(LoggingNotifying) +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_LoggingNotifying) @protocol FBSDKLoggingNotifying - (void)logAndNotify:(NSString *)message; diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ML/FBSDKModelManager.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKModelManager.h similarity index 82% rename from FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ML/FBSDKModelManager.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKModelManager.h index 88725a3d0..376cea5d2 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ML/FBSDKModelManager.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKModelManager.h @@ -12,11 +12,15 @@ #import #import -#import "FBSDKIntegrityProcessing.h" - NS_ASSUME_NONNULL_BEGIN -NS_SWIFT_NAME(ModelManager) +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_ModelManager) @interface FBSDKModelManager : NSObject @property (class, nonnull, readonly) FBSDKModelManager *shared; @@ -29,6 +33,7 @@ NS_SWIFT_NAME(ModelManager) - (nullable NSArray *)getThresholdsForKey:(NSString *)useCase; - (BOOL)processIntegrity:(nullable NSString *)param; - (NSString *)processSuggestedEvents:(NSString *)textFeature denseData:(nullable float *)denseData; + - (void)configureWithFeatureChecker:(id)featureChecker graphRequestFactory:(id)graphRequestFactory fileManager:(id)fileManager @@ -37,7 +42,8 @@ NS_SWIFT_NAME(ModelManager) dataExtractor:(Class)dataExtractor gateKeeperManager:(Class)gateKeeperManager suggestedEventsIndexer:(id)suggestedEventsIndexer - featureExtractor:(Class)featureExtractor; + featureExtractor:(Class)featureExtractor +NS_SWIFT_NAME(configure(featureChecker:graphRequestFactory:fileManager:store:settings:dataExtractor:gateKeeperManager:suggestedEventsIndexer:featureExtractor:)); @end diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKProfile.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKProfile.h index 2199d1564..f7de3395a 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKProfile.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKProfile.h @@ -14,6 +14,10 @@ @class FBSDKLocation; @class FBSDKProfile; @class FBSDKUserAgeRange; +@protocol FBSDKDataPersisting; +@protocol FBSDKNotificationDelivering; +@protocol FBSDKURLHosting; +@protocol _FBSDKNotificationPosting; NS_ASSUME_NONNULL_BEGIN @@ -296,6 +300,21 @@ NS_SWIFT_NAME(imageURL(forMode:size:)); NS_SWIFT_NAME(imageURL(profileID:pictureMode:size:)); // UNCRUSTIFY_FORMAT_ON +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +// UNCRUSTIFY_FORMAT_OFF ++ (void)configureWithDataStore:(id)dataStore + accessTokenProvider:(Class)accessTokenProvider + notificationCenter:(id<_FBSDKNotificationPosting, FBSDKNotificationDelivering>)notificationCenter + settings:(id)settings + urlHoster:(id)urlHoster +NS_SWIFT_NAME(configure(dataStore:accessTokenProvider:notificationCenter:settings:urlHoster:)); +// UNCRUSTIFY_FORMAT_ON + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKServerConfigurationManager.h similarity index 87% rename from FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.h rename to FBSDKCoreKit/FBSDKCoreKit/include/FBSDKServerConfigurationManager.h index 0e7279fd3..ba624b0cb 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKServerConfigurationManager.h @@ -9,15 +9,19 @@ #import #import -#import "FBSDKServerConfiguration.h" - #define FBSDK_SERVER_CONFIGURATION_MANAGER_CACHE_TIMEOUT (60 * 60) @protocol FBSDKGraphRequestFactory; NS_ASSUME_NONNULL_BEGIN -NS_SWIFT_NAME(ServerConfigurationManager) +/** + Internal type exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +NS_SWIFT_NAME(_ServerConfigurationManager) @interface FBSDKServerConfigurationManager : NSObject @property (class, readonly) FBSDKServerConfigurationManager *shared; diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKSettings.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKSettings.h index 9a00e27d7..bb5e2d810 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKSettings.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKSettings.h @@ -12,6 +12,11 @@ #import #import +@protocol FBSDKAppEventsConfigurationProviding; +@protocol FBSDKDataPersisting; +@protocol FBSDKEventLogging; +@protocol FBSDKInfoDictionaryProviding; + NS_ASSUME_NONNULL_BEGIN NS_SWIFT_NAME(Settings) @@ -192,6 +197,20 @@ Set the data processing options. */ - (void)disableLoggingBehavior:(FBSDKLoggingBehavior)loggingBehavior; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +// UNCRUSTIFY_FORMAT_OFF +- (void) configureWithStore:(id)store + appEventsConfigurationProvider:(id)provider + infoDictionaryProvider:(id)infoDictionaryProvider + eventLogger:(id)eventLogger +NS_SWIFT_NAME(configure(store:appEventsConfigurationProvider:infoDictionaryProvider:eventLogger:)); +// UNCRUSTIFY_FORMAT_ON + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKURL.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKURL.h index 292430f5d..78c400e50 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKURL.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKURL.h @@ -79,6 +79,20 @@ NS_SWIFT_NAME(init(inboundURL:sourceApplication:)); /// The flag indicating whether the URL comes from auto app link @property (nonatomic, readonly, getter = isAutoAppLink) BOOL isAutoAppLink; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +// UNCRUSTIFY_FORMAT_OFF ++ (void)configureWithSettings:(id)settings + appLinkFactory:(id)appLinkFactory + appLinkTargetFactory:(id)appLinkTargetFactory + appLinkEventPoster:(id)appLinkEventPoster +NS_SWIFT_NAME(configure(settings:appLinkFactory:appLinkTargetFactory:appLinkEventPoster:)); +// UNCRUSTIFY_FORMAT_ON + @end NS_ASSUME_NONNULL_END diff --git a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKWebDialogView.h b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKWebDialogView.h index b0861b817..66527492b 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKWebDialogView.h +++ b/FBSDKCoreKit/FBSDKCoreKit/include/FBSDKWebDialogView.h @@ -22,6 +22,19 @@ NS_SWIFT_NAME(FBWebDialogView) - (void)loadURL:(NSURL *)URL; - (void)stopLoading; +/** + Internal method exposed to facilitate transition to Swift. + API Subject to change or removal without warning. Do not use. + + @warning INTERNAL - DO NOT USE + */ +// UNCRUSTIFY_FORMAT_OFF ++ (void)configureWithWebViewProvider:(id)webViewProvider + urlOpener:(id)urlOpener + errorFactory:(id)errorFactory +NS_SWIFT_NAME(configure(webViewProvider:urlOpener:errorFactory:)); +// UNCRUSTIFY_FORMAT_ON + @end NS_SWIFT_NAME(WebDialogViewDelegate) diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/AccessTokenTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/AccessTokenTests.swift index 4435794b2..0e8ba38b3 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/AccessTokenTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/AccessTokenTests.swift @@ -31,7 +31,7 @@ final class AccessTokenTests: XCTestCase { graphRequestPiggybackManager = TestGraphRequestPiggybackManager() AccessToken.configure( - withTokenCache: tokenCache, + tokenCache: tokenCache, graphRequestConnectionFactory: graphRequestConnectionFactory, graphRequestPiggybackManager: graphRequestPiggybackManager, errorFactory: TestErrorFactory() diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/ApplicationDelegateTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/ApplicationDelegateTests.swift index 48bb38e6c..6640fbeeb 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/ApplicationDelegateTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/ApplicationDelegateTests.swift @@ -147,7 +147,7 @@ final class ApplicationDelegateTests: XCTestCase { "An application delegate should be created with the provided components" ) XCTAssertIdentical( - delegate.configurator, + delegate.configurator as AnyObject, configurator, "An application delegate should be created with the provided configurator" ) diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/DefaultCoreKitComponentsTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/DefaultCoreKitComponentsTests.swift index b68bebef6..af882ab84 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/DefaultCoreKitComponentsTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/DefaultCoreKitComponentsTests.swift @@ -35,7 +35,7 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testAdvertiserIDProvider() { XCTAssertTrue( - components.advertiserIDProvider === AppEventsUtility.shared, + components.advertiserIDProvider === _AppEventsUtility.shared, "The default components should use the shared AppEventsUtility as its advertise ID provider" ) } @@ -49,7 +49,7 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testAppEventsConfigurationProvider() { XCTAssertTrue( - components.appEventsConfigurationProvider === AppEventsConfigurationManager.shared, + components.appEventsConfigurationProvider === _AppEventsConfigurationManager.shared, """ The default components should use the shared \ AppEventsConfigurationManager as its app events configuration provider @@ -73,7 +73,7 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testAppEventsUtility() { XCTAssertTrue( - components.appEventsUtility === AppEventsUtility.shared, + components.appEventsUtility === _AppEventsUtility.shared, "The default components should use the shared AppEventsUtility as its app events utility" ) } @@ -154,7 +154,7 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testDeviceInformationProvider() { XCTAssertTrue( - components.deviceInformationProvider === AppEventsDeviceInfo.shared, + components.deviceInformationProvider === _AppEventsDeviceInfo.shared, "The default components should use the shared AppEventsDeviceInfo as its device information provider" ) } @@ -401,7 +401,7 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testServerConfigurationProvider() { XCTAssertTrue( - components.serverConfigurationProvider === ServerConfigurationManager.shared, + components.serverConfigurationProvider === _ServerConfigurationManager.shared, "The default components should use the shared ServerConfigurationManager as its server configuration provider" ) } @@ -481,14 +481,14 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testAppEventParametersExtractor() { XCTAssertTrue( - components.appEventParametersExtractor === AppEventsUtility.shared, + components.appEventParametersExtractor === _AppEventsUtility.shared, "The default components should use the shared AppEventsUtility as its app event parameters extractor" ) } func testAppEventsDropDeterminer() { XCTAssertTrue( - components.appEventsDropDeterminer === AppEventsUtility.shared, + components.appEventsDropDeterminer === _AppEventsUtility.shared, "The default components should use the shared AppEventsUtility as its app events drop determiner" ) } @@ -545,7 +545,7 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testCodelessIndexer() { XCTAssertTrue( - components.codelessIndexer === CodelessIndexer.self, + components.codelessIndexer === _CodelessIndexer.self, "The default components should use the CodelessIndexer type as its codeless indexer" ) } @@ -559,7 +559,7 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testFeatureExtractor() { XCTAssertTrue( - components.featureExtractor === FeatureExtractor.self, + components.featureExtractor === _FeatureExtractor.self, "The default components should use the FeatureExtractor type as its feature extractor" ) } @@ -595,7 +595,7 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testModelManager() { XCTAssertTrue( - components.modelManager === ModelManager.shared, + components.modelManager === _ModelManager.shared, "The default components should use the shared ModelManager as its model manager" ) } @@ -609,7 +609,7 @@ final class DefaultCoreKitComponentsTests: XCTestCase { func testRulesFromKeyProvider() { XCTAssertTrue( - components.rulesFromKeyProvider === ModelManager.shared, + components.rulesFromKeyProvider === _ModelManager.shared, "The default components should use the shared ModelManager as its rules from key provider" ) } diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/FBSDKCoreKitTests-Bridging-Header.h b/FBSDKCoreKit/FBSDKCoreKitTests/FBSDKCoreKitTests-Bridging-Header.h index 45cc8a227..ad8603ad6 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/FBSDKCoreKitTests-Bridging-Header.h +++ b/FBSDKCoreKit/FBSDKCoreKitTests/FBSDKCoreKitTests-Bridging-Header.h @@ -31,14 +31,10 @@ #import "FBSDKAppEventsConfiguration+Testing.h" #import "FBSDKAppEventsConfigurationManager+Testing.h" #import "FBSDKAppEventsConfigurationProtocol.h" -#import "FBSDKAppEventsDeviceInfo.h" #import "FBSDKAppEventsNumberParser.h" -#import "FBSDKAppEventsState.h" #import "FBSDKAppEventsStateFactory.h" #import "FBSDKAppEventsStateManager.h" -#import "FBSDKAppEventsUtility.h" #import "FBSDKAppEventsUtility+Testing.h" -#import "FBSDKAppEventsUtilityProtocol.h" #import "FBSDKAppLink+Internal.h" #import "FBSDKAppLinkFactory.h" #import "FBSDKAppLinkNavigation+Testing.h" @@ -69,7 +65,6 @@ #import "FBSDKCrashHandler+Testing.h" #import "FBSDKCrashObserver.h" #import "FBSDKCrashObserver+Internal.h" -#import "FBSDKCrashShield.h" #import "FBSDKCrashShield+Testing.h" #import "FBSDKDialogConfigurationMapBuilder.h" #import "FBSDKDynamicFrameworkLoader.h" @@ -131,7 +126,6 @@ #import "FBSDKSKAdNetworkReporter+Testing.h" #import "FBSDKSKAdNetworkRule.h" #import "FBSDKServerConfiguration+Internal.h" -#import "FBSDKServerConfigurationManager.h" #import "FBSDKServerConfigurationManager+Testing.h" #import "FBSDKSettings+Internal.h" #import "FBSDKSettings+Testing.h" diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/GraphRequestConnectionTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/GraphRequestConnectionTests.swift index 00b88c271..9e4fa2089 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/GraphRequestConnectionTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/GraphRequestConnectionTests.swift @@ -75,7 +75,7 @@ final class GraphRequestConnectionTests: XCTestCase, GraphRequestConnectionDeleg errorFactory = TestErrorFactory() piggybackManager = TestGraphRequestPiggybackManager() GraphRequestConnection.configure( - withURLSessionProxyFactory: sessionFactory, + urlSessionProxyFactory: sessionFactory, errorConfigurationProvider: errorConfigurationProvider, piggybackManager: piggybackManager, settings: settings, diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKAppEventsConfigurationManager+Testing.h b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKAppEventsConfigurationManager+Testing.h index 4e147e2ab..0eb6e418a 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKAppEventsConfigurationManager+Testing.h +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKAppEventsConfigurationManager+Testing.h @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKAppEventsConfigurationManager.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKAppEventsUtility+Testing.h b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKAppEventsUtility+Testing.h index 6ce5ca7cc..3036d1cf5 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKAppEventsUtility+Testing.h +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKAppEventsUtility+Testing.h @@ -6,7 +6,8 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKAppEventsUtility.h" +#import + #import "FBSDKDynamicFrameworkResolving.h" NS_ASSUME_NONNULL_BEGIN diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKCodelessIndexer+Testing.h b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKCodelessIndexer+Testing.h index 849f77175..32c7d5564 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKCodelessIndexer+Testing.h +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKCodelessIndexer+Testing.h @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKCodelessIndexer.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKCrashShield+Testing.h b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKCrashShield+Testing.h index 86c63cd1c..707502235 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKCrashShield+Testing.h +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKCrashShield+Testing.h @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKCrashShield.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKFeatureExtractor+Testing.h b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKFeatureExtractor+Testing.h index c5cb6f42e..86aa44ef3 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKFeatureExtractor+Testing.h +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKFeatureExtractor+Testing.h @@ -11,8 +11,6 @@ #import #import -#import "FBSDKFeatureExtractor.h" - NS_ASSUME_NONNULL_BEGIN @interface FBSDKFeatureExtractor (Testing) diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKIntegrityManager+Testing.h b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKIntegrityManager+Testing.h index 9b0e475c3..7c17f032a 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKIntegrityManager+Testing.h +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKIntegrityManager+Testing.h @@ -9,7 +9,6 @@ #import #import "FBSDKIntegrityManager.h" -#import "FBSDKIntegrityProcessing.h" NS_ASSUME_NONNULL_BEGIN diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKServerConfigurationManager+Testing.h b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKServerConfigurationManager+Testing.h index 4bec4fcc9..1327e560b 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKServerConfigurationManager+Testing.h +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKServerConfigurationManager+Testing.h @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKServerConfigurationManager.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKViewHierarchy+Testing.h b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKViewHierarchy+Testing.h index 18a89156f..4b71bc8a2 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKViewHierarchy+Testing.h +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Interfaces/FBSDKViewHierarchy+Testing.h @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. */ -#import "FBSDKCrashShield.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsConfigurationManagerTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsConfigurationManagerTests.swift index 09b41b330..5e0a8ba18 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsConfigurationManagerTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsConfigurationManagerTests.swift @@ -13,7 +13,7 @@ import TestTools final class AppEventsConfigurationManagerTests: XCTestCase { // swiftlint:disable implicitly_unwrapped_optional - var manager: AppEventsConfigurationManager! + var manager: _AppEventsConfigurationManager! var store: UserDefaultsSpy! var settings: TestSettings! var graphRequestFactory: TestGraphRequestFactory! @@ -32,7 +32,7 @@ final class AppEventsConfigurationManagerTests: XCTestCase { connection = TestGraphRequestConnection() graphRequestConnectionFactory = TestGraphRequestConnectionFactory.create(withStubbedConnection: connection) - manager = AppEventsConfigurationManager() + manager = _AppEventsConfigurationManager() manager.configure( store: store, settings: settings, diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsPublishATETests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsPublishATETests.swift index 07e670d75..8d7125859 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsPublishATETests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsPublishATETests.swift @@ -53,7 +53,7 @@ final class AppEventsPublishATETests: XCTestCase { settings.appID = name appEvents.configure( - withGateKeeperManager: TestGateKeeperManager.self, + gateKeeperManager: TestGateKeeperManager.self, appEventsConfigurationProvider: TestAppEventsConfigurationProvider(), serverConfigurationProvider: TestServerConfigurationProvider(), graphRequestFactory: TestGraphRequestFactory(), diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsStateManagerTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsStateManagerTests.swift index 8fd0a5612..759e6a442 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsStateManagerTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsStateManagerTests.swift @@ -14,7 +14,7 @@ final class AppEventsStateManagerTests: XCTestCase { private let token = "token" private let appID = "1234" private var manager = AppEventsStateManager() - private lazy var state = AppEventsState(token: token, appID: appID) + private lazy var state = _AppEventsState(token: token, appID: appID) override func tearDown() { super.tearDown() diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsStateTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsStateTests.swift index 68ed4cba7..f11524d35 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsStateTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsStateTests.swift @@ -15,18 +15,18 @@ final class AppEventsStateTests: XCTestCase { let appEventsStateMaxEvents = 1000 let appId = "appid" let eventsProcessor = TestAppEventsParameterProcessor() - lazy var state = AppEventsState(token: self.name, appID: appId) - lazy var partiallyFullState = AppEventsState( + lazy var state = _AppEventsState(token: self.name, appID: appId) + lazy var partiallyFullState = _AppEventsState( token: self.name, appID: appId ) - lazy var fullState = AppEventsState(token: self.name, appID: appId) + lazy var fullState = _AppEventsState(token: self.name, appID: appId) override func setUp() { super.setUp() setUpFixtures() - AppEventsState.eventProcessors = [eventsProcessor] + _AppEventsState.eventProcessors = [eventsProcessor] } func setUpFixtures( @@ -80,79 +80,79 @@ final class AppEventsStateTests: XCTestCase { func testCreatingWithNilTokenNilAppID() { XCTAssertNotNil( - AppEventsState(token: nil, appID: nil), + _AppEventsState(token: nil, appID: nil), "Should not create app events state with missing token and app id but you can" ) } func testCreatingWithNilTokenInvalidAppID() { XCTAssertNotNil( - AppEventsState(token: nil, appID: ""), + _AppEventsState(token: nil, appID: ""), "Should not create app events state with missing token and empty app id but you can" ) XCTAssertNotNil( - AppEventsState(token: nil, appID: " "), + _AppEventsState(token: nil, appID: " "), "Should not create app events state with missing token and whitespace only app id but you can" ) } func testCreatingWithNilTokenValidAppID() { XCTAssertNotNil( - AppEventsState(token: nil, appID: appId), + _AppEventsState(token: nil, appID: appId), "Should not create app events state with missing token and valid app id but you can" ) } func testCreatingWithInvalidTokenNilAppID() { XCTAssertNotNil( - AppEventsState(token: "", appID: nil), + _AppEventsState(token: "", appID: nil), "Should not create app events state with empty token and missing app id but you can" ) XCTAssertNotNil( - AppEventsState(token: " ", appID: nil), + _AppEventsState(token: " ", appID: nil), "Should not create app events state with whitespace only token and missing app id but you can" ) } func testCreatingWithInvalidTokenInvalidAppID() { XCTAssertNotNil( - AppEventsState(token: "", appID: ""), + _AppEventsState(token: "", appID: ""), "Should not create app events state with invalid token and invalid app id but you can" ) } func testCreatingWithInvalidTokenValidAppID() { XCTAssertNotNil( - AppEventsState(token: "", appID: appId), + _AppEventsState(token: "", appID: appId), "Should not create app events state with empty token and valid app id but you can" ) XCTAssertNotNil( - AppEventsState(token: " ", appID: appId), + _AppEventsState(token: " ", appID: appId), "Should not create app events state with whitespace only token and valid app id but you can" ) } func testCreatingWithValidTokenNilAppID() { XCTAssertNotNil( - AppEventsState(token: name, appID: nil), + _AppEventsState(token: name, appID: nil), "Should not create app events state with valid token and missing app id but you can" ) } func testCreatingWithValidTokenInvalidAppID() { XCTAssertNotNil( - AppEventsState(token: name, appID: ""), + _AppEventsState(token: name, appID: ""), "Should not create app events state with valid token and empty app id but you can" ) XCTAssertNotNil( - AppEventsState(token: name, appID: " "), + _AppEventsState(token: name, appID: " "), "Should not create app events state with valid token and whitespace only app id but you can" ) } func testCreatingWithValidTokenValidAppID() { XCTAssertNotNil( - AppEventsState(token: name, appID: appId), + _AppEventsState(token: name, appID: appId), "Should be able to create app events state with valid token and app id" ) } @@ -286,7 +286,7 @@ final class AppEventsStateTests: XCTestCase { } func testAddingEventsFromEmptyStateToEmptyState() { - let state2 = AppEventsState(token: name, appID: appId) + let state2 = _AppEventsState(token: name, appID: appId) state.addEvents(fromAppEventState: state2) XCTAssertEqual( 0, @@ -315,7 +315,7 @@ final class AppEventsStateTests: XCTestCase { } func testAddEventsFromEmptyStateToPartiallyFilledState() { - let emptyState = AppEventsState(token: name, appID: appId) + let emptyState = _AppEventsState(token: name, appID: appId) state.addEvent(SampleAppEvents.validEvent, isImplicit: true) state.addEvents(fromAppEventState: emptyState) @@ -374,7 +374,7 @@ final class AppEventsStateTests: XCTestCase { } func testAddEventsFromFullStateToFullState() { - let otherFullState = AppEventsState(token: name, appID: appId) + let otherFullState = _AppEventsState(token: name, appID: appId) for _ in 0 ..< (appEventsStateMaxEvents * 2) { otherFullState.addEvent(SampleAppEvents.validEvent, isImplicit: false) @@ -415,7 +415,7 @@ final class AppEventsStateTests: XCTestCase { } func testCompatibilityWithMatchingTokenMatchingAppID() { - let state2 = AppEventsState(token: name, appID: appId) + let state2 = _AppEventsState(token: name, appID: appId) XCTAssertTrue( state.is(compatibleWith: state2), "States with matching tokens and matching app ids should be compatible" @@ -423,7 +423,7 @@ final class AppEventsStateTests: XCTestCase { } func testMatchingTokenNonMatchingAppID() { - let state2 = AppEventsState(token: name, appID: name) + let state2 = _AppEventsState(token: name, appID: name) XCTAssertFalse( state.is(compatibleWith: state2), "States with matching tokens and non-matching app ids should not be compatible" @@ -431,7 +431,7 @@ final class AppEventsStateTests: XCTestCase { } func testNonMatchingTokenMatchingAppID() { - let state2 = AppEventsState(token: appId, appID: appId) + let state2 = _AppEventsState(token: appId, appID: appId) XCTAssertFalse( state.is(compatibleWith: state2), "States with matching non-matching tokens and matching app ids should not be compatible" @@ -439,7 +439,7 @@ final class AppEventsStateTests: XCTestCase { } func testNonMatchingTokenNonMatchingAppID() { - let state2 = AppEventsState(token: appId, appID: name) + let state2 = _AppEventsState(token: appId, appID: name) XCTAssertFalse( state.is(compatibleWith: state2), "States with matching non-matching tokens and non matching app ids should not be compatible" @@ -447,8 +447,8 @@ final class AppEventsStateTests: XCTestCase { } func testNilTokensMatchingAppID() { - let state1 = AppEventsState(token: nil, appID: name) - let state2 = AppEventsState(token: nil, appID: name) + let state1 = _AppEventsState(token: nil, appID: name) + let state2 = _AppEventsState(token: nil, appID: name) XCTAssertTrue( state1.is(compatibleWith: state2), "States with nil tokens and matching app ids should be compatible" @@ -456,8 +456,8 @@ final class AppEventsStateTests: XCTestCase { } func testNilTokensNonMatchingAppID() { - let state1 = AppEventsState(token: nil, appID: appId) - let state2 = AppEventsState(token: nil, appID: name) + let state1 = _AppEventsState(token: nil, appID: appId) + let state2 = _AppEventsState(token: nil, appID: name) XCTAssertFalse( state1.is(compatibleWith: state2), "States with nil tokens and matching app ids should be compatible" diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsTests.swift index c75ad4b1a..8044c34d6 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsTests.swift @@ -135,7 +135,7 @@ final class AppEventsTests: XCTestCase { func configureAppEvents() { appEvents.configure( - withGateKeeperManager: TestGateKeeperManager.self, + gateKeeperManager: TestGateKeeperManager.self, appEventsConfigurationProvider: appEventsConfigurationProvider, serverConfigurationProvider: serverConfigurationProvider, graphRequestFactory: graphRequestFactory, diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsUtilityTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsUtilityTests.swift index 5c59e1a6f..d8a70bc85 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsUtilityTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsUtilityTests.swift @@ -19,7 +19,7 @@ final class AppEventsUtilityTests: XCTestCase { var settings: TestSettings! var internalUtility: TestInternalUtility! var errorFactory: TestErrorFactory! - var appEventsUtility: AppEventsUtility! + var appEventsUtility: _AppEventsUtility! // swiftlint:enable implicitly_unwrapped_optional override func setUp() { @@ -31,7 +31,7 @@ final class AppEventsUtilityTests: XCTestCase { settings = TestSettings() internalUtility = TestInternalUtility() errorFactory = TestErrorFactory() - appEventsUtility = AppEventsUtility() + appEventsUtility = _AppEventsUtility() appEventsUtility.configure( appEventsConfigurationProvider: appEventsConfigurationProvider, deviceInformationProvider: deviceInformationProvider, diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/Codeless/CodelessIndexerTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/Codeless/CodelessIndexerTests.swift index 03f5e3610..a289d072c 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/Codeless/CodelessIndexerTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/Codeless/CodelessIndexerTests.swift @@ -44,7 +44,7 @@ final class CodelessIndexerTests: XCTestCase { settings.appID = name - CodelessIndexer.configure( + _CodelessIndexer.configure( graphRequestFactory: graphRequestFactory, serverConfigurationProvider: serverConfigurationProvider, dataStore: dataStore, @@ -62,75 +62,75 @@ final class CodelessIndexerTests: XCTestCase { } class func reset() { - CodelessIndexer.reset() + _CodelessIndexer.reset() TestSwizzler.reset() } // MARK: - Dependencies func testDefaultDependencies() { - CodelessIndexer.reset() + _CodelessIndexer.reset() XCTAssertNil( - CodelessIndexer.graphRequestFactory, + _CodelessIndexer.graphRequestFactory, "Should not have a request provider by default" ) XCTAssertNil( - CodelessIndexer.serverConfigurationProvider, + _CodelessIndexer.serverConfigurationProvider, "Should not have a server configuration provider by default" ) XCTAssertNil( - CodelessIndexer.dataStore, + _CodelessIndexer.dataStore, "Should not have a persistent data store by default" ) XCTAssertNil( - CodelessIndexer.graphRequestConnectionFactory, + _CodelessIndexer.graphRequestConnectionFactory, "Should not have a connection provider by default" ) XCTAssertNil( - CodelessIndexer.swizzler, + _CodelessIndexer.swizzler, "Should not have a swizzler by default" ) XCTAssertNil( - CodelessIndexer.settings, + _CodelessIndexer.settings, "Should not have a settings instance by default" ) XCTAssertNil( - CodelessIndexer.advertiserIDProvider, + _CodelessIndexer.advertiserIDProvider, "Should not have an advertiser ID provider by default" ) } func testConfiguringWithDependencies() { XCTAssertEqual( - CodelessIndexer.graphRequestFactory as? TestGraphRequestFactory, + _CodelessIndexer.graphRequestFactory as? TestGraphRequestFactory, graphRequestFactory, "Should be able to configure with a request provider" ) XCTAssertTrue( - CodelessIndexer.serverConfigurationProvider is TestServerConfigurationProvider, + _CodelessIndexer.serverConfigurationProvider is TestServerConfigurationProvider, "Should be able to configure with a server configuration provider" ) XCTAssertEqual( - CodelessIndexer.dataStore as? UserDefaultsSpy, + _CodelessIndexer.dataStore as? UserDefaultsSpy, dataStore, "Should be able to configure with a persistent data store" ) XCTAssertEqual( - CodelessIndexer.graphRequestConnectionFactory as? TestGraphRequestConnectionFactory, + _CodelessIndexer.graphRequestConnectionFactory as? TestGraphRequestConnectionFactory, graphRequestConnectionFactory, "Should be able to configure with a connection provider" ) XCTAssertTrue( - CodelessIndexer.swizzler is TestSwizzler.Type, + _CodelessIndexer.swizzler is TestSwizzler.Type, "Should be able to configure with a swizzler" ) XCTAssertTrue( - CodelessIndexer.settings is TestSettings, + _CodelessIndexer.settings is TestSettings, "Should be able to configure with a settings" ) XCTAssertTrue( - CodelessIndexer.advertiserIDProvider is TestAdvertiserIDProvider, + _CodelessIndexer.advertiserIDProvider is TestAdvertiserIDProvider, "Should be able to configure with an advertiser ID provider" ) } @@ -139,7 +139,7 @@ final class CodelessIndexerTests: XCTestCase { func testSetupRequestWithoutAdvertiserID() { XCTAssertNil( - CodelessIndexer.requestToLoadCodelessSetup(appID: appID), + _CodelessIndexer.requestToLoadCodelessSetup(appID: appID), "Should not create a request to load the codeless setup if there is no advertiser ID" ) } @@ -147,7 +147,7 @@ final class CodelessIndexerTests: XCTestCase { func testSetupRequestWithAdvertiserID() { advertiserIDProvider.advertiserID = name - CodelessIndexer.requestToLoadCodelessSetup(appID: appID) + _CodelessIndexer.requestToLoadCodelessSetup(appID: appID) let expectedParameters = [ Keys.fields: autoEventSetupEnabled, @@ -181,7 +181,7 @@ final class CodelessIndexerTests: XCTestCase { // MARK: - Enabling func testEnablingSetsGesture() { - CodelessIndexer.enable() + _CodelessIndexer.enable() XCTAssertTrue( TestSwizzler.evidence.contains( @@ -193,7 +193,7 @@ final class CodelessIndexerTests: XCTestCase { ) TestSwizzler.reset() - CodelessIndexer.enable() + _CodelessIndexer.enable() XCTAssertTrue( TestSwizzler.evidence.isEmpty, @@ -206,7 +206,7 @@ final class CodelessIndexerTests: XCTestCase { func testLoadingSettingWithoutAppID() { settings.appID = nil - CodelessIndexer.loadCodelessSetting { _, _ in + _CodelessIndexer.loadCodelessSetting { _, _ in XCTFail("Should not load a codeless setting without an app identifier") } XCTAssertFalse( @@ -216,7 +216,7 @@ final class CodelessIndexerTests: XCTestCase { } func testLoadingSettingWithCodelessEventsDisabledByConfiguration() { - CodelessIndexer.loadCodelessSetting { _, _ in + _CodelessIndexer.loadCodelessSetting { _, _ in XCTFail("Should not load a codeless setting when codeless events are disabled") } serverConfigurationProvider.capturedCompletionBlock?( @@ -232,7 +232,7 @@ final class CodelessIndexerTests: XCTestCase { func testLoadingValidCachedSetting() throws { dataStore.set(archivedSetting(), forKey: codelessSettingStorageKey) - CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in + _CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in self.capturedIsEnabled = isEnabled self.capturedError = potentialError } @@ -257,7 +257,7 @@ final class CodelessIndexerTests: XCTestCase { func testLoadingExpiredCachedSettingWithoutAdvertiserID() { dataStore.set(archivedSetting(date: .distantPast), forKey: codelessSettingStorageKey) - CodelessIndexer.loadCodelessSetting { _, _ in + _CodelessIndexer.loadCodelessSetting { _, _ in XCTFail("Should not invoke the completion") } @@ -273,7 +273,7 @@ final class CodelessIndexerTests: XCTestCase { advertiserIDProvider.advertiserID = name dataStore.set(archivedSetting(date: .distantPast), forKey: codelessSettingStorageKey) - CodelessIndexer.loadCodelessSetting { _, _ in + _CodelessIndexer.loadCodelessSetting { _, _ in XCTFail("Should not invoke the completion") } @@ -294,7 +294,7 @@ final class CodelessIndexerTests: XCTestCase { advertiserIDProvider.advertiserID = name dataStore.set(archivedSetting(date: .distantPast), forKey: codelessSettingStorageKey) - CodelessIndexer.loadCodelessSetting { _, _ in + _CodelessIndexer.loadCodelessSetting { _, _ in XCTFail("Should not invoke the completion if the network call completes with an error") } @@ -306,7 +306,7 @@ final class CodelessIndexerTests: XCTestCase { func testCompletingLoadingSettingWithMissingResults() { advertiserIDProvider.advertiserID = name - CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in + _CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in self.capturedIsEnabled = isEnabled self.capturedError = potentialError } @@ -328,7 +328,7 @@ final class CodelessIndexerTests: XCTestCase { func testCompletingLoadingSettingWithInvalidResults() { advertiserIDProvider.advertiserID = name - CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in + _CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in self.capturedIsEnabled = isEnabled self.capturedError = potentialError } @@ -350,7 +350,7 @@ final class CodelessIndexerTests: XCTestCase { func testCompletingLoadingSettingWithValidResults() { advertiserIDProvider.advertiserID = name - CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in + _CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in self.capturedIsEnabled = isEnabled self.capturedError = potentialError } @@ -375,7 +375,7 @@ final class CodelessIndexerTests: XCTestCase { advertiserIDProvider.advertiserID = name dataStore.set(archivedSetting(date: .distantPast), forKey: codelessSettingStorageKey) - CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in + _CodelessIndexer.loadCodelessSetting { isEnabled, potentialError in self.capturedIsEnabled = isEnabled self.capturedError = potentialError } @@ -405,7 +405,7 @@ final class CodelessIndexerTests: XCTestCase { func testUploadingWithoutAppID() { settings.appID = nil - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.empty) + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.empty) XCTAssertNotNil( graphRequestFactory.capturedGraphPath, @@ -414,7 +414,7 @@ final class CodelessIndexerTests: XCTestCase { } func testUploadingWithoutViewHierarchy() { - CodelessIndexer.uploadIndexing(nil) + _CodelessIndexer.uploadIndexing(nil) XCTAssertNil( graphRequestFactory.capturedGraphPath, @@ -423,7 +423,7 @@ final class CodelessIndexerTests: XCTestCase { } func testUploadingWithEmptyViewHierarchy() { - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.empty) + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.empty) XCTAssertNotNil( graphRequestFactory.capturedGraphPath, @@ -432,11 +432,11 @@ final class CodelessIndexerTests: XCTestCase { } func testUploadingWhileUploadInProgress() { - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) // Reset the test evidence to be able to check that the second call // does not create a graph request graphRequestFactory.capturedGraphPath = nil - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) XCTAssertNil( graphRequestFactory.capturedGraphPath, @@ -445,13 +445,13 @@ final class CodelessIndexerTests: XCTestCase { } func testUploadingIdenticalViewHierarchy() { - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) // Reset the flag so that it treats the first call as completed - CodelessIndexer.resetIsCodelessIndexing() + _CodelessIndexer.resetIsCodelessIndexing() // Reset the test evidence to be able to check that the second call // does not create a graph request graphRequestFactory.capturedGraphPath = nil - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) XCTAssertNil( graphRequestFactory.capturedGraphPath, @@ -460,7 +460,7 @@ final class CodelessIndexerTests: XCTestCase { } func testUploadRequest() { - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) XCTAssertEqual( graphRequestFactory.capturedGraphPath, @@ -479,7 +479,7 @@ final class CodelessIndexerTests: XCTestCase { graphRequestFactory.capturedParameters as? [String: String], [ "app_version": appVersion, - Keys.deviceSessionID: CodelessIndexer.currentSessionDeviceID!, // swiftlint:disable:this force_unwrapping + Keys.deviceSessionID: _CodelessIndexer.currentSessionDeviceID!, // swiftlint:disable:this force_unwrapping "platform": "iOS", "tree": "UIButton", ], @@ -493,8 +493,8 @@ final class CodelessIndexerTests: XCTestCase { } func testCompletingUploadWithoutInformation() { - let sessionID = CodelessIndexer.currentSessionDeviceID - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) + let sessionID = _CodelessIndexer.currentSessionDeviceID + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) guard let completion = graphRequestFactory.capturedRequests.first?.capturedCompletionHandler else { return XCTFail("Should start a request with a completion handler") @@ -503,14 +503,14 @@ final class CodelessIndexerTests: XCTestCase { XCTAssertEqual( sessionID, - CodelessIndexer.currentSessionDeviceID, + _CodelessIndexer.currentSessionDeviceID, "Completing with no results or error should be treated as a noop" ) } func testCompletingUploadWithErrorOnly() { - let sessionID = CodelessIndexer.currentSessionDeviceID - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) + let sessionID = _CodelessIndexer.currentSessionDeviceID + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) guard let completion = graphRequestFactory.capturedRequests.first?.capturedCompletionHandler else { return XCTFail("Should start a request with a completion handler") @@ -519,14 +519,14 @@ final class CodelessIndexerTests: XCTestCase { XCTAssertEqual( sessionID, - CodelessIndexer.currentSessionDeviceID, + _CodelessIndexer.currentSessionDeviceID, "Completing with only an error should be treated as a noop" ) } func testCompletingUploadWithResultsIndicatingThatCodelessIsEnabled() { - let sessionID = CodelessIndexer.currentSessionDeviceID - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) + let sessionID = _CodelessIndexer.currentSessionDeviceID + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) guard let completion = graphRequestFactory.capturedRequests.first?.capturedCompletionHandler else { return XCTFail("Should start a request with a completion handler") @@ -535,14 +535,14 @@ final class CodelessIndexerTests: XCTestCase { XCTAssertEqual( sessionID, - CodelessIndexer.currentSessionDeviceID, + _CodelessIndexer.currentSessionDeviceID, "Completing with results indicating that codeless is enabled should be treated as a noop" ) } func testCompletingUploadWithResultsIndicatingThatCodelessIsDisabled() { - let sessionID = CodelessIndexer.currentSessionDeviceID - CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) + let sessionID = _CodelessIndexer.currentSessionDeviceID + _CodelessIndexer.uploadIndexing(SampleViewHierarchyTrees.valid) guard let completion = graphRequestFactory.capturedRequests.first?.capturedCompletionHandler else { return XCTFail("Should start a request with a completion handler") @@ -551,7 +551,7 @@ final class CodelessIndexerTests: XCTestCase { XCTAssertNotEqual( sessionID, - CodelessIndexer.currentSessionDeviceID, + _CodelessIndexer.currentSessionDeviceID, """ Completing with results indicating that codeless is disabled should reset the session identifier @@ -562,9 +562,9 @@ final class CodelessIndexerTests: XCTestCase { // MARK: - Checking Indexing Session func testCheckingIndexingSessionWhileIndexing() { - CodelessIndexer.checkCodelessIndexingSession() + _CodelessIndexer.checkCodelessIndexingSession() graphRequestFactory.capturedRequests.first?.capturedCompletionHandler = nil - CodelessIndexer.checkCodelessIndexingSession() + _CodelessIndexer.checkCodelessIndexingSession() XCTAssertNil( graphRequestFactory.capturedRequests.first?.capturedCompletionHandler, @@ -573,15 +573,15 @@ final class CodelessIndexerTests: XCTestCase { } func testCheckingIndexingSessionRequest() { - CodelessIndexer.checkCodelessIndexingSession() + _CodelessIndexer.checkCodelessIndexingSession() - guard let sessionID = CodelessIndexer.currentSessionDeviceID else { + guard let sessionID = _CodelessIndexer.currentSessionDeviceID else { return XCTFail("Should provide a session device identifier") } let expectedParameters = [ Keys.deviceSessionID: sessionID, - Keys.extInfo: CodelessIndexer.extInfo, + Keys.extInfo: _CodelessIndexer.extInfo, ] XCTAssertEqual( @@ -602,73 +602,73 @@ final class CodelessIndexerTests: XCTestCase { } func testCompleteCheckingIndexingSessionWithNoInput() { - CodelessIndexer.checkCodelessIndexingSession() + _CodelessIndexer.checkCodelessIndexingSession() graphRequestFactory.capturedRequests.first?.capturedCompletionHandler?(nil, nil, nil) XCTAssertFalse( - CodelessIndexer.isCheckingSession, + _CodelessIndexer.isCheckingSession, "Should reset the ability to check a session after the request completes" ) XCTAssertNil( - CodelessIndexer.appIndexingTimer, + _CodelessIndexer.appIndexingTimer, "Should not create an indexing timer without a result" ) } func testCompleteCheckingIndexingSessionWithErrorOnly() { - CodelessIndexer.checkCodelessIndexingSession() + _CodelessIndexer.checkCodelessIndexingSession() graphRequestFactory.capturedRequests.first?.capturedCompletionHandler?(nil, nil, SampleError()) - XCTAssertFalse(CodelessIndexer.isCheckingSession) + XCTAssertFalse(_CodelessIndexer.isCheckingSession) XCTAssertNil( - CodelessIndexer.appIndexingTimer, + _CodelessIndexer.appIndexingTimer, "Should not create an indexing timer if there is an error" ) } func testCompleteCheckingIndexingSessionWithInvalidResults() { - CodelessIndexer.checkCodelessIndexingSession() + _CodelessIndexer.checkCodelessIndexingSession() (1 ... 20).forEach { _ in graphRequestFactory.capturedRequests.first?.capturedCompletionHandler?(nil, Fuzzer.random, nil) XCTAssertNil( - CodelessIndexer.appIndexingTimer, + _CodelessIndexer.appIndexingTimer, "Should not create an indexing timer if the result is invalid" ) } } func testCompletingCheckingIndexingWithCodelessEnabledResult() { - CodelessIndexer.checkCodelessIndexingSession() + _CodelessIndexer.checkCodelessIndexingSession() graphRequestFactory.capturedRequests.first?.capturedCompletionHandler?(nil, [Keys.codelessEnabled: true], nil) - XCTAssertFalse(CodelessIndexer.isCheckingSession) + XCTAssertFalse(_CodelessIndexer.isCheckingSession) XCTAssertNotNil( - CodelessIndexer.appIndexingTimer, + _CodelessIndexer.appIndexingTimer, "Should create an indexing timer if the result indicates that codeless is enabled" ) // Invalidate for cleanup - CodelessIndexer.appIndexingTimer?.invalidate() + _CodelessIndexer.appIndexingTimer?.invalidate() } func testCompletingCheckingIndexingWithCodelessDisabledResult() { - let sessionIdentifier = CodelessIndexer.currentSessionDeviceID - CodelessIndexer.checkCodelessIndexingSession() + let sessionIdentifier = _CodelessIndexer.currentSessionDeviceID + _CodelessIndexer.checkCodelessIndexingSession() graphRequestFactory.capturedRequests.first?.capturedCompletionHandler?(nil, [Keys.codelessEnabled: false], nil) - XCTAssertFalse(CodelessIndexer.isCheckingSession) + XCTAssertFalse(_CodelessIndexer.isCheckingSession) XCTAssertNil( - CodelessIndexer.appIndexingTimer, + _CodelessIndexer.appIndexingTimer, "Should not create an indexing timer if the result indicates that codeless is disabled" ) XCTAssertNotEqual( sessionIdentifier, - CodelessIndexer.currentSessionDeviceID, + _CodelessIndexer.currentSessionDeviceID, "Should reset the current session device identifier if the result indicates that codeless is disabled" ) } @@ -685,7 +685,7 @@ final class CodelessIndexerTests: XCTestCase { ) XCTAssertEqual( - CodelessIndexer.extInfo, + _CodelessIndexer.extInfo, """ ["\(machine)","","1","1","en_US"] """, @@ -694,25 +694,25 @@ final class CodelessIndexerTests: XCTestCase { } func testCurrentSessionDeviceID() { - let identifier = CodelessIndexer.currentSessionDeviceID + let identifier = _CodelessIndexer.currentSessionDeviceID XCTAssertEqual( - CodelessIndexer.currentSessionDeviceID, + _CodelessIndexer.currentSessionDeviceID, identifier, "Should only create a single session device ID" ) - CodelessIndexer.reset() + _CodelessIndexer.reset() XCTAssertNotEqual( - CodelessIndexer.currentSessionDeviceID, + _CodelessIndexer.currentSessionDeviceID, identifier, "Should create unique session device IDs per sdk launch" ) } func testDimensionOfNonView() { - let dimensions = CodelessIndexer.dimension(of: "" as NSString) + let dimensions = _CodelessIndexer.dimension(of: "" as NSString) XCTAssertEqual( dimensions, @@ -730,7 +730,7 @@ final class CodelessIndexerTests: XCTestCase { } func testDimensionOfView() { - let dimensions = CodelessIndexer.dimension(of: view) + let dimensions = _CodelessIndexer.dimension(of: view) XCTAssertEqual( dimensions, @@ -750,7 +750,7 @@ final class CodelessIndexerTests: XCTestCase { func testDimensionOfViewController() { let controller = UIViewController() controller.view = view - let dimensions = CodelessIndexer.dimension(of: controller) + let dimensions = _CodelessIndexer.dimension(of: controller) XCTAssertEqual( dimensions, @@ -770,7 +770,7 @@ final class CodelessIndexerTests: XCTestCase { func testDimensionOfScrollView() { let view = UIScrollView(frame: frame) view.setContentOffset(CGPoint(x: 100, y: 100), animated: false) - let dimensions = CodelessIndexer.dimension(of: view) + let dimensions = _CodelessIndexer.dimension(of: view) XCTAssertEqual( dimensions, @@ -789,7 +789,7 @@ final class CodelessIndexerTests: XCTestCase { func testDimensionOfHiddenView() { view.isHidden = true - let dimensions = CodelessIndexer.dimension(of: view) + let dimensions = _CodelessIndexer.dimension(of: view) XCTAssertEqual( dimensions, diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/ML/ModelManagerTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/ML/ModelManagerTests.swift index 7f7407465..e5fd436c9 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/ML/ModelManagerTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/ML/ModelManagerTests.swift @@ -13,7 +13,7 @@ import XCTest final class ModelManagerTests: XCTestCase { - let manager = ModelManager.shared + let manager = _ModelManager.shared let featureChecker = TestFeatureManager() let factory = TestGraphRequestFactory() let modelDirectoryPath = "\(NSTemporaryDirectory())models" @@ -30,7 +30,7 @@ final class ModelManagerTests: XCTestCase { override class func setUp() { super.setUp() - ModelManager.reset() + _ModelManager.reset() TestGateKeeperManager.reset() } @@ -52,7 +52,7 @@ final class ModelManagerTests: XCTestCase { } override func tearDown() { - ModelManager.reset() + _ModelManager.reset() TestFileDataExtractor.reset() TestGateKeeperManager.reset() TestFeatureExtractor.reset() @@ -195,7 +195,7 @@ final class ModelManagerTests: XCTestCase { // MARK: - Getting Rules func testGettingRulesForKeyWithMissingModelInfo() { - ModelManager.directoryPath = "foo" + _ModelManager.directoryPath = "foo" XCTAssertNil( manager.getRulesForKey(RawRemoteModelResponse.UseCase.detection), @@ -204,8 +204,8 @@ final class ModelManagerTests: XCTestCase { } func testGettingRulesForKeyWithMismatchedKey() { - ModelManager.directoryPath = "foo" - ModelManager.setModelInfo(RemoteModelResponse.valid) + _ModelManager.directoryPath = "foo" + _ModelManager.setModelInfo(RemoteModelResponse.valid) XCTAssertNil( manager.getRulesForKey(RawRemoteModelResponse.UseCase.missing), @@ -214,8 +214,8 @@ final class ModelManagerTests: XCTestCase { } func testGettingRulesForKeyWithMatchingKeyWithMissingData() throws { - ModelManager.directoryPath = "foo" - ModelManager.setModelInfo(RemoteModelResponse.valid) + _ModelManager.directoryPath = "foo" + _ModelManager.setModelInfo(RemoteModelResponse.valid) XCTAssertNil( manager.getRulesForKey(RawRemoteModelResponse.UseCase.detection), @@ -224,8 +224,8 @@ final class ModelManagerTests: XCTestCase { } func testGettingRulesForKeyWithMatchingKeyWithInvalidData() throws { - ModelManager.directoryPath = "foo" - ModelManager.setModelInfo(RemoteModelResponse.valid) + _ModelManager.directoryPath = "foo" + _ModelManager.setModelInfo(RemoteModelResponse.valid) TestFileDataExtractor.stubbedData = name.data(using: .utf8) @@ -242,8 +242,8 @@ final class ModelManagerTests: XCTestCase { } func testGettingRulesForKeyWithMatchingKeyWithValidData() throws { - ModelManager.directoryPath = "foo" - ModelManager.setModelInfo(RemoteModelResponse.valid) + _ModelManager.directoryPath = "foo" + _ModelManager.setModelInfo(RemoteModelResponse.valid) TestFileDataExtractor.stubbedData = try JSONSerialization.data( withJSONObject: RawRemoteModelResponse.detectionAsset, @@ -266,14 +266,14 @@ final class ModelManagerTests: XCTestCase { func testIntegrityMapping() { XCTAssertEqual( - ModelManager.getIntegrityMapping(), + _ModelManager.getIntegrityMapping(), ["none", "address", "health"] ) } func testSuggestedEventsMapping() { XCTAssertEqual( - ModelManager.getSuggestedEventsMapping(), + _ModelManager.getSuggestedEventsMapping(), [ "other", "fb_mobile_complete_registration", diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/SuggestedEvent/FeatureExtractorTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/SuggestedEvent/FeatureExtractorTests.swift index f3a0a4b71..b0f8d8fb3 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/SuggestedEvent/FeatureExtractorTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/SuggestedEvent/FeatureExtractorTests.swift @@ -197,20 +197,20 @@ final class FeatureExtractorTests: XCTestCase { with: data as Data ) as! [String: Any] // swiftlint:disable:this force_cast } - FeatureExtractor.configureWithRules(modelManager) + _FeatureExtractor.configure(rulesFromKeyProvider: modelManager) modelManager.rulesForKey = rules - FeatureExtractor.loadRules(forKey: "MTML") + _FeatureExtractor.loadRules(forKey: "MTML") } override func tearDown() { super.tearDown() - FeatureExtractor.reset() + _FeatureExtractor.reset() } func testGetDenseFeature() { - let denseFeature = FeatureExtractor.getDenseFeatures( + let denseFeature = _FeatureExtractor.getDenseFeatures( viewHierarchy )! // swiftlint:disable:this force_unwrapping @@ -226,7 +226,7 @@ final class FeatureExtractorTests: XCTestCase { func testGetDenseFeatureParsing() { for _ in 0 ..< 100 { - FeatureExtractor.getDenseFeatures( + _FeatureExtractor.getDenseFeatures( Fuzzer.randomize(json: viewHierarchy) as! [String: Any] // swiftlint:disable:this force_cast ) } @@ -234,7 +234,7 @@ final class FeatureExtractorTests: XCTestCase { func testGetTextFeature() { XCTAssertEqual( - FeatureExtractor.getTextFeature( + _FeatureExtractor.getTextFeature( "Buy Buy Buy", withScreenName: "BuyPage" ), @@ -247,7 +247,7 @@ final class FeatureExtractorTests: XCTestCase { let viewTree = viewHierarchy["view"] as! [[String: Any]] // swiftlint:disable:this force_cast let siblings: NSMutableArray = [] let node = (viewTree[0] as NSDictionary).mutableCopy() as! NSMutableDictionary // swiftlint:disable:this force_cast - FeatureExtractor.pruneTree(node, siblings: siblings) + _FeatureExtractor.pruneTree(node, siblings: siblings) XCTAssertEqual(self.siblings as NSArray, siblings as NSArray) } @@ -265,7 +265,7 @@ final class FeatureExtractorTests: XCTestCase { let interactedNode = (self.interactedNode as NSDictionary).mutableCopy() as! NSMutableDictionary let siblings = (self.siblings as NSArray).mutableCopy() as! NSMutableArray // swiftlint:disable:this force_cast - let nonParseFeature = FeatureExtractor.nonparseFeatures( + let nonParseFeature = _FeatureExtractor.nonparseFeatures( interactedNode, siblings: siblings, screenname: viewHierarchy["screenname"] as! String, // swiftlint:disable:this force_cast @@ -285,7 +285,7 @@ final class FeatureExtractorTests: XCTestCase { func testParseFeature() { let viewTree = viewHierarchy["view"] as! [[String: Any]] // swiftlint:disable:this force_cast let node = (viewTree[0] as NSDictionary).mutableCopy() as! NSMutableDictionary // swiftlint:disable:this force_cast - let parseFeature = FeatureExtractor.parseFeatures(node) + let parseFeature = _FeatureExtractor.parseFeatures(node) var parseFeatureArray: [Int] = [] for idx in 0 ..< 30 { @@ -305,25 +305,25 @@ final class FeatureExtractorTests: XCTestCase { "text": "Coffee 5", ] - XCTAssertTrue(FeatureExtractor.isButton(interactedNode)) - XCTAssertFalse(FeatureExtractor.isButton(labelNode)) + XCTAssertTrue(_FeatureExtractor.isButton(interactedNode)) + XCTAssertFalse(_FeatureExtractor.isButton(labelNode)) } func testUpdateTextAndHint() { let buttonTextString = NSMutableString() let buttonHintString = NSMutableString() - FeatureExtractor.update(interactedNode, text: buttonTextString, hint: buttonHintString) + _FeatureExtractor.update(interactedNode, text: buttonTextString, hint: buttonHintString) XCTAssertEqual(buttonTextString, "") XCTAssertEqual(buttonHintString, "confirm order ") } func testFoundIndicators() { - let test1 = FeatureExtractor.foundIndicators( + let test1 = _FeatureExtractor.foundIndicators( ["phone", "tel"], inValues: ["your phone number", "111-111-1111"] ) - let test2 = FeatureExtractor.foundIndicators( + let test2 = _FeatureExtractor.foundIndicators( ["phone", "tel"], inValues: ["your email", "test@fb.com"] ) @@ -333,8 +333,8 @@ final class FeatureExtractorTests: XCTestCase { } func testRegextMatch() { - XCTAssertEqual(FeatureExtractor.regextMatch("(?i)(sign in)|login|signIn", text: "click to sign in"), 1.0) + XCTAssertEqual(_FeatureExtractor.regextMatch("(?i)(sign in)|login|signIn", text: "click to sign in"), 1.0) - XCTAssertEqual(FeatureExtractor.regextMatch("(?i)(sign in)|login|signIn", text: "click to sign up"), 0.0) + XCTAssertEqual(_FeatureExtractor.regextMatch("(?i)(sign in)|login|signIn", text: "click to sign up"), 0.0) } } diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEventsDeviceInfoTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEventsDeviceInfoTests.swift index 086b5137a..224d21817 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEventsDeviceInfoTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEventsDeviceInfoTests.swift @@ -13,7 +13,7 @@ import XCTest final class AppEventsDeviceInfoTests: XCTestCase { // swiftlint:disable implicitly_unwrapped_optional - var deviceInfo: AppEventsDeviceInfo! + var deviceInfo: _AppEventsDeviceInfo! var settings: TestSettings! // swiftlint:enable implicitly_unwrapped_optional @@ -21,8 +21,8 @@ final class AppEventsDeviceInfoTests: XCTestCase { super.setUp() settings = TestSettings() - deviceInfo = AppEventsDeviceInfo() - deviceInfo.configure(with: settings) + deviceInfo = _AppEventsDeviceInfo() + deviceInfo.configure(settings: settings) } override func tearDown() { @@ -33,7 +33,7 @@ final class AppEventsDeviceInfoTests: XCTestCase { } func testDefaultDependencies() { - deviceInfo = AppEventsDeviceInfo() + deviceInfo = _AppEventsDeviceInfo() XCTAssertNil( deviceInfo.settings, "Should not have settings by default" diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AuthenticationStatusUtilityTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AuthenticationStatusUtilityTests.swift index 07b6df886..4523f8b7e 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AuthenticationStatusUtilityTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AuthenticationStatusUtilityTests.swift @@ -33,7 +33,7 @@ final class AuthenticationStatusUtilityTests: XCTestCase { sessionDataTaskProvider.stubbedDataTask = sessionDataTask _AuthenticationStatusUtility.configure( - withProfileSetter: TestProfileProvider.self, + profileSetter: TestProfileProvider.self, sessionDataTaskProvider: sessionDataTaskProvider, accessTokenWallet: TestAccessTokenWallet.self, authenticationTokenWallet: TestAuthenticationTokenWallet.self diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/BridgeAPI+ApplicationOpenUrlTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/BridgeAPI+ApplicationOpenUrlTests.swift index b2a0bc3cb..8578699ef 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/BridgeAPI+ApplicationOpenUrlTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/BridgeAPI+ApplicationOpenUrlTests.swift @@ -704,8 +704,8 @@ extension BridgeAPITests { canHandleBridgeApiResponse ? validBridgeResponseURL : sampleURL } - func makeSampleBridgeAPIRequest() -> BridgeAPIRequest { - BridgeAPIRequest( + func makeSampleBridgeAPIRequest() -> _BridgeAPIRequest { + _BridgeAPIRequest( protocolType: .web, scheme: .https, methodName: nil, diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/BridgeAPIRequestTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/BridgeAPIRequestTests.swift index 1bf128d11..512560744 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/BridgeAPIRequestTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/BridgeAPIRequestTests.swift @@ -27,7 +27,7 @@ final class BridgeAPIRequestTests: XCTestCase { internalUtility = TestInternalUtility() settings = TestSettings() - BridgeAPIRequest.configure( + _BridgeAPIRequest.configure( internalURLOpener: internalURLOpener, internalUtility: internalUtility, settings: settings @@ -35,7 +35,7 @@ final class BridgeAPIRequestTests: XCTestCase { } override func tearDown() { - BridgeAPIRequest.resetClassDependencies() + _BridgeAPIRequest.resetClassDependencies() internalURLOpener = nil internalUtility = nil @@ -47,8 +47,8 @@ final class BridgeAPIRequestTests: XCTestCase { private func makeRequest( protocolType: FBSDKBridgeAPIProtocolType = .web, scheme: URLScheme = .https - ) -> BridgeAPIRequest? { - BridgeAPIRequest( + ) -> _BridgeAPIRequest? { + _BridgeAPIRequest( protocolType: protocolType, scheme: scheme, methodName: "methodName", @@ -58,18 +58,18 @@ final class BridgeAPIRequestTests: XCTestCase { } func testDefaultClassDependencies() throws { - BridgeAPIRequest.resetClassDependencies() + _BridgeAPIRequest.resetClassDependencies() _ = makeRequest() - XCTAssertNil(BridgeAPIRequest.settings, "Should not have a default settings") - XCTAssertNil(BridgeAPIRequest.internalUtility, "Should not have a default internal utility") - XCTAssertNil(BridgeAPIRequest.internalURLOpener, "Should not have a default internal url opener") + XCTAssertNil(_BridgeAPIRequest.settings, "Should not have a default settings") + XCTAssertNil(_BridgeAPIRequest.internalUtility, "Should not have a default internal utility") + XCTAssertNil(_BridgeAPIRequest.internalURLOpener, "Should not have a default internal url opener") } func testRequestProtocolConformance() { XCTAssertTrue( - (BridgeAPIRequest.self as Any) is BridgeAPIRequestProtocol.Type, - "BridgeAPIRequest should conform to the expected protocol" + (_BridgeAPIRequest.self as Any) is BridgeAPIRequestProtocol.Type, + "_BridgeAPIRequest should conform to the expected protocol" ) } diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/ProtocolVersions/BridgeAPIProtocolWebV2Tests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/ProtocolVersions/BridgeAPIProtocolWebV2Tests.swift index 9d0c75318..9c405589e 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/ProtocolVersions/BridgeAPIProtocolWebV2Tests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI/ProtocolVersions/BridgeAPIProtocolWebV2Tests.swift @@ -94,7 +94,7 @@ final class BridgeAPIProtocolWebV2Tests: XCTestCase { bridge = BridgeAPIProtocolWebV2() XCTAssertTrue( - bridge.serverConfigurationProvider is ServerConfigurationManager, + bridge.serverConfigurationProvider is _ServerConfigurationManager, "Should use the expected default server configuration provider" ) XCTAssertTrue( diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Configuration/CoreKitConfiguratorTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Configuration/CoreKitConfiguratorTests.swift index 974b5c622..56999ef62 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Configuration/CoreKitConfiguratorTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Configuration/CoreKitConfiguratorTests.swift @@ -40,10 +40,10 @@ final class CoreKitConfiguratorTests: XCTestCase { private class func resetTargets() { AccessToken.resetClassDependencies() AppEvents.shared.reset() - AppEventsConfigurationManager.shared.resetDependencies() - AppEventsDeviceInfo.shared.resetDependencies() - AppEventsState.eventProcessors = nil - AppEventsUtility.shared.reset() + _AppEventsConfigurationManager.shared.resetDependencies() + _AppEventsDeviceInfo.shared.resetDependencies() + _AppEventsState.eventProcessors = nil + _AppEventsUtility.shared.reset() AuthenticationToken.resetTokenCache() FBButton.resetClassDependencies() ErrorFactory.resetClassDependencies() @@ -54,7 +54,7 @@ final class CoreKitConfiguratorTests: XCTestCase { ImpressionLoggingButton.resetClassDependencies() _InstrumentManager.reset() InternalUtility.reset() - ServerConfigurationManager.shared.reset() + _ServerConfigurationManager.shared.reset() Settings.shared.reset() // Non-tvOS @@ -63,12 +63,12 @@ final class CoreKitConfiguratorTests: XCTestCase { AppLinkURL.reset() AppLinkUtility.reset() _AuthenticationStatusUtility.resetClassDependencies() - BridgeAPIRequest.resetClassDependencies() - CodelessIndexer.reset() - CrashShield.reset() + _BridgeAPIRequest.resetClassDependencies() + _CodelessIndexer.reset() + _CrashShield.reset() FBWebDialogView.resetClassDependencies() - FeatureExtractor.reset() - ModelManager.reset() + _FeatureExtractor.reset() + _ModelManager.reset() Profile.reset() } @@ -327,123 +327,123 @@ final class CoreKitConfiguratorTests: XCTestCase { func testConfiguringAppEventsConfigurationManager() { XCTAssertNil( - AppEventsConfigurationManager.shared.store, - "AppEventsConfigurationManager should not have a default data store by default" + _AppEventsConfigurationManager.shared.store, + "_AppEventsConfigurationManager should not have a default data store by default" ) XCTAssertNil( - AppEventsConfigurationManager.shared.settings, - "AppEventsConfigurationManager should not have settings by default" + _AppEventsConfigurationManager.shared.settings, + "_AppEventsConfigurationManager should not have settings by default" ) XCTAssertNil( - AppEventsConfigurationManager.shared.graphRequestFactory, - "AppEventsConfigurationManager should not have a graph request factory by default" + _AppEventsConfigurationManager.shared.graphRequestFactory, + "_AppEventsConfigurationManager should not have a graph request factory by default" ) XCTAssertNil( - AppEventsConfigurationManager.shared.graphRequestConnectionFactory, - "AppEventsConfigurationManager should not have a graph request connection factory by default" + _AppEventsConfigurationManager.shared.graphRequestConnectionFactory, + "_AppEventsConfigurationManager should not have a graph request connection factory by default" ) configurator.performConfiguration() XCTAssertTrue( - AppEventsConfigurationManager.shared.store === components.defaultDataStore, - "AppEventsConfigurationManager should be configured with the default data store" + _AppEventsConfigurationManager.shared.store === components.defaultDataStore, + "_AppEventsConfigurationManager should be configured with the default data store" ) XCTAssertTrue( - AppEventsConfigurationManager.shared.settings === components.settings, - "AppEventsConfigurationManager should be configured with the settings" + _AppEventsConfigurationManager.shared.settings === components.settings, + "_AppEventsConfigurationManager should be configured with the settings" ) XCTAssertTrue( - AppEventsConfigurationManager.shared.graphRequestFactory === components.graphRequestFactory, - "AppEventsConfigurationManager should be configured with the graph request factory" + _AppEventsConfigurationManager.shared.graphRequestFactory === components.graphRequestFactory, + "_AppEventsConfigurationManager should be configured with the graph request factory" ) XCTAssertTrue( - AppEventsConfigurationManager.shared.graphRequestConnectionFactory === components.graphRequestConnectionFactory, - "AppEventsConfigurationManager should be configured with the graph request connection factory" + _AppEventsConfigurationManager.shared.graphRequestConnectionFactory === components.graphRequestConnectionFactory, + "_AppEventsConfigurationManager should be configured with the graph request connection factory" ) } func testConfiguringAppEventsDeviceInfo() throws { XCTAssertNil( - AppEventsDeviceInfo.shared.settings, - "AppEventsDeviceInfo should not have settings by default" + _AppEventsDeviceInfo.shared.settings, + "_AppEventsDeviceInfo should not have settings by default" ) configurator.performConfiguration() XCTAssertTrue( - AppEventsDeviceInfo.shared.settings === components.settings, - "AppEventsDeviceInfo should be configured with the settings" + _AppEventsDeviceInfo.shared.settings === components.settings, + "_AppEventsDeviceInfo should be configured with the settings" ) } func testConfiguringAppEventsState() throws { XCTAssertNil( - AppEventsState.eventProcessors, - "AppEventsState should not have event processors by default" + _AppEventsState.eventProcessors, + "_AppEventsState should not have event processors by default" ) configurator.performConfiguration() let processors = try XCTUnwrap( - AppEventsState.eventProcessors, - "AppEventsState's event processors should be configured" + _AppEventsState.eventProcessors, + "_AppEventsState's event processors should be configured" ) - XCTAssertEqual(processors.count, 2, "AppEventsState should have two event processors") + XCTAssertEqual(processors.count, 2, "_AppEventsState should have two event processors") XCTAssertTrue( processors.first === components.eventDeactivationManager, - "AppEventsState's event processors should be configured with the event deactivation manager" + "_AppEventsState's event processors should be configured with the event deactivation manager" ) XCTAssertTrue( processors.last === components.restrictiveDataFilterManager, - "AppEventsState's event processors should be configured with the restrictive data filter manager" + "_AppEventsState's event processors should be configured with the restrictive data filter manager" ) } func testConfiguringAppEventsUtility() { XCTAssertNil( - AppEventsUtility.shared.appEventsConfigurationProvider, - "AppEventsUtility should not have an app events configuration provider by default" + _AppEventsUtility.shared.appEventsConfigurationProvider, + "_AppEventsUtility should not have an app events configuration provider by default" ) XCTAssertNil( - AppEventsUtility.shared.deviceInformationProvider, - "AppEventsUtility should not have a device information provider by default" + _AppEventsUtility.shared.deviceInformationProvider, + "_AppEventsUtility should not have a device information provider by default" ) XCTAssertNil( - AppEventsUtility.shared.settings, - "AppEventsUtility should not have settings by default" + _AppEventsUtility.shared.settings, + "_AppEventsUtility should not have settings by default" ) XCTAssertNil( - AppEventsUtility.shared.internalUtility, - "AppEventsUtility should not have an internal utility by default" + _AppEventsUtility.shared.internalUtility, + "_AppEventsUtility should not have an internal utility by default" ) XCTAssertNil( - AppEventsUtility.shared.errorFactory, - "AppEventsUtility should not have an error factory by default" + _AppEventsUtility.shared.errorFactory, + "_AppEventsUtility should not have an error factory by default" ) configurator.performConfiguration() XCTAssertTrue( - AppEventsUtility.shared.appEventsConfigurationProvider === components.appEventsConfigurationProvider, - "AppEventsUtility should be configured with the app events configuration provider" + _AppEventsUtility.shared.appEventsConfigurationProvider === components.appEventsConfigurationProvider, + "_AppEventsUtility should be configured with the app events configuration provider" ) XCTAssertTrue( - AppEventsUtility.shared.deviceInformationProvider === components.deviceInformationProvider, - "AppEventsUtility should be configured with the device information provider" + _AppEventsUtility.shared.deviceInformationProvider === components.deviceInformationProvider, + "_AppEventsUtility should be configured with the device information provider" ) XCTAssertTrue( - AppEventsUtility.shared.settings === components.settings, - "AppEventsUtility should be configured with the settings" + _AppEventsUtility.shared.settings === components.settings, + "_AppEventsUtility should be configured with the settings" ) XCTAssertTrue( - AppEventsUtility.shared.internalUtility === components.internalUtility, - "AppEventsUtility should be configured with the internal utility" + _AppEventsUtility.shared.internalUtility === components.internalUtility, + "_AppEventsUtility should be configured with the internal utility" ) XCTAssertIdentical( - AppEventsUtility.shared.errorFactory, + _AppEventsUtility.shared.errorFactory, components.errorFactory, - "AppEventsUtility should be configured with the error factory" + "_AppEventsUtility should be configured with the error factory" ) } @@ -780,31 +780,31 @@ final class CoreKitConfiguratorTests: XCTestCase { func testConfiguringServerConfigurationManager() { XCTAssertNil( - ServerConfigurationManager.shared.graphRequestFactory, - "ServerConfigurationManager should not have a graph request factory by default" + _ServerConfigurationManager.shared.graphRequestFactory, + "_ServerConfigurationManager should not have a graph request factory by default" ) XCTAssertNil( - ServerConfigurationManager.shared.graphRequestConnectionFactory, - "ServerConfigurationManager should not have a graph request connection factory by default" + _ServerConfigurationManager.shared.graphRequestConnectionFactory, + "_ServerConfigurationManager should not have a graph request connection factory by default" ) XCTAssertNil( - ServerConfigurationManager.shared.dialogConfigurationMapBuilder, - "ServerConfigurationManager should not have a dialog configuration map builder by default" + _ServerConfigurationManager.shared.dialogConfigurationMapBuilder, + "_ServerConfigurationManager should not have a dialog configuration map builder by default" ) configurator.performConfiguration() XCTAssertTrue( - ServerConfigurationManager.shared.graphRequestFactory === components.graphRequestFactory, - "ServerConfigurationManager should be configured with the graph request factory" + _ServerConfigurationManager.shared.graphRequestFactory === components.graphRequestFactory, + "_ServerConfigurationManager should be configured with the graph request factory" ) XCTAssertTrue( - ServerConfigurationManager.shared.graphRequestConnectionFactory === components.graphRequestConnectionFactory, - "ServerConfigurationManager should be configured with the graph request connection factory" + _ServerConfigurationManager.shared.graphRequestConnectionFactory === components.graphRequestConnectionFactory, + "_ServerConfigurationManager should be configured with the graph request connection factory" ) XCTAssertTrue( - ServerConfigurationManager.shared.dialogConfigurationMapBuilder === components.dialogConfigurationMapBuilder, - "ServerConfigurationManager should be configured with the dialog configuration map builder" + _ServerConfigurationManager.shared.dialogConfigurationMapBuilder === components.dialogConfigurationMapBuilder, + "_ServerConfigurationManager should be configured with the dialog configuration map builder" ) } @@ -1075,211 +1075,211 @@ final class CoreKitConfiguratorTests: XCTestCase { func testConfiguringBridgeAPIRequest() { XCTAssertNil( - BridgeAPIRequest.internalURLOpener, - "BridgeAPIRequest should not have an internal URL openenr by default" + _BridgeAPIRequest.internalURLOpener, + "_BridgeAPIRequest should not have an internal URL openenr by default" ) XCTAssertNil( - BridgeAPIRequest.internalUtility, - "BridgeAPIRequest should not have an internal utility by default" + _BridgeAPIRequest.internalUtility, + "_BridgeAPIRequest should not have an internal utility by default" ) XCTAssertNil( - BridgeAPIRequest.settings, - "BridgeAPIRequest should not have settings by default" + _BridgeAPIRequest.settings, + "_BridgeAPIRequest should not have settings by default" ) configurator.performConfiguration() XCTAssertTrue( - BridgeAPIRequest.internalURLOpener === components.internalURLOpener, - "BridgeAPIRequest should be configured with the internal URL opener" + _BridgeAPIRequest.internalURLOpener === components.internalURLOpener, + "_BridgeAPIRequest should be configured with the internal URL opener" ) XCTAssertTrue( - BridgeAPIRequest.internalUtility === components.internalUtility, - "BridgeAPIRequest should be configured with the internal utility" + _BridgeAPIRequest.internalUtility === components.internalUtility, + "_BridgeAPIRequest should be configured with the internal utility" ) XCTAssertTrue( - BridgeAPIRequest.settings === components.settings, - "BridgeAPIRequest should be configured with the settings" + _BridgeAPIRequest.settings === components.settings, + "_BridgeAPIRequest should be configured with the settings" ) } func testConfiguringCodelessIndexer() { XCTAssertNil( - CodelessIndexer.graphRequestFactory, - "CodelessIndexer should not have a graph request factory by default" + _CodelessIndexer.graphRequestFactory, + "_CodelessIndexer should not have a graph request factory by default" ) XCTAssertNil( - CodelessIndexer.serverConfigurationProvider, - "CodelessIndexer should not have a server configuration provider by default" + _CodelessIndexer.serverConfigurationProvider, + "_CodelessIndexer should not have a server configuration provider by default" ) XCTAssertNil( - CodelessIndexer.dataStore, - "CodelessIndexer should be not have a data store by default" + _CodelessIndexer.dataStore, + "_CodelessIndexer should be not have a data store by default" ) XCTAssertNil( - CodelessIndexer.graphRequestConnectionFactory, - "CodelessIndexer should not have a graph request connection provider by default" + _CodelessIndexer.graphRequestConnectionFactory, + "_CodelessIndexer should not have a graph request connection provider by default" ) XCTAssertNil( - CodelessIndexer.swizzler, - "CodelessIndexer should not have a swizzler by default" + _CodelessIndexer.swizzler, + "_CodelessIndexer should not have a swizzler by default" ) XCTAssertNil( - CodelessIndexer.settings, - "CodelessIndexer should not have settings by default" + _CodelessIndexer.settings, + "_CodelessIndexer should not have settings by default" ) XCTAssertNil( - CodelessIndexer.advertiserIDProvider, - "CodelessIndexer should not have an advertiser ID provider by default" + _CodelessIndexer.advertiserIDProvider, + "_CodelessIndexer should not have an advertiser ID provider by default" ) configurator.performConfiguration() XCTAssertTrue( - CodelessIndexer.graphRequestFactory === components.graphRequestFactory, - "CodelessIndexer should be configured with the graph request factory" + _CodelessIndexer.graphRequestFactory === components.graphRequestFactory, + "_CodelessIndexer should be configured with the graph request factory" ) XCTAssertTrue( - CodelessIndexer.serverConfigurationProvider === components.serverConfigurationProvider, - "CodelessIndexer should be configured with the server configuration provider" + _CodelessIndexer.serverConfigurationProvider === components.serverConfigurationProvider, + "_CodelessIndexer should be configured with the server configuration provider" ) XCTAssertTrue( - CodelessIndexer.dataStore === components.defaultDataStore, + _CodelessIndexer.dataStore === components.defaultDataStore, "Should be configured with the default data store" ) XCTAssertTrue( - CodelessIndexer.graphRequestConnectionFactory === components.graphRequestConnectionFactory, - "CodelessIndexer should be configured with the graph request connection factory" + _CodelessIndexer.graphRequestConnectionFactory === components.graphRequestConnectionFactory, + "_CodelessIndexer should be configured with the graph request connection factory" ) XCTAssertTrue( - CodelessIndexer.swizzler === components.swizzler, - "CodelessIndexer should be configured with the swizzler" + _CodelessIndexer.swizzler === components.swizzler, + "_CodelessIndexer should be configured with the swizzler" ) XCTAssertTrue( - CodelessIndexer.settings === components.settings, - "CodelessIndexer should be configured with the settings" + _CodelessIndexer.settings === components.settings, + "_CodelessIndexer should be configured with the settings" ) XCTAssertTrue( - CodelessIndexer.advertiserIDProvider === components.advertiserIDProvider, - "CodelessIndexer should be configured with the advertiser ID provider" + _CodelessIndexer.advertiserIDProvider === components.advertiserIDProvider, + "_CodelessIndexer should be configured with the advertiser ID provider" ) } func testConfiguringCrashShield() { XCTAssertNil( - CrashShield.settings, - "CrashShield should not have settings by default" + _CrashShield.settings, + "_CrashShield should not have settings by default" ) XCTAssertNil( - CrashShield.graphRequestFactory, - "CrashShield should not have a graph request factory by default" + _CrashShield.graphRequestFactory, + "_CrashShield should not have a graph request factory by default" ) XCTAssertNil( - CrashShield.featureChecking, - "CrashShield should not have a feature checker by default" + _CrashShield.featureChecking, + "_CrashShield should not have a feature checker by default" ) configurator.performConfiguration() XCTAssertTrue( - CrashShield.settings === components.settings, - "CrashShield should be configured with the settings" + _CrashShield.settings === components.settings, + "_CrashShield should be configured with the settings" ) XCTAssertTrue( - CrashShield.graphRequestFactory === components.graphRequestFactory, - "CrashShield should be configured with the graph request factory" + _CrashShield.graphRequestFactory === components.graphRequestFactory, + "_CrashShield should be configured with the graph request factory" ) XCTAssertTrue( - CrashShield.featureChecking === components.featureChecker, - "CrashShield should be configured with the feature checker" + _CrashShield.featureChecking === components.featureChecker, + "_CrashShield should be configured with the feature checker" ) } func testConfiguringFeatureExtractor() { XCTAssertNil( - FeatureExtractor.rulesFromKeyProvider, - "FeatureExtractor should not have a web view provider by default" + _FeatureExtractor.rulesFromKeyProvider, + "_FeatureExtractor should not have a web view provider by default" ) configurator.performConfiguration() XCTAssertTrue( - FeatureExtractor.rulesFromKeyProvider === components.rulesFromKeyProvider, - "FeatureExtractor should be configured with the web view provider" + _FeatureExtractor.rulesFromKeyProvider === components.rulesFromKeyProvider, + "_FeatureExtractor should be configured with the web view provider" ) } func testConfiguringModelManager() { XCTAssertNil( - ModelManager.shared.featureChecker, - "ModelManager should not have a feature checker by default" + _ModelManager.shared.featureChecker, + "_ModelManager should not have a feature checker by default" ) XCTAssertNil( - ModelManager.shared.graphRequestFactory, - "ModelManager should not have a request factory by default" + _ModelManager.shared.graphRequestFactory, + "_ModelManager should not have a request factory by default" ) XCTAssertNil( - ModelManager.shared.fileManager, - "ModelManager should not have a file manager by default" + _ModelManager.shared.fileManager, + "_ModelManager should not have a file manager by default" ) XCTAssertNil( - ModelManager.shared.store, - "ModelManager should not have a data store by default" + _ModelManager.shared.store, + "_ModelManager should not have a data store by default" ) XCTAssertNil( - ModelManager.shared.settings, - "ModelManager should not have a settings by default" + _ModelManager.shared.settings, + "_ModelManager should not have a settings by default" ) XCTAssertNil( - ModelManager.shared.dataExtractor, - "ModelManager should not have a data extractor by default" + _ModelManager.shared.dataExtractor, + "_ModelManager should not have a data extractor by default" ) XCTAssertNil( - ModelManager.shared.gateKeeperManager, - "ModelManager should not have a gate keeper manager by default" + _ModelManager.shared.gateKeeperManager, + "_ModelManager should not have a gate keeper manager by default" ) XCTAssertNil( - ModelManager.shared.suggestedEventsIndexer, - "ModelManager should not have a suggested events indexer by default" + _ModelManager.shared.suggestedEventsIndexer, + "_ModelManager should not have a suggested events indexer by default" ) XCTAssertNil( - ModelManager.shared.featureExtractor, - "ModelManager should not have a feature extractor by default" + _ModelManager.shared.featureExtractor, + "_ModelManager should not have a feature extractor by default" ) configurator.performConfiguration() XCTAssertTrue( - ModelManager.shared.featureChecker === components.featureChecker, - "ModelManager should be configured with the feature checker" + _ModelManager.shared.featureChecker === components.featureChecker, + "_ModelManager should be configured with the feature checker" ) XCTAssertTrue( - ModelManager.shared.graphRequestFactory === components.graphRequestFactory, - "ModelManager should be configured with the request factory" + _ModelManager.shared.graphRequestFactory === components.graphRequestFactory, + "_ModelManager should be configured with the request factory" ) XCTAssertTrue( - ModelManager.shared.fileManager === components.fileManager, - "ModelManager should be configured with the file manager" + _ModelManager.shared.fileManager === components.fileManager, + "_ModelManager should be configured with the file manager" ) XCTAssertTrue( - ModelManager.shared.store === components.defaultDataStore, - "ModelManager should be configured with the default data store" + _ModelManager.shared.store === components.defaultDataStore, + "_ModelManager should be configured with the default data store" ) XCTAssertTrue( - ModelManager.shared.settings === components.settings, - "ModelManager should be configured with the settings" + _ModelManager.shared.settings === components.settings, + "_ModelManager should be configured with the settings" ) XCTAssertTrue( - ModelManager.shared.dataExtractor === components.dataExtractor, - "ModelManager should be configured with the data extractor" + _ModelManager.shared.dataExtractor === components.dataExtractor, + "_ModelManager should be configured with the data extractor" ) XCTAssertTrue( - ModelManager.shared.gateKeeperManager === components.gateKeeperManager, - "ModelManager should be configured with the gate keeper manager" + _ModelManager.shared.gateKeeperManager === components.gateKeeperManager, + "_ModelManager should be configured with the gate keeper manager" ) XCTAssertTrue( - ModelManager.shared.featureExtractor === components.featureExtractor, - "ModelManager should be configured with the feature extractor" + _ModelManager.shared.featureExtractor === components.featureExtractor, + "_ModelManager should be configured with the feature extractor" ) } diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Configuration/TestCoreKitComponents.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Configuration/TestCoreKitComponents.swift index 8633cc506..0f47a1bb0 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Configuration/TestCoreKitComponents.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Configuration/TestCoreKitComponents.swift @@ -19,7 +19,7 @@ enum TestCoreKitComponents { appEventsConfigurationProvider: _AppEventsConfigurationProviding = TestAppEventsConfigurationProvider(), appEventsStateProvider: _AppEventsStateProviding = TestAppEventsStateProvider(), appEventsStateStore: _AppEventsStatePersisting = TestAppEventsStateStore(), - appEventsUtility: _AppEventDropDetermining & _AppEventParametersExtracting & AppEventsUtilityProtocol & LoggingNotifying = TestAppEventsUtility(), + appEventsUtility: _AppEventDropDetermining & _AppEventParametersExtracting & _AppEventsUtilityProtocol & _LoggingNotifying = TestAppEventsUtility(), atePublisherFactory: _ATEPublisherCreating = TestATEPublisherFactory(), authenticationTokenWallet: _AuthenticationTokenProviding.Type = TestAuthenticationTokenWallet.self, crashHandler: CrashHandlerProtocol = TestCrashHandler(), diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEvents.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEvents.swift index a913c6350..55ed87748 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEvents.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEvents.swift @@ -61,13 +61,13 @@ final class TestAppEvents: TestEventLogger, var capturedUserDataStore: _UserDataPersisting? var capturedAEMReporter: _AEMReporterProtocol.Type? // swiftlint:disable:next line_length - var capturedAppEventsUtility: (_AppEventDropDetermining & _AppEventParametersExtracting & AppEventsUtilityProtocol & LoggingNotifying)? + var capturedAppEventsUtility: (_AppEventDropDetermining & _AppEventParametersExtracting & _AppEventsUtilityProtocol & _LoggingNotifying)? var capturedInternalUtility: InternalUtilityProtocol? var capturedCAPIReporter: CAPIReporter? // swiftlint:disable:next function_parameter_count func configure( - withGateKeeperManager gateKeeperManager: _GateKeeperManaging.Type, + gateKeeperManager: _GateKeeperManaging.Type, appEventsConfigurationProvider: _AppEventsConfigurationProviding, serverConfigurationProvider: _ServerConfigurationProviding, graphRequestFactory: GraphRequestFactoryProtocol, @@ -85,7 +85,7 @@ final class TestAppEvents: TestEventLogger, advertiserIDProvider: _AdvertiserIDProviding, userDataStore: _UserDataPersisting, // swiftlint:disable:next line_length - appEventsUtility: _AppEventDropDetermining & _AppEventParametersExtracting & AppEventsUtilityProtocol & LoggingNotifying, + appEventsUtility: _AppEventDropDetermining & _AppEventParametersExtracting & _AppEventsUtilityProtocol & _LoggingNotifying, internalUtility: InternalUtilityProtocol, capiReporter: CAPIReporter ) { diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsState.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsState.swift index 19eec9a20..790aa9bd0 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsState.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsState.swift @@ -9,7 +9,7 @@ import Foundation @objcMembers -final class TestAppEventsState: AppEventsState { +final class TestAppEventsState: _AppEventsState { var capturedEventDictionary: [String: Any]? var capturedIsImplicit = false var isAddEventCalled = false diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsStateProvider.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsStateProvider.swift index fb21d50df..4b233b3f2 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsStateProvider.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsStateProvider.swift @@ -15,7 +15,7 @@ final class TestAppEventsStateProvider: NSObject, _AppEventsStateProviding { var capturedAppID: String? var isCreateStateCalled = false - func createState(tokenString: String, appID: String) -> AppEventsState { + func createState(tokenString: String, appID: String) -> _AppEventsState { isCreateStateCalled = true capturedTokenString = tokenString capturedAppID = appID diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsStateStore.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsStateStore.swift index 7a7b3a0b0..f1916c933 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsStateStore.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsStateStore.swift @@ -20,7 +20,7 @@ final class TestAppEventsStateStore: NSObject, _AppEventsStatePersisting { capturedPersistedState = [] } - func persistAppEventsData(_ appEventsState: AppEventsState) { + func persistAppEventsData(_ appEventsState: _AppEventsState) { capturedPersistedState.append(appEventsState) } diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsUtility.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsUtility.swift index fedf377aa..ac7e0f75b 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsUtility.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestAppEventsUtility.swift @@ -11,7 +11,7 @@ import XCTest @objcMembers // swiftlint:disable:next line_length -final class TestAppEventsUtility: NSObject, _AppEventDropDetermining, _AppEventParametersExtracting, AppEventsUtilityProtocol, LoggingNotifying { +final class TestAppEventsUtility: NSObject, _AppEventDropDetermining, _AppEventParametersExtracting, _AppEventsUtilityProtocol, _LoggingNotifying { var shouldDropAppEvents = false var unixTimeNow = TimeInterval(0) var stubbedIsIdentifierValid = false diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestLoggingNotifier.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestLoggingNotifier.swift index 9397e5a94..70b947de0 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestLoggingNotifier.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers/TestLoggingNotifier.swift @@ -8,7 +8,7 @@ import XCTest -final class TestLoggingNotifier: LoggingNotifying { +final class TestLoggingNotifier: _LoggingNotifying { var capturedMessage: String? func logAndNotify(_ message: String) { diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Instrument/CrashShieldTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Instrument/CrashShieldTests.swift index c02dcffee..42e2d4b2b 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Instrument/CrashShieldTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/Instrument/CrashShieldTests.swift @@ -20,8 +20,8 @@ final class CrashShieldTests: XCTestCase { super.setUp() settings.reset() - CrashShield.reset() - CrashShield.configure( + _CrashShield.reset() + _CrashShield.configure( with: settings, graphRequestFactory: graphRequestFactory, featureChecking: featureManager @@ -37,7 +37,7 @@ final class CrashShieldTests: XCTestCase { "(22 DEV METHODS)", ] - let featureName1 = CrashShield._getFeature(callstack1) + let featureName1 = _CrashShield._getFeature(callstack1) XCTAssertEqual(featureName1, "AAM") } @@ -48,7 +48,7 @@ final class CrashShieldTests: XCTestCase { "(22 DEV METHODS)", ] - let featureName2 = CrashShield._getFeature(callstack2) + let featureName2 = _CrashShield._getFeature(callstack2) XCTAssertEqual(featureName2, "CodelessEvents") } @@ -59,7 +59,7 @@ final class CrashShieldTests: XCTestCase { "(22 DEV METHODS)", ] - let featureName3 = CrashShield._getFeature(callstack3) + let featureName3 = _CrashShield._getFeature(callstack3) XCTAssertEqual(featureName3, "RestrictiveDataFiltering") } @@ -70,7 +70,7 @@ final class CrashShieldTests: XCTestCase { "(22 DEV METHODS)", ] - let featureName4 = CrashShield._getFeature(callstack4) + let featureName4 = _CrashShield._getFeature(callstack4) XCTAssertEqual(featureName4, "ErrorReport") } @@ -82,7 +82,7 @@ final class CrashShieldTests: XCTestCase { "(22 DEV METHODS)", ] - let featureName5 = CrashShield._getFeature(callstack5) + let featureName5 = _CrashShield._getFeature(callstack5) XCTAssertNil(featureName5) } @@ -94,7 +94,7 @@ final class CrashShieldTests: XCTestCase { ] for _ in 0 ..< 100 { - _ = CrashShield._getFeature(Fuzzer.randomize(json: callstack)) + _ = _CrashShield._getFeature(Fuzzer.randomize(json: callstack)) } } @@ -102,31 +102,31 @@ final class CrashShieldTests: XCTestCase { func testGetClassNameForClassMethod() { let entry1 = "+[FBSDKRestrictiveDataFilterManager crash]+84" - let className1 = CrashShield._getClassName(entry1) + let className1 = _CrashShield._getClassName(entry1) XCTAssertTrue(className1 == "FBSDKRestrictiveDataFilterManager") } func testGetClassNameForInstanceMethod() { let entry2 = "-[FBSDKRestrictiveDataFilterManager crash]+84" - let className2 = CrashShield._getClassName(entry2) + let className2 = _CrashShield._getClassName(entry2) XCTAssertTrue(className2 == "FBSDKRestrictiveDataFilterManager") } func testGetClassNameForIneligibleFormat() { let entry3 = "(6 DEV METHODS)" - let className3 = CrashShield._getClassName(entry3) + let className3 = _CrashShield._getClassName(entry3) XCTAssertNil(className3) } func testParsingClassName() { for _ in 0 ..< 100 { - CrashShield._getClassName(Fuzzer.random) + _CrashShield._getClassName(Fuzzer.random) } } func testAnalyzingEmptyCrashLogs() { // Should not create a graph request for posting a non-existent crash - CrashShield.analyze([]) + _CrashShield.analyze([]) XCTAssertNil( graphRequestFactory.capturedGraphPath, "Should not create a graph request for posting a non-existent crash" @@ -137,7 +137,7 @@ final class CrashShieldTests: XCTestCase { func testDisablingCoreKitFeatureWithDataProcessingRestricted() { settings.isDataProcessingRestricted = true - CrashShield.analyze(coreKitCrashLogs) + _CrashShield.analyze(coreKitCrashLogs) XCTAssertTrue( featureManager.disabledFeaturesContains(.codelessEvents), @@ -147,7 +147,7 @@ final class CrashShieldTests: XCTestCase { func testDisablingNonCoreKitFeatureWithDataProcessingRestricted() { settings.isDataProcessingRestricted = true - CrashShield.analyze(nonCoreKitCrashLogs) + _CrashShield.analyze(nonCoreKitCrashLogs) XCTAssertFalse( featureManager.disabledFeaturesContains(.codelessEvents), @@ -158,7 +158,7 @@ final class CrashShieldTests: XCTestCase { func testDisablingCoreKitFeatureWithDataProcessingUnrestricted() { settings.isDataProcessingRestricted = false - CrashShield.analyze(coreKitCrashLogs) + _CrashShield.analyze(coreKitCrashLogs) XCTAssertTrue( featureManager.disabledFeaturesContains(.codelessEvents), @@ -168,7 +168,7 @@ final class CrashShieldTests: XCTestCase { func testDisablingNonCoreKitFeatureWithDataProcessingUnrestricted() { settings.isDataProcessingRestricted = false - CrashShield.analyze(nonCoreKitCrashLogs) + _CrashShield.analyze(nonCoreKitCrashLogs) XCTAssertFalse( featureManager.disabledFeaturesContains(.codelessEvents), @@ -203,7 +203,7 @@ final class CrashShieldTests: XCTestCase { ] for (key, value) in pairs { - XCTAssertEqual(CrashShield.feature(for: key), value) + XCTAssertEqual(_CrashShield.feature(for: key), value) } } @@ -211,14 +211,14 @@ final class CrashShieldTests: XCTestCase { func testPostingCoreKitCrashLogsWithDataProcessingRestricted() { settings.isDataProcessingRestricted = true - CrashShield.analyze(coreKitCrashLogs) + _CrashShield.analyze(coreKitCrashLogs) XCTAssertNil(graphRequestFactory.capturedGraphPath) } func testPostingNonCoreKitCrashLogsWithDataProcessingRestricted() { settings.isDataProcessingRestricted = true - CrashShield.analyze(nonCoreKitCrashLogs) + _CrashShield.analyze(nonCoreKitCrashLogs) XCTAssertNil(graphRequestFactory.capturedGraphPath) } @@ -228,14 +228,14 @@ final class CrashShieldTests: XCTestCase { settings.appID = "appID" // Act - CrashShield.analyze(coreKitCrashLogs) + _CrashShield.analyze(coreKitCrashLogs) XCTAssertNotNil(graphRequestFactory.capturedGraphPath) } func testPostingNonCoreKitCrashLogsWithDataProcessingUnrestricted() { settings.isDataProcessingRestricted = false settings.appID = "appID" - CrashShield.analyze(nonCoreKitCrashLogs) + _CrashShield.analyze(nonCoreKitCrashLogs) XCTAssertNil(graphRequestFactory.capturedGraphPath) } diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/InternalUtilityTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/InternalUtilityTests.swift index b94a9b7f0..533e48357 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/InternalUtilityTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/InternalUtilityTests.swift @@ -65,7 +65,7 @@ final class InternalUtilityTests: XCTestCase { func configureInternalUtility() { internalUtility.configure( - withInfoDictionaryProvider: bundle, + infoDictionaryProvider: bundle, loggerFactory: loggerFactory, settings: settings, errorFactory: errorFactory diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/ServerConfiguration/ServerConfigurationManagerTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/ServerConfiguration/ServerConfigurationManagerTests.swift index 87e5dc1af..067a978d6 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/ServerConfiguration/ServerConfigurationManagerTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/ServerConfiguration/ServerConfigurationManagerTests.swift @@ -26,7 +26,7 @@ final class ServerConfigurationManagerTests: XCTestCase { requestFactory = TestGraphRequestFactory() connectionFactory = TestGraphRequestConnectionFactory(stubbedConnection: connection) dialogConfigurationMapBuilder = TestDialogConfigurationMapBuilder() - ServerConfigurationManager.shared.configure( + _ServerConfigurationManager.shared.configure( graphRequestFactory: requestFactory, graphRequestConnectionFactory: connectionFactory, dialogConfigurationMapBuilder: dialogConfigurationMapBuilder @@ -34,7 +34,7 @@ final class ServerConfigurationManagerTests: XCTestCase { } override func tearDown() { - ServerConfigurationManager.shared.reset() + _ServerConfigurationManager.shared.reset() connection = nil requestFactory = nil connectionFactory = nil @@ -44,33 +44,33 @@ final class ServerConfigurationManagerTests: XCTestCase { } func testDefaultDependencies() { - ServerConfigurationManager.shared.reset() + _ServerConfigurationManager.shared.reset() XCTAssertNil( - ServerConfigurationManager.shared.graphRequestFactory, + _ServerConfigurationManager.shared.graphRequestFactory, "Should not have a graph request factory by default" ) XCTAssertNil( - ServerConfigurationManager.shared.graphRequestConnectionFactory, + _ServerConfigurationManager.shared.graphRequestConnectionFactory, "Should not have a graph request connection factory by default" ) XCTAssertNil( - ServerConfigurationManager.shared.dialogConfigurationMapBuilder, + _ServerConfigurationManager.shared.dialogConfigurationMapBuilder, "Should not have a dialog configuration map builder by default" ) } func testConfiguringWithDependencies() { XCTAssertTrue( - ServerConfigurationManager.shared.graphRequestFactory === requestFactory, + _ServerConfigurationManager.shared.graphRequestFactory === requestFactory, "Should set the provided graph request factory" ) XCTAssertTrue( - ServerConfigurationManager.shared.graphRequestConnectionFactory === connectionFactory, + _ServerConfigurationManager.shared.graphRequestConnectionFactory === connectionFactory, "Should set the provided graph request connection factory" ) XCTAssertTrue( - ServerConfigurationManager.shared.dialogConfigurationMapBuilder === dialogConfigurationMapBuilder, + _ServerConfigurationManager.shared.dialogConfigurationMapBuilder === dialogConfigurationMapBuilder, "Should set the provided dialog configuration map builder" ) } @@ -84,7 +84,7 @@ final class ServerConfigurationManagerTests: XCTestCase { var didInvokeCompletion = false var configuration: _ServerConfiguration? var error: Error? - ServerConfigurationManager.shared.loadServerConfiguration { potentialConfiguration, potentialError in + _ServerConfigurationManager.shared.loadServerConfiguration { potentialConfiguration, potentialError in didInvokeCompletion = true configuration = potentialConfiguration error = potentialError @@ -109,7 +109,7 @@ final class ServerConfigurationManagerTests: XCTestCase { } func testParsingWithMissingDialogConfigurations() { - ServerConfigurationManager.shared.processLoadRequestResponse( + _ServerConfigurationManager.shared.processLoadRequestResponse( [String: Any](), error: nil, appID: name @@ -125,7 +125,7 @@ final class ServerConfigurationManagerTests: XCTestCase { RawServerConfigurationResponseFixtures.Keys.dialogConfigurations: [String: Any](), ] - ServerConfigurationManager.shared.processLoadRequestResponse( + _ServerConfigurationManager.shared.processLoadRequestResponse( response, error: nil, appID: name @@ -147,7 +147,7 @@ final class ServerConfigurationManagerTests: XCTestCase { ], ] - ServerConfigurationManager.shared.processLoadRequestResponse( + _ServerConfigurationManager.shared.processLoadRequestResponse( response, error: nil, appID: name @@ -164,7 +164,7 @@ final class ServerConfigurationManagerTests: XCTestCase { func testParsingResponses() { for _ in 0 ..< 100 { - ServerConfigurationManager.shared.processLoadRequestResponse( + _ServerConfigurationManager.shared.processLoadRequestResponse( RawServerConfigurationResponseFixtures.random, error: nil, appID: name diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/ShareDialogConfigurationTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/ShareDialogConfigurationTests.swift index 40ada6197..3a3f55f0b 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/ShareDialogConfigurationTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/ShareDialogConfigurationTests.swift @@ -20,8 +20,8 @@ final class ShareDialogConfigurationTests: XCTestCase { let configuration = ShareDialogConfiguration() XCTAssertEqual( - configuration.serverConfigurationProvider as? ServerConfigurationManager, - ServerConfigurationManager.shared, + configuration.serverConfigurationProvider as? _ServerConfigurationManager, + _ServerConfigurationManager.shared, "Should use the expected default server configuration provider" ) } diff --git a/FBSDKGamingServicesKit/FBSDKGamingServicesKit/GameRequestDialog.swift b/FBSDKGamingServicesKit/FBSDKGamingServicesKit/GameRequestDialog.swift index e65ecef00..216f815aa 100644 --- a/FBSDKGamingServicesKit/FBSDKGamingServicesKit/GameRequestDialog.swift +++ b/FBSDKGamingServicesKit/FBSDKGamingServicesKit/GameRequestDialog.swift @@ -309,7 +309,7 @@ public final class GameRequestDialog: NSObject { return handleCompletion() } - let potentialRequest = BridgeAPIRequest( + let potentialRequest = _BridgeAPIRequest( protocolType: .web, scheme: .https, methodName: Self.appRequestMethodName, diff --git a/FBSDKGamingServicesKit/FBSDKGamingServicesKitTests/GameRequestDialogTests.swift b/FBSDKGamingServicesKit/FBSDKGamingServicesKitTests/GameRequestDialogTests.swift index 00ef4161c..9aa86def8 100644 --- a/FBSDKGamingServicesKit/FBSDKGamingServicesKitTests/GameRequestDialogTests.swift +++ b/FBSDKGamingServicesKit/FBSDKGamingServicesKitTests/GameRequestDialogTests.swift @@ -307,7 +307,7 @@ final class GameRequestDialogTests: XCTestCase { "Should use the expected method name" ) let downcastRequest = try XCTUnwrap( - capturedRequest as? BridgeAPIRequest, + capturedRequest as? _BridgeAPIRequest, "The request should be the expected type" ) let parameters = try XCTUnwrap( diff --git a/FBSDKShareKit/FBSDKShareKit/Bridging/ShareBridgeAPIRequestFactory.swift b/FBSDKShareKit/FBSDKShareKit/Bridging/ShareBridgeAPIRequestFactory.swift index 4516aee0f..c4014be05 100644 --- a/FBSDKShareKit/FBSDKShareKit/Bridging/ShareBridgeAPIRequestFactory.swift +++ b/FBSDKShareKit/FBSDKShareKit/Bridging/ShareBridgeAPIRequestFactory.swift @@ -19,7 +19,7 @@ final class ShareBridgeAPIRequestFactory: BridgeAPIRequestCreating { parameters: [String: Any]?, userInfo: [String: Any]? ) -> BridgeAPIRequestProtocol? { - BridgeAPIRequest( + _BridgeAPIRequest( protocolType: protocolType, scheme: URLScheme(rawValue: scheme), methodName: methodName, diff --git a/FBSDKTVOSKit/FBSDKTVOSKit/FBSDKButton+Internal.h b/FBSDKTVOSKit/FBSDKTVOSKit/FBSDKButton+Internal.h index 69eae03e5..a75d68096 100644 --- a/FBSDKTVOSKit/FBSDKTVOSKit/FBSDKButton+Internal.h +++ b/FBSDKTVOSKit/FBSDKTVOSKit/FBSDKButton+Internal.h @@ -27,10 +27,6 @@ NS_ASSUME_NONNULL_BEGIN + (void)resetClassDependencies; #endif -+ (void)configureWithApplicationActivationNotifier:(id)applicationActivationNotifier - eventLogger:(id)eventLogger - accessTokenProvider:(Class)accessTokenProvider; - - (void)configureButton; - (void) configureWithIcon:(FBSDKIcon *)icon title:(NSString *)title