├── .gitignore ├── .ruby-version ├── Example └── UnityAdsExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── 100.png │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 144.png │ │ ├── 152.png │ │ ├── 167.png │ │ ├── 180.png │ │ ├── 20.png │ │ ├── 29.png │ │ ├── 40.png │ │ ├── 50.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 72.png │ │ ├── 76.png │ │ ├── 80.png │ │ ├── 87.png │ │ └── Contents.json │ ├── Brand Assets.launchimage │ │ └── Contents.json │ ├── background.imageset │ │ ├── Contents.json │ │ └── unityads_maxbg.png │ └── logo.imageset │ │ ├── Contents.json │ │ └── unityads_logo.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── SwiftFilePlaceholder.swift │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── LICENSE ├── README.md ├── SourceCode ├── Private │ ├── AR │ │ ├── Api │ │ │ ├── UARApiAR.h │ │ │ └── UARApiAR.m │ │ ├── Configuration │ │ │ ├── UADSARModuleConfiguration.h │ │ │ └── UADSARModuleConfiguration.m │ │ ├── UADSAREvent.h │ │ ├── UADSAREvent.m │ │ ├── UADSARUtils.h │ │ ├── UADSARUtils.m │ │ ├── UADSARView.h │ │ ├── UADSARView.m │ │ ├── UADSARViewHandler.h │ │ └── UADSARViewHandler.m │ ├── Ads │ │ ├── AdUnit │ │ │ ├── UADSAdUnitError.h │ │ │ ├── UADSAdUnitError.m │ │ │ ├── UADSAdUnitEvent.h │ │ │ ├── UADSAdUnitEvent.m │ │ │ ├── UADSAdUnitViewHandler.h │ │ │ ├── UADSAdUnitViewHandler.m │ │ │ ├── UADSVideoPlayerHandler.h │ │ │ ├── UADSVideoPlayerHandler.m │ │ │ ├── UADSViewController.h │ │ │ ├── UADSViewController.m │ │ │ ├── UADSWebPlayerHandler.h │ │ │ ├── UADSWebPlayerHandler.m │ │ │ ├── UADSWebViewHandler.h │ │ │ ├── UADSWebViewHandler.m │ │ │ ├── UADSWebViewShowOperation.h │ │ │ └── UADSWebViewShowOperation.m │ │ ├── Api │ │ │ ├── UADSApiAdUnit.h │ │ │ ├── UADSApiAdUnit.m │ │ │ ├── UADSApiAdsProperties.h │ │ │ ├── UADSApiGMAScar │ │ │ │ ├── UADSApiGMAScar.h │ │ │ │ └── UADSApiGMAScar.m │ │ │ ├── UADSApiLoad.h │ │ │ ├── UADSApiLoad.m │ │ │ ├── UADSApiShow.h │ │ │ ├── UADSApiShow.m │ │ │ ├── UADSApiToken.h │ │ │ ├── UADSApiToken.m │ │ │ ├── UADSApiVideoPlayer.h │ │ │ ├── UADSApiVideoPlayer.m │ │ │ ├── UADSApiWebPlayer.h │ │ │ └── UADSApiWebPlayer.m │ │ ├── Configuration │ │ │ ├── UADSAdsModuleConfiguration.h │ │ │ └── UADSAdsModuleConfiguration.m │ │ ├── Load │ │ │ ├── UADSAbstractModule │ │ │ │ ├── UADSAbstractModule.h │ │ │ │ ├── UADSAbstractModule.m │ │ │ │ ├── UADSAbstractModuleBasicState │ │ │ │ │ ├── UADSAbstractModuleOperationBasicObject.h │ │ │ │ │ └── UADSAbstractModuleOperationBasicObject.m │ │ │ │ └── UADSAbstractModuleDelegate.h │ │ │ ├── UADSBannerLoadModule │ │ │ │ ├── UADSBannerLoadModule.h │ │ │ │ ├── UADSBannerLoadModule.m │ │ │ │ ├── UADSBannerLoadModuleDelegateWrapper.h │ │ │ │ ├── UADSBannerLoadModuleDelegateWrapper.m │ │ │ │ ├── UADSBannerLoadModuleOperationObject.h │ │ │ │ ├── UADSBannerLoadModuleOperationObject.m │ │ │ │ ├── UADSBannerLoadOptions.h │ │ │ │ └── UADSBannerLoadOptions.m │ │ │ ├── UADSEventHandler │ │ │ │ ├── UADSEventHandler.h │ │ │ │ └── UADSEventHandler.m │ │ │ ├── UADSLoadModule │ │ │ │ ├── UADSLoadModule.h │ │ │ │ ├── UADSLoadModule.m │ │ │ │ ├── UADSLoadModuleDelegateWrapper.h │ │ │ │ ├── UADSLoadModuleDelegateWrapper.m │ │ │ │ ├── UADSLoadModuleOperationObject │ │ │ │ │ ├── UADSLoadModuleOperationObject.h │ │ │ │ │ └── UADSLoadModuleOperationObject.m │ │ │ │ └── UADSShowModuleState │ │ │ │ │ ├── UADSShowModuleOperation.h │ │ │ │ │ └── UADSShowModuleOperation.m │ │ │ └── UADSShowModule │ │ │ │ ├── UADSShowDelegateWrapper │ │ │ │ ├── UADShowDelegateWrapper.h │ │ │ │ └── UADShowDelegateWrapper.m │ │ │ │ ├── UADSShowModule.h │ │ │ │ ├── UADSShowModule.m │ │ │ │ ├── UADSShowModuleOptions.h │ │ │ │ └── UADSShowModuleOptions.m │ │ ├── Token │ │ │ ├── UADSTokenStorage.h │ │ │ ├── UADSTokenStorage.m │ │ │ ├── UADSTokenStorageEvent.h │ │ │ ├── UADSTokenStorageEvent.m │ │ │ ├── UADSTokenStorageEventHandler.h │ │ │ ├── UADSTokenStorageEventHandler.m │ │ │ └── UADSTokenStorageEventProtocol.h │ │ ├── Video │ │ │ ├── UADSAVPlayer.h │ │ │ ├── UADSAVPlayer.m │ │ │ ├── UADSAVPlayerEvent.h │ │ │ ├── UADSAVPlayerEvent.m │ │ │ ├── UADSVideoView.h │ │ │ └── UADSVideoView.m │ │ └── WebPlayer │ │ │ ├── UADSWebPlayerBridge.h │ │ │ ├── UADSWebPlayerBridge.m │ │ │ ├── UADSWebPlayerError.h │ │ │ ├── UADSWebPlayerError.m │ │ │ ├── UADSWebPlayerEvent.h │ │ │ ├── UADSWebPlayerEvent.m │ │ │ ├── UADSWebPlayerSettings.h │ │ │ ├── UADSWebPlayerSettings.m │ │ │ ├── UADSWebPlayerSettingsManager.h │ │ │ ├── UADSWebPlayerSettingsManager.m │ │ │ ├── UADSWebPlayerView.h │ │ │ ├── UADSWebPlayerView.m │ │ │ ├── UADSWebPlayerViewManager.h │ │ │ └── UADSWebPlayerViewManager.m │ ├── Analytics │ │ └── Core │ │ │ ├── Api │ │ │ ├── UANAWebViewEventCategory.h │ │ │ └── UANAWebViewEventCategory.m │ │ │ ├── Configuration │ │ │ ├── UANAAnalyticsModuleConfiguration.h │ │ │ └── UANAAnalyticsModuleConfiguration.m │ │ │ └── Webview │ │ │ ├── UANAWebViewAnalyticsEvent.h │ │ │ └── UANAWebViewAnalyticsEvent.m │ ├── Banners │ │ ├── Api │ │ │ ├── UADSApiBanner.h │ │ │ ├── UADSApiBanner.m │ │ │ ├── UADSApiBannerListener.h │ │ │ └── UADSApiBannerListener.m │ │ ├── Bridge │ │ │ ├── USRVBannerBridge.h │ │ │ └── USRVBannerBridge.m │ │ ├── Configuration │ │ │ ├── UADSBannerModuleConfiguration.h │ │ │ └── UADSBannerModuleConfiguration.m │ │ ├── GMAScar │ │ │ ├── UADSGADBannerWrapper.h │ │ │ └── UADSGADBannerWrapper.m │ │ ├── Properties │ │ │ ├── UADSBannerRefreshInfo.h │ │ │ ├── UADSBannerRefreshInfo.m │ │ │ ├── UADSBannerWebPlayerContainerType.h │ │ │ └── UADSBannerWebPlayerContainerType.m │ │ ├── UADSBannerAdRefreshView.h │ │ ├── UADSBannerAdRefreshView.m │ │ ├── UADSBannerView+UADSBannerWebPlayerContainerDelegate.h │ │ ├── UADSBannerWrapperView.h │ │ ├── UADSBannerWrapperView.m │ │ └── View │ │ │ ├── UADSBannerEvent.h │ │ │ ├── UADSBannerEvent.m │ │ │ ├── UADSBannerWebPlayerContainer.h │ │ │ └── UADSBannerWebPlayerContainer.m │ ├── Core │ │ ├── Api │ │ │ ├── USRVApiCache.h │ │ │ ├── USRVApiCache.m │ │ │ ├── USRVApiClassDetection.h │ │ │ ├── USRVApiClassDetection.m │ │ │ ├── USRVApiConnectivity.h │ │ │ ├── USRVApiConnectivity.m │ │ │ ├── USRVApiDeviceInfo.h │ │ │ ├── USRVApiDeviceInfo.m │ │ │ ├── USRVApiMainBundle.h │ │ │ ├── USRVApiMainBundle.m │ │ │ ├── USRVApiNotification.h │ │ │ ├── USRVApiNotification.m │ │ │ ├── USRVApiPermissions.h │ │ │ ├── USRVApiPermissions.m │ │ │ ├── USRVApiPreferences.h │ │ │ ├── USRVApiPreferences.m │ │ │ ├── USRVApiRequest.h │ │ │ ├── USRVApiRequest.m │ │ │ ├── USRVApiResolve.h │ │ │ ├── USRVApiResolve.m │ │ │ ├── USRVApiSdk.h │ │ │ ├── USRVApiSdk.m │ │ │ ├── USRVApiSensorInfo.h │ │ │ ├── USRVApiSensorInfo.m │ │ │ ├── USRVApiStorage.h │ │ │ ├── USRVApiStorage.m │ │ │ ├── USRVApiTrackingManager.h │ │ │ ├── USRVApiTrackingManager.m │ │ │ ├── USRVApiUrlScheme.h │ │ │ └── USRVApiUrlScheme.m │ │ ├── Cache │ │ │ ├── USRVCacheEvent.h │ │ │ ├── USRVCacheEvent.m │ │ │ ├── USRVCacheOperation.h │ │ │ ├── USRVCacheOperation.m │ │ │ ├── USRVCacheQueue.h │ │ │ └── USRVCacheQueue.m │ │ ├── Categories │ │ │ ├── NSBundle+TypecastGet.h │ │ │ ├── NSBundle+TypecastGet.m │ │ │ ├── NSDictionary │ │ │ │ ├── NSDictionary+Filter.h │ │ │ │ ├── NSDictionary+Filter.m │ │ │ │ ├── NSDictionary+Headers.h │ │ │ │ ├── NSDictionary+Headers.m │ │ │ │ ├── NSDictionary+JSONString.h │ │ │ │ ├── NSDictionary+JSONString.m │ │ │ │ ├── NSDictionary+Merge.h │ │ │ │ └── NSDictionary+Merge.m │ │ │ ├── NSObject+DeepCopy.h │ │ │ ├── NSObject+DeepCopy.m │ │ │ ├── NSString+Hash.h │ │ │ ├── NSString+Hash.m │ │ │ ├── WKWebView+UserAgent.h │ │ │ └── WKWebView+UserAgent.m │ │ ├── Configuration │ │ │ ├── ConfigurationStorage │ │ │ │ ├── Decorators │ │ │ │ │ ├── UADSConfigurationSaverWithTokenStorage.h │ │ │ │ │ └── UADSConfigurationSaverWithTokenStorage.m │ │ │ │ ├── UADSConfigurationCRUDBase.h │ │ │ │ └── UADSConfigurationCRUDBase.m │ │ │ ├── SDKConfigurationReader │ │ │ │ ├── ConfigurationLoader │ │ │ │ │ ├── Decorators │ │ │ │ │ │ ├── UADSConfigurationLoaderWithMetrics.h │ │ │ │ │ │ ├── UADSConfigurationLoaderWithMetrics.m │ │ │ │ │ │ ├── UADSConfigurationLoaderWithPersistence.h │ │ │ │ │ │ ├── UADSConfigurationLoaderWithPersistence.m │ │ │ │ │ │ ├── UADSConfigurationLoaderWithPrivacy.h │ │ │ │ │ │ └── UADSConfigurationLoaderWithPrivacy.m │ │ │ │ │ ├── PrivacyLoader │ │ │ │ │ │ ├── UADSInitializationResponse.h │ │ │ │ │ │ ├── UADSInitializationResponse.m │ │ │ │ │ │ ├── UADSPrivacyLoader.h │ │ │ │ │ │ ├── UADSPrivacyLoader.m │ │ │ │ │ │ ├── UADSPrivacyLoaderWithMetrics.h │ │ │ │ │ │ ├── UADSPrivacyLoaderWithMetrics.m │ │ │ │ │ │ ├── UADSPrivacyStorage.h │ │ │ │ │ │ └── UADSPrivacyStorage.m │ │ │ │ │ ├── UADSConfigurationEndpointProvider.h │ │ │ │ │ ├── UADSConfigurationEndpointProvider.m │ │ │ │ │ ├── UADSConfigurationLoader.h │ │ │ │ │ ├── UADSConfigurationLoader.m │ │ │ │ │ ├── UADSConfigurationLoaderBuilder.h │ │ │ │ │ └── UADSConfigurationLoaderBuilder.m │ │ │ │ ├── UADSBaseURLBuilder │ │ │ │ │ ├── UADSBaseURLBuilder.h │ │ │ │ │ └── UADSBaseURLBuilder.m │ │ │ │ ├── UADSClientConfig.h │ │ │ │ ├── UADSClientConfig.m │ │ │ │ ├── UADSConfigurationExperimentValue.h │ │ │ │ ├── UADSConfigurationExperimentValue.m │ │ │ │ ├── UADSConfigurationExperiments.h │ │ │ │ ├── UADSConfigurationExperiments.m │ │ │ │ ├── UADSConfigurationMetricTagsReader.h │ │ │ │ ├── USRVBodyBase64GzipCompressor.h │ │ │ │ ├── USRVBodyBase64GzipCompressor.m │ │ │ │ ├── USRVBodyJSONCompressor.h │ │ │ │ ├── USRVBodyJSONCompressor.m │ │ │ │ ├── USRVBodyURLEncodedCompressorDecorator.h │ │ │ │ ├── USRVBodyURLEncodedCompressorDecorator.m │ │ │ │ ├── USRVConfiguration.h │ │ │ │ ├── USRVConfiguration.m │ │ │ │ ├── USRVConfigurationRequestFactoryWithLogs.h │ │ │ │ ├── USRVConfigurationRequestFactoryWithLogs.m │ │ │ │ ├── USRVDataGzipCompressor.h │ │ │ │ ├── USRVDataGzipCompressor.m │ │ │ │ ├── USRVDictionaryCompressorWithMetrics.h │ │ │ │ ├── USRVDictionaryCompressorWithMetrics.m │ │ │ │ ├── USRVInitializationRequestFactory.h │ │ │ │ └── USRVInitializationRequestFactory.m │ │ │ ├── UADSErrorState.h │ │ │ ├── UADSErrorState.m │ │ │ ├── UADSInitializeEventsMetricSender.h │ │ │ ├── UADSInitializeEventsMetricSender.m │ │ │ ├── USRVConfigurationStorage.h │ │ │ ├── USRVConfigurationStorage.m │ │ │ ├── USRVCoreModuleConfiguration.h │ │ │ ├── USRVCoreModuleConfiguration.m │ │ │ ├── USRVInitializationDelegate.h │ │ │ ├── USRVInitializationNotificationCenter.h │ │ │ ├── USRVInitializationNotificationCenter.m │ │ │ ├── USRVInitialize_old.m │ │ │ ├── USRVModuleConfiguration.h │ │ │ └── USRVModuleConfiguration.m │ │ ├── Connectivity │ │ │ ├── USRVConnectivityDelegate.h │ │ │ ├── USRVConnectivityMonitor.h │ │ │ ├── USRVConnectivityMonitor.m │ │ │ ├── USRVConnectivityUtils.h │ │ │ └── USRVConnectivityUtils.m │ │ ├── Data │ │ │ ├── USRVJsonUtilities.h │ │ │ └── USRVJsonUtilities.m │ │ ├── Device │ │ │ ├── DeviceInfoReader │ │ │ │ ├── Decorators │ │ │ │ │ ├── UADSDeviceInfoReaderGate.h │ │ │ │ │ ├── UADSDeviceInfoReaderGate.m │ │ │ │ │ ├── UADSDeviceInfoReaderKeys.h │ │ │ │ │ ├── UADSDeviceInfoReaderKeys.m │ │ │ │ │ ├── UADSDeviceInfoReaderWithFilter.h │ │ │ │ │ ├── UADSDeviceInfoReaderWithFilter.m │ │ │ │ │ ├── UADSDeviceInfoReaderWithMetrics.h │ │ │ │ │ ├── UADSDeviceInfoReaderWithMetrics.m │ │ │ │ │ ├── UADSDeviceInfoReaderWithPII │ │ │ │ │ │ ├── UADSDeviceInfoReaderWithPrivacy.h │ │ │ │ │ │ ├── UADSDeviceInfoReaderWithPrivacy.m │ │ │ │ │ │ ├── UADSPIIDataProvider.h │ │ │ │ │ │ ├── UADSPIIDataProvider.m │ │ │ │ │ │ ├── UADSPIITrackingStatusReader.h │ │ │ │ │ │ └── UADSPIITrackingStatusReader.m │ │ │ │ │ ├── UADSDeviceInfoReaderWithSessionId.h │ │ │ │ │ ├── UADSDeviceInfoReaderWithSessionId.m │ │ │ │ │ ├── UADSDeviceInfoReaderWithStorageInfo.h │ │ │ │ │ ├── UADSDeviceInfoReaderWithStorageInfo.m │ │ │ │ │ └── UADSDeviceInfoStorageKeysProvider │ │ │ │ │ │ ├── UADSDeviceInfoStorageKeysProvider.h │ │ │ │ │ │ ├── UADSDeviceInfoStorageKeysProviderExtended.h │ │ │ │ │ │ ├── UADSDeviceInfoStorageKeysProviderExtended.m │ │ │ │ │ │ ├── UADSDeviceInfoStorageKeysProviderMinimal.h │ │ │ │ │ │ └── UADSDeviceInfoStorageKeysProviderMinimal.m │ │ │ │ ├── UADSDeviceIDFIReader.h │ │ │ │ ├── UADSDeviceIDFIReader.m │ │ │ │ ├── UADSDeviceInfoReader.h │ │ │ │ ├── UADSDeviceInfoReader.m │ │ │ │ ├── UADSDeviceInfoReaderBuilder.h │ │ │ │ ├── UADSDeviceInfoReaderBuilder.m │ │ │ │ ├── UADSDeviceInfoReaderOptimizer.h │ │ │ │ ├── UADSDeviceInfoReaderOptimizer.m │ │ │ │ ├── UADSDictionaryFilters │ │ │ │ │ ├── UADSDeviceInfoExcludeFieldsProvider.h │ │ │ │ │ └── UADSDeviceInfoExcludeFieldsProvider.m │ │ │ │ ├── UADSJsonStorageKeyNames.h │ │ │ │ ├── UADSJsonStorageKeyNames.m │ │ │ │ ├── UADSMinDeviceInfoReader.h │ │ │ │ └── UADSMinDeviceInfoReader.m │ │ │ ├── HeaderBiddingTokenReader │ │ │ │ ├── ScarHeaderBidding │ │ │ │ │ ├── Metric │ │ │ │ │ │ ├── UADSSCARHeaderBiddingMetric.h │ │ │ │ │ │ └── UADSSCARHeaderBiddingMetric.m │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderSCARSignalsConfig.h │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderSCARSignalsConfig.m │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSCARSignals.h │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSCARSignals.m │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSCARSignalsBaseStrategy+Internal.h │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSCARSignalsBaseStrategy.h │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSCARSignalsBaseStrategy.m │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSCARSignalsEagerStrategy.h │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSCARSignalsEagerStrategy.m │ │ │ │ │ ├── UADSSCARHBConfigurationReader.h │ │ │ │ │ ├── UADSSCARRawSignalsReader.h │ │ │ │ │ ├── UADSSCARRawSignalsReader.m │ │ │ │ │ ├── UADSSCARSignalIdentifiers.h │ │ │ │ │ ├── UADSSCARSignalReader.h │ │ │ │ │ ├── UADSSCARSignalSender.h │ │ │ │ │ ├── UADSSCARWebRequestSignalSender.h │ │ │ │ │ ├── UADSSCARWebRequestSignalSender.m │ │ │ │ │ ├── UADSUUIDStringGenerator.h │ │ │ │ │ ├── UADSUUIDStringGenerator.m │ │ │ │ │ └── UADSUniqueIdGenerator.h │ │ │ │ ├── UADSHBTokenReaderWithPrivacyWait.h │ │ │ │ ├── UADSHBTokenReaderWithPrivacyWait.m │ │ │ │ ├── UADSHeaderBiddingToken.h │ │ │ │ ├── UADSHeaderBiddingToken.m │ │ │ │ ├── UADSHeaderBiddingTokenReaderBase.h │ │ │ │ ├── UADSHeaderBiddingTokenReaderBase.m │ │ │ │ ├── UADSHeaderBiddingTokenReaderBridge.h │ │ │ │ ├── UADSHeaderBiddingTokenReaderBridge.m │ │ │ │ ├── UADSHeaderBiddingTokenReaderBuilder.h │ │ │ │ ├── UADSHeaderBiddingTokenReaderBuilder.m │ │ │ │ ├── UADSHeaderBiddingTokenReaderSwiftBridge.h │ │ │ │ ├── UADSHeaderBiddingTokenReaderSwiftBridge.m │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithMetrics.h │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithMetrics.m │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSerialQueue.h │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSerialQueue.m │ │ │ │ └── UADSTokenType.h │ │ │ ├── SessionIdReader │ │ │ │ ├── UADSGameSessionIdReader.h │ │ │ │ ├── UADSGameSessionIdReader.m │ │ │ │ ├── UADSSharedSessionIdReader.h │ │ │ │ └── UADSSharedSessionIdReader.m │ │ │ ├── UADSCurrentTimestamp.h │ │ │ ├── UADSCurrentTimestampBase.h │ │ │ ├── UADSCurrentTimestampBase.m │ │ │ ├── UADSUserAgentStorage.h │ │ │ ├── UADSUserAgentStorage.m │ │ │ ├── USRVDevice.h │ │ │ ├── USRVDevice.m │ │ │ ├── USRVDeviceError.h │ │ │ ├── USRVDeviceError.m │ │ │ ├── USRVDeviceLog.h │ │ │ ├── USRVDeviceLog.m │ │ │ ├── USRVJsonStorageAggregator.h │ │ │ ├── USRVJsonStorageAggregator.m │ │ │ ├── USRVMuteSwitch.h │ │ │ ├── USRVMuteSwitch.m │ │ │ ├── USRVMuteSwitchDetectionAiff.h │ │ │ ├── USRVStorage.h │ │ │ ├── USRVStorage.m │ │ │ ├── USRVStorageError.h │ │ │ ├── USRVStorageError.m │ │ │ ├── USRVStorageManager.h │ │ │ ├── USRVStorageManager.m │ │ │ ├── USRVVolumeChange.h │ │ │ └── USRVVolumeChange.m │ │ ├── Errors │ │ │ ├── UADSErrorLogger │ │ │ │ ├── UADSInternalErrorLogger.h │ │ │ │ └── UADSWebViewErrorHandler │ │ │ │ │ ├── UADSWebViewErrorHandler.h │ │ │ │ │ └── UADSWebViewErrorHandler.m │ │ │ ├── UADSGenericError.h │ │ │ ├── UADSInternalError.h │ │ │ ├── UADSInternalError.m │ │ │ ├── USRVNativeErrorReporter.h │ │ │ └── USRVNativeErrorReporter.m │ │ ├── InitializationFlow │ │ │ ├── USRVInitialize.h │ │ │ ├── USRVInitialize.m │ │ │ ├── USRVInitializeStateCheckForCachedWebViewUpdate.h │ │ │ ├── USRVInitializeStateCheckForCachedWebViewUpdate.m │ │ │ ├── USRVInitializeStateCheckForUpdatedWebView.h │ │ │ ├── USRVInitializeStateCheckForUpdatedWebView.m │ │ │ ├── USRVInitializeStateCleanCache.h │ │ │ ├── USRVInitializeStateCleanCache.m │ │ │ ├── USRVInitializeStateComplete.h │ │ │ ├── USRVInitializeStateComplete.m │ │ │ ├── USRVInitializeStateConfig.h │ │ │ ├── USRVInitializeStateConfig.m │ │ │ ├── USRVInitializeStateCreate.h │ │ │ ├── USRVInitializeStateCreate.m │ │ │ ├── USRVInitializeStateDownloadLatestWebView.h │ │ │ ├── USRVInitializeStateDownloadLatestWebView.m │ │ │ ├── USRVInitializeStateError.h │ │ │ ├── USRVInitializeStateError.m │ │ │ ├── USRVInitializeStateForceReset.h │ │ │ ├── USRVInitializeStateForceReset.m │ │ │ ├── USRVInitializeStateInitModules.h │ │ │ ├── USRVInitializeStateInitModules.m │ │ │ ├── USRVInitializeStateLoadCache.h │ │ │ ├── USRVInitializeStateLoadCache.m │ │ │ ├── USRVInitializeStateLoadCacheConfigAndWebView.h │ │ │ ├── USRVInitializeStateLoadCacheConfigAndWebView.m │ │ │ ├── USRVInitializeStateLoadConfigFile.h │ │ │ ├── USRVInitializeStateLoadConfigFile.m │ │ │ ├── USRVInitializeStateLoadWeb.h │ │ │ ├── USRVInitializeStateLoadWeb.m │ │ │ ├── USRVInitializeStateNetworkError.h │ │ │ ├── USRVInitializeStateNetworkError.m │ │ │ ├── USRVInitializeStateReset.h │ │ │ ├── USRVInitializeStateReset.m │ │ │ ├── USRVInitializeStateRetry.h │ │ │ ├── USRVInitializeStateRetry.m │ │ │ ├── USRVInitializeStateUpdateCache.h │ │ │ ├── USRVInitializeStateUpdateCache.m │ │ │ ├── USRVInitializeStateWithMeasurement.h │ │ │ └── USRVInitializeStateWithMeasurement.m │ │ ├── Notification │ │ │ ├── USRVNotificationEvent.h │ │ │ ├── USRVNotificationEvent.m │ │ │ ├── USRVNotificationObserver.h │ │ │ └── USRVNotificationObserver.m │ │ ├── Preferences │ │ │ ├── USRVPreferences.h │ │ │ ├── USRVPreferences.m │ │ │ ├── USRVPreferencesError.h │ │ │ └── USRVPreferencesError.m │ │ ├── Properties │ │ │ ├── UADSInitializationStatusReader.h │ │ │ ├── UADSInitializationStatusReader.m │ │ │ ├── USRVClientProperties.h │ │ │ ├── USRVClientProperties.m │ │ │ ├── USRVEnvironmentProperties.h │ │ │ ├── USRVEnvironmentProperties.m │ │ │ ├── USRVMadeWithUnityDetector.h │ │ │ ├── USRVMadeWithUnityDetector.m │ │ │ ├── USRVSdkProperties.h │ │ │ └── USRVSdkProperties.m │ │ ├── Request │ │ │ ├── Metrics │ │ │ │ ├── Events │ │ │ │ │ ├── Load │ │ │ │ │ │ ├── UADSLoadMetric.h │ │ │ │ │ │ └── UADSLoadMetric.m │ │ │ │ │ ├── Privacy │ │ │ │ │ │ ├── UADSPrivacyMetrics.h │ │ │ │ │ │ └── UADSPrivacyMetrics.m │ │ │ │ │ ├── TSI │ │ │ │ │ │ ├── UADSTsiMetric.h │ │ │ │ │ │ └── UADSTsiMetric.m │ │ │ │ │ ├── UADSMetric.h │ │ │ │ │ ├── UADSMetric.m │ │ │ │ │ └── WebViewNavigation │ │ │ │ │ │ ├── UADSWebViewMetric.h │ │ │ │ │ │ └── UADSWebViewMetric.m │ │ │ │ ├── UADSMetricCommonTags.h │ │ │ │ ├── UADSMetricCommonTags.m │ │ │ │ ├── UADSMetricCommonTagsProvider.h │ │ │ │ ├── UADSMetricCommonTagsProvider.m │ │ │ │ ├── UADSMetricSender.h │ │ │ │ ├── UADSMetricSender.m │ │ │ │ ├── UADSMetricSenderWithBatch.h │ │ │ │ ├── UADSMetricSenderWithBatch.m │ │ │ │ ├── UADSMetricsContainer.h │ │ │ │ ├── UADSMetricsContainer.m │ │ │ │ ├── USRVSDKMetrics.h │ │ │ │ └── USRVSDKMetrics.m │ │ │ ├── USRVResolve.h │ │ │ ├── USRVResolve.m │ │ │ ├── USRVResolveError.h │ │ │ ├── USRVResolveError.m │ │ │ ├── USRVResolveEvent.h │ │ │ ├── USRVResolveEvent.m │ │ │ ├── USRVResolveOperation.h │ │ │ ├── USRVResolveOperation.m │ │ │ ├── USRVWebRequest.h │ │ │ ├── USRVWebRequestError.h │ │ │ ├── USRVWebRequestError.m │ │ │ ├── USRVWebRequestEvent.h │ │ │ ├── USRVWebRequestEvent.m │ │ │ ├── USRVWebRequestFactory.h │ │ │ ├── USRVWebRequestFactory.m │ │ │ ├── USRVWebRequestOperation.h │ │ │ ├── USRVWebRequestOperation.m │ │ │ ├── USRVWebRequestQueue.h │ │ │ ├── USRVWebRequestQueue.m │ │ │ ├── USRVWebRequestWithUrlConnection.h │ │ │ └── USRVWebRequestWithUrlConnection.m │ │ ├── SensorInfo │ │ │ ├── USRVSensorInfo.h │ │ │ ├── USRVSensorInfo.m │ │ │ ├── USRVSensorInfoError.h │ │ │ └── USRVSensorInfoError.m │ │ ├── TrackingManager │ │ │ ├── USRVTrackingManagerProxy.h │ │ │ └── USRVTrackingManagerProxy.m │ │ ├── UADSLogger │ │ │ ├── UADSLogRecord.h │ │ │ ├── UADSLogRecord.m │ │ │ ├── UADSLogger.h │ │ │ ├── UADSLogger.m │ │ │ ├── UADSPerformanceLogger.h │ │ │ ├── UADSPerformanceLogger.m │ │ │ ├── UADSPerformanceMeasurer.h │ │ │ └── UADSPerformanceMeasurer.m │ │ ├── UADSServiceProvider.h │ │ ├── UADSServiceProvider.m │ │ ├── UADSServiceProviderContainer.h │ │ ├── UADSServiceProviderContainer.m │ │ ├── UnityAdsCoreProxy │ │ │ ├── Initialize │ │ │ │ ├── UADSSDKInitializerProxy.h │ │ │ │ └── UADSSDKInitializerProxy.m │ │ │ ├── Network │ │ │ │ ├── UADSCommonNetworkErrorProxy.h │ │ │ │ ├── UADSCommonNetworkErrorProxy.m │ │ │ │ ├── UADSCommonNetworkProxy.h │ │ │ │ ├── UADSCommonNetworkProxy.m │ │ │ │ ├── UADSCommonNetworkResponseProxy.h │ │ │ │ └── UADSCommonNetworkResponseProxy.m │ │ │ ├── Request │ │ │ │ ├── UADSWebRequestFactorySwiftAdapter.h │ │ │ │ ├── UADSWebRequestFactorySwiftAdapter.m │ │ │ │ ├── UADSWebRequestSwiftAdapter.h │ │ │ │ ├── UADSWebRequestSwiftAdapter.m │ │ │ │ ├── UADSWebRequestSwiftAdapterWithFallback.h │ │ │ │ └── UADSWebRequestSwiftAdapterWithFallback.m │ │ │ ├── ServiceProvider │ │ │ │ ├── UADSServiceProviderProxy.h │ │ │ │ └── UADSServiceProviderProxy.m │ │ │ ├── UADSCorePresenceChecker.h │ │ │ └── UADSCorePresenceChecker.m │ │ └── WebView │ │ │ ├── Bridge │ │ │ ├── UADSWebViewEventSender │ │ │ │ ├── UADSWebViewEvent.h │ │ │ │ ├── UADSWebViewEvent.m │ │ │ │ ├── UADSWebViewEventSender.h │ │ │ │ └── UADSWebViewEventSender.m │ │ │ ├── USRVInvocation.h │ │ │ ├── USRVInvocation.m │ │ │ ├── USRVNativeCallback.h │ │ │ ├── USRVNativeCallback.m │ │ │ ├── USRVURLProtocol.h │ │ │ ├── USRVURLProtocol.m │ │ │ ├── USRVWebViewAsyncOperation │ │ │ │ ├── UADSAsyncOperationStorage │ │ │ │ │ ├── USRVWebViewAsyncOperationStorage.h │ │ │ │ │ └── USRVWebViewAsyncOperationStorage.m │ │ │ │ ├── USRVWebViewAsyncOperation.h │ │ │ │ └── USRVWebViewAsyncOperation.m │ │ │ ├── USRVWebViewBridge.h │ │ │ ├── USRVWebViewBridge.m │ │ │ ├── USRVWebViewCallback.h │ │ │ ├── USRVWebViewCallback.m │ │ │ ├── USRVWebViewMethodInvokeHandler.h │ │ │ ├── USRVWebViewMethodInvokeHandler.m │ │ │ ├── USRVWebViewMethodInvokeOperation.h │ │ │ ├── USRVWebViewMethodInvokeOperation.m │ │ │ ├── USRVWebViewMethodInvokeQueue.h │ │ │ ├── USRVWebViewMethodInvokeQueue.m │ │ │ └── WebViewInvoker │ │ │ │ ├── UADSWebViewInvoker.h │ │ │ │ ├── UADSWebViewInvoker.m │ │ │ │ └── WebViewInvokerQueueDecorator │ │ │ │ ├── WebViewInvokerQueueDecorator.h │ │ │ │ └── WebViewInvokerQueueDecorator.m │ │ │ ├── UADSWebKitLoader │ │ │ ├── UADSWebKitLoader.h │ │ │ └── UADSWebKitLoader.m │ │ │ ├── UADSWebViewNavigationDelegate.h │ │ │ ├── UADSWebViewNavigationDelegate.m │ │ │ ├── USRVWKWebViewUtilities.h │ │ │ ├── USRVWKWebViewUtilities.m │ │ │ ├── USRVWebViewApp.h │ │ │ ├── USRVWebViewApp.m │ │ │ ├── USRVWebViewBackgroundView.h │ │ │ ├── USRVWebViewBackgroundView.m │ │ │ ├── USRVWebViewEventCategory.h │ │ │ ├── USRVWebViewEventCategory.m │ │ │ └── WebViewURLBuilder │ │ │ ├── UADSWebViewURLBuilder.h │ │ │ └── UADSWebViewURLBuilder.m │ ├── GMAScar │ │ ├── GMAAdLoaders │ │ │ ├── GMAAdLoaderStrategy │ │ │ │ ├── Banner │ │ │ │ │ ├── GMABannerAdLoader.h │ │ │ │ │ └── GMABannerAdLoader.m │ │ │ │ ├── GMAAdLoaderStrategy.h │ │ │ │ ├── GMAAdLoaderStrategy.m │ │ │ │ ├── GMAAdMetaData │ │ │ │ │ ├── GMAAdMetaData.h │ │ │ │ │ └── GMAAdMetaData.m │ │ │ │ ├── Interstitial │ │ │ │ │ ├── GMAGenericAdsDelegateObject │ │ │ │ │ │ ├── GMAAdDelegateBase.h │ │ │ │ │ │ ├── GMAAdDelegateBase.m │ │ │ │ │ │ ├── GMAGenericAdsDelegateObject.h │ │ │ │ │ │ └── GMAGenericAdsDelegateObject.m │ │ │ │ │ └── GMAIntersitialAdLoader │ │ │ │ │ │ ├── GMAInterstitialAdLoaderV7.h │ │ │ │ │ │ ├── GMAInterstitialAdLoaderV7.m │ │ │ │ │ │ ├── GMAInterstitialAdLoaderV8.h │ │ │ │ │ │ └── GMAInterstitialAdLoaderV8.m │ │ │ │ └── Rewarded │ │ │ │ │ ├── GMARewardedAdLoader │ │ │ │ │ ├── GMARewardedAdLoaderV7.h │ │ │ │ │ └── GMARewardedAdLoaderV7.m │ │ │ │ │ └── GMARewardedAdLoaderV8 │ │ │ │ │ ├── GMARewardedAdLoaderV8.h │ │ │ │ │ └── GMARewardedAdLoaderV8.m │ │ │ ├── GMALoaderBase.h │ │ │ └── GMALoaderBase.m │ │ ├── GMABridges │ │ │ ├── BannerDelegateProxy │ │ │ │ ├── GMABannerViewDelegateProxy.h │ │ │ │ └── GMABannerViewDelegateProxy.m │ │ │ ├── GADAdInfoBridge.h │ │ │ ├── GADAdInfoBridge.m │ │ │ ├── GADAdSizeBridge.h │ │ │ ├── GADBannerViewBridge.h │ │ │ ├── GADBannerViewBridge.m │ │ │ ├── GADBaseAd.h │ │ │ ├── GADBaseAd.m │ │ │ ├── GADExtrasBridge.h │ │ │ ├── GADExtrasBridge.m │ │ │ ├── GADInterstitialBridge.h │ │ │ ├── GADInterstitialBridge.m │ │ │ ├── GADMobileAdsBridge.h │ │ │ ├── GADMobileAdsBridge.m │ │ │ ├── GADQueryInfoBridge.h │ │ │ ├── GADQueryInfoBridge.m │ │ │ ├── GADRequestBridge.h │ │ │ ├── GADRequestBridge.m │ │ │ ├── GADRequestBridgeV85.h │ │ │ ├── GADRequestBridgeV85.m │ │ │ ├── GADResponseInfoBridge.h │ │ │ ├── GADResponseInfoBridge.m │ │ │ ├── GADRewardedAdBridge.h │ │ │ ├── GADRewardedAdBridge.m │ │ │ ├── GMADelegatesFactory │ │ │ │ ├── GMADelegatesFactory.h │ │ │ │ └── GMADelegatesFactory.m │ │ │ ├── InterstitialDelegateProxy │ │ │ │ ├── GMAInterstitialAdDelegateProxy.h │ │ │ │ └── GMAInterstitialAdDelegateProxy.m │ │ │ └── RewardedDelegateProxy │ │ │ │ ├── GMARewardedAdDelegateProxy.h │ │ │ │ └── GMARewardedAdDelegateProxy.m │ │ ├── GMABridgesV8 │ │ │ ├── GADFullScreenContentDelegateProxy.h │ │ │ ├── GADInterstitialAdBridgeV8.h │ │ │ ├── GADInterstitialAdBridgeV8.m │ │ │ ├── GADRewardedAdBridgeV8.h │ │ │ └── GADRewardedAdBridgeV8.m │ │ ├── GMAError │ │ │ ├── GMAError.h │ │ │ └── GMAError.m │ │ ├── GMAQueryInfoReader │ │ │ ├── GMAQueryInfoReader.h │ │ │ ├── GMAQueryInfoReader.m │ │ │ ├── GMAQueryInfoRequestFactory.h │ │ │ ├── GMAQueryInfoRequestFactory.m │ │ │ ├── GMAQueryInfoRequestFactoryV85.h │ │ │ └── GMAQueryInfoRequestFactoryV85.m │ │ ├── GMAScarSignalsReader │ │ │ ├── GMASCARSignalsReader.h │ │ │ ├── GMASCARSignalsReader.m │ │ │ ├── GMASCARSignalsReaderDecorator.h │ │ │ └── GMASCARSignalsReaderDecorator.m │ │ ├── GMASignalReader │ │ │ ├── GMABaseQuerySignalReaderV85.h │ │ │ ├── GMABaseQuerySignalReaderV85.m │ │ │ ├── GMAQuerySignalReader.h │ │ │ └── GMAQuerySignalReader.m │ │ ├── GMAVersionReader │ │ │ ├── GMAVersionReaderStrategy.h │ │ │ ├── GMAVersionReaderStrategy.m │ │ │ ├── GMAVersionReaderV7 │ │ │ │ ├── GMAVersionReaderV7.h │ │ │ │ └── GMAVersionReaderV7.m │ │ │ └── GMAVersionReaderV8 │ │ │ │ ├── GMAVersionReaderV8.h │ │ │ │ └── GMAVersionReaderV8.m │ │ ├── GMAWebViewEvent │ │ │ ├── GMABannerWebViewEvent.h │ │ │ ├── GMABannerWebViewEvent.m │ │ │ ├── GMAWebViewEvent.h │ │ │ └── GMAWebViewEvent.m │ │ ├── UADSGMAScar.h │ │ ├── UADSGMAScar.m │ │ ├── UADSScarSignalParameters.h │ │ └── UADSScarSignalParameters.m │ ├── Info.plist │ ├── MuteSwitchDetection.aiff │ ├── PrefixHeader.pch │ ├── Store │ │ ├── Api │ │ │ ├── USTRApiAppSheet.h │ │ │ ├── USTRApiAppSheet.m │ │ │ ├── USTRApiProducts.h │ │ │ └── USTRApiProducts.m │ │ ├── AppSheet │ │ │ ├── USTRAppSheet.h │ │ │ ├── USTRAppSheet.m │ │ │ ├── USTRAppSheetError.h │ │ │ ├── USTRAppSheetError.m │ │ │ ├── USTRAppSheetEvent.h │ │ │ └── USTRAppSheetEvent.m │ │ ├── Configuration │ │ │ ├── USTRStoreModuleConfiguration.h │ │ │ └── USTRStoreModuleConfiguration.m │ │ ├── SKAdImpression │ │ │ ├── SKAdImpressionProxy.h │ │ │ └── SKAdImpressionProxy.m │ │ ├── SKAdNetworkFacade │ │ │ ├── SKAdNetworkFacade.h │ │ │ └── SKAdNetworkFacade.m │ │ ├── SKAdNetworkProxy │ │ │ ├── SKAdNetworkProxy.h │ │ │ └── SKAdNetworkProxy.m │ │ ├── SKOverlay │ │ │ ├── Helpers │ │ │ │ ├── SKOverlayAppConfiguration+Dictionary.h │ │ │ │ ├── SKOverlayAppConfiguration+Dictionary.m │ │ │ │ ├── UIViewController+WindowScene.h │ │ │ │ └── UIViewController+WindowScene.m │ │ │ ├── UADSApiOverlay.h │ │ │ ├── UADSApiOverlay.m │ │ │ ├── UADSOverlay.h │ │ │ ├── UADSOverlay.m │ │ │ ├── UADSOverlayDelegateProxy.h │ │ │ ├── UADSOverlayDelegateProxy.m │ │ │ ├── UADSOverlayError.h │ │ │ ├── UADSOverlayError.m │ │ │ ├── UADSOverlayEventHandler.h │ │ │ ├── UADSOverlayEventHandler.m │ │ │ ├── UADSOverlayEventProtocol.h │ │ │ ├── UADSOverlayWebViewEvent.h │ │ │ └── UADSOverlayWebViewEvent.m │ │ ├── Transactions │ │ │ ├── Categories │ │ │ │ ├── NSLocale │ │ │ │ │ └── NSLocale+PriceDictionary │ │ │ │ │ │ ├── NSLocale+PriceDictionary.h │ │ │ │ │ │ └── NSLocale+PriceDictionary.m │ │ │ │ ├── SKPayment │ │ │ │ │ └── SKPayment+Dictionary │ │ │ │ │ │ ├── SKPayment+Dictionary.h │ │ │ │ │ │ └── SKPayment+Dictionary.m │ │ │ │ ├── SKPaymentTransaction │ │ │ │ │ └── SKPaymentTransaction+Dictionary │ │ │ │ │ │ ├── SKPaymentTransaction+Dictionary.h │ │ │ │ │ │ └── SKPaymentTransaction+Dictionary.m │ │ │ │ ├── SKProductBridge │ │ │ │ │ └── SKProductBridge+Dictionary │ │ │ │ │ │ ├── SKProductBridge+Dictionary.h │ │ │ │ │ │ └── SKProductBridge+Dictionary.m │ │ │ │ ├── SKProductDiscountBridge │ │ │ │ │ └── SKProductDiscountBridge+Dictionary │ │ │ │ │ │ ├── SKProductDiscountBridge+Dictionary.h │ │ │ │ │ │ └── SKProductDiscountBridge+Dictionary.m │ │ │ │ ├── SKProductSubscriptionPeriodBridge │ │ │ │ │ └── SKProductSubscriptionPeriodBridge+Dictionary │ │ │ │ │ │ ├── SKProductSubscriptionPeriodBridge+Dictionary.h │ │ │ │ │ │ └── SKProductSubscriptionPeriodBridge+Dictionary.m │ │ │ │ └── SKRequest │ │ │ │ │ └── SKRequest+UniqueID │ │ │ │ │ ├── SKProductsRequest+UniqueID.h │ │ │ │ │ └── SKProductsRequest+UniqueID.m │ │ │ ├── StoreKitBridges │ │ │ │ ├── SKProductBridge │ │ │ │ │ ├── SKProductBridge.h │ │ │ │ │ └── SKProductBridge.m │ │ │ │ ├── SKProductDiscountBridge │ │ │ │ │ ├── SKProductDiscountBridge.h │ │ │ │ │ └── SKProductDiscountBridge.m │ │ │ │ ├── SKProductSubscriptionPeriodBridge │ │ │ │ │ ├── SKProductSubscriptionPeriodBridge.h │ │ │ │ │ └── SKProductSubscriptionPeriodBridge.m │ │ │ │ ├── UADSStoreKitReflection.h │ │ │ │ └── UADSStoreKitReflection.m │ │ │ ├── UADSSKProductReader │ │ │ │ ├── UADSProducRequestDelegateAdapter.h │ │ │ │ ├── UADSProducRequestDelegateAdapter.m │ │ │ │ ├── UADSSKProductReader.h │ │ │ │ └── UADSSKProductReader.m │ │ │ └── UADSTransactionObserver │ │ │ │ ├── UADSTransactionObserver.h │ │ │ │ └── UADSTransactionObserver.m │ │ ├── UADSAppStoreReceiptReader.h │ │ ├── UADSAppStoreReceiptReader.m │ │ ├── UADSStoreKitLoader │ │ │ ├── UADSStoreKitLoader.h │ │ │ └── UADSStoreKitLoader.m │ │ ├── USTRApiSKAdNetwork │ │ │ ├── USTRApiSKAdNetwork.h │ │ │ └── USTRApiSKAdNetwork.m │ │ ├── USTRStore.h │ │ └── USTRStore.m │ └── Tools │ │ ├── Categories │ │ ├── NSArray │ │ │ ├── NSArray+Convenience.h │ │ │ ├── NSArray+Convenience.m │ │ │ ├── NSArray+Map.h │ │ │ ├── NSArray+Map.m │ │ │ ├── NSArray+SafeOperations.h │ │ │ └── NSArray+SafeOperations.m │ │ ├── NSData │ │ │ ├── NSData+GZIP.h │ │ │ └── NSData+GZIP.m │ │ ├── NSDate │ │ │ ├── NSDate+NSNumber.h │ │ │ └── NSDate+NSNumber.m │ │ ├── NSError │ │ │ ├── NSError+RequestDictionary.h │ │ │ ├── NSError+RequestDictionary.m │ │ │ ├── NSError+UADSError.h │ │ │ └── NSError+UADSError.m │ │ ├── NSInvocation │ │ │ ├── NSEnumWrapper │ │ │ │ ├── GADAdSizeStructBox.h │ │ │ │ ├── GADAdSizeStructBox.m │ │ │ │ ├── NSPrimitivesBox.h │ │ │ │ └── NSPrimitivesBox.m │ │ │ ├── NSInvocation+Convenience.h │ │ │ └── NSInvocation+Convenience.m │ │ ├── NSMutableDictionary │ │ │ ├── NSMutableDictionary+SafeOperations │ │ │ │ ├── NSMutableDictionary+SafeOperations.h │ │ │ │ └── NSMutableDictionary+SafeOperations.m │ │ │ ├── NSMutableDictionary+SafeRemoval.h │ │ │ └── NSMutableDictionary+SafeRemoval.m │ │ ├── NSObject │ │ │ ├── NSObject+Convenience.h │ │ │ └── NSObject+Convenience.m │ │ ├── UIView │ │ │ ├── UIView+ParentViewController.h │ │ │ ├── UIView+ParentViewController.m │ │ │ ├── UIView+Subview.h │ │ │ └── UIView+Subview.m │ │ └── UIViewController │ │ │ ├── UIViewController+TopController.h │ │ │ └── UIViewController+TopController.m │ │ ├── DynamicLibLoader │ │ ├── UADSDynamicLibLoader.h │ │ └── UADSDynamicLibLoader.m │ │ ├── Errors │ │ └── UADSDefaultError │ │ │ ├── UADSDefaultError.h │ │ │ └── UADSDefaultError.m │ │ ├── GenericMediator │ │ ├── UADSGenericClosureWrapper.h │ │ ├── UADSGenericClosureWrapper.m │ │ ├── UADSGenericMediator.h │ │ └── UADSGenericMediator.m │ │ ├── Timer │ │ ├── UADSAppLifeCycleListener.m │ │ ├── UADSAppLifeCycleNotificationCenter.h │ │ ├── UADSArrayScheduledStream.h │ │ ├── UADSArrayScheduledStream.m │ │ ├── UADSTimer.h │ │ ├── UADSTimer.m │ │ ├── UADSTimerFactory.h │ │ ├── UADSTimerFactory.m │ │ ├── UADSTimerWithAppLifeCycle.h │ │ └── UADSTimerWithAppLifeCycle.m │ │ ├── UADSGenericCompletion │ │ ├── UADSGenericCompletion.h │ │ └── UADSGenericCompletion.m │ │ ├── UADSProxyReflection │ │ ├── UADSProxyReflection.h │ │ └── UADSProxyReflection.m │ │ ├── UADSTools.h │ │ ├── UADSTools.m │ │ └── WeakProxy │ │ ├── NSObject+WeakProxy.h │ │ ├── NSObject+WeakProxy.m │ │ ├── UADSWeakProxy.h │ │ └── UADSWeakProxy.m ├── Public │ ├── Ads │ │ ├── Delegates │ │ │ ├── UnityAdsInitializationDelegate.h │ │ │ ├── UnityAdsLoadDelegate.h │ │ │ └── UnityAdsShowDelegate.h │ │ ├── Enums │ │ │ ├── UnityAdsInitializationError.h │ │ │ ├── UnityAdsLoadError.h │ │ │ ├── UnityAdsShowCompletionState.h │ │ │ └── UnityAdsShowError.h │ │ ├── MetaData │ │ │ ├── UADSMediationMetaData.h │ │ │ ├── UADSMediationMetaData.m │ │ │ ├── UADSMetaData.h │ │ │ ├── UADSMetaData.m │ │ │ ├── UADSPlayerMetaData.h │ │ │ └── UADSPlayerMetaData.m │ │ └── Options │ │ │ ├── UADSBaseOptions.h │ │ │ ├── UADSBaseOptions.m │ │ │ ├── UADSDictionaryConvertible.h │ │ │ ├── UADSLoadOptions.h │ │ │ ├── UADSLoadOptions.m │ │ │ ├── UADSShowOptions.h │ │ │ └── UADSShowOptions.m │ ├── Analytic │ │ ├── Core │ │ │ └── Api │ │ │ │ ├── UANAApiAnalytics.h │ │ │ │ └── UANAApiAnalytics.m │ │ ├── UnityAnalytics.h │ │ ├── UnityAnalytics.m │ │ ├── UnityAnalyticsAcquisitionType.h │ │ └── UnityAnalyticsAcquisitionType.m │ ├── Banners │ │ ├── UADSBanner.h │ │ ├── UADSBanner.m │ │ ├── UADSBannerAdRefreshViewDelegate.h │ │ ├── UADSBannerError.h │ │ ├── UADSBannerError.m │ │ ├── UADSBannerView.h │ │ ├── UADSBannerView.m │ │ ├── UADSBannerViewDelegate.h │ │ └── UnityAdsBannerDelegate.h │ ├── Core │ │ └── InitializationFlow │ │ │ ├── UADSDeviceInfoProvider.h │ │ │ ├── USRVInitializeStateFactory.h │ │ │ ├── USRVInitializeStateFactory.m │ │ │ └── USRVInitializeStateType.h │ ├── Misc │ │ ├── USRVJsonStorage.h │ │ └── USRVJsonStorage.m │ ├── UnityAds.h │ ├── UnityAdvertisement.h │ ├── UnityAdvertisement.m │ ├── UnityServices.h │ └── UnityServices.m └── Swift │ ├── Compression │ └── DataCompressorWithMetrics.swift │ ├── DeviceInfo │ └── DeviceInfoBodyReaderBuilder.swift │ ├── Initialization │ ├── InitializationStateStorage │ │ └── SDKStateStorage.swift │ ├── Legacy │ │ ├── InitTaskState.swift │ │ ├── InitializationSequenceProvider.swift │ │ ├── InitializationTaskFactoryBase.swift │ │ └── InitializationTaskFactoryStrategy.swift │ ├── SDKInitializerBase.swift │ └── Tasks │ │ ├── ConfigFetchTask.swift │ │ ├── InitModulesTask.swift │ │ ├── LocalConfigFetchTask.swift │ │ ├── PreviousSessionCleanupTask.swift │ │ ├── PrivacyFetchTask.swift │ │ ├── StartInitTask.swift │ │ ├── TaskPerformanceDecorator.swift │ │ └── WebViewDownloadTask.swift │ ├── Network │ ├── UnityAdsEventsNetworkServicesFactory.swift │ └── UnityAdsNetworkServicesFactory.swift │ ├── ObjBridges │ ├── Configuration │ │ └── SDKConfigurationStorageObjcBridge.swift │ ├── DeviceInfo │ │ └── DeviceInfoObjBridge.swift │ ├── Initialization │ │ ├── InitializationStateTaskBridge.swift │ │ └── SDKInitializerOBJBridge.swift │ ├── JSONStorage │ │ ├── JSONStorageBridge.swift │ │ └── JSONStorageContentNormalizer.swift │ ├── NetworkLayer │ │ └── NetworkLayerObjcBridge.swift │ └── ServiceProvider │ │ └── ServiceProviderObjCBridge.swift │ ├── Settings │ └── SDKSettingsStorage.swift │ ├── Token │ ├── HeaderBiddingToken.swift │ └── HeaderBiddingTokenReader.swift │ └── UnityAdsServiceProvider.swift ├── Tests ├── .swiftlint.yml ├── Categories │ ├── UnityAds+Testability.h │ └── UnityAds+Testability.m ├── GMAIntegrationTests │ ├── CommonTests │ │ ├── GMAAdLoaderStrategy │ │ │ ├── GMAAdLoaderStrategy + SyncCategory │ │ │ │ ├── GMAAdLoaderStrategy + SyncCategory.h │ │ │ │ └── GMAAdLoaderStrategy + SyncCategory.m │ │ │ ├── GMAAdLoaderStrategyTests.h │ │ │ ├── GMAAdLoaderStrategyTests.m │ │ │ └── Mocks │ │ │ │ ├── GADRequestFactoryMock.h │ │ │ │ ├── GADRequestFactoryMock.m │ │ │ │ ├── GMADelegatesFactoryMock.h │ │ │ │ ├── GMADelegatesFactoryMock.m │ │ │ │ ├── GMAInterstitialAdDelegateMock.h │ │ │ │ ├── GMAInterstitialAdDelegateMock.m │ │ │ │ ├── GMARewardedAdDelegateMock.h │ │ │ │ └── GMARewardedAdDelegateMock.m │ │ ├── GMABridges │ │ │ └── GADMobileAdsBridgeTests.m │ │ ├── GMAQueryInfoReader │ │ │ ├── GMAQueryInfoReader+TestCategory │ │ │ │ ├── GMABaseQueryInfoReader+TestCategory.h │ │ │ │ └── GMABaseQueryInfoReader+TestCategory.m │ │ │ └── GMAQueryInfoReaderTests.m │ │ ├── GMAScar │ │ │ ├── Helpers │ │ │ │ ├── GMAQueryInfoReaderWithRequestId.h │ │ │ │ ├── GMAQueryInfoReaderWithRequestId.m │ │ │ │ ├── UADSGMAScarForTest.h │ │ │ │ └── UADSGMAScarForTest.m │ │ │ └── UADSGMAScarTests.m │ │ └── Mocks │ │ │ └── EventSenderMock │ │ │ ├── EventSenderMock.h │ │ │ └── EventSenderMock.m │ ├── GMAIntegrationTestsV7 │ │ ├── GADInterstitialBridge │ │ │ └── GADInterstitialBridgeTests.m │ │ ├── GMABridges │ │ │ ├── GADAdInfoBridgeTests.m │ │ │ └── GADRequestBridgeTest.m │ │ ├── GMAVersionReader │ │ │ └── GMAVersionReaderV7Tests.m │ │ └── Info.plist │ └── GMAIntegrationTestsV8 │ │ ├── GMAAdLoaderStrategy │ │ └── GMAAdLoaderStrategyV8Tests.m │ │ ├── GMABridges │ │ └── GADRequestBridgeTest.m │ │ ├── GMAVersionReader │ │ └── GMAVersionReaderV8Tests.m │ │ └── Info.plist ├── Mocks │ └── UADSURLProtocolStub.swift ├── UnityAdsBannerIntegrationTests │ ├── BannerTestDelegate.h │ ├── BannerTestDelegate.m │ ├── BannerTests.m │ ├── Info.plist │ ├── UnityBannerTestDelegate.h │ └── UnityBannerTestDelegate.m ├── UnityAdsHybridTests │ ├── Info.plist │ ├── UADSHybridTest.h │ ├── UADSHybridTest.m │ └── UnityAdsHybridTests.m ├── UnityAdsHybridTestsExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── UnityAdsInitializationLegacyTests │ ├── Info.plist │ └── InitializeTests.m ├── UnityAdsIntegrationTests │ ├── CacheQueueTests.m │ ├── ConfigurationTests.m │ ├── Info.plist │ ├── InitializeTests.m │ ├── TestUtilities.h │ ├── TestUtilities.m │ ├── WebRequestQueueTests.m │ └── WebRequestTests.m ├── UnityAdsPerformanceTests │ ├── Info.plist │ └── Swift │ │ └── Initialization │ │ ├── Hash │ │ └── FileHasherPerformanceTests.swift │ │ ├── InitializationPerformanceE2ETests.swift │ │ ├── InitializationPerformanceTest.swift │ │ └── InitializationTasksPerformanceE2ETests.swift ├── UnityAdsTests-Bridging-Header.h ├── UnityAdsTests │ ├── Ads │ │ ├── Mocks │ │ │ ├── UnityAdsInitializationDelegateMock.h │ │ │ └── UnityAdsInitializationDelegateMock.m │ │ ├── Options │ │ │ ├── LoadOptionsTest.m │ │ │ └── ShowOptionsTest.m │ │ └── WebPlayer │ │ │ └── UADSWebPlayerViewTests.m │ ├── Analytics │ │ ├── UnityAnalyticsAcquisitionTypeTests.m │ │ └── UnityAnalyticsTests.m │ ├── AppSheetTests.m │ ├── CacheQueueTests.m │ ├── Categories │ │ ├── NSDate │ │ │ └── NSDate_NSNumberTests.m │ │ ├── NSMutableDictionary + SafeOperations │ │ │ └── NSMutableDictionary_SafeOperationsTests.m │ │ ├── NSObjectDeepCopyTests.m │ │ └── WKWebView │ │ │ └── WKWebViewUserAgentTestCase.m │ ├── ClientPropertiesTest.m │ ├── ConfigurationTests.m │ ├── Core │ │ ├── Categories │ │ │ ├── NSDictionaryFilterTestCase.m │ │ │ └── NSDictionaryQueryStringTestCase.m │ │ ├── Configuration │ │ │ ├── Mocks │ │ │ │ ├── UADSFactoryConfigMock.h │ │ │ │ ├── UADSFactoryConfigMock.m │ │ │ │ ├── UADSPIITrackingStatusReaderMock.h │ │ │ │ └── UADSPIITrackingStatusReaderMock.m │ │ │ ├── Privacy │ │ │ │ └── UADSPrivacyStorageTestCase.m │ │ │ ├── SDKConfigurationReader │ │ │ │ ├── ConfigurationLoader │ │ │ │ │ ├── Decorators │ │ │ │ │ │ ├── UADSConfigurationLoaderWithPrivacyTestCase.m │ │ │ │ │ │ └── UADSConfigurationPersistenceTestCase.m │ │ │ │ │ ├── Mocks │ │ │ │ │ │ ├── UADSConfigurationLoaderMock.h │ │ │ │ │ │ ├── UADSConfigurationLoaderMock.m │ │ │ │ │ │ ├── UADSConfigurationPersistenceMock.h │ │ │ │ │ │ ├── UADSConfigurationPersistenceMock.m │ │ │ │ │ │ ├── UADSPrivacyLoaderMock.h │ │ │ │ │ │ ├── UADSPrivacyLoaderMock.m │ │ │ │ │ │ ├── UADSPrivacyStorageMock.h │ │ │ │ │ │ └── UADSPrivacyStorageMock.m │ │ │ │ │ ├── UADSConfigurationLoaderBaseTestCase.m │ │ │ │ │ ├── UADSConfigurationLoaderIntegrationMetricsBatchTests.h │ │ │ │ │ ├── UADSConfigurationLoaderIntegrationMetricsBatchTests.m │ │ │ │ │ ├── UADSConfigurationLoaderIntegrationPrivacyRequestTests.m │ │ │ │ │ ├── UADSConfigurationLoaderIntegrationTestsBase.h │ │ │ │ │ ├── UADSConfigurationLoaderIntegrationTestsBase.m │ │ │ │ │ ├── UADSLoaderIntegrationTestsHelper.h │ │ │ │ │ └── UADSLoaderIntegrationTestsHelper.m │ │ │ │ ├── Mocks │ │ │ │ │ ├── UADSBaseURLBuilderMock.h │ │ │ │ │ ├── UADSBaseURLBuilderMock.m │ │ │ │ │ ├── UADSDeviceReaderMock.h │ │ │ │ │ ├── UADSDeviceReaderMock.m │ │ │ │ │ ├── UADSDictionaryKeysBlockListMock.h │ │ │ │ │ ├── UADSDictionaryKeysBlockListMock.m │ │ │ │ │ ├── UADSPlistReaderMock.h │ │ │ │ │ ├── UADSPlistReaderMock.m │ │ │ │ │ ├── USRVBodyCompressorMock.h │ │ │ │ │ └── USRVBodyCompressorMock.m │ │ │ │ ├── PrivacyLoader │ │ │ │ │ └── UADSPrivacyLoaderTests.m │ │ │ │ ├── UADSBaseURLBuilderBaseTestCase │ │ │ │ │ ├── Mocks │ │ │ │ │ │ ├── UADSConfigurationEndpointProviderMock.h │ │ │ │ │ │ └── UADSConfigurationEndpointProviderMock.m │ │ │ │ │ └── UADSBaseURLBuilderBaseTestCase.m │ │ │ │ ├── UADSConfigurationEndpointProviderTestCase.m │ │ │ │ ├── UADSConfigurationExperimentsTestCase.m │ │ │ │ ├── USRVBodyBase64GzipCompressorTestCase.m │ │ │ │ └── USRVBodyURLEncodedCompressorDecoratorTestCase.m │ │ │ ├── UADSDeviceInfoExcludeFieldsProviderIntegrationTestCase.m │ │ │ ├── UADSDeviceInfoExcludeFieldsProviderTestCase.m │ │ │ ├── USRVConfigurationRequestFactoryBaseTestCase.m │ │ │ └── USRVInitializationNotificationCenterTests.m │ │ ├── Data │ │ │ └── USRVJsonUtilitiesTests.m │ │ └── Device │ │ │ ├── DeviceTestsHelper │ │ │ ├── UADSDeviceTestsHelper.h │ │ │ └── UADSDeviceTestsHelper.m │ │ │ ├── HeaderBiddingTokenReader │ │ │ ├── GMASCARHeaderBidding │ │ │ │ ├── Mocks │ │ │ │ │ ├── GMASCARSignalServiceMock.h │ │ │ │ │ ├── GMASCARSignalServiceMock.m │ │ │ │ │ ├── UADSDeviceIDFIReaderMock.h │ │ │ │ │ ├── UADSDeviceIDFIReaderMock.m │ │ │ │ │ ├── UADSJSONCompressorMock.h │ │ │ │ │ ├── UADSJSONCompressorMock.m │ │ │ │ │ ├── UADSSCARSignalReaderMock.h │ │ │ │ │ ├── UADSSCARSignalReaderMock.m │ │ │ │ │ ├── UADSSCARSignalSenderMock.h │ │ │ │ │ ├── UADSSCARSignalSenderMock.m │ │ │ │ │ ├── UADSUniqueIdGeneratorMock.h │ │ │ │ │ └── UADSUniqueIdGeneratorMock.m │ │ │ │ ├── Strategies │ │ │ │ │ ├── UADSHeaderBiddingTokenReaderWithSCARSignalsEagerStrategyTests.m │ │ │ │ │ ├── UADSSCARWebRequestSignalSenderTests.m │ │ │ │ │ ├── XCTestCase+SCARHBStrategies.h │ │ │ │ │ └── XCTestCase+SCARHBStrategies.m │ │ │ │ └── UADSSCARRawSignalsReaderTests.m │ │ │ ├── Mocks │ │ │ │ ├── UADSHeaderBiddingTokenAsyncReaderMock.h │ │ │ │ ├── UADSHeaderBiddingTokenAsyncReaderMock.m │ │ │ │ ├── UADSInitializationStatusReaderMock.h │ │ │ │ └── UADSInitializationStatusReaderMock.m │ │ │ ├── UADSAsyncTokenWithPrivacyIntegrationTests.m │ │ │ ├── UADSHeaderBiddingTokenIntegrationTestCase.m │ │ │ ├── UADSHeaderBiddingTokenReaderBridgeTestCase.h │ │ │ ├── UADSHeaderBiddingTokenReaderBridgeTestCase.m │ │ │ ├── UADSHeaderBiddingTokenReaderDecoratorTestCase.m │ │ │ └── UADSHeaderBiddingTokenReaderSwiftBridgeTestCase.m │ │ │ ├── Mocks │ │ │ ├── UADSDeviceInfoStorageKeysProviderMock.h │ │ │ ├── UADSDeviceInfoStorageKeysProviderMock.m │ │ │ ├── UADSPIIDataProviderMock.h │ │ │ ├── UADSPIIDataProviderMock.m │ │ │ ├── UADSRetryInfoReaderMock.h │ │ │ └── UADSRetryInfoReaderMock.m │ │ │ ├── UADSDeviceIDFIReaderBase │ │ │ └── UADSDeviceIDFIReaderBaseTestCase.m │ │ │ ├── UADSDeviceInfoReaderExtendedIntegrationTestsCase.m │ │ │ ├── UADSDeviceInfoReaderIntegrationTestsCaseBase.h │ │ │ ├── UADSDeviceInfoReaderIntegrationTestsCaseBase.m │ │ │ ├── UADSDeviceInfoReaderIntegrationTestsLegacy.m │ │ │ ├── UADSDeviceInfoReaderMinIntegrationTestsCase.m │ │ │ ├── UADSDeviceInfoReaderWithFilterTestCase.m │ │ │ ├── UADSDeviceInfoReaderWithStorageInfoTestCase.m │ │ │ ├── UADSGameSessionIdReaderBaseTestsCase.m │ │ │ └── UADSUserAgentStorageTestCase.m │ ├── DeviceNetworkingGetterPerformanceTests.m │ ├── DeviceTests.m │ ├── GMAInfo │ │ ├── DelegateProxyTests │ │ │ ├── GMABannerViewDelegateProxy │ │ │ │ └── GMABannerViewDelegateProxyTests.m │ │ │ ├── GMABaseAdDelegateProxyTests.h │ │ │ ├── GMABaseAdDelegateProxyTests.m │ │ │ ├── GMAInterstitialAdDelegateProxy │ │ │ │ └── GMAInterstitialAdDelegateProxyTests.m │ │ │ └── GMARewardedAdDelegateProxy │ │ │ │ └── GMARewardedAdDelegateProxyTests.m │ │ ├── GMAAdMetaData │ │ │ └── GMAAdMetaDataTests.m │ │ ├── GMAError │ │ │ └── GMAErrorTests.m │ │ ├── GMASCARSignalsReaderDecorator │ │ │ ├── GMASCARSignalsReaderDecoratorTests.m │ │ │ └── Mocks │ │ │ │ ├── GMASCARSignalsReaderMock.h │ │ │ │ └── GMASCARSignalsReaderMock.m │ │ ├── GMAScarSignalsReaderTests │ │ │ ├── GMAScarSignalsReaderTests.m │ │ │ └── Mocks │ │ │ │ ├── GMASignalServiceMock.h │ │ │ │ └── GMASignalServiceMock.m │ │ ├── GMASignalReaderTests │ │ │ ├── GMASignalReaderTests.m │ │ │ └── Mocks │ │ │ │ ├── GMAQueryInfoReaderMock.h │ │ │ │ └── GMAQueryInfoReaderMock.m │ │ └── UADSGMAScarNoGMATests │ │ │ ├── UADSGMAScarNoGMATests.m │ │ │ └── UADSNoGMAApiTests.m │ ├── Info.plist │ ├── InvocationTests.m │ ├── MetaDataTests.m │ ├── Metrics │ │ ├── UADSInitializeEventsMetricSenderTestCase.m │ │ ├── UADSMetricSenderTestCase.m │ │ └── UADSMetricSenderWithBatchTestCase.m │ ├── Misc │ │ └── JSONStorage │ │ │ ├── Mocks │ │ │ ├── UADSJsonStorageReaderMock.h │ │ │ └── UADSJsonStorageReaderMock.m │ │ │ └── USRVJsonStorageAggregatorTestCase.m │ ├── Mocks │ │ ├── SDKMetricsSenderMock.h │ │ ├── SDKMetricsSenderMock.m │ │ ├── UADSConfigurationReaderMock.h │ │ ├── UADSConfigurationReaderMock.m │ │ ├── UADSCurrentTimestampMock.h │ │ ├── UADSCurrentTimestampMock.m │ │ ├── UADSLoggerMock.h │ │ ├── UADSLoggerMock.m │ │ ├── UADSRepeatableTimerMock.h │ │ ├── UADSRepeatableTimerMock.m │ │ ├── UADSTimerFactoryMock.h │ │ ├── UADSTimerFactoryMock.m │ │ ├── USRVConfigurationRequestFactoryMock.h │ │ ├── USRVConfigurationRequestFactoryMock.m │ │ ├── WebRequestFactoryMock.h │ │ ├── WebRequestFactoryMock.m │ │ ├── WebRequestMock.h │ │ └── WebRequestMock.m │ ├── MuteSwitchTests.m │ ├── NSDictionaryMergeTests.m │ ├── NSStringHashTests.m │ ├── NotificationTests.m │ ├── PreferencesTests.m │ ├── ResolveTests.m │ ├── SdkPropertiesTest.m │ ├── SensorInfoTests.m │ ├── StorageGeneralTests.m │ ├── Swift │ │ ├── DeviceInfoBodyReader │ │ │ ├── DeviceInfoBodyReaderIntegrationTestsCaseBase.swift │ │ │ ├── ExtendedDeviceInfoBodyReaderIntegrationTestsCaseBase.swift │ │ │ └── MinDeviceInfoBodyReaderIntegrationTestsCase.swift │ │ ├── Initialization │ │ │ ├── IntegrationTests │ │ │ │ ├── LegacyFlow │ │ │ │ │ └── SDKInitializerLegacyIntegrationTests.swift │ │ │ │ ├── ObjCBridges │ │ │ │ │ ├── JSONStorageContentNormalizerTests.swift │ │ │ │ │ └── SDKObjCBridgesTests.swift │ │ │ │ ├── Parallel │ │ │ │ │ └── SDKInitializerParallelFlowIntegrationTests.swift │ │ │ │ └── SequentialFlow │ │ │ │ │ └── SDKInitializerSequentialFlowIntegrationTests.swift │ │ │ ├── Legacy │ │ │ │ └── InitializationTaskSequenceLegacyTests.swift │ │ │ └── Tasks │ │ │ │ ├── InitModulesTaskTests.swift │ │ │ │ ├── Mocks │ │ │ │ └── LegacyTaskMock.swift │ │ │ │ ├── PreviousSessionCleanupTaskTests.swift │ │ │ │ └── StartInitTaskTests.swift │ │ ├── Network │ │ │ └── UnityAdsNetworkLayerTestCase.swift │ │ ├── TestTools │ │ │ ├── Extensions │ │ │ │ ├── InputStream.Data.swift │ │ │ │ ├── UADSMetrics.DiagnosticMetric.swift │ │ │ │ └── URLRequest.Test.Tools.swift │ │ │ ├── IntegrationTests │ │ │ │ ├── SDKInitializerBaseStateLegacyMap.swift │ │ │ │ ├── SDKInitializerLegacyIntegrationTestsBase.swift │ │ │ │ └── SDKNetworkTestsHelper.swift │ │ │ ├── MetricValidator │ │ │ │ ├── MetricTypes │ │ │ │ │ ├── SDKMetricType.swift │ │ │ │ │ └── SDKMetricTypeLegacy.swift │ │ │ │ └── SDKMetricsValidator.swift │ │ │ ├── Mocks │ │ │ │ ├── ExperimentsReaderMock.swift │ │ │ │ ├── Factories │ │ │ │ │ ├── InitTaskFactoryMock.swift │ │ │ │ │ ├── SDKConfigFactoryMock.swift │ │ │ │ │ └── USRVInitializeStateFactoryMock.swift │ │ │ │ ├── Metrcis │ │ │ │ │ └── ExpectedMetrics.swift │ │ │ │ ├── Network │ │ │ │ │ ├── Legacy │ │ │ │ │ │ ├── MockWebRequest.swift │ │ │ │ │ │ ├── UnityAdsDelegateWrapper.swift │ │ │ │ │ │ ├── UnityAdsInitializeWrapper.swift │ │ │ │ │ │ └── WebRequestFactoryMock.swift │ │ │ │ │ ├── MockedResponseObject.swift │ │ │ │ │ ├── NetworkRequestFactoryMock.swift │ │ │ │ │ ├── Responses │ │ │ │ │ │ ├── ConfigResponseMock.json │ │ │ │ │ │ └── JSONResources.swift │ │ │ │ │ ├── URLConvertibleMockFactory.swift │ │ │ │ │ ├── URLProtocolMainNetworkStub.swift │ │ │ │ │ ├── URLProtocolMetricsNetworkStub.swift │ │ │ │ │ ├── URLProtocolResponseStub.swift │ │ │ │ │ └── URLProtocolStubBase.swift │ │ │ │ ├── Storage │ │ │ │ │ └── KeyValueStorageMock.swift │ │ │ │ ├── Tasks │ │ │ │ │ ├── TaskMock.swift │ │ │ │ │ └── USRVInitializeWebViewCreateTask.swift │ │ │ │ └── TimeReaderMock.swift │ │ │ └── Network │ │ │ │ └── NetworkTestCaseBase.swift │ │ └── Token │ │ │ └── HeaderBiddingTokenReaderTestsCase.swift │ ├── TestUtilities.h │ ├── TestUtilities.m │ ├── TokenStorageTests.m │ ├── Tools │ │ ├── Mediator │ │ │ └── UADSGenericMediatorTestCase.m │ │ └── Timer │ │ │ ├── UADSAppLifeCycleListenerBaseTests.m │ │ │ ├── UADSArrayScheduledStreamTests.m │ │ │ ├── UADSTimerTests.m │ │ │ └── UADSTimerWithAppLifeCycleTests.m │ ├── UADSConfigurationReaderBaseTestCase.m │ ├── UADSOverlay │ │ ├── SKOverlayAppConfigurationDictionaryTests.m │ │ ├── UADSOverlayEventHandlerMock.h │ │ ├── UADSOverlayEventHandlerMock.m │ │ ├── UADSOverlayEventHandlerTests.m │ │ └── UADSOverlayTests.m │ ├── UADSTools │ │ ├── Categories │ │ │ ├── NSArray │ │ │ │ ├── NSArray+Sort.h │ │ │ │ ├── NSArray+Sort.m │ │ │ │ └── NSArrayConvenienceTestCase.m │ │ │ ├── NSError │ │ │ │ └── NSError+UADSError.m │ │ │ ├── NSInvocation │ │ │ │ ├── Mocks │ │ │ │ │ ├── NSInvocationTargetMock.h │ │ │ │ │ └── NSInvocationTargetMock.m │ │ │ │ └── NSInvocationTests.m │ │ │ └── USRVConfiguration │ │ │ │ ├── USRVConfiguration+TestConvenience.h │ │ │ │ └── USRVConfiguration+TestConvenience.m │ │ ├── DynamicLibLoader │ │ │ └── DynamicLibLoaderTests.m │ │ ├── UADSCurrentTimestampTests.m │ │ ├── UADSProxyReflection │ │ │ ├── Mocks │ │ │ │ ├── UADSBridgeMock.h │ │ │ │ ├── UADSBridgeMock.m │ │ │ │ ├── UADSNullInitializedMock.h │ │ │ │ ├── UADSNullInitializedMock.m │ │ │ │ ├── UADSProxyReflectionMock.h │ │ │ │ └── UADSProxyReflectionMock.m │ │ │ └── UADSProxyReflectionTests.m │ │ └── UADSToolsTestCase.m │ ├── UADSWeakProxyTests │ │ └── UADSWeakProxyTests.m │ ├── UADTestsTools │ │ ├── Categories │ │ │ ├── NSData+JSONSerialization.h │ │ │ ├── NSData+JSONSerialization.m │ │ │ ├── UADSHeaderBiddingToken+Compressed.h │ │ │ └── UADSHeaderBiddingToken+Compressed.m │ │ ├── GMAError+XCTest │ │ │ ├── GMAError+XCTest.h │ │ │ └── GMAError+XCTest.m │ │ ├── GMAIntegrationTestsConstants.h │ │ ├── GMATestCommonConstants.h │ │ ├── GMATestsHelper │ │ │ ├── GMATestsHelper.h │ │ │ ├── GMATestsHelper.m │ │ │ ├── USRVWebViewCallbackMock.h │ │ │ └── USRVWebViewCallbackMock.m │ │ ├── Mocks │ │ │ ├── USRVWebViewAppMock.h │ │ │ └── USRVWebViewAppMock.m │ │ ├── NSDate+Mock.h │ │ ├── NSDate+Mock.m │ │ ├── UADSGMAScar+Sync │ │ │ ├── UADSGMAScar+SyncGetter.h │ │ │ └── UADSGMAScar+SyncGetter.m │ │ ├── XCTestAssert+Fail.h │ │ ├── XCTestCase+Convenience.h │ │ └── XCTestCase+Convenience.m │ ├── USRVNativeCallbackTests.m │ ├── UnitTestsPrefixHeader.pch │ ├── UnityAdsCoreProxy │ │ ├── UADSWebRequestSwiftAdapterTests.swift │ │ └── UADSWebRequestSwiftAdapterWithFallbackTests.m │ ├── UnityServices │ │ ├── Ads │ │ │ ├── Load │ │ │ │ ├── UADSAbstractModule │ │ │ │ │ ├── Mocks │ │ │ │ │ │ ├── UADSAbstractTestModule │ │ │ │ │ │ │ ├── UADSAbstractTestModule.h │ │ │ │ │ │ │ └── UADSAbstractTestModule.m │ │ │ │ │ │ ├── UADSEventHandlerMock │ │ │ │ │ │ │ ├── UADSEventHandlerMock.h │ │ │ │ │ │ │ └── UADSEventHandlerMock.m │ │ │ │ │ │ └── UADSShowDelegateMock │ │ │ │ │ │ │ ├── UADSAbstractModuleDelegateMock.h │ │ │ │ │ │ │ └── UADSAbstractModuleDelegateMock.m │ │ │ │ │ └── UADSAbstractModuleTests.m │ │ │ │ ├── UADSBannerLoadModule │ │ │ │ │ ├── Mocks │ │ │ │ │ │ ├── UADSBannerViewDelegateMock.h │ │ │ │ │ │ └── UADSBannerViewDelegateMock.m │ │ │ │ │ ├── UADSBannerLoadModuleIntegrationTests.m │ │ │ │ │ └── UADSBannerLoadModuleTests.m │ │ │ │ ├── UADSEventHandler │ │ │ │ │ └── UADSEventHandlerTests.m │ │ │ │ ├── UADSLoadModule │ │ │ │ │ ├── Mocks │ │ │ │ │ │ ├── UnityAdsLoadDelegateMock.h │ │ │ │ │ │ └── UnityAdsLoadDelegateMock.m │ │ │ │ │ ├── UADSLoadModuleIntegrationTests.m │ │ │ │ │ └── UADSLoadModuleTests.m │ │ │ │ └── UADSShowModule │ │ │ │ │ ├── Mocks │ │ │ │ │ ├── UIViewControllerMock.h │ │ │ │ │ ├── UIViewControllerMock.m │ │ │ │ │ ├── UnityAdsShowDelegateMock.h │ │ │ │ │ └── UnityAdsShowDelegateMock.m │ │ │ │ │ ├── UADSModuleOptionsStructureTests.m │ │ │ │ │ ├── UADSShowModuleIntegrationTests.m │ │ │ │ │ └── UADSShowModuleTests.m │ │ │ └── WebPlayer │ │ │ │ ├── UADSWebPlayerSettingsManagerTests.m │ │ │ │ └── UADSWebPlayerViewManagerTests.m │ │ ├── Banners │ │ │ ├── BannerTestDelegate.h │ │ │ └── BannerTestDelegate.m │ │ ├── Core │ │ │ └── WebView │ │ │ │ ├── Bridge │ │ │ │ └── WebViewInvoker │ │ │ │ │ └── WebViewInvokerQueueDecorator │ │ │ │ │ ├── Mocks │ │ │ │ │ ├── UADSWebViewInvokerMock.h │ │ │ │ │ └── UADSWebViewInvokerMock.m │ │ │ │ │ └── WebViewInvokerQueueDecoratorTests.m │ │ │ │ ├── USRVWebViewAsyncOperation │ │ │ │ └── USRVWebViewAsyncOperationTests.m │ │ │ │ └── WebViewURLBuilder │ │ │ │ └── UADSWebViewURLBuilderTestCase.m │ │ └── Store │ │ │ ├── SKAdImpression │ │ │ └── SKAdImpressionReflectionTests.m │ │ │ └── Transactions │ │ │ └── StoreKitBridges │ │ │ ├── Mocks │ │ │ ├── NSLocale+CustomInit.h │ │ │ ├── NSLocale+CustomInit.m │ │ │ ├── SKProduct+CustomInit.h │ │ │ ├── SKProduct+CustomInit.m │ │ │ ├── SKProductDiscount+CustomInit.h │ │ │ ├── SKProductDiscount+CustomInit.m │ │ │ ├── SKProductSubscriptionPeriod+CustomInit.h │ │ │ └── SKProductSubscriptionPeriod+CustomInit.m │ │ │ └── SKProductBridgeTests.m │ ├── VideoPlayerTests.m │ ├── ViewControllerTest.m │ ├── VolumeChangeTests.m │ ├── WebAppTests.m │ ├── WebExposedApi │ │ ├── Mocks │ │ │ ├── UADSEventSenderMock.h │ │ │ └── UADSEventSenderMock.m │ │ └── NativeToken_WebExposedTestCase.m │ ├── WebPlayerTests.m │ ├── WebRequestTests.m │ └── WebViewMethodInvokeHandlerTests.m └── UnityAdsUITests │ ├── Info.plist │ ├── LoadShowTests.swift │ └── Tools │ ├── Extensions │ ├── XCUIApplication+Extension.swift │ └── XCUIElementQuery+Extension.swift │ └── XCUITestCase.swift └── UnityAds.podspec /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.3.1 -------------------------------------------------------------------------------- /Example/UnityAdsExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AppDelegate : UIResponder 4 | 5 | @property (strong, nonatomic) UIWindow *window; 6 | 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "unityads_maxbg.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/background.imageset/unityads_maxbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/background.imageset/unityads_maxbg.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "unityads_logo.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/UnityAdsExample/Assets.xcassets/logo.imageset/unityads_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/Example/UnityAdsExample/Assets.xcassets/logo.imageset/unityads_logo.png -------------------------------------------------------------------------------- /Example/UnityAdsExample/SwiftFilePlaceholder.swift: -------------------------------------------------------------------------------- 1 | import UnityAds 2 | 3 | final class Test { 4 | init() { 5 | UnityAds.initialize("") 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Example/UnityAdsExample/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | @import UnityAds; 3 | 4 | @interface ViewController : UIViewController 5 | 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Example/UnityAdsExample/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "AppDelegate.h" 3 | 4 | int main(int argc, char *argv[]) { 5 | @autoreleasepool { 6 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Unity Advertisements copyright © 2023 Unity Technologies. 2 | This software is subject to, and made available under, the terms of service for Operate Solutions (see https://unity3d.com/legal/one-operate-services-terms-of-service), and is an "Operate Service" as defined therein. 3 | 4 | Your use of the Services constitutes your acceptance of such terms. Unless expressly provided otherwise, the software under this license is made available strictly on an "AS IS" BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the terms of service for details on these and other terms and conditions. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity Ads iOS Release Repository 2 | 3 | Welcome to the Unity Ads iOS SDK Repository. 4 | 5 | ## Binaries 6 | 7 | Binaries can be found in the [releases tab](https://github.com/Unity-Technologies/unity-ads-ios/releases). 8 | 9 | ## Integration Guide 10 | 11 | Integration guide can be found [here](https://unityads.unity3d.com/help/ios/integration-guide-ios). 12 | 13 | ## API Reference 14 | 15 | API Reference can be found [here](https://unityads.unity3d.com/help/ios/api-ios) 16 | 17 | ## License 18 | The license can be viewed [here](LICENSE) -------------------------------------------------------------------------------- /SourceCode/Private/AR/Api/UARApiAR.h: -------------------------------------------------------------------------------- 1 | @interface UARApiAR : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /SourceCode/Private/AR/Configuration/UADSARModuleConfiguration.h: -------------------------------------------------------------------------------- 1 | #import "UADSAdsModuleConfiguration.h" 2 | 3 | @interface UADSARModuleConfiguration : UADSAdsModuleConfiguration 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/AR/UADSAREvent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityAdsAREvent) { 4 | kUnityAdsARPlanesAdded, 5 | kUnityAdsARPlanesRemoved, 6 | kUnityAdsARPlanesUpdated, 7 | kUnityAdsARAnchorsUpdated, 8 | kUnityAdsARFrameUpdated, 9 | kUnityAdsARWindowResized, 10 | kUnityAdsARError, 11 | kUnityAdsARSessionInterrupted, 12 | kUnityAdsARSessionInterruptionEnded, 13 | }; 14 | 15 | NSString * UADSNSStringFromAREvent(UnityAdsAREvent); 16 | -------------------------------------------------------------------------------- /SourceCode/Private/AR/UADSARViewHandler.h: -------------------------------------------------------------------------------- 1 | #import "UADSAdUnitViewHandler.h" 2 | #import "UADSARView.h" 3 | 4 | @interface UADSARViewHandler : UADSAdUnitViewHandler 5 | @property (nonatomic, strong) UADSARView *arView; 6 | @end 7 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/AdUnit/UADSAdUnitError.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityAdsAdUnitError) { 4 | kUnityAdsAdUnitNull, 5 | kUnityAdsAdUnitNoRotationZ, 6 | kUnityAdsAdUnitUnknownView, 7 | kUnityAdsAdUnitHostViewControllerNull, 8 | kUnityAdsAdUnitApiLevelError 9 | }; 10 | 11 | NSString * UADSNSStringFromAdUnitError(UnityAdsAdUnitError); 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/AdUnit/UADSAdUnitEvent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityAdsAdUnitEvent) { 4 | kUnityAdsViewControllerInit, 5 | kUnityAdsViewControllerDidLoad, 6 | kUnityAdsViewControllerDidAppear, 7 | kUnityAdsViewControllerWillDisappear, 8 | kUnityAdsViewControllerDidDisappear, 9 | kUnityAdsViewControllerDidReceiveMemoryWarning 10 | }; 11 | 12 | NSString * UADSNSStringFromAdUnitEvent(UnityAdsAdUnitEvent); 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/AdUnit/UADSVideoPlayerHandler.h: -------------------------------------------------------------------------------- 1 | #import "UADSAdUnitViewHandler.h" 2 | #import "UADSAVPlayer.h" 3 | #import "UADSVideoView.h" 4 | 5 | @interface UADSVideoPlayerHandler : UADSAdUnitViewHandler 6 | 7 | @property (nonatomic, strong) UADSAVPlayer *videoPlayer; 8 | @property (nonatomic, strong) UADSVideoView *videoView; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/AdUnit/UADSWebPlayerHandler.h: -------------------------------------------------------------------------------- 1 | #import "UADSAdUnitViewHandler.h" 2 | #import "UADSWebPlayerView.h" 3 | 4 | extern NSString *const UADSWebPlayerViewId; 5 | 6 | @interface UADSWebPlayerHandler : UADSAdUnitViewHandler 7 | @property (nonatomic, strong) UADSWebPlayerView *webPlayerView; 8 | @end 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/AdUnit/UADSWebViewHandler.h: -------------------------------------------------------------------------------- 1 | #import "UADSAdUnitViewHandler.h" 2 | 3 | @interface UADSWebViewHandler : UADSAdUnitViewHandler 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/AdUnit/UADSWebViewShowOperation.h: -------------------------------------------------------------------------------- 1 | #import "USRVWebViewMethodInvokeOperation.h" 2 | #import "USRVConfiguration.h" 3 | 4 | @interface UADSWebViewShowOperation : USRVWebViewMethodInvokeOperation 5 | 6 | - (instancetype)initWithPlacementId: (NSString *)placementId parametersDictionary: (NSDictionary *)parametersDictioanry; 7 | + (void)setConfiguration: (USRVConfiguration *)config; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Api/UADSApiAdUnit.h: -------------------------------------------------------------------------------- 1 | #import "UADSViewController.h" 2 | 3 | @interface UADSApiAdUnit : NSObject 4 | 5 | + (UADSViewController *)getAdUnit; 6 | 7 | + (void) setAdUnit: (UADSViewController *)viewController; 8 | 9 | @end -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Api/UADSApiAdsProperties.h: -------------------------------------------------------------------------------- 1 | @interface UADSApiAdsProperties : NSObject 2 | 3 | @end 4 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Api/UADSApiGMAScar/UADSApiGMAScar.h: -------------------------------------------------------------------------------- 1 | @interface UADSApiGMAScar : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Api/UADSApiLoad.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface UADSApiLoad : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Api/UADSApiShow.h: -------------------------------------------------------------------------------- 1 | NS_ASSUME_NONNULL_BEGIN 2 | 3 | @interface UADSApiShow : NSObject 4 | 5 | @end 6 | 7 | NS_ASSUME_NONNULL_END 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Api/UADSApiToken.h: -------------------------------------------------------------------------------- 1 | #import "USRVWebViewCallback.h" 2 | @interface UADSApiToken : NSObject 3 | + (void)WebViewExposed_getNativeGeneratedToken: (USRVWebViewCallback *)callback; 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Api/UADSApiVideoPlayer.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface UADSApiVideoPlayer : NSObject 4 | @end -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Api/UADSApiWebPlayer.h: -------------------------------------------------------------------------------- 1 | 2 | @interface UADSApiWebPlayer : NSObject 3 | @end 4 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Configuration/UADSAdsModuleConfiguration.h: -------------------------------------------------------------------------------- 1 | #import "USRVModuleConfiguration.h" 2 | 3 | @interface UADSAdsModuleConfiguration : USRVModuleConfiguration 4 | - (NSDictionary *)getAdUnitViewHandlers; 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Load/UADSAbstractModule/UADSAbstractModuleDelegate.h: -------------------------------------------------------------------------------- 1 | #import "UADSInternalError.h" 2 | #ifndef UADSAbstractModuleDelegate_h 3 | #define UADSAbstractModuleDelegate_h 4 | 5 | @protocol UADSAbstractModuleDelegate 6 | @property (nonatomic, readonly) NSString *_Nonnull uuidString; 7 | - (void)didFailWithError: (UADSInternalError *_Nonnull)error 8 | forPlacementID: (NSString *__nonnull)placementID; 9 | @end 10 | #endif /* UADSShowInternalDelegate_h */ 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Load/UADSBannerLoadModule/UADSBannerLoadModuleDelegateWrapper.h: -------------------------------------------------------------------------------- 1 | #import "UADSAbstractModuleDelegate.h" 2 | #import "UADSBannerViewDelegate.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSBannerLoadModuleDelegateWrapper : NSObject 7 | + (instancetype)newWithAdsDelegate: (id)decorated bannerView:(UADSBannerView *)bannerView; 8 | 9 | @property (nonatomic, weak, readonly) UADSBannerView *bannerView; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Load/UADSBannerLoadModule/UADSBannerLoadModuleOperationObject.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSAbstractModuleOperationBasicObject.h" 3 | #import "UADSBannerView.h" 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | static NSString *const kUADSBannerWidth = @"width"; 7 | static NSString *const kUADSBannerHeight = @"height"; 8 | 9 | @interface UADSBannerLoadModuleOperationObject : UADSAbstractModuleOperationBasicObject 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Load/UADSBannerLoadModule/UADSBannerLoadOptions.h: -------------------------------------------------------------------------------- 1 | #import "UADSLoadOptions.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSBannerLoadOptions : UADSLoadOptions 7 | @property (nonatomic, assign) CGSize size; 8 | 9 | +(instancetype)newBannerLoadOptionsWith:(UADSLoadOptions *)loadOptions size:(CGSize)size; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Load/UADSLoadModule/UADSLoadModuleDelegateWrapper.h: -------------------------------------------------------------------------------- 1 | #import "UnityAdsLoadDelegate.h" 2 | #import "UADSAbstractModuleDelegate.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSLoadModuleDelegateWrapper : NSObject 6 | + (instancetype)newWithAdsDelegate: (id)decorated; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Load/UADSLoadModule/UADSLoadModuleOperationObject/UADSLoadModuleOperationObject.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSAbstractModuleOperationBasicObject.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSLoadModuleOperationObject : UADSAbstractModuleOperationBasicObject 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Load/UADSLoadModule/UADSLoadModuleOperationObject/UADSLoadModuleOperationObject.m: -------------------------------------------------------------------------------- 1 | #import "UADSLoadModuleOperationObject.h" 2 | 3 | @implementation UADSLoadModuleOperationObject 4 | - (NSString *)methodName { 5 | return @"load"; 6 | } 7 | 8 | - (nonnull NSString *)className { 9 | return kWebViewClassName; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Load/UADSLoadModule/UADSShowModuleState/UADSShowModuleOperation.h: -------------------------------------------------------------------------------- 1 | #import "UADSAbstractModuleOperationBasicObject.h" 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | @interface UADSShowModuleOperation : UADSAbstractModuleOperationBasicObject 5 | @end 6 | 7 | NS_ASSUME_NONNULL_END 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Load/UADSShowModule/UADSShowDelegateWrapper/UADShowDelegateWrapper.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UnityAdsShowDelegate.h" 3 | #import "UADSAbstractModuleDelegate.h" 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | 7 | 8 | @interface UADShowDelegateWrapper : NSObject 9 | + (instancetype)newWithOriginalDelegate: (nullable id)delegate; 10 | - (void)unityAdsDidShowConsent: (NSString *)placementId; // 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Token/UADSTokenStorageEvent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityAdsTokenStorageEvent) { 4 | kUnityAdsTokenStorageQueueEmpty, 5 | kUnityAdsTokenStorageAccessToken 6 | }; 7 | 8 | NSString * UADSNSStringFromTokenStorageEvent(UnityAdsTokenStorageEvent); 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Token/UADSTokenStorageEvent.m: -------------------------------------------------------------------------------- 1 | #import "UADSTokenStorageEvent.h" 2 | 3 | static NSString *unityAdTokenStorageEventQueueEmpty = @"QUEUE_EMPTY"; 4 | static NSString *unityAdTokenStorageEventTokenAccess = @"TOKEN_ACCESS"; 5 | 6 | NSString * UADSNSStringFromTokenStorageEvent(UnityAdsTokenStorageEvent event) { 7 | switch (event) { 8 | case kUnityAdsTokenStorageQueueEmpty: 9 | return unityAdTokenStorageEventQueueEmpty; 10 | 11 | case kUnityAdsTokenStorageAccessToken: 12 | return unityAdTokenStorageEventTokenAccess; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Token/UADSTokenStorageEventHandler.h: -------------------------------------------------------------------------------- 1 | #import "UADSTokenStorageEventProtocol.h" 2 | 3 | @interface UADSTokenStorageEventHandler : NSObject 4 | 5 | - (void)sendQueueEmpty; 6 | - (void)sendTokenAccess: (NSNumber *)index; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Token/UADSTokenStorageEventProtocol.h: -------------------------------------------------------------------------------- 1 | @protocol UADSTokenStorageEventProtocol 2 | 3 | - (void)sendQueueEmpty; 4 | - (void)sendTokenAccessIndex: (NSNumber *)index; 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Video/UADSAVPlayer.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface UADSAVPlayer : AVPlayer 5 | 6 | @property (nonatomic, strong) NSString *url; 7 | @property (nonatomic, assign) int progressInterval; 8 | @property (nonatomic, assign) BOOL isPlaying; 9 | 10 | - (void)setProgressEventInterval: (int)progressEventInterval; 11 | - (void)prepare: (NSString *)url initialVolume: (float)volume timeout: (NSInteger)timeout; 12 | - (void)stop; 13 | - (void)stopObserving; 14 | - (void)seekTo: (long)msec; 15 | - (long)getCurrentPosition; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/Video/UADSVideoView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface UADSVideoView : UIView 5 | 6 | @property (nonatomic) AVPlayer *player; 7 | 8 | + (Class)layerClass; 9 | - (void) setPlayer: (AVPlayer *)player; 10 | - (void)setVideoFillMode: (NSString *)fillMode; 11 | - (AVPlayer *)player; 12 | - (CGRect) getPlayerRect; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/WebPlayer/UADSWebPlayerBridge.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface UADSWebPlayerBridge : NSObject 5 | 6 | + (void)sendFrameUpdate: (NSString *)viewId frame: (CGRect)frame alpha: (CGFloat)alpha; 7 | 8 | + (void)sendGetFrameResponse: (NSString *)callId viewId: (NSString *)viewId frame: (CGRect)frame alpha: (CGFloat)alpha; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/WebPlayer/UADSWebPlayerError.h: -------------------------------------------------------------------------------- 1 | typedef NS_ENUM (NSInteger, UnityAdsWebPlayerError) { 2 | kUnityAdsWebPlayerNull, 3 | }; 4 | 5 | NSString * UADSNSStringFromWebPlayerError(UnityAdsWebPlayerError); 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/WebPlayer/UADSWebPlayerError.m: -------------------------------------------------------------------------------- 1 | #import "UADSWebPlayerError.h" 2 | 3 | static NSString *unityAdsWebPlayerNull = @"WEBPLAYER_NULL"; 4 | 5 | NSString * UADSNSStringFromWebPlayerError(UnityAdsWebPlayerError error) { 6 | switch (error) { 7 | case kUnityAdsWebPlayerNull: 8 | return unityAdsWebPlayerNull; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/WebPlayer/UADSWebPlayerEvent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityAdsWebPlayerEvent) { 4 | kUnityAdsWebPlayerPageStarted, 5 | kUnityAdsWebPlayerPageFinished, 6 | kUnityAdsWebPlayerError, 7 | kUnityAdsWebPlayerEvent, 8 | kUnityAdsWebPlayerShouldOverrideURLLoading, 9 | kUnityAdsWebPlayerCreateWebView, 10 | kUnityAdsWebPlayerFrameUpdate, 11 | kUnityAdsWebPlayerGetFrameResponse 12 | }; 13 | 14 | NSString * UADSNSStringFromWebPlayerEvent(UnityAdsWebPlayerEvent); 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Ads/WebPlayer/UADSWebPlayerViewManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSWebPlayerView.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSWebPlayerViewManager : NSObject 7 | 8 | + (instancetype)sharedInstance; 9 | 10 | - (void) addWebPlayerView: (UADSWebPlayerView *)webPlayerView viewId: (NSString *)viewId; 11 | 12 | - (void)removeWebPlayerViewWithViewId: (NSString *)viewId; 13 | 14 | - (UADSWebPlayerView *_Nullable)getWebPlayerViewWithViewId: (NSString *)viewId; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /SourceCode/Private/Analytics/Core/Api/UANAWebViewEventCategory.h: -------------------------------------------------------------------------------- 1 | typedef NS_ENUM (NSInteger, UANAWebViewEventCategory) { 2 | kWebViewEventCategoryAnalytics 3 | }; 4 | 5 | NSString * NSStringFromUANAWebViewEventCategory(UANAWebViewEventCategory); 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Analytics/Core/Api/UANAWebViewEventCategory.m: -------------------------------------------------------------------------------- 1 | #import "UANAWebViewEventCategory.h" 2 | 3 | NSString * NSStringFromUANAWebViewEventCategory(UANAWebViewEventCategory category) { 4 | switch (category) { 5 | case kWebViewEventCategoryAnalytics: 6 | return @"ANALYTICS"; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Analytics/Core/Configuration/UANAAnalyticsModuleConfiguration.h: -------------------------------------------------------------------------------- 1 | #import "USRVModuleConfiguration.h" 2 | 3 | @interface UANAAnalyticsModuleConfiguration : USRVModuleConfiguration 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Analytics/Core/Configuration/UANAAnalyticsModuleConfiguration.m: -------------------------------------------------------------------------------- 1 | #import "UANAAnalyticsModuleConfiguration.h" 2 | 3 | @implementation UANAAnalyticsModuleConfiguration 4 | 5 | - (NSArray *)getWebAppApiClassList { 6 | return @[ 7 | @"UANAApiAnalytics" 8 | ]; 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Analytics/Core/Webview/UANAWebViewAnalyticsEvent.h: -------------------------------------------------------------------------------- 1 | typedef NS_ENUM (NSInteger, UANAWebViewAnalyticsEvent) { 2 | kWebViewAnalyticsEventPost 3 | }; 4 | 5 | NSString * NSStringFromUANAWebViewAnalyticsEvent(UANAWebViewAnalyticsEvent); 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Analytics/Core/Webview/UANAWebViewAnalyticsEvent.m: -------------------------------------------------------------------------------- 1 | #import "UANAWebViewAnalyticsEvent.h" 2 | 3 | NSString * NSStringFromUANAWebViewAnalyticsEvent(UANAWebViewAnalyticsEvent event) { 4 | switch (event) { 5 | case kWebViewAnalyticsEventPost: 6 | return @"POSTEVENT"; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Banners/Api/UADSApiBanner.h: -------------------------------------------------------------------------------- 1 | @interface UADSApiBanner : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /SourceCode/Private/Banners/Api/UADSApiBannerListener.h: -------------------------------------------------------------------------------- 1 | @interface UADSApiBannerListener : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /SourceCode/Private/Banners/Configuration/UADSBannerModuleConfiguration.h: -------------------------------------------------------------------------------- 1 | #import "USRVModuleConfiguration.h" 2 | 3 | @interface UADSBannerModuleConfiguration : USRVModuleConfiguration 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Banners/Properties/UADSBannerRefreshInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSBannerRefreshInfo : NSObject 6 | 7 | + (instancetype)sharedInstance; 8 | 9 | - (void) setRefreshRateForPlacementId: (NSString *)placementId refreshRate: (NSNumber *)refreshRate; 10 | 11 | - (NSNumber *__nullable)getRefreshRateForPlacementId: (NSString *)placementId; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Banners/Properties/UADSBannerWebPlayerContainerType.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UADSBannerWebPlayerContainerType) { 4 | UADSBannerWebPlayerContainerTypeWebPlayer, 5 | UADSBannerWebPlayerContainerTypeUnknown 6 | }; 7 | 8 | UADSBannerWebPlayerContainerType UADSBannerWebPlayerContainerTypeFromNSString(NSString *bannerWebPlayerContainerTypeString); 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Banners/UADSBannerView+UADSBannerWebPlayerContainerDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSBannerView.h" 3 | #import "UADSBannerWebPlayerContainer.h" 4 | 5 | @interface UADSBannerView (UADSBannerWebPlayerContainerDelegate) 6 | 7 | - (void)setBannerWebPlayerContainer: (UADSBannerWebPlayerContainer *)bannerWebPlayerContainer; 8 | - (UADSBannerWebPlayerContainer *)getBannerWebPlayerContainer; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Banners/UADSBannerWrapperView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSBannerAdRefreshView.h" 3 | #import "UADSBanner.h" 4 | 5 | @interface UADSBannerWrapperView : UIView 6 | 7 | @property (nonatomic, strong, readonly) UADSBannerAdRefreshView *bannerAdRefreshView; 8 | 9 | - (instancetype)initWithBannerAdRefreshView: (UADSBannerAdRefreshView *)bannerAdRefreshView bannerPosition: (UnityAdsBannerPosition)bannerPosition; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiClassDetection.h: -------------------------------------------------------------------------------- 1 | @interface USRVApiClassDetection : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiClassDetection.m: -------------------------------------------------------------------------------- 1 | #import "USRVApiClassDetection.h" 2 | #import "USRVWebViewApp.h" 3 | #import "USRVMadeWithUnityDetector.h" 4 | 5 | @implementation USRVApiClassDetection 6 | 7 | + (void)WebViewExposed_isMadeWithUnity: (USRVWebViewCallback *)callback { 8 | [callback invoke: [NSNumber numberWithBool: [USRVMadeWithUnityDetector isMadeWithUnity]], nil]; 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiConnectivity.h: -------------------------------------------------------------------------------- 1 | 2 | @interface USRVApiConnectivity : NSObject 3 | 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiConnectivity.m: -------------------------------------------------------------------------------- 1 | #import "USRVApiConnectivity.h" 2 | #import "USRVConnectivityMonitor.h" 3 | #import "USRVWebViewCallback.h" 4 | 5 | @implementation USRVApiConnectivity 6 | 7 | + (void)WebViewExposed_setConnectionMonitoring: (NSNumber *)monitoring callback: (USRVWebViewCallback *)callback { 8 | [USRVConnectivityMonitor setConnectionMonitoring: [monitoring boolValue]]; 9 | [callback invoke: nil]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiDeviceInfo.h: -------------------------------------------------------------------------------- 1 | #import "USRVVolumeChange.h" 2 | 3 | @interface USRVApiDeviceInfo : NSObject 4 | @end 5 | 6 | @interface USRVVolumeChangeListener : NSObject 7 | @end 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiMainBundle.h: -------------------------------------------------------------------------------- 1 | @interface USRVApiMainBundle : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiNotification.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVApiNotification : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiPermissions.h: -------------------------------------------------------------------------------- 1 | @interface USRVApiPermissions : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiPreferences.h: -------------------------------------------------------------------------------- 1 | #import "USRVWebViewCallback.h" 2 | 3 | @interface USRVApiPreferences : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiRequest.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVApiRequest : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiResolve.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVApiResolve : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiSdk.h: -------------------------------------------------------------------------------- 1 | #import "USRVWebViewCallback.h" 2 | @interface USRVApiSdk : NSObject 3 | 4 | typedef NS_ENUM (NSInteger, USRVDownloadLatestWebViewStatus) { 5 | kDownloadLatestWebViewStatusInitQueueNull, 6 | kDownloadLatestWebViewStatusInitQueueNotEmpty, 7 | kDownloadLatestWebViewStatusMissingLatestConfig, 8 | kDownloadLatestWebViewStatusBackgroundDownloadStarted 9 | }; 10 | + (void)WebViewExposed_getTrrData: (nonnull USRVWebViewCallback *)callback; 11 | @end 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiSensorInfo.h: -------------------------------------------------------------------------------- 1 | 2 | @interface USRVApiSensorInfo : NSObject 3 | 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiStorage.h: -------------------------------------------------------------------------------- 1 | #import "USRVWebViewCallback.h" 2 | 3 | @interface USRVApiStorage : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiTrackingManager.h: -------------------------------------------------------------------------------- 1 | @interface USRVApiTrackingManager : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiUrlScheme.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVApiUrlScheme : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Api/USRVApiUrlScheme.m: -------------------------------------------------------------------------------- 1 | #import "USRVApiUrlScheme.h" 2 | #import "USRVWebViewCallback.h" 3 | #import 4 | 5 | @implementation USRVApiUrlScheme 6 | 7 | + (void)WebViewExposed_open: (NSString *)url callback: (USRVWebViewCallback *)callback { 8 | [USRVApiUrlScheme openUrlScheme: url]; 9 | [callback invoke: nil]; 10 | } 11 | 12 | + (void)openUrlScheme: (NSString *)url { 13 | [[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Cache/USRVCacheEvent.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesCacheEvent) { 4 | kUnityServicesDownloadStarted, 5 | kUnityServicesDownloadStopped, 6 | kUnityServicesDownloadEnd, 7 | kUnityServicesDownloadProgress, 8 | kUnityServicesDownloadError 9 | }; 10 | 11 | NSString * USRVNSStringFromCacheEvent(UnityServicesCacheEvent); 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Cache/USRVCacheQueue.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVCacheQueue : NSObject 4 | 5 | + (void)start; 6 | + (BOOL)download: (NSString *)source target: (NSString *)target headers: (NSDictionary *)headers append: (BOOL)append; 7 | + (void)cancelAllDownloads; 8 | + (void)setProgressInterval: (int)interval; 9 | + (int) getProgressInterval; 10 | + (void)setConnectTimeout: (int)timeout; 11 | + (int) getConnectTimeout; 12 | + (BOOL)hasOperations; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Categories/NSBundle+TypecastGet.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol UADSPlistReader 6 | 7 | - (NSString *)uads_getStringValueForKey: (NSString *)key; 8 | 9 | @end 10 | 11 | @interface NSBundle (TypecastGet) 12 | - (NSString *)uads_getStringValueForKey: (NSString *)key; 13 | + (NSString *)uads_getBuiltSDKVersion; 14 | + (NSString *)uads_getFromMainBundleValueForKey: (NSString *)key; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Categories/NSDictionary/NSDictionary+Filter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface NSDictionary<__covariant KeyType, __covariant ObjectType> (Filter) 6 | 7 | - (NSDictionary *)uads_filter: (BOOL(NS_NOESCAPE ^)(KeyType key, ObjectType obj))block; 8 | - (NSDictionary *)uads_mapKeys: (KeyType(NS_NOESCAPE ^)(KeyType key))block; 9 | - (NSDictionary *)uads_mapValues: (ObjectType(NS_NOESCAPE ^)(KeyType key, ObjectType obj))block; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Categories/NSDictionary/NSDictionary+Headers.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface NSDictionary (Headers) 6 | + (NSDictionary *)uads_getHeadersMap: (NSArray *)headers; 7 | + (NSArray *> *)uads_getHeadersArray: (NSDictionary *)headersMap; 8 | + (NSDictionary *)uads_getRequestHeaders: (NSDictionary *)headers; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Categories/NSDictionary/NSDictionary+JSONString.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface NSDictionary (JSONString) 6 | - (NSString *) uads_jsonEncodedString; 7 | - (NSData *_Nullable)uads_jsonData; 8 | - (NSString *) uads_queryString; 9 | - (BOOL) uads_isEmpty; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Categories/NSObject+DeepCopy.h: -------------------------------------------------------------------------------- 1 | @interface NSObject (DeepCopy) 2 | 3 | - (instancetype)uads_deepCopy; 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Categories/NSObject+DeepCopy.m: -------------------------------------------------------------------------------- 1 | @implementation NSObject (DeepCopy) 2 | 3 | - (instancetype)uads_deepCopy { 4 | return [NSKeyedUnarchiver unarchiveObjectWithData: [NSKeyedArchiver archivedDataWithRootObject: self]]; 5 | } 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Categories/NSString+Hash.h: -------------------------------------------------------------------------------- 1 | @interface NSString (Hash) 2 | 3 | - (NSString *)uads_sha256; 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Categories/WKWebView+UserAgent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface WKWebView (UserAgent) 6 | + (NSString *)uads_getUserAgentSync; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/ConfigurationStorage/Decorators/UADSConfigurationSaverWithTokenStorage.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVConfiguration.h" 3 | #import "UADSHeaderBiddingTokenReaderBuilder.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | 8 | @interface UADSConfigurationSaverWithTokenStorage : NSObject 9 | + (instancetype)newWithTokenCRUD: (id)crud 10 | andOriginal: (id)original; 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/SDKConfigurationReader/ConfigurationLoader/Decorators/UADSConfigurationLoaderWithPersistence.h: -------------------------------------------------------------------------------- 1 | #import "UADSConfigurationLoader.h" 2 | #import 3 | #import "UADSConfigurationSaverWithTokenStorage.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | 8 | @interface UADSConfigurationLoaderWithPersistence : NSObject 9 | 10 | + (instancetype)newWithOriginal: (id)loader andSaver: (id)saver; 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/SDKConfigurationReader/UADSConfigurationExperimentValue.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSConfigurationExperimentValue : NSObject 6 | + (instancetype)newWithKey: (NSString *)key json: (id)value; 7 | 8 | @property (nonatomic, assign) BOOL enabled; 9 | @property (nonatomic, assign) BOOL nextSession; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/SDKConfigurationReader/UADSConfigurationMetricTagsReader.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol UADSConfigurationMetricTagsReader 4 | - (NSDictionary *)metricTags; 5 | - (NSDictionary *)metricContainerConfigurationInfo; 6 | @end 7 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/SDKConfigurationReader/USRVBodyBase64GzipCompressor.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | #import "USRVDataGzipCompressor.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @protocol USRVStringCompressor 8 | 9 | - (NSString *)compressedIntoString: (NSDictionary *)dictionary; 10 | 11 | @end 12 | 13 | @interface USRVBodyBase64GzipCompressor : NSObject 14 | + (instancetype)newWithDataCompressor: (id)compressor; 15 | @end 16 | 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/SDKConfigurationReader/USRVBodyJSONCompressor.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVBodyBase64GzipCompressor.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVBodyJSONCompressor : NSObject 7 | 8 | + (id)defaultURLEncoded; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/SDKConfigurationReader/USRVBodyURLEncodedCompressorDecorator.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVBodyBase64GzipCompressor.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVBodyURLEncodedCompressorDecorator : NSObject 7 | + (instancetype)decorateOriginal: (id)original; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/SDKConfigurationReader/USRVConfigurationRequestFactoryWithLogs.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVInitializationRequestFactory.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface USRVConfigurationRequestFactoryWithLogs : NSObject 6 | + (instancetype)newWithOriginal: (id)original; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/SDKConfigurationReader/USRVDataGzipCompressor.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @protocol USRVDataCompressor 7 | 8 | - (NSData *)compressedIntoData: (NSDictionary *)dictionary; 9 | 10 | @end 11 | 12 | @interface USRVDataGzipCompressor : NSObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/SDKConfigurationReader/USRVDataGzipCompressor.m: -------------------------------------------------------------------------------- 1 | #import "USRVDataGzipCompressor.h" 2 | #import "NSData+GZIP.h" 3 | #import "NSDictionary+JSONString.h" 4 | 5 | @implementation USRVDataGzipCompressor 6 | 7 | - (NSData *)compressedIntoData: (NSDictionary *)dictionary { 8 | return dictionary.uads_jsonData.uads_gzippedData; 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/USRVConfigurationStorage.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class USRVModuleConfiguration; 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface USRVConfigurationStorage : NSObject 8 | 9 | + (instancetype) sharedInstance; 10 | - (USRVModuleConfiguration *)getModuleConfiguration: (NSString *)moduleName; 11 | - (NSArray *) getWebAppApiClassList; 12 | - (NSArray *) getModuleConfigurationList; 13 | 14 | @end 15 | 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/USRVCoreModuleConfiguration.h: -------------------------------------------------------------------------------- 1 | #import "USRVModuleConfiguration.h" 2 | 3 | @interface USRVCoreModuleConfiguration : USRVModuleConfiguration 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/USRVInitializationDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol USRVInitializationDelegate 4 | 5 | - (void)sdkDidInitialize; 6 | 7 | - (void)sdkInitializeFailed: (NSError *)error; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Configuration/USRVModuleConfiguration.h: -------------------------------------------------------------------------------- 1 | #import "USRVConfiguration.h" 2 | #import "UADSErrorState.h" 3 | 4 | @interface USRVModuleConfiguration : NSObject 5 | 6 | - (NSArray *)getWebAppApiClassList; 7 | - (BOOL) resetState: (USRVConfiguration *)configuration; 8 | - (BOOL)initModuleState: (USRVConfiguration *)configuration; 9 | - (BOOL)initErrorState: (USRVConfiguration *)configuration code: (UADSErrorState)stateCode message: (NSString *)message; 10 | - (BOOL)initCompleteState: (USRVConfiguration *)configuration; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Connectivity/USRVConnectivityDelegate.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @protocol USRVConnectivityDelegate 4 | - (void)connected; 5 | - (void)disconnected; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Connectivity/USRVConnectivityMonitor.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | #import 6 | #import "USRVConnectivityDelegate.h" 7 | 8 | @interface USRVConnectivityMonitor : NSObject 9 | 10 | + (void)setConnectionMonitoring: (BOOL)status; 11 | 12 | + (void)startListening: (id)connectivityDelegate; 13 | 14 | + (void)stopListening: (id)connectivitydelegate; 15 | 16 | + (void)stopAll; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Data/USRVJsonUtilities.h: -------------------------------------------------------------------------------- 1 | NS_ASSUME_NONNULL_BEGIN 2 | 3 | extern NSString *const USRVJsonUtilitiesErrorDomain; 4 | 5 | typedef NS_ENUM (NSInteger, USRVJsonUtilitiesErrorCode) { 6 | USRVJsonUtilitiesErrorCodeInvalidJson, 7 | USRVJsonUtilitiesErrorCodeExceptionCaught, 8 | USRVJsonUtilitiesErrorCodeErrorCaught 9 | }; 10 | 11 | @interface USRVJsonUtilities : NSObject 12 | 13 | + (NSData *)dataWithJSONObject: (id)obj options: (NSJSONWritingOptions)opt error: (NSError *_Nullable *)error; 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/DeviceInfoReader/Decorators/UADSDeviceInfoReaderGate.h: -------------------------------------------------------------------------------- 1 | #import "UADSDeviceInfoReader.h" 2 | #import "UADSPIIDataProvider.h" 3 | #import "UADSPrivacyStorage.h" 4 | #import "UADSPIITrackingStatusReader.h" 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | @interface UADSDeviceInfoReaderGate : NSObject 9 | + (instancetype)decorateOriginal: (id)original 10 | withPrivacyReader: (id)privacyReader; 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/DeviceInfoReader/Decorators/UADSDeviceInfoReaderWithFilter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSDeviceInfoReader.h" 3 | #import "UADSDeviceInfoExcludeFieldsProvider.h" 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSDeviceInfoReaderWithFilter : NSObject 7 | 8 | + (id)newWithOriginal: (id)original 9 | andBlockList: (id)blockListReader; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/DeviceInfoReader/Decorators/UADSDeviceInfoReaderWithPII/UADSPIIDataProvider.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | 6 | @protocol UADSPIIDataProvider 7 | 8 | - (NSString *)advertisingTrackingID; 9 | - (NSString *)vendorID; 10 | 11 | @end 12 | 13 | @interface UADSPIIDataProviderBase : NSObject 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/DeviceInfoReader/Decorators/UADSDeviceInfoReaderWithPII/UADSPIIDataProvider.m: -------------------------------------------------------------------------------- 1 | #import "UADSPIIDataProvider.h" 2 | #import "USRVDevice.h" 3 | 4 | @implementation UADSPIIDataProviderBase 5 | 6 | - (nonnull NSString *)advertisingTrackingID { 7 | return [USRVDevice getAdvertisingTrackingId]; 8 | } 9 | 10 | - (nonnull NSString *)vendorID { 11 | return [USRVDevice getVendorIdentifier]; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/DeviceInfoReader/Decorators/UADSDeviceInfoReaderWithSessionId.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSDeviceInfoReader.h" 3 | #import "UADSSharedSessionIdReader.h" 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSDeviceInfoReaderWithSessionId : NSObject 7 | 8 | + (id)newWithOriginal: (id)original 9 | andSessionIdReader: (id)sessionIdReader; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/DeviceInfoReader/Decorators/UADSDeviceInfoStorageKeysProvider/UADSDeviceInfoStorageKeysProvider.h: -------------------------------------------------------------------------------- 1 | #import 2 | #ifndef UADSDeviceInfoStorageKeysProvider_h 3 | #define UADSDeviceInfoStorageKeysProvider_h 4 | 5 | @protocol UADSDeviceInfoStorageKeysProvider 6 | - (NSArray< NSString *> *)topLevelKeysToInclude; 7 | - (NSArray< NSString *> *)keysToReduce; 8 | - (NSArray< NSString *> *)keysToExclude; 9 | @end 10 | 11 | #endif /* UADSDeviceInfoStorageKeysProvider_h */ 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/DeviceInfoReader/Decorators/UADSDeviceInfoStorageKeysProvider/UADSDeviceInfoStorageKeysProviderExtended.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSDeviceInfoStorageKeysProviderMinimal.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSDeviceInfoStorageKeysProviderExtended : UADSDeviceInfoStorageKeysProviderMinimal 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/DeviceInfoReader/Decorators/UADSDeviceInfoStorageKeysProvider/UADSDeviceInfoStorageKeysProviderMinimal.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSDeviceInfoStorageKeysProvider.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSDeviceInfoStorageKeysProviderMinimal : NSObject 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/DeviceInfoReader/UADSDeviceInfoReaderOptimizer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSDeviceInfoReaderOptimizer : NSObject 6 | - (void)startOptimization; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/ScarHeaderBidding/UADSHeaderBiddingTokenReaderSCARSignalsConfig.m: -------------------------------------------------------------------------------- 1 | #import "UADSHeaderBiddingTokenReaderSCARSignalsConfig.h" 2 | 3 | @implementation UADSHeaderBiddingTokenReaderSCARSignalsConfig 4 | 5 | -(instancetype) init { 6 | SUPER_INIT; 7 | self.idfiReader = [UADSDeviceIDFIReaderBase new]; 8 | self.timestampReader = [UADSCurrentTimestampBase new]; 9 | 10 | return self; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/ScarHeaderBidding/UADSSCARHBConfigurationReader.h: -------------------------------------------------------------------------------- 1 | #ifndef UADSSCARHBConfigurationReader_h 2 | #define UADSSCARHBConfigurationReader_h 3 | 4 | @protocol UADSSCARHBConfigurationReader 5 | - (NSString *)getCurrentScarHBURL; 6 | @end 7 | 8 | #endif /* UADSSCARHBConfigurationReader_h */ 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/ScarHeaderBidding/UADSSCARRawSignalsReader.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSSCARSignalReader.h" 3 | 4 | #import "UADSHeaderBiddingTokenReaderSCARSignalsConfig.h" 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | @interface UADSSCARRawSignalsReader : NSObject 9 | 10 | @property (nonatomic, weak) UADSHeaderBiddingTokenReaderSCARSignalsConfig* config; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/ScarHeaderBidding/UADSSCARSignalReader.h: -------------------------------------------------------------------------------- 1 | #ifndef UADSSCARSignalReader_h 2 | #define UADSSCARSignalReader_h 3 | 4 | #import "UADSHeaderBiddingTokenReaderSCARSignalsConfig.h" 5 | 6 | @protocol UADSSCARSignalReader 7 | 8 | - (void) requestSCARSignalsWithIsAsync:(BOOL)isAsync completion: (_Nullable UADSSuccessCompletion) completion; 9 | 10 | @end 11 | 12 | #endif /* UADSSCARSignalReader_h */ 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/ScarHeaderBidding/UADSSCARSignalSender.h: -------------------------------------------------------------------------------- 1 | #ifndef UADSSCARSignalSender_h 2 | #define UADSSCARSignalSender_h 3 | 4 | #import "UADSHeaderBiddingTokenReaderSCARSignalsConfig.h" 5 | 6 | @protocol UADSSCARSignalSender 7 | 8 | - (void)sendSCARSignalsWithUUIDString:(NSString* _Nonnull)uuidString signals:(UADSSCARSignals * _Nonnull) signals isAsync:(BOOL)isAsync; 9 | 10 | @end 11 | 12 | #endif /* UADSSCARSignalSender_h */ 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/ScarHeaderBidding/UADSSCARWebRequestSignalSender.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSSCARSignalSender.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSSCARWebRequestSignalSender : NSObject 7 | 8 | @property (nonatomic, weak) UADSHeaderBiddingTokenReaderSCARSignalsConfig* config; 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/ScarHeaderBidding/UADSUUIDStringGenerator.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSUniqueIdGenerator.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSUUIDStringGenerator : NSObject 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/ScarHeaderBidding/UADSUUIDStringGenerator.m: -------------------------------------------------------------------------------- 1 | #import "UADSUUIDStringGenerator.h" 2 | 3 | @implementation UADSUUIDStringGenerator 4 | 5 | - (NSString*)generateId { 6 | return [NSUUID new].UUIDString; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/ScarHeaderBidding/UADSUniqueIdGenerator.h: -------------------------------------------------------------------------------- 1 | #ifndef UADSUniqueIdGenerator_h 2 | #define UADSUniqueIdGenerator_h 3 | 4 | #import 5 | 6 | @protocol UADSUniqueIdGenerator 7 | 8 | - (NSString*)generateId; 9 | 10 | @end 11 | 12 | #endif /* UADSUniqueIdGenerator_h */ 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/UADSHeaderBiddingTokenReaderSwiftBridge.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSHeaderBiddingTokenReaderBase.h" 3 | #import "UADSServiceProviderContainer.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface UADSHeaderBiddingTokenReaderSwiftBridge : NSObject 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/UADSHeaderBiddingTokenReaderSwiftBridge.m: -------------------------------------------------------------------------------- 1 | #import "UADSHeaderBiddingTokenReaderSwiftBridge.h" 2 | 3 | @implementation UADSHeaderBiddingTokenReaderSwiftBridge 4 | 5 | - (void)getToken:(nonnull UADSHeaderBiddingTokenCompletion)completion { 6 | [[UADSServiceProviderContainer.sharedInstance.serviceProvider objBridge] getToken:^(NSDictionary * _Nonnull tokenDict) { 7 | completion([UADSHeaderBiddingToken newWithDictionary:tokenDict]); 8 | }]; 9 | } 10 | 11 | @end 12 | 13 | 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/HeaderBiddingTokenReader/UADSTokenType.h: -------------------------------------------------------------------------------- 1 | #ifndef UADSTokenType_h 2 | #define UADSTokenType_h 3 | 4 | typedef NS_ENUM (NSInteger, UADSTokenType) { 5 | kUADSTokenNative, 6 | kUADSTokenRemote 7 | }; 8 | 9 | #endif /* UADSTokenType_h */ 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/SessionIdReader/UADSGameSessionIdReader.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol UADSGameSessionIdReader 6 | 7 | - (NSNumber *)gameSessionId; 8 | 9 | @end 10 | 11 | @interface UADSGameSessionIdReaderBase : NSObject 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/SessionIdReader/UADSGameSessionIdReader.m: -------------------------------------------------------------------------------- 1 | #import "UADSGameSessionIdReader.h" 2 | #import "UADSServiceProviderContainer.h" 3 | 4 | @interface UADSGameSessionIdReaderBase () 5 | @end 6 | 7 | @implementation UADSGameSessionIdReaderBase 8 | 9 | - (nonnull NSNumber *)gameSessionId { 10 | UADSServiceProvider *provider = UADSServiceProviderContainer.sharedInstance.serviceProvider; 11 | return [NSNumber numberWithLongLong: [[provider.objBridge gameSessionId] longLongValue]]; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/SessionIdReader/UADSSharedSessionIdReader.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol UADSSharedSessionIdReader 6 | 7 | - (NSString *)sessionId; 8 | 9 | @end 10 | 11 | @interface UADSSharedSessionIdReaderBase : NSObject 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/SessionIdReader/UADSSharedSessionIdReader.m: -------------------------------------------------------------------------------- 1 | #import "UADSSharedSessionIdReader.h" 2 | #import "UADSServiceProviderContainer.h" 3 | 4 | @implementation UADSSharedSessionIdReaderBase 5 | 6 | - (nonnull NSString *)sessionId { 7 | UADSServiceProvider *provider = UADSServiceProviderContainer.sharedInstance.serviceProvider; 8 | return [provider.objBridge sessionId]; 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/UADSCurrentTimestamp.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol UADSCurrentTimestamp 4 | - (CFTimeInterval)currentTimestamp; 5 | - (NSTimeInterval)epochSeconds; 6 | - (NSNumber *) msDurationFrom: (CFTimeInterval)time; 7 | @end 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/UADSCurrentTimestampBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSCurrentTimestamp.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSCurrentTimestampBase : NSObject 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/UADSCurrentTimestampBase.m: -------------------------------------------------------------------------------- 1 | #import "UADSCurrentTimestampBase.h" 2 | #import "UIKit/UIKit.h" 3 | 4 | @implementation UADSCurrentTimestampBase 5 | 6 | - (CFTimeInterval)currentTimestamp { 7 | return CACurrentMediaTime(); 8 | } 9 | 10 | - (NSNumber *)msDurationFrom: (CFTimeInterval)time { 11 | CFTimeInterval duration = self.currentTimestamp - time; 12 | 13 | return [NSNumber numberWithInt: round(duration * 1000)]; 14 | } 15 | 16 | - (NSTimeInterval)epochSeconds { 17 | return [[NSDate date] timeIntervalSince1970]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/UADSUserAgentStorage.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | extern NSString *const kUADSLastKnownSystemVersionKey; 6 | extern NSString *const kUADSLastKnownUserAgent; 7 | 8 | @interface UADSUserAgentStorage : NSObject 9 | - (NSString *)userAgent; 10 | - (void) generateAndSaveIfNeed; 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/USRVDeviceError.h: -------------------------------------------------------------------------------- 1 | typedef NS_ENUM (NSInteger, UnityServicesDeviceError) { 2 | kUnityServicesCouldntGetSensorInfo, 3 | kUnityServicesCouldntGetProcessInfo 4 | }; 5 | 6 | NSString * USRVNSStringFromDeviceError(UnityServicesDeviceError); 7 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/USRVDeviceError.m: -------------------------------------------------------------------------------- 1 | #import "USRVDeviceError.h" 2 | 3 | static NSString *couldntGetSensorInfo = @"COULDNT_GET_SENSOR_INFO"; 4 | static NSString *couldntGetProcessInfo = @"COULDNT_GET_PROCESS_INFO"; 5 | 6 | 7 | NSString * USRVNSStringFromDeviceError(UnityServicesDeviceError error) { 8 | switch (error) { 9 | case kUnityServicesCouldntGetSensorInfo: 10 | return couldntGetSensorInfo; 11 | 12 | case kUnityServicesCouldntGetProcessInfo: 13 | return couldntGetProcessInfo; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/USRVDeviceLog.m: -------------------------------------------------------------------------------- 1 | #import "USRVDeviceLog.h" 2 | 3 | @implementation USRVDeviceLog 4 | 5 | static UnityServicesLogLevel _logLevel = -1; 6 | 7 | + (void)setLogLevel: (UnityServicesLogLevel)logLevel { 8 | _logLevel = logLevel; 9 | } 10 | 11 | + (UnityServicesLogLevel)getLogLevel { 12 | return _logLevel; 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/USRVJsonStorageAggregator.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVJsonStorageAggregator : NSObject 7 | + (instancetype)defaultAggregator; 8 | 9 | + (instancetype)newWithReaders: (NSArray > *)readers; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/USRVMuteSwitch.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | @interface USRVMuteSwitch : NSObject 5 | 6 | + (USRVMuteSwitch *)sharedInstance; 7 | 8 | - (NSString *) getMuteDetectionFilePath; 9 | 10 | - (bool) writeToMuteDetectionPath: (NSString *)filePath; 11 | 12 | - (void) detectMuteSwitch; 13 | 14 | - (void) playbackComplete; 15 | 16 | - (void)sendMuteState: (bool)muteState; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/USRVStorageError.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesStorageError) { 4 | kUnityServicesCouldntSetValue, 5 | kUnityServicesCouldntGetValue, 6 | kUnityServicesCouldntWriteStorageToCache, 7 | kUnityServicesCouldntClearStorage, 8 | kUnityServicesCouldntGetStorage, 9 | kUnityServicesCouldntDeleteValue 10 | }; 11 | 12 | NSString * USRVNSStringFromStorageError(UnityServicesStorageError); 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/USRVStorageManager.h: -------------------------------------------------------------------------------- 1 | #import "USRVStorage.h" 2 | 3 | @interface USRVStorageManager : NSObject 4 | 5 | + (instancetype) sharedInstance; 6 | + (USRVStorage *)getStorage: (UnityServicesStorageType)storageType; 7 | 8 | - (void)commit: (NSDictionary *)storageContents; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Device/USRVVolumeChange.h: -------------------------------------------------------------------------------- 1 | @protocol USRVVolumeChangeDelegate 2 | 3 | - (void)onVolumeChanged: (float)volume; 4 | 5 | @end 6 | 7 | @interface USRVVolumeChange : NSObject 8 | 9 | + (void)startObserving; 10 | + (void)stopObserving; 11 | + (void)registerDelegate: (id)delegate; 12 | + (void)unregisterDelegate: (id)delegate; 13 | + (void)clearAllDelegates; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Errors/UADSErrorLogger/UADSInternalErrorLogger.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSInternalError.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol UADSInternalErrorHandler 6 | - (void)catchError: (UADSInternalError *)error forId: (NSString *)identifier; 7 | @end 8 | 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Errors/UADSErrorLogger/UADSWebViewErrorHandler/UADSWebViewErrorHandler.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSGenericError.h" 3 | #import "UADSWebViewEventSender.h" 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSWebViewErrorHandler : NSObject 7 | + (instancetype)newWithEventSender: (id)eventSender; 8 | + (instancetype)defaultHandler; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Errors/USRVNativeErrorReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface USRVNativeErrorReporter : NSObject 4 | 5 | + (void)reportError: (NSString *)errorString; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateCheckForCachedWebViewUpdate.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateCheckForCachedWebViewUpdate : USRVInitializeState 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateCheckForUpdatedWebView.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateCheckForUpdatedWebView : USRVInitializeState 7 | 8 | - (instancetype)initWithConfiguration: (USRVConfiguration *)configuration localConfiguration: (USRVConfiguration *)localConfiguration; 9 | 10 | @property (nonatomic, strong) USRVConfiguration *localWebViewConfiguration; 11 | @property (nonatomic, strong) NSString *localWebViewData; 12 | 13 | @end 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateCleanCache.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateCleanCache : USRVInitializeState 7 | 8 | - (instancetype)initWithConfiguration: (USRVConfiguration *)configuration nextState: (USRVInitializeState *)nextState; 9 | 10 | @property (nonatomic, strong) USRVInitializeState *nextState; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateComplete.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateComplete : USRVInitializeState 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateCreate.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | #define InitializeStateCreateStateName @"create webapp" 7 | @interface USRVInitializeStateCreate : USRVInitializeState 8 | 9 | @property (atomic, strong) NSString *webViewData; 10 | + (void)setMocked: (BOOL)isMocked; 11 | - (instancetype)initWithConfiguration: (USRVConfiguration *)configuration webViewData: (NSString *)webViewData; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateDownloadLatestWebView.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateDownloadLatestWebView : USRVInitializeState 7 | 8 | @property (nonatomic, assign) int retries; 9 | @property (nonatomic, assign) long retryDelay; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateForceReset.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitializeStateReset.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateForceReset : USRVInitializeStateReset 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateForceReset.m: -------------------------------------------------------------------------------- 1 | #import "USRVInitializeStateForceReset.h" 2 | #import "USRVSdkProperties.h" 3 | 4 | @implementation USRVInitializeStateForceReset : USRVInitializeStateReset 5 | 6 | - (instancetype)execute { 7 | [USRVSdkProperties setInitializationState: NOT_INITIALIZED]; 8 | [super execute]; 9 | return nil; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateInitModules.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateInitModules : USRVInitializeState 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateLoadCache.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateLoadCache : USRVInitializeState 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateLoadCacheConfigAndWebView.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateLoadCacheConfigAndWebView : USRVInitializeState 7 | 8 | - (instancetype)initWithConfiguration: (USRVConfiguration *)configuration localConfig: (USRVConfiguration *)localConfig; 9 | 10 | @property (nonatomic, strong) USRVConfiguration *localConfig; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateLoadConfigFile.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVInitialize.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateLoadConfigFile : USRVInitializeState 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateLoadWeb.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import "UADSCommonNetworkProxy.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateLoadWeb : USRVInitializeState 7 | 8 | - (instancetype)initWithConfiguration: (USRVConfiguration *)configuration retries: (int)retries retryDelay: (long)retryDelay; 9 | 10 | @property (nonatomic, assign) int retries; 11 | @property (nonatomic, assign) long retryDelay; 12 | @property (nonatomic, strong) UADSCommonNetworkProxy *networkLayer; 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateNetworkError.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | #import "USRVInitializeStateError.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface USRVInitializeStateNetworkError : USRVInitializeStateError 8 | 9 | @property (nonatomic, strong) NSCondition *blockCondition; 10 | @property (nonatomic, assign) int receivedConnectedEvents; 11 | @property (nonatomic, assign) long long lastConnectedEventTimeMs; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateReset.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateReset : USRVInitializeState 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateRetry.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateRetry : USRVInitializeState 7 | 8 | @property (nonatomic, strong) id retryState; 9 | @property (nonatomic, assign) long retryDelay; 10 | 11 | - (instancetype)initWithConfiguration: (USRVConfiguration *)configuration retryState: (id)retryState retryDelay: (long)retryDelay; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateUpdateCache.h: -------------------------------------------------------------------------------- 1 | #import "USRVInitialize.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateUpdateCache : USRVInitializeState 7 | 8 | @property (nonatomic, strong) NSString *localWebViewData; 9 | 10 | - (instancetype)initWithConfiguration: (USRVConfiguration *)configuration webViewData: (NSString *)webViewData; 11 | 12 | @end 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/InitializationFlow/USRVInitializeStateWithMeasurement.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVInitializeStateFactory.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface USRVInitializeStateWithMeasurement : NSObject 7 | +(instancetype)newWithOriginal: (id)original; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Notification/USRVNotificationEvent.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesNotificationEvent) { 4 | kUnityServicesNotificatoinEventAction 5 | }; 6 | 7 | NSString * USRVNSStringFromNotificationEvent(UnityServicesNotificationEvent); 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Notification/USRVNotificationEvent.m: -------------------------------------------------------------------------------- 1 | #import "USRVNotificationEvent.h" 2 | 3 | static NSString *notificationEventAction = @"ACTION"; 4 | 5 | NSString * USRVNSStringFromNotificationEvent(UnityServicesNotificationEvent event) { 6 | switch (event) { 7 | case kUnityServicesNotificatoinEventAction: 8 | return notificationEventAction; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Notification/USRVNotificationObserver.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVNotificationObserver : NSObject 4 | 5 | + (void)addObserver: (NSString *)name userInfoKeys: (NSArray *)keys targetObject: (id)targetObject; 6 | 7 | + (void)removeObserver: (NSString *)name targetObject: (id)targetObject; 8 | 9 | + (void)unregisterNotificationObserver; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Preferences/USRVPreferencesError.h: -------------------------------------------------------------------------------- 1 | typedef NS_ENUM (NSInteger, UnityServicesPreferencesError) { 2 | kUnityServicesPreferencesCouldntGetValue 3 | }; 4 | 5 | NSString * USRVNSStringFromPreferencesError(UnityServicesPreferencesError); 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Preferences/USRVPreferencesError.m: -------------------------------------------------------------------------------- 1 | #import "USRVPreferencesError.h" 2 | 3 | static NSString *unityServicesPreferencesCouldntGetValue = @"COULDNT_GET_VALUE"; 4 | 5 | NSString * USRVNSStringFromPreferencesError(UnityServicesPreferencesError error) { 6 | switch (error) { 7 | case kUnityServicesPreferencesCouldntGetValue: 8 | return unityServicesPreferencesCouldntGetValue; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Properties/UADSInitializationStatusReader.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVSdkProperties.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol UADSInitializationStatusReader 6 | 7 | - (InitializationState)currentState; 8 | 9 | @end 10 | 11 | @interface UADSInitializationStatusReaderBase : NSObject 12 | 13 | @end 14 | 15 | NSString * UADSStringFromInitializationState(InitializationState state); 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Properties/USRVEnvironmentProperties.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVEnvironmentProperties : NSObject 4 | 5 | + (BOOL)isEnvironmentOk; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Properties/USRVEnvironmentProperties.m: -------------------------------------------------------------------------------- 1 | #import "USRVEnvironmentProperties.h" 2 | 3 | @implementation USRVEnvironmentProperties 4 | 5 | + (BOOL)isEnvironmentOk { 6 | return true; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Properties/USRVMadeWithUnityDetector.h: -------------------------------------------------------------------------------- 1 | @interface USRVMadeWithUnityDetector : NSObject 2 | 3 | + (BOOL)isMadeWithUnity; 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Properties/USRVMadeWithUnityDetector.m: -------------------------------------------------------------------------------- 1 | #import "USRVMadeWithUnityDetector.h" 2 | 3 | // This class should be present in an application made with Unity 4 | NSString *const kUnityEngineClassName = @"UnityAppController"; 5 | 6 | @implementation USRVMadeWithUnityDetector 7 | 8 | + (BOOL)isMadeWithUnity { 9 | return NSClassFromString(kUnityEngineClassName) != nil; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/Metrics/Events/Privacy/UADSPrivacyMetrics.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSMetric.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSPrivacyMetrics : UADSMetric 6 | + (instancetype)newPrivacyRequestSuccessLatency: (nullable NSDictionary *)tags; 7 | + (instancetype)newPrivacyRequestErrorLatency: (nullable NSDictionary *)tags; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/Metrics/Events/UADSMetric.h: -------------------------------------------------------------------------------- 1 | #import "UADSDictionaryConvertible.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSMetric : NSObject 6 | + (instancetype)newWithName: (NSString *)name value: (nullable NSNumber *)value tags: (nullable NSDictionary *)tags; 7 | 8 | - (instancetype)updatedWithValue: (nullable NSNumber *)value; 9 | @end 10 | 11 | 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/Metrics/Events/WebViewNavigation/UADSWebViewMetric.h: -------------------------------------------------------------------------------- 1 | #import "UADSMetric.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSWebViewMetric : UADSMetric 6 | + (instancetype)newWebViewTerminated; 7 | + (instancetype)newReloaded; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/Metrics/Events/WebViewNavigation/UADSWebViewMetric.m: -------------------------------------------------------------------------------- 1 | #import "UADSWebViewMetric.h" 2 | 3 | @implementation UADSWebViewMetric 4 | + (instancetype)newWebViewTerminated { 5 | return [self newWithName: @"native_webview_terminated" 6 | value: nil 7 | tags: nil]; 8 | } 9 | 10 | + (instancetype)newReloaded { 11 | return [self newWithName: @"native_webview_reloaded" 12 | value: nil 13 | tags: nil]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/Metrics/UADSMetricCommonTags.h: -------------------------------------------------------------------------------- 1 | #import "UADSDictionaryConvertible.h" 2 | #import "UADSConfigurationMetricTagsReader.h" 3 | 4 | @interface UADSMetricCommonTags : NSObject 5 | - (instancetype)initWithCountryISO: (NSString *)countryISO platform: (NSString *)platform sdkVersion: (NSString *)sdkVersion systemVersion: (NSString *)systemVersion testMode: (BOOL)testMode metricTags: (NSDictionary *)metricTags; 6 | @end 7 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/Metrics/UADSMetricsContainer.h: -------------------------------------------------------------------------------- 1 | #import "UADSDictionaryConvertible.h" 2 | #import "UADSMetricCommonTags.h" 3 | #import "UADSMetric.h" 4 | 5 | @interface UADSMetricsContainer : NSObject 6 | - (instancetype)initWithCommonTags: (UADSMetricCommonTags *)tags 7 | metrics: (NSArray *)metrics 8 | info: (NSDictionary *)commonInfo; 9 | @end 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/Metrics/USRVSDKMetrics.m: -------------------------------------------------------------------------------- 1 | #import "USRVSDKMetrics.h" 2 | #import "UADSMetricSender.h" 3 | #import "UADSServiceProviderContainer.h" 4 | 5 | @implementation USRVSDKMetrics 6 | 7 | 8 | + (id )getInstance { 9 | return UADSServiceProviderContainer.sharedInstance.serviceProvider.metricSender; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/USRVResolve.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVResolve : NSObject 4 | 5 | @property (nonatomic, strong) NSString *hostName; 6 | @property (nonatomic, strong) NSString *address; 7 | @property (nonatomic, strong) NSCondition *blockCondition; 8 | @property (nonatomic, strong) NSString *error; 9 | @property (nonatomic, strong) NSString *errorMessage; 10 | @property (nonatomic, assign) BOOL canceled; 11 | 12 | - (instancetype)initWithHostName: (NSString *)hostName; 13 | - (void) resolve; 14 | - (void) cancel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/USRVResolveError.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesResolveError) { 4 | kUnityServicesResolveErrorTimedOut, 5 | kUnityServicesResolveErrorUnknownHost, 6 | kUnityServicesResolveErrorInvalidHost 7 | }; 8 | 9 | NSString * USRVNSStringFromResolveError(UnityServicesResolveError); 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/USRVResolveEvent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesResolveEvent) { 4 | kUnityServicesResolveEventComplete, 5 | kUnityServicesResolveEventFailed 6 | }; 7 | 8 | NSString * USRVNSStringFromResolveEvent(UnityServicesResolveEvent); 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/USRVResolveEvent.m: -------------------------------------------------------------------------------- 1 | #import "USRVResolveEvent.h" 2 | 3 | static NSString *complete = @"COMPLETE"; 4 | static NSString *failed = @"FAILED"; 5 | 6 | NSString * USRVNSStringFromResolveEvent(UnityServicesResolveEvent event) { 7 | switch (event) { 8 | case kUnityServicesResolveEventComplete: 9 | return complete; 10 | 11 | case kUnityServicesResolveEventFailed: 12 | return failed; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/USRVResolveOperation.h: -------------------------------------------------------------------------------- 1 | #import "USRVResolve.h" 2 | 3 | typedef void (^UnityServicesResolveRequestCompletion)(NSString *host, NSString *address, NSString *error, NSString *errorMessage); 4 | 5 | @interface USRVResolveOperation : NSOperation 6 | 7 | @property (nonatomic, strong) UnityServicesResolveRequestCompletion completeBlock; 8 | @property (nonatomic, strong) USRVResolve *resolve; 9 | 10 | - (instancetype)initWithHostName: (NSString *)hostName completeBlock: (UnityServicesResolveRequestCompletion)completeBlock; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/USRVWebRequestError.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesWebRequestError) { 4 | kUnityServicesWebRequestErrorRequestTimedOut = 5, 5 | kUnityServicesWebRequestGenericError = 10, 6 | kUnityServicesWebRequestErrorMappingHeadersFailed 7 | }; 8 | 9 | NSString * USRVNSStringFromWebRequestError(UnityServicesWebRequestError); 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/USRVWebRequestEvent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesWebRequestEvent) { 4 | kUnityServicesWebRequestEventComplete, 5 | kUnityServicesWebRequestEventFailed 6 | }; 7 | 8 | NSString * USRVNSStringFromWebRequestEvent(UnityServicesWebRequestEvent); 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/Request/USRVWebRequestEvent.m: -------------------------------------------------------------------------------- 1 | #import "USRVWebRequestEvent.h" 2 | 3 | static NSString *complete = @"COMPLETE"; 4 | static NSString *failed = @"FAILED"; 5 | 6 | NSString * USRVNSStringFromWebRequestEvent(UnityServicesWebRequestEvent event) { 7 | switch (event) { 8 | case kUnityServicesWebRequestEventComplete: 9 | return complete; 10 | 11 | case kUnityServicesWebRequestEventFailed: 12 | return failed; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/SensorInfo/USRVSensorInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface USRVSensorInfo : NSObject 4 | 5 | + (BOOL)startAccelerometerUpdates: (double)updateInterval; 6 | 7 | + (void) stopAccelerometerUpdates; 8 | 9 | + (BOOL) isAccelerometerActive; 10 | 11 | + (NSDictionary *)getAccelerometerData; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/SensorInfo/USRVSensorInfoError.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesSensorInfoError) { 4 | kUnityServicesAccelerometerDataNotAvailable 5 | }; 6 | 7 | NSString * USRVNSStringFromSensorInfoError(UnityServicesSensorInfoError); 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/SensorInfo/USRVSensorInfoError.m: -------------------------------------------------------------------------------- 1 | #import "USRVSensorInfoError.h" 2 | 3 | static NSString *accelerometerDataNotAvailable = @"ACCELEROMETER_DATA_NOT_AVAILABLE"; 4 | 5 | 6 | NSString * USRVNSStringFromSensorInfoError(UnityServicesSensorInfoError error) { 7 | switch (error) { 8 | case kUnityServicesAccelerometerDataNotAvailable: 9 | return accelerometerDataNotAvailable; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/TrackingManager/USRVTrackingManagerProxy.h: -------------------------------------------------------------------------------- 1 | @interface USRVTrackingManagerProxy : NSObject 2 | + (USRVTrackingManagerProxy *)sharedInstance; 3 | - (BOOL) available; 4 | - (void) requestTrackingAuthorization; 5 | - (NSUInteger) trackingAuthorizationStatus; 6 | @end 7 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UADSLogger/UADSLogger.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSLogRecord.h" 3 | #import "UADSTools.h" 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @protocol UADSLogger 7 | @property (nonatomic, assign) UADSLogLevel currentLogLevel; 8 | - (void)logRecord: (id)record; 9 | @end 10 | 11 | @interface UADSConsoleLogger : NSObject 12 | @property (nonatomic, assign) UADSLogLevel currentLogLevel; 13 | + (instancetype)newWithSystemList: (NSArray *)allowedList; 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UADSLogger/UADSPerformanceLogger.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSLogger.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol UADSPerformanceLogger 6 | 7 | - (void)startMeasureForSystem: (NSString *)system; 8 | - (void)endMeasureForSystem: (NSString *)system; 9 | 10 | @end 11 | 12 | @interface UADSPerformanceLoggerBase : NSObject 13 | 14 | + (instancetype)newWithLogger: (id)logger; 15 | 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UADSServiceProviderContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSServiceProvider.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSServiceProviderContainer : NSObject 7 | + (instancetype) sharedInstance; 8 | @property (nonatomic) UADSServiceProvider *serviceProvider; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UADSServiceProviderContainer.m: -------------------------------------------------------------------------------- 1 | #import "UADSServiceProviderContainer.h" 2 | #import "UADSTools.h" 3 | 4 | @implementation UADSServiceProviderContainer 5 | _uads_custom_singleton_imp(UADSServiceProviderContainer, ^{ 6 | return [self new]; 7 | }) 8 | 9 | - (instancetype)init { 10 | SUPER_INIT 11 | _serviceProvider = [UADSServiceProvider new]; 12 | return self; 13 | } 14 | @end 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UnityAdsCoreProxy/Initialize/UADSSDKInitializerProxy.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | #import "UADSTools.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSSDKInitializerProxy : UADSProxyReflection 6 | -(void)initializeWithGameID: (NSString *)gameId 7 | testMode: (BOOL)testMode 8 | completion: (UADSVoidClosure)completion 9 | error: (UADSNSErrorCompletion)error; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UnityAdsCoreProxy/Network/UADSCommonNetworkErrorProxy.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSCommonNetworkErrorProxy : UADSProxyReflection 6 | - (NSString *)requestID; 7 | - (NSString *)message; 8 | - (NSString *)requestURL; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UnityAdsCoreProxy/Network/UADSCommonNetworkErrorProxy.m: -------------------------------------------------------------------------------- 1 | #import "UADSCommonNetworkErrorProxy.h" 2 | 3 | @implementation UADSCommonNetworkErrorProxy 4 | - (NSString *)requestID { 5 | return [self valueForKey: @"requestID"]; 6 | } 7 | 8 | - (NSString *)message { 9 | return [self valueForKey: @"message"]; 10 | } 11 | 12 | - (NSString *)requestURL { 13 | return [self valueForKey: @"requestURL"]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UnityAdsCoreProxy/Network/UADSCommonNetworkResponseProxy.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSCommonNetworkResponseProxy : UADSProxyReflection 6 | - (NSString *) id; 7 | - (NSString *) body; 8 | - (NSDictionary *)headers; 9 | - (NSNumber *) status; 10 | - (NSString *) urlString; 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UnityAdsCoreProxy/Request/UADSWebRequestFactorySwiftAdapter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVWebRequestFactory.h" 3 | #import "USRVSDKMetrics.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface UADSWebRequestFactorySwiftAdapter : NSObject 8 | + (instancetype)newWithMetricSender: (nullable id)metricSender andNetworkLayer: (id)networkLayer; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UnityAdsCoreProxy/UADSCorePresenceChecker.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSCorePresenceChecker : NSObject 6 | + (Boolean)isPresent; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/UnityAdsCoreProxy/UADSCorePresenceChecker.m: -------------------------------------------------------------------------------- 1 | #import "UADSCorePresenceChecker.h" 2 | 3 | @implementation UADSCorePresenceChecker 4 | + (Boolean)isPresent { 5 | return NSClassFromString(@"UnityAds.ServiceProviderObjCBridge") != nil; 6 | } 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/Bridge/UADSWebViewEventSender/UADSWebViewEventSender.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSWebViewEvent.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @protocol UADSWebViewEventSender 7 | - (void)sendEvent: (id)event; 8 | @end 9 | 10 | @interface UADSWebViewEventSenderBase : NSObject 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/Bridge/UADSWebViewEventSender/UADSWebViewEventSender.m: -------------------------------------------------------------------------------- 1 | #import "UADSWebViewEventSender.h" 2 | #import "USRVWebViewApp.h" 3 | 4 | @implementation UADSWebViewEventSenderBase 5 | 6 | - (void)sendEvent: (nonnull id)event { 7 | [[USRVWebViewApp getCurrentApp] sendEvent: event.eventName 8 | category: event.categoryName 9 | params: event.params]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/Bridge/USRVURLProtocol.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVURLProtocol : NSURLProtocol 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/Bridge/USRVWebViewBridge.h: -------------------------------------------------------------------------------- 1 | #import "USRVWebViewCallback.h" 2 | 3 | @interface USRVWebViewBridge : NSObject 4 | 5 | + (void)handleInvocation: (NSInvocation *)invocation; 6 | + (void)handleCallback: (NSString *)callbackId callbackStatus: (NSString *)callbackStatus params: (NSArray *)params; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/Bridge/USRVWebViewCallback.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | @interface USRVWebViewCallback : NSObject 4 | 5 | @property (nonatomic, strong) NSString *callbackId; 6 | @property (nonatomic, assign) int invocationId; 7 | @property (nonatomic, assign) BOOL invoked; 8 | 9 | - (instancetype)initWithCallbackId: (NSString *)callbackId invocationId: (int)invocationId; 10 | - (void)invoke: (id)arg1, ...; 11 | - (void)error: (NSString *)error arg1: (id)arg1, ...; 12 | @end 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/Bridge/USRVWebViewMethodInvokeHandler.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface USRVWebViewMethodInvokeHandler : NSObject 4 | 5 | - (void)handleData: (NSData *)jsonData invocationType: (NSString *)invocationType; 6 | - (void)handleInvocation: (NSArray *)invocations; 7 | - (void)handleCallback: (NSDictionary *)callback; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/Bridge/USRVWebViewMethodInvokeQueue.h: -------------------------------------------------------------------------------- 1 | #import "USRVWebViewMethodInvokeOperation.h" 2 | 3 | @interface USRVWebViewMethodInvokeQueue : NSObject 4 | 5 | + (void)addOperation: (USRVWebViewMethodInvokeOperation *)operation; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/Bridge/WebViewInvoker/WebViewInvokerQueueDecorator/WebViewInvokerQueueDecorator.h: -------------------------------------------------------------------------------- 1 | #import "UADSWebViewInvoker.h" 2 | #import "USRVInitializationNotificationCenter.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface WebViewInvokerQueueDecorator : NSObject 6 | + (instancetype)newWithDecorated: (id)decorated 7 | andNotificationCenter: (id)center; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/UADSWebKitLoader/UADSWebKitLoader.h: -------------------------------------------------------------------------------- 1 | #import "UADSDynamicLibLoader.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSWebKitLoader : UADSDynamicLibLoader 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/UADSWebKitLoader/UADSWebKitLoader.m: -------------------------------------------------------------------------------- 1 | #import "UADSWebKitLoader.h" 2 | 3 | @implementation UADSWebKitLoader 4 | 5 | + (NSString *)frameworkName { 6 | return @"WebKit"; 7 | } 8 | 9 | + (NSString *)classNameForCheck { 10 | return @"WKWebView"; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/UADSWebViewNavigationDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | @interface UADSWebViewNavigationDelegate : NSObject 5 | + (UADSWebViewNavigationDelegate *)sharedInstance; 6 | @end 7 | 8 | NS_ASSUME_NONNULL_END 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/USRVWebViewBackgroundView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface USRVWebViewBackgroundView : UIView 4 | - (void)placeViewToBackground; 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Private/Core/WebView/WebViewURLBuilder/UADSWebViewURLBuilder.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSBaseURLBuilder.h" 3 | #import "USRVConfiguration.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface UADSWebViewURLBuilder : NSObject 8 | + (instancetype)newWithBaseURL: (NSString *)base 9 | andQueryAttributes: (NSDictionary *)attributes; 10 | 11 | //convenience init. 12 | + (instancetype)newWithBaseURL: (NSString *)base andConfiguration: (USRVConfiguration *)config; 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAAdLoaders/GMAAdLoaderStrategy/Banner/GMABannerAdLoader.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GMALoaderBase.h" 3 | #import "GADBannerViewBridge.h" 4 | #import "GMABannerViewDelegateProxy.h" 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface GMABannerAdLoader : GMALoaderBase 8 | 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAAdLoaders/GMAAdLoaderStrategy/GMAAdMetaData/GMAAdMetaData.m: -------------------------------------------------------------------------------- 1 | #import "GMAAdMetaData.h" 2 | 3 | @implementation GMAAdMetaData 4 | 5 | - (NSTimeInterval)videoLengthInSeconds { 6 | return ([_videoLength intValue] >= 1000) ? [_videoLength doubleValue] / 1000 : [_videoLength doubleValue]; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAAdLoaders/GMAAdLoaderStrategy/Interstitial/GMAGenericAdsDelegateObject/GMAGenericAdsDelegateObject.h: -------------------------------------------------------------------------------- 1 | NS_ASSUME_NONNULL_BEGIN 2 | 3 | @interface GMAGenericAdsDelegateObject<__covariant AdType, __covariant DelegateType> : NSObject 4 | @property (strong, nonatomic, readonly) AdType storedAd; 5 | @property (strong, nonatomic, readonly) DelegateType storedDelegate; 6 | 7 | + (instancetype)newWithAd: (AdType)ad delegate: (DelegateType)delegate; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAAdLoaders/GMAAdLoaderStrategy/Interstitial/GMAIntersitialAdLoader/GMAInterstitialAdLoaderV8.h: -------------------------------------------------------------------------------- 1 | #import "GMAQuerySignalReader.h" 2 | #import "GMALoaderBase.h" 3 | #import "GADInterstitialAdBridgeV8.h" 4 | #import "GMAInterstitialAdDelegateProxy.h" 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface GMAInterstitialAdLoaderV8 : GMALoaderBase 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAAdLoaders/GMAAdLoaderStrategy/Rewarded/GMARewardedAdLoader/GMARewardedAdLoaderV7.h: -------------------------------------------------------------------------------- 1 | #import "GMALoaderBase.h" 2 | #import "GADRewardedAdBridge.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** 6 | Class that provides full flow for loading GADRewardedAd. Contains internal storage for saving GADRewardedAd and RewardedDelegateProxy for each placementID so they can be retrieved during `show` call. 7 | */ 8 | @interface GMARewardedAdLoaderV7 : GMALoaderBase 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAAdLoaders/GMAAdLoaderStrategy/Rewarded/GMARewardedAdLoaderV8/GMARewardedAdLoaderV8.h: -------------------------------------------------------------------------------- 1 | #import "GMALoaderBase.h" 2 | #import "GMARewardedAdDelegateProxy.h" 3 | #import "GADRewardedAdBridgeV8.h" 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface GMARewardedAdLoaderV8 : GMALoaderBase 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADAdInfoBridge.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | #import "GADQueryInfoBridge.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @class GADQueryInfoBridge; 7 | 8 | @interface GADAdInfoBridge : UADSProxyReflection 9 | 10 | + (nullable instancetype)newWithQueryInfo: (GADQueryInfoBridge *)queryInfo 11 | adString: (NSString *)string; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADAdSizeBridge.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | struct GADAdSizeBridge { 4 | CGSize size; 5 | NSUInteger flags; 6 | }; 7 | typedef struct GADAdSizeBridge GADAdSizeBridge; 8 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADBaseAd.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | #import "GADResponseInfoBridge.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GADBaseAd : UADSProxyReflection 6 | - (GADResponseInfoBridge *)responseInfo; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADBaseAd.m: -------------------------------------------------------------------------------- 1 | #import "GADBaseAd.h" 2 | 3 | static NSString *const kResponseInfoKey = @"responseInfo"; 4 | 5 | @implementation GADBaseAd 6 | 7 | + (NSArray *)requiredKeysForKVO { 8 | return @[kResponseInfoKey]; 9 | } 10 | 11 | - (GADResponseInfoBridge *)responseInfo { 12 | id responseInfo = [self.proxyObject valueForKey: kResponseInfoKey]; 13 | 14 | return [GADResponseInfoBridge getProxyWithObject: responseInfo]; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADExtrasBridge.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GADExtrasBridge : UADSProxyReflection 6 | @property (nonatomic, copy, nullable) NSDictionary *additionalParameters; 7 | 8 | + (instancetype)getNewExtras; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADMobileAdsBridge.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | 6 | @interface GADMobileAdsBridge : UADSProxyReflection 7 | + (instancetype)sharedInstance; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADRequestBridge.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | #import "GADAdInfoBridge.h" 3 | #import "GADQueryInfoBridge.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @class GADAdInfoBridge; 8 | 9 | @interface GADRequestBridge : UADSProxyReflection 10 | @property (strong, nonatomic) GADAdInfoBridge *adInfo; 11 | + (instancetype)getNewRequest; 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADRequestBridgeV85.h: -------------------------------------------------------------------------------- 1 | #import "GADRequestBridge.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GADRequestBridgeV85 : GADRequestBridge 6 | @property (nonatomic, copy, nullable) NSString *requestAgent; 7 | @property(nonatomic, copy, nullable) NSString *adString; 8 | 9 | - (void)registerAdNetworkExtras:(nonnull id)extras; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADResponseInfoBridge.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GADResponseInfoBridge : UADSProxyReflection 6 | - (NSString *)responseIdentifier; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridges/GADResponseInfoBridge.m: -------------------------------------------------------------------------------- 1 | #import "GADResponseInfoBridge.h" 2 | 3 | static NSString *const kResponseIdentifierKey = @"responseIdentifier"; 4 | 5 | @implementation GADResponseInfoBridge 6 | 7 | + (NSString *)className { 8 | return @"GADResponseInfo"; 9 | } 10 | 11 | + (NSArray *)requiredKeysForKVO { 12 | return @[kResponseIdentifierKey]; 13 | } 14 | 15 | - (NSString *)responseIdentifier { 16 | return [self.proxyObject valueForKey: kResponseIdentifierKey]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMABridgesV8/GADFullScreenContentDelegateProxy.h: -------------------------------------------------------------------------------- 1 | 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | @protocol UADSGADFullScreenContentDelegate 5 | - (void)adDidPresentFullScreenContent: (id)ad; 6 | - (void)ad: (id)ad didFailToPresentFullScreenContentWithError: (NSError *)error; 7 | - (void)adDidDismissFullScreenContent: (id)ad; 8 | - (void)adDidRecordImpression: (nonnull id)ad; 9 | - (void)adDidRecordClick:(nonnull id)ad; 10 | @end 11 | 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAQueryInfoReader/GMAQueryInfoRequestFactory.h: -------------------------------------------------------------------------------- 1 | #import "GADRequestBridge.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol GMAQueryInfoRequestFactory 6 | 7 | - (GADRequestBridge *)createRequest; 8 | 9 | @end 10 | 11 | @interface GMAQueryInfoRequestFactoryBase : NSObject 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAQueryInfoReader/GMAQueryInfoRequestFactory.m: -------------------------------------------------------------------------------- 1 | #import "GMAQueryInfoRequestFactory.h" 2 | 3 | @implementation GMAQueryInfoRequestFactoryBase 4 | 5 | - (nonnull GADRequestBridge *)createRequest { 6 | return [GADRequestBridge getNewRequest]; 7 | } 8 | 9 | @end 10 | 11 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAQueryInfoReader/GMAQueryInfoRequestFactoryV85.h: -------------------------------------------------------------------------------- 1 | #import "GMAQueryInfoRequestFactory.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GMAQueryInfoRequestFactoryV85 : NSObject 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMASignalReader/GMABaseQuerySignalReaderV85.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GMAQuerySignalReader.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface GMABaseQuerySignalReaderV85 : NSObject 7 | - (instancetype)__unavailable init; 8 | + (instancetype)newWithInfoReader: (id)reader; 9 | + (BOOL)isSupported; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAVersionReader/GMAVersionReaderStrategy.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | static NSString *const kGMAVersionReaderUnavailableVersionString = @"0.0.0"; 6 | 7 | @interface GMAVersionReaderStrategy : NSObject 8 | - (NSString *)sdkVersion; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAVersionReader/GMAVersionReaderV7/GMAVersionReaderV7.h: -------------------------------------------------------------------------------- 1 | #import "GADRequestBridge.h" 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | @interface GMAVersionReaderV7 : GADRequestBridge 5 | + (NSString *)sdkVersion; 6 | @end 7 | 8 | NS_ASSUME_NONNULL_END 9 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAVersionReader/GMAVersionReaderV8/GMAVersionReaderV8.h: -------------------------------------------------------------------------------- 1 | #import "GADMobileAdsBridge.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GMAVersionReaderV8 : GADMobileAdsBridge 6 | + (NSString *)sdkVersion; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/GMAVersionReader/GMAVersionReaderV8/GMAVersionReaderV8.m: -------------------------------------------------------------------------------- 1 | #import "GMAVersionReaderV8.h" 2 | 3 | static NSString *const kGMASDKVersionKey = @"sdkVersion"; 4 | 5 | @implementation GMAVersionReaderV8 6 | 7 | + (NSArray *)requiredKeysForKVO { 8 | return @[kGMASDKVersionKey]; 9 | } 10 | 11 | + (NSString *)sdkVersion { 12 | return [self.sharedInstance sdkVersion]; 13 | } 14 | 15 | - (NSString *)sdkVersion { 16 | return [self.proxyObject valueForKey: kGMASDKVersionKey]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /SourceCode/Private/GMAScar/UADSScarSignalParameters.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GADQueryInfoBridge.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSScarSignalParameters: NSObject 7 | @property (nonatomic, assign) GADQueryInfoAdType adFormat; 8 | @property (nonatomic, strong) NSString *placementId; 9 | 10 | - (instancetype)initWithPlacementId: (NSString *)placementId 11 | adFormat: (GADQueryInfoAdType)adFormat; 12 | 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /SourceCode/Private/MuteSwitchDetection.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/unity-ads-ios/960bcb1ba5e8e0890fdf27d3a6bc47de1cbf696f/SourceCode/Private/MuteSwitchDetection.aiff -------------------------------------------------------------------------------- /SourceCode/Private/PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | #ifndef PrefixHeader_pch 2 | #define PrefixHeader_pch 3 | 4 | #import 5 | #import "USRVDeviceLog.h" 6 | #import "UADSTools.h" 7 | 8 | #endif /* PrefixHeader_pch */ 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Api/USTRApiAppSheet.h: -------------------------------------------------------------------------------- 1 | @interface USTRApiAppSheet : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Api/USTRApiProducts.h: -------------------------------------------------------------------------------- 1 | @interface USTRApiProducts : NSObject 2 | 3 | @end 4 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/AppSheet/USTRAppSheetError.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesAppSheetError) { 4 | kUnityServicesAppSheetErrorAlreadyPreparing, 5 | kUnityServicesAppSheetErrorAlreadyPresenting, 6 | kUnityServicesAppSheetErrorNotFound, 7 | kUnityServicesAppSheetErrorNoAppSheetFound, 8 | kUnityServicesAppSheetErrorNoRootViewControllerFound, 9 | kUnityServicesAppSheetErrorTimeout 10 | }; 11 | 12 | NSString * USRVNSStringFromAppSheetError(UnityServicesAppSheetError); 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/AppSheet/USTRAppSheetEvent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UnityServicesAppSheetEvent) { 4 | kAppSheetPrepared, 5 | kAppSheetOpened, 6 | kAppSheetClosed, 7 | kAppSheetFailed, 8 | }; 9 | 10 | NSString * USRVNSStringFromAppSheetEvent(UnityServicesAppSheetEvent); 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Configuration/USTRStoreModuleConfiguration.h: -------------------------------------------------------------------------------- 1 | #import "USRVModuleConfiguration.h" 2 | 3 | @interface USTRStoreModuleConfiguration : USRVModuleConfiguration 4 | @end 5 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKAdNetworkFacade/SKAdNetworkFacade.h: -------------------------------------------------------------------------------- 1 | NS_ASSUME_NONNULL_BEGIN 2 | 3 | @interface SKAdNetworkFacade : NSObject 4 | 5 | + (instancetype)sharedInstance; 6 | - (void) startImpression: (NSDictionary *)impressionJSON 7 | completionHandler: (UADSNSErrorCompletion)completion; 8 | 9 | - (void)endImpression: (NSDictionary *)impressionJSON 10 | completionHandler: (UADSNSErrorCompletion)completion; 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKAdNetworkProxy/SKAdNetworkProxy.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | #import "SKAdImpressionProxy.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SKAdNetworkProxy : UADSProxyReflection 6 | + (void)startImpression: (SKAdImpressionProxy *)impression 7 | completionHandler: (UADSNSErrorCompletion)completion; 8 | 9 | + (void)endImpression: (SKAdImpressionProxy *)impression 10 | completionHandler: (UADSNSErrorCompletion)completion; 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKOverlay/Helpers/SKOverlayAppConfiguration+Dictionary.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface SKOverlayAppConfiguration (Dictionary) 5 | + (SKOverlayAppConfiguration *)uads_overlayAppConfigurationFrom: (NSDictionary *)dictionary API_AVAILABLE(ios(14.0)); 6 | @end 7 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKOverlay/Helpers/UIViewController+WindowScene.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UIViewController (WindowScene) 6 | + (UIWindowScene *)uads_currentWindowScene API_AVAILABLE(ios(13.0)); 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKOverlay/UADSApiOverlay.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSApiOverlay : NSObject 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKOverlay/UADSApiOverlay.m: -------------------------------------------------------------------------------- 1 | #import "UADSApiOverlay.h" 2 | #import "UADSOverlay.h" 3 | #import "USRVWebViewCallback.h" 4 | 5 | @implementation UADSApiOverlay 6 | 7 | + (void)WebViewExposed_show: (NSDictionary *)parameters callback: (USRVWebViewCallback *)callback { 8 | [[UADSOverlay sharedInstance] show: parameters]; 9 | 10 | [callback invoke: nil]; 11 | } 12 | 13 | + (void)WebViewExposed_hide: (USRVWebViewCallback *)callback { 14 | [[UADSOverlay sharedInstance] hide]; 15 | [callback invoke: nil]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKOverlay/UADSOverlay.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSOverlayEventProtocol.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSOverlay : NSObject 7 | 8 | + (instancetype)sharedInstance; 9 | - (instancetype)initWithEventHandler: (id)handler; 10 | 11 | - (void)show: (NSDictionary *)configDictionary; 12 | - (void) hide; 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKOverlay/UADSOverlayDelegateProxy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "UADSOverlayEventProtocol.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface UADSOverlayDelegateProxy : NSObject 8 | 9 | - (instancetype)initWithEventHandler: (id)handler; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKOverlay/UADSOverlayError.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM (NSInteger, UADSOverlayError) { 4 | kOverlayNotAvailable, 5 | kOverlaySceneNotFound, 6 | kOverlayInvalidParamaters, 7 | kOverlayNoLoad, 8 | kOverlayAlreadyShown 9 | }; 10 | 11 | NSString * UADSStringFromOverlayError(UADSOverlayError); 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKOverlay/UADSOverlayEventHandler.h: -------------------------------------------------------------------------------- 1 | #import "UADSOverlayEventProtocol.h" 2 | #import "UADSWebViewEventSender.h" 3 | 4 | @interface UADSOverlayEventHandler : NSObject 5 | 6 | - (id)initWithEventSender: (id)eventSender; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/SKOverlay/UADSOverlayWebViewEvent.h: -------------------------------------------------------------------------------- 1 | #import "UADSWebViewEvent.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSOverlayWebViewEvent : UADSWebViewEventBase 6 | 7 | + (instancetype)newWillStartPresentation; 8 | + (instancetype)newDidFinishPresentation; 9 | + (instancetype)newWillStartDismissal; 10 | + (instancetype)newDidFinishDismissal; 11 | + (instancetype)newDidFailToLoadWithParams: (NSArray *_Nullable)params; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/Categories/NSLocale/NSLocale+PriceDictionary/NSLocale+PriceDictionary.h: -------------------------------------------------------------------------------- 1 | NS_ASSUME_NONNULL_BEGIN 2 | static NSString *const kNSLocaleCurrencySymbolKey = @"currencySymbol"; 3 | static NSString *const kNSLocaleCountryCodeKey = @"countryCode"; 4 | static NSString *const kNSLocaleCurrencyCodeKey = @"currencyCode"; 5 | 6 | @interface NSLocale (PriceDictionary) 7 | - (NSDictionary *_Nonnull)uads_Dictionary; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/Categories/SKPayment/SKPayment+Dictionary/SKPayment+Dictionary.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SKPayment (Dictionary) 6 | - (NSDictionary *_Nonnull)uads_Dictionary; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/Categories/SKPaymentTransaction/SKPaymentTransaction+Dictionary/SKPaymentTransaction+Dictionary.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SKPaymentTransaction (Dictionary) 6 | - (NSDictionary *_Nonnull)uads_Dictionary; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/Categories/SKProductBridge/SKProductBridge+Dictionary/SKProductBridge+Dictionary.h: -------------------------------------------------------------------------------- 1 | #import "SKProductBridge.h" 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | @interface SKProductBridge (Dictionary) 5 | - (NSDictionary *_Nonnull)uads_Dictionary; 6 | @end 7 | 8 | NS_ASSUME_NONNULL_END 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/Categories/SKProductDiscountBridge/SKProductDiscountBridge+Dictionary/SKProductDiscountBridge+Dictionary.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "SKProductDiscountBridge.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SKProductDiscountBridge (Dictionary) 6 | - (NSDictionary *_Nonnull)uads_Dictionary; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/Categories/SKProductSubscriptionPeriodBridge/SKProductSubscriptionPeriodBridge+Dictionary/SKProductSubscriptionPeriodBridge+Dictionary.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "SKProductSubscriptionPeriodBridge.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SKProductSubscriptionPeriodBridge (Dictionary) 6 | - (NSDictionary *_Nonnull)uads_Dictionary; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/Categories/SKRequest/SKRequest+UniqueID/SKProductsRequest+UniqueID.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SKProductsRequest (Category) 6 | - (NSString *)uads_uniqueID; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/Categories/SKRequest/SKRequest+UniqueID/SKProductsRequest+UniqueID.m: -------------------------------------------------------------------------------- 1 | #import "SKProductsRequest+UniqueID.h" 2 | 3 | @implementation SKProductsRequest (Category) 4 | 5 | - (NSString *)uads_uniqueID { 6 | return [NSString stringWithFormat: @"%lu", (unsigned long)self.hash]; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/StoreKitBridges/SKProductSubscriptionPeriodBridge/SKProductSubscriptionPeriodBridge.h: -------------------------------------------------------------------------------- 1 | #import "UADSStoreKitReflection.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | static NSString *const kSKProductSubscriptionNumberOfUnitsKey = @"numberOfUnits"; 5 | static NSString *const kSKProductSubscriptionUnitKey = @"unit"; 6 | 7 | @interface SKProductSubscriptionPeriodBridge : UADSStoreKitReflection 8 | @property (nonatomic, readonly) NSNumber *numberOfUnitsNumber; 9 | @property (nonatomic, readonly) NSNumber *unitNumber; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/StoreKitBridges/SKProductSubscriptionPeriodBridge/SKProductSubscriptionPeriodBridge.m: -------------------------------------------------------------------------------- 1 | #import "SKProductSubscriptionPeriodBridge.h" 2 | 3 | @implementation SKProductSubscriptionPeriodBridge 4 | 5 | - (NSNumber *)unitNumber { 6 | return [self valueForKey: kSKProductSubscriptionUnitKey]; 7 | } 8 | 9 | - (NSNumber *)numberOfUnitsNumber { 10 | return [self valueForKey: kSKProductSubscriptionNumberOfUnitsKey]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/StoreKitBridges/UADSStoreKitReflection.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | @interface UADSStoreKitReflection : UADSProxyReflection 5 | 6 | @end 7 | 8 | NS_ASSUME_NONNULL_END 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/StoreKitBridges/UADSStoreKitReflection.m: -------------------------------------------------------------------------------- 1 | #import "UADSStoreKitReflection.h" 2 | 3 | @implementation UADSStoreKitReflection 4 | - (id)valueForKey: (NSString *)key { 5 | //due to unexpected behaviour in SKProduct in sdk lower than 12.0 we have to return nil 6 | //instead of calling super. 7 | GUARD_OR_NIL([self.proxyObject respondsToSelector: NSSelectorFromString(key)]); 8 | return [self.proxyObject valueForKey: key]; 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/UADSSKProductReader/UADSProducRequestDelegateAdapter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSSKProductReader.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSProducRequestDelegateAdapter : NSObject 6 | + (instancetype)newWithCompletion: (UADSSKProductReaderCompletion)completion 7 | onErrorCompletion: (UADSSKProductReaderErrorCompletion)onError; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/Transactions/UADSTransactionObserver/UADSTransactionObserver.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSAppStoreReceiptReader.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | typedef void (^UADSTransactionObserverCompletion)(NSArray *result); 7 | 8 | @interface UADSTransactionObserver : NSObject 9 | + (instancetype)newWithReceiptReader: (id)reader 10 | andCompletion: (UADSTransactionObserverCompletion)completion; 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/UADSAppStoreReceiptReader.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @protocol UADSAppStoreReceiptReader 7 | - (NSString *)encodedReceipt; 8 | @end 9 | 10 | @interface UADSAppStoreReceiptReaderImp : NSObject 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/UADSAppStoreReceiptReader.m: -------------------------------------------------------------------------------- 1 | 2 | #import "UADSAppStoreReceiptReader.h" 3 | 4 | @implementation UADSAppStoreReceiptReaderImp 5 | 6 | - (nonnull NSString *)encodedReceipt { 7 | NSURL *receiptURL = NSBundle.mainBundle.appStoreReceiptURL; 8 | NSData *receipt = [NSData dataWithContentsOfURL: receiptURL]; 9 | 10 | return [receipt base64EncodedStringWithOptions: 0]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/UADSStoreKitLoader/UADSStoreKitLoader.h: -------------------------------------------------------------------------------- 1 | #import "UADSDynamicLibLoader.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSStoreKitLoader : UADSDynamicLibLoader 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/UADSStoreKitLoader/UADSStoreKitLoader.m: -------------------------------------------------------------------------------- 1 | #import "UADSStoreKitLoader.h" 2 | 3 | @implementation UADSStoreKitLoader 4 | 5 | + (NSString *)frameworkName { 6 | return @"StoreKit"; 7 | } 8 | 9 | + (NSString *)classNameForCheck { 10 | return @"SKPaymentQueue"; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Store/USTRApiSKAdNetwork/USTRApiSKAdNetwork.h: -------------------------------------------------------------------------------- 1 | NS_ASSUME_NONNULL_BEGIN 2 | 3 | @interface USTRApiSKAdNetwork : NSObject 4 | 5 | @end 6 | 7 | NS_ASSUME_NONNULL_END 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSArray/NSArray+Convenience.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface NSArray(Category) 6 | 7 | + (instancetype)uads_newWithRepeating: (ObjectType)object count: (int)count; 8 | - (bool)uads_allSatisfy: (bool (^)(ObjectType obj))block; 9 | - (NSArray *)uads_removingFirstWhere: (bool(NS_NOESCAPE ^)(ObjectType _Nonnull))block; 10 | 11 | 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSArray/NSArray+Map.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | 6 | @interface NSArray (Map) 7 | typedef id _Nonnull (^NSArrayMapBlock)(ObjectType obj); 8 | typedef BOOL (^NSArrayFilterBlock)(ObjectType obj); 9 | - (NSArray *)uads_mapObjectsUsingBlock: (NSArrayMapBlock)block; 10 | 11 | - (NSArray *)uads_filter: (NSArrayFilterBlock)block; 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSArray/NSArray+SafeOperations.h: -------------------------------------------------------------------------------- 1 | NS_ASSUME_NONNULL_BEGIN 2 | 3 | @interface NSArray<__covariant ObjectType>(Category) 4 | - (_Nullable ObjectType)uads_getItemSafelyAtIndex: (NSInteger)index; 5 | 6 | - (instancetype)uads_removingFirstElements: (unsigned long)count; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSData/NSData+GZIP.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface NSData (GZIP) 5 | 6 | - (nullable NSData *)uads_gzippedDataWithCompressionLevel: (float)level; 7 | - (nullable NSData *)uads_gzippedData; 8 | - (nullable NSData *)uads_gunzippedData; 9 | - (BOOL) uads_isGzippedData; 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSDate/NSDate+NSNumber.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface NSDate (NSNumber) 7 | - (NSNumber *) uads_timeIntervalSince1970; 8 | @end 9 | 10 | 11 | @interface NSDate (Convenience) 12 | + (NSTimeInterval)uads_currentTimestampSince1970; 13 | @end 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSDate/NSDate+NSNumber.m: -------------------------------------------------------------------------------- 1 | #import "NSDate+NSNumber.h" 2 | 3 | @implementation NSDate (NSNumber) 4 | - (NSNumber *)uads_timeIntervalSince1970 { 5 | return [NSNumber numberWithDouble: self.timeIntervalSince1970]; 6 | } 7 | 8 | @end 9 | 10 | 11 | @implementation NSDate (Convenience) 12 | + (NSTimeInterval)uads_currentTimestampSince1970 { 13 | return [[self date] timeIntervalSince1970]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSError/NSError+RequestDictionary.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface NSError (RequestDictionary) 6 | + (instancetype)errorWithFailureDictionary: (NSDictionary *)failure; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSError/NSError+UADSError.h: -------------------------------------------------------------------------------- 1 | #import "UADSGenericError.h" 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | NSString * uads_extractErrorString(id error); 5 | NSString * uads_tryExtractAsUADSErrorString(id error); 6 | NSString * uads_tryExtractAsNSString(id error); 7 | NSNumber * _Nullable uads_extractErrorCode(id error); 8 | @interface NSError (Category) 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSInvocation/NSEnumWrapper/GADAdSizeStructBox.h: -------------------------------------------------------------------------------- 1 | #import "NSPrimitivesBox.h" 2 | #import 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GADAdSizeStructBox : NSPrimitivesBox 6 | @end 7 | 8 | NS_ASSUME_NONNULL_END 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSInvocation/NSEnumWrapper/GADAdSizeStructBox.m: -------------------------------------------------------------------------------- 1 | #import "GADAdSizeStructBox.h" 2 | #import "GADAdSizeBridge.h" 3 | 4 | @implementation GADAdSizeStructBox 5 | 6 | - (void)setAsArgumentForInvocation: (NSInvocation *)invocation atIndex:(NSInteger)index { 7 | GADAdSizeBridge structValue; 8 | [self getValue: &structValue]; 9 | [invocation setArgument: &structValue 10 | atIndex: index]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSMutableDictionary/NSMutableDictionary+SafeOperations/NSMutableDictionary+SafeOperations.h: -------------------------------------------------------------------------------- 1 | NS_ASSUME_NONNULL_BEGIN 2 | 3 | @interface NSMutableDictionary (SafeOperations) 4 | - (void)uads_setValueIfNotNil: (nullable id)object forKey: (nonnull NSString *)key; 5 | @end 6 | 7 | NS_ASSUME_NONNULL_END 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSMutableDictionary/NSMutableDictionary+SafeOperations/NSMutableDictionary+SafeOperations.m: -------------------------------------------------------------------------------- 1 | #import "NSMutableDictionary+SafeOperations.h" 2 | #import "UADSTools.h" 3 | 4 | @implementation NSMutableDictionary (SafeOperations) 5 | - (void)uads_setValueIfNotNil: (id)object forKey: (NSString *)key { 6 | GUARD(object) 7 | [self setValue: object forKey: key]; 8 | } 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSMutableDictionary/NSMutableDictionary+SafeRemoval.h: -------------------------------------------------------------------------------- 1 | NS_ASSUME_NONNULL_BEGIN 2 | 3 | @interface NSMutableDictionary (SafeRemoval) 4 | - (_Nullable id)uads_removeObjectForKeyAndReturn: (NSString *)key; 5 | @end 6 | 7 | NS_ASSUME_NONNULL_END 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSMutableDictionary/NSMutableDictionary+SafeRemoval.m: -------------------------------------------------------------------------------- 1 | #import "NSMutableDictionary+SafeRemoval.h" 2 | 3 | @implementation NSMutableDictionary (SafeRemoval) 4 | - (id)uads_removeObjectForKeyAndReturn: (NSString *)key { 5 | if (key == nil) { 6 | return nil; 7 | } 8 | 9 | id object = [self objectForKey: key]; 10 | [self removeObjectForKey: key]; 11 | return object; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/NSObject/NSObject+Convenience.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface NSObject (Category) 6 | + (bool)uads_containsMethods: (NSArray *)names; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/UIView/UIView+ParentViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface UIView (ParentViewController) 5 | - (nullable UIViewController *)parentViewController; 6 | @end 7 | 8 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/UIView/UIView+ParentViewController.m: -------------------------------------------------------------------------------- 1 | #import "UIView+ParentViewController.h" 2 | 3 | @implementation UIView (ParentViewController) 4 | - (nullable UIViewController *)parentViewController { 5 | UIResponder *responder = [self nextResponder]; 6 | while (responder != nil) { 7 | if ([responder isKindOfClass:[UIViewController class]]) { 8 | return (UIViewController *)responder; 9 | } 10 | responder = [responder nextResponder]; 11 | } 12 | return nil; 13 | } 14 | @end 15 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/UIView/UIView+Subview.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UIView (Subview) 6 | 7 | - (void)addSubview:(UIView *)subview withSize:(CGSize)size; 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/UIViewController/UIViewController+TopController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UIViewController (TopViewController) 6 | + (UIViewController *_Nullable)uads_getTopController; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Categories/UIViewController/UIViewController+TopController.m: -------------------------------------------------------------------------------- 1 | #import "UIViewController+TopController.h" 2 | 3 | @implementation UIViewController (TopViewController) 4 | + (UIViewController *_Nullable)uads_getTopController { 5 | UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController; 6 | 7 | while (topController.presentedViewController) 8 | topController = topController.presentedViewController; 9 | 10 | return topController; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Errors/UADSDefaultError/UADSDefaultError.h: -------------------------------------------------------------------------------- 1 | #import "UADSGenericError.h" 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | /// Class that provides simple interface to create an error from a string 5 | /// and then pass it back to the webView. 6 | @interface UADSDefaultError : NSObject 7 | 8 | + (instancetype)newWithString: (NSString *)errorMessage; 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Timer/UADSAppLifeCycleNotificationCenter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSTools.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @protocol UADSAppLifeCycleNotificationCenter 7 | 8 | - (NSString *)addEventsListenerWithDidBecomeActive: (UADSVoidClosure)didBecomeActive didEnterBackground: (UADSVoidClosure)didEnterBackground; 9 | - (void)removeListener: (NSString *)identifier; 10 | 11 | @end 12 | 13 | @interface UADSAppLifeCycleMediator : NSObject 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Timer/UADSArrayScheduledStream.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSTimer.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSArrayScheduledStream : NSObject 7 | 8 | + (instancetype)scheduledStreamWithArray: (NSArray *)array totalTime: (NSTimeInterval)ti timer: (id)timer block: (void (^)(id item, NSInteger index))block; 9 | - (void) invalidate; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Timer/UADSTimer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol UADSRepeatableTimer 6 | 7 | - (void)scheduleWithTimeInterval: (NSTimeInterval)ti repeatCount: (NSInteger)repeat block: (void (^)(NSInteger index))block; 8 | - (void)invalidate; 9 | - (void)pause; 10 | - (void)resume; 11 | 12 | @end 13 | 14 | @interface UADSTimer : NSObject 15 | - (void)scheduleWithTimeIntervals: (NSArray *)ti block: (void (^)(NSInteger index))block; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Timer/UADSTimerFactory.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "UADSTimer.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @protocol UADSTimerFactory 8 | - (id)timerWithAppLifeCycle; 9 | @end 10 | 11 | @interface UADSTimerFactoryBase : NSObject 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Timer/UADSTimerFactory.m: -------------------------------------------------------------------------------- 1 | #import "UADSTimerFactory.h" 2 | #import "UADSTimerWithAppLifeCycle.h" 3 | 4 | @implementation UADSTimerFactoryBase 5 | 6 | - (nonnull id)timerWithAppLifeCycle { 7 | return [UADSTimerWithAppLifeCycle defaultTimer]; 8 | } 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/Timer/UADSTimerWithAppLifeCycle.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSTimer.h" 3 | #import "UADSAppLifeCycleNotificationCenter.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface UADSTimerWithAppLifeCycle : NSObject 8 | + (instancetype)defaultTimer; 9 | + (instancetype)timerWithOriginal: (id )timer lifeCycleNotificationCenter: (id)notificationCenter; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/WeakProxy/NSObject+WeakProxy.h: -------------------------------------------------------------------------------- 1 | 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | @interface NSObject (Category) 5 | @property (nonatomic, readonly) id uads_weakSelf; 6 | @end 7 | 8 | NS_ASSUME_NONNULL_END 9 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/WeakProxy/NSObject+WeakProxy.m: -------------------------------------------------------------------------------- 1 | #import "NSObject+WeakProxy.h" 2 | #import "UADSWeakProxy.h" 3 | 4 | @implementation NSObject (Category) 5 | 6 | - (id)uads_weakSelf { 7 | return [UADSWeakProxy newWithObject: self]; 8 | } 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Private/Tools/WeakProxy/UADSWeakProxy.h: -------------------------------------------------------------------------------- 1 | 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | /** 5 | * Instances of `UADSWeakProxy` hold a weak reference to the target object. 6 | */ 7 | 8 | @interface UADSWeakProxy : NSProxy 9 | 10 | /** 11 | * Initializes an `UADSWeakProxy` object with the specified target object. 12 | * 13 | * @param object The target object for the proxy. 14 | * 15 | * @return The newly initialized proxy. 16 | */ 17 | + (instancetype)newWithObject: (id)object; 18 | 19 | @end 20 | 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/Enums/UnityAdsInitializationError.h: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration for the error category of initialization errors 3 | */ 4 | typedef NS_ENUM (NSInteger, UnityAdsInitializationError) { 5 | /** 6 | * Error related to environment or internal services. 7 | */ 8 | kUnityInitializationErrorInternalError, 9 | 10 | /** 11 | * Error related to invalid arguments 12 | */ 13 | kUnityInitializationErrorInvalidArgument, 14 | 15 | /** 16 | * Error related to url being blocked 17 | */ 18 | kUnityInitializationErrorAdBlockerDetected 19 | }; 20 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/Enums/UnityAdsShowCompletionState.h: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration for the show completion state of an ad. 3 | */ 4 | typedef NS_ENUM (NSInteger, UnityAdsShowCompletionState) { 5 | /** 6 | * A state that indicates that the user skipped the ad. 7 | */ 8 | kUnityShowCompletionStateSkipped, 9 | /** 10 | * A state that indicates that the ad was played entirely. 11 | */ 12 | kUnityShowCompletionStateCompleted 13 | }; 14 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/MetaData/UADSMediationMetaData.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UADSMediationMetaData : UADSMetaData 4 | 5 | - (void)setName: (NSString *)mediationNetworkName; 6 | - (void)setVersion: (NSString *)mediationSdkVersion; 7 | - (void)setOrdinal: (int)mediationOrdinal; 8 | - (void)setMissedImpressionOrdinal: (int)missedImpressionOrdinal; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/MetaData/UADSMetaData.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UADSMetaData : USRVJsonStorage 4 | 5 | @property (nonatomic, strong) NSString *category; 6 | 7 | - (instancetype)initWithCategory: (NSString *)category; 8 | - (BOOL)setRaw: (NSString *)key value: (id)value; 9 | - (void) commit; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/MetaData/UADSPlayerMetaData.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UADSPlayerMetaData : UADSMetaData 4 | 5 | - (void)setServerId: (NSString *)serverId; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/MetaData/UADSPlayerMetaData.m: -------------------------------------------------------------------------------- 1 | #import "UADSPlayerMetaData.h" 2 | 3 | @implementation UADSPlayerMetaData 4 | 5 | - (instancetype)init { 6 | self = [super initWithCategory: @"player"]; 7 | return self; 8 | } 9 | 10 | - (void)setServerId: (NSString *)serverId { 11 | [self set: @"server_id" 12 | value : serverId]; 13 | } 14 | 15 | @end -------------------------------------------------------------------------------- /SourceCode/Public/Ads/Options/UADSBaseOptions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UADSBaseOptions : NSObject 4 | 5 | @property (nonatomic, strong, readonly) NSDictionary *dictionary; 6 | @property (nonatomic, readwrite) NSString *objectId; 7 | 8 | - (instancetype)init; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/Options/UADSDictionaryConvertible.h: -------------------------------------------------------------------------------- 1 | @protocol UADSDictionaryConvertible 2 | - (NSDictionary *)dictionary; 3 | @end 4 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/Options/UADSLoadOptions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UADSLoadOptions : UADSBaseOptions 4 | 5 | @property (nonatomic, readwrite) NSString *adMarkup; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/Options/UADSLoadOptions.m: -------------------------------------------------------------------------------- 1 | #import "UADSLoadOptions.h" 2 | 3 | NSString *const kUnityAdsOptionsAdMarkup = @"adMarkup"; 4 | 5 | @implementation UADSLoadOptions 6 | 7 | - (NSString *)adMarkup { 8 | return [self.dictionary valueForKey: kUnityAdsOptionsAdMarkup]; 9 | } 10 | 11 | - (void)setAdMarkup: (NSString *)adMarkup { 12 | [self.dictionary setValue: adMarkup 13 | forKey: kUnityAdsOptionsAdMarkup]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/Options/UADSShowOptions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UADSShowOptions : UADSBaseOptions 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Public/Ads/Options/UADSShowOptions.m: -------------------------------------------------------------------------------- 1 | #import "UADSShowOptions.h" 2 | 3 | @implementation UADSShowOptions 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /SourceCode/Public/Analytic/Core/Api/UANAApiAnalytics.h: -------------------------------------------------------------------------------- 1 | 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | // C# 5 | @protocol UANAEngineDelegate 6 | - (void)addExtras: (NSString *)extras; 7 | @end 8 | 9 | // Webview 10 | @interface UANAApiAnalytics : NSObject 11 | + (void)setAnalyticsDelegate: (id )analyticsDelegate; 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /SourceCode/Public/Analytic/UnityAnalyticsAcquisitionType.h: -------------------------------------------------------------------------------- 1 | 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | typedef NS_ENUM (NSInteger, UnityAnalyticsAcquisitionType) { 5 | kUnityAnalyticsAcquisitionTypeUnset, 6 | kUnityAnalyticsAcquisitionTypeSoft, 7 | kUnityAnalyticsAcquisitionTypePremium 8 | }; 9 | 10 | NSString * NSStringFromUnityAnalyticsAcquisitionType(UnityAnalyticsAcquisitionType); 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /SourceCode/Public/Analytic/UnityAnalyticsAcquisitionType.m: -------------------------------------------------------------------------------- 1 | #import "UnityAnalyticsAcquisitionType.h" 2 | 3 | NSString * NSStringFromUnityAnalyticsAcquisitionType(UnityAnalyticsAcquisitionType acquisitionType) { 4 | switch (acquisitionType) { 5 | case kUnityAnalyticsAcquisitionTypePremium: 6 | return @"premium"; 7 | 8 | case kUnityAnalyticsAcquisitionTypeSoft: 9 | return @"soft"; 10 | 11 | default: 12 | return @""; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SourceCode/Public/Core/InitializationFlow/UADSDeviceInfoProvider.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol UADSDeviceInfoProvider 4 | - (NSDictionary*)getDeviceInfoWithExtended:(BOOL)extended; 5 | @end 6 | -------------------------------------------------------------------------------- /Tests/Categories/UnityAds+Testability.h: -------------------------------------------------------------------------------- 1 | #import "UnityAds.h" 2 | 3 | @interface UnityAds (Testability) 4 | 5 | + (void)resetForTest; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Tests/GMAIntegrationTests/CommonTests/GMAAdLoaderStrategy/Mocks/GADRequestFactoryMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GMAQuerySignalReader.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface GADRequestFactoryMock : NSObject 7 | @property (nonatomic) id returnedError; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/GMAIntegrationTests/CommonTests/GMAAdLoaderStrategy/Mocks/GADRequestFactoryMock.m: -------------------------------------------------------------------------------- 1 | 2 | #import "GADRequestFactoryMock.h" 3 | #import "UADSTools.h" 4 | @implementation GADRequestFactoryMock 5 | 6 | 7 | - (nullable GADRequestBridge *)getAdRequestFor: (nonnull GMAAdMetaData *)meta 8 | error: (id _Nullable __autoreleasing *_Nullable)error { 9 | if (_returnedError) { 10 | *error = _returnedError; 11 | } 12 | 13 | return [GADRequestBridge getNewRequest]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Tests/GMAIntegrationTests/CommonTests/GMAQueryInfoReader/GMAQueryInfoReader+TestCategory/GMABaseQueryInfoReader+TestCategory.h: -------------------------------------------------------------------------------- 1 | #import "GMAQueryInfoReader.h" 2 | #import 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GMABaseQueryInfoReader (TestCategory) 6 | + (GADQueryInfoBridge *)getQueryInfoSyncOfType: (GADQueryInfoAdType)type 7 | forTestCase: (XCTestCase *)testCase; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/GMAIntegrationTests/CommonTests/GMAScar/Helpers/GMAQueryInfoReaderWithRequestId.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GMAQueryInfoReader.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface GMAQueryInfoReaderWithRequestId : NSObject 7 | 8 | + (instancetype)newWithOriginal:(id)original; 9 | - (NSString *)lastRequestId; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Tests/GMAIntegrationTests/CommonTests/GMAScar/Helpers/UADSGMAScarForTest.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSGMAScar.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSGMAScarForTest : UADSGMAScar 7 | 8 | - (NSString*)lastRequestId; 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /Tests/GMAIntegrationTests/CommonTests/Mocks/EventSenderMock/EventSenderMock.h: -------------------------------------------------------------------------------- 1 | #import "UADSWebViewEventSender.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface EventSenderMock : NSObject 7 | @property (nonatomic, strong) NSArray > *events; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/GMAIntegrationTests/CommonTests/Mocks/EventSenderMock/EventSenderMock.m: -------------------------------------------------------------------------------- 1 | #import "EventSenderMock.h" 2 | #import "UADSTools.h" 3 | 4 | @implementation EventSenderMock 5 | 6 | 7 | - (instancetype)init 8 | { 9 | SUPER_INIT; 10 | self.events = [NSArray new]; 11 | return self; 12 | } 13 | 14 | - (void)sendEvent: (nonnull id)event { 15 | _events = [_events arrayByAddingObject: event]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Tests/GMAIntegrationTests/GMAIntegrationTestsV7/GMABridges/GADRequestBridgeTest.m: -------------------------------------------------------------------------------- 1 | #import "GADRequestBridge.h" 2 | #import 3 | 4 | @interface GADRequestBridgeTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation GADRequestBridgeTest 9 | 10 | - (void)test_request_exists { 11 | XCTAssertTrue([GADRequestBridge exists]); 12 | } 13 | 14 | - (void)test_creates_non_null_request { 15 | XCTAssertNotNil([GADRequestBridge getNewRequest]); 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Tests/GMAIntegrationTests/GMAIntegrationTestsV8/GMABridges/GADRequestBridgeTest.m: -------------------------------------------------------------------------------- 1 | #import "GADRequestBridgeV85.h" 2 | #import "GADRequestBridge.h" 3 | #import 4 | 5 | @interface GADRequestBridgeTest : XCTestCase 6 | 7 | @end 8 | 9 | @implementation GADRequestBridgeTest 10 | 11 | - (void)test_request_exists { 12 | XCTAssertTrue([GADRequestBridgeV85 exists] || [GADRequestBridge exists]); 13 | } 14 | 15 | - (void)test_creates_non_null_request { 16 | XCTAssertNotNil([GADRequestBridge getNewRequest]); 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Tests/UnityAdsBannerIntegrationTests/BannerTestDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSBannerViewDelegate.h" 3 | 4 | @interface BannerTestDelegate : NSObject 5 | 6 | @property (nonatomic, copy) void (^ didLoadBlock)(UADSBannerView *); 7 | @property (nonatomic, copy) void (^ didClickBlock)(UADSBannerView *); 8 | @property (nonatomic, copy) void (^ didLeaveApplicationBlock)(UADSBannerView *); 9 | @property (nonatomic, copy) void (^ didErrorBlock)(UADSBannerView *, UADSBannerError *error); 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsHybridTests/UADSHybridTest.h: -------------------------------------------------------------------------------- 1 | @interface UADSHybridTest : NSObject 2 | 3 | + (BOOL)didFinish; 4 | + (int) getFailures; 5 | @end 6 | -------------------------------------------------------------------------------- /Tests/UnityAdsHybridTests/UADSHybridTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVWebViewCallback.h" 3 | #import "UADSHybridTest.h" 4 | 5 | static BOOL finished = NO; 6 | static int fails = 0; 7 | 8 | @implementation UADSHybridTest : NSObject 9 | 10 | + (void)WebViewExposed_onTestResult: (NSNumber *)failures callback: (USRVWebViewCallback *)callback { 11 | fails = [failures intValue]; 12 | finished = YES; 13 | } 14 | 15 | + (BOOL)didFinish { 16 | return finished; 17 | } 18 | 19 | + (int)getFailures { 20 | return fails; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Tests/UnityAdsHybridTestsExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AppDelegate : UIResponder 4 | 5 | @property (strong, nonatomic) UIWindow *window; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Tests/UnityAdsHybridTestsExample/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ViewController : UIViewController 4 | @end 5 | -------------------------------------------------------------------------------- /Tests/UnityAdsHybridTestsExample/ViewController.m: -------------------------------------------------------------------------------- 1 | #import "ViewController.h" 2 | 3 | @interface ViewController () 4 | @end 5 | 6 | @implementation ViewController 7 | - (void)viewDidLoad { 8 | [super viewDidLoad]; 9 | // Do any additional setup after loading the view, typically from a nib. 10 | } 11 | 12 | - (void)didReceiveMemoryWarning { 13 | [super didReceiveMemoryWarning]; 14 | // Dispose of any resources that can be recreated. 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Tests/UnityAdsHybridTestsExample/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "AppDelegate.h" 3 | 4 | int main(int argc, char *argv[]) { 5 | @autoreleasepool { 6 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Tests/UnityAdsIntegrationTests/TestUtilities.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface TestUtilities : NSObject 4 | 5 | + (NSString *)getTestServerAddress; 6 | + (NSString *)getTestVideoUrl; 7 | + (int) getTestVideoExpectedSize; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Categories/WKWebView/WKWebViewUserAgentTestCase.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "WKWebView+UserAgent.h" 3 | 4 | @interface WKWebViewUserAgentTestCase : XCTestCase 5 | 6 | @end 7 | 8 | @implementation WKWebViewUserAgentTestCase 9 | 10 | - (void)test_returns_web_view_agent_string { 11 | XCTAssertNotNil([WKWebView uads_getUserAgentSync]); 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Categories/NSDictionaryQueryStringTestCase.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NSDictionary+JSONString.h" 3 | 4 | @interface NSDictionaryQueryString : XCTestCase 5 | 6 | @end 7 | 8 | @implementation NSDictionaryQueryString 9 | 10 | 11 | - (void)test_creates_query_string { 12 | NSDictionary *data = @{ 13 | @"username": @"user_name", 14 | @"id": @"unique_ID" 15 | }; 16 | 17 | XCTAssertEqualObjects(data.uads_queryString, @"?id=unique_ID&username=user_name"); 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/Mocks/UADSFactoryConfigMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSClientConfig.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | 7 | @interface UADSFactoryConfigMock : NSObject 8 | @property (nonatomic) BOOL isSwiftInitEnabled; 9 | 10 | @property (nonatomic) NSString *gameID; 11 | @property (nonatomic) NSString *sdkVersionName; 12 | @property (nonatomic) NSNumber *sdkVersion; 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/Mocks/UADSFactoryConfigMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSFactoryConfigMock.h" 2 | 3 | @implementation UADSFactoryConfigMock 4 | - (NSString *)gameID { 5 | if (_gameID) { 6 | return _gameID; 7 | } 8 | 9 | return @"GameID"; 10 | } 11 | 12 | - (NSString *)sdkVersionName { 13 | if (_sdkVersionName) { 14 | return _sdkVersionName; 15 | } 16 | 17 | return @"SDKVersionName"; 18 | } 19 | 20 | - (NSNumber *)sdkVersion { 21 | if (_sdkVersion) { 22 | return _sdkVersion; 23 | } 24 | 25 | return @(4000); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/Mocks/UADSPIITrackingStatusReaderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSPIITrackingStatusReader.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSPIITrackingStatusReaderMock : NSObject 7 | @property (nonatomic, assign) BOOL expectedUserBehaviouralFlag; 8 | @property (nonatomic, assign) UADSPrivacyMode expectedMode; 9 | @property (nonatomic) NSInteger userBehavioralCount; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/Mocks/UADSPIITrackingStatusReaderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSPIITrackingStatusReaderMock.h" 2 | #import "UADSTools.h" 3 | @implementation UADSPIITrackingStatusReaderMock 4 | 5 | - (instancetype)init { 6 | SUPER_INIT; 7 | self.userBehavioralCount = 0; 8 | return self; 9 | } 10 | 11 | - (UADSPrivacyMode)privacyMode { 12 | return self.expectedMode; 13 | } 14 | 15 | - (NSNumber *)userNonBehavioralFlag { 16 | _userBehavioralCount += 1; 17 | return self.expectedUserBehaviouralFlag ? @(self.expectedUserBehaviouralFlag) : nil; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/ConfigurationLoader/Mocks/UADSConfigurationLoaderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSConfigurationLoader.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSConfigurationLoaderMock : NSObject 6 | @property (nonatomic, strong) USRVConfiguration *_Nullable expectedConfig; 7 | @property (nonatomic, strong) id __nullable expectedError; 8 | @property (nonatomic, assign) int loadCallCount; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/ConfigurationLoader/Mocks/UADSConfigurationPersistenceMock.h: -------------------------------------------------------------------------------- 1 | #import "UADSConfigurationSaverWithTokenStorage.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSConfigurationPersistenceMock : NSObject 7 | @property (nonatomic, strong) id original; 8 | @property (nonatomic, strong) NSArray *receivedConfig; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/ConfigurationLoader/Mocks/UADSPrivacyLoaderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSPrivacyLoader.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSPrivacyLoaderMock : NSObject 6 | @property (nonatomic, strong) UADSInitializationResponse *_Nullable expectedResponse; 7 | @property (nonatomic, strong) id __nullable expectedError; 8 | @property (nonatomic, assign) int loadCallCount; 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/ConfigurationLoader/Mocks/UADSPrivacyStorageMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSPrivacyStorage.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSPrivacyStorageMock : NSObject 6 | @property (nonatomic, strong) NSArray *responses; 7 | @property (nonatomic, assign) UADSPrivacyResponseState expectedState; 8 | @property (nonatomic) BOOL shouldSendUserNonBehavioral; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/ConfigurationLoader/UADSConfigurationLoaderIntegrationMetricsBatchTests.h: -------------------------------------------------------------------------------- 1 | #import "UADSConfigurationLoaderIntegrationTestsBase.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSConfigurationLoaderIntegrationMetricsBatchTests : UADSConfigurationLoaderIntegrationTestsBase 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/UADSBaseURLBuilderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSBaseURLBuilder.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSBaseURLBuilderMock : NSObject 6 | @property (nonatomic, copy) NSString *baseURL; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/UADSBaseURLBuilderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSBaseURLBuilderMock.h" 2 | 3 | @implementation UADSBaseURLBuilderMock 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/UADSDeviceReaderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSDeviceInfoReader.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSDeviceReaderMock : NSObject 7 | @property (nonatomic, strong) NSDictionary *expectedInfo; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/UADSDeviceReaderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSDeviceReaderMock.h" 2 | 3 | @implementation UADSDeviceReaderMock 4 | 5 | - (nonnull NSDictionary *)getDeviceInfoForGameMode: (UADSGameMode)mode { 6 | return self.expectedInfo; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/UADSDictionaryKeysBlockListMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSDeviceInfoReaderWithFilter.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSDictionaryKeysBlockListMock : NSObject 6 | @property (nonatomic, strong) NSArray *keysToSkip; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/UADSDictionaryKeysBlockListMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSDictionaryKeysBlockListMock.h" 2 | 3 | @implementation UADSDictionaryKeysBlockListMock 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/UADSPlistReaderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NSBundle+TypecastGet.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSPlistReaderMock : NSObject 7 | @property (nonatomic, strong) NSString *_Nullable expectedValue; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/UADSPlistReaderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSPlistReaderMock.h" 2 | 3 | @implementation UADSPlistReaderMock 4 | - (NSString *)uads_getStringValueForKey: (NSString *)key { 5 | return _expectedValue; 6 | } 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/USRVBodyCompressorMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVBodyBase64GzipCompressor.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface USRVBodyCompressorMock : NSObject 6 | @property (nonatomic, copy) NSString *expectedString; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/Mocks/USRVBodyCompressorMock.m: -------------------------------------------------------------------------------- 1 | #import "USRVBodyCompressorMock.h" 2 | #import "NSDictionary+JSONString.h" 3 | @implementation USRVBodyCompressorMock 4 | 5 | - (nonnull NSString *)compressedIntoString: (nonnull NSDictionary *)dictionary { 6 | return self.expectedString; 7 | } 8 | 9 | - (NSData *)compressedIntoData: (NSDictionary *)dictionary { 10 | return dictionary.uads_jsonData; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/UADSBaseURLBuilderBaseTestCase/Mocks/UADSConfigurationEndpointProviderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSConfigurationEndpointProvider.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSConfigurationEndpointProviderMock : NSObject 6 | @property (nonatomic, strong) NSString *hostname; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Configuration/SDKConfigurationReader/UADSBaseURLBuilderBaseTestCase/Mocks/UADSConfigurationEndpointProviderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSConfigurationEndpointProviderMock.h" 2 | 3 | @implementation UADSConfigurationEndpointProviderMock 4 | 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/HeaderBiddingTokenReader/GMASCARHeaderBidding/Mocks/GMASCARSignalServiceMock.h: -------------------------------------------------------------------------------- 1 | #import "GMASCARSignalsReader.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface GMASCARSignalServiceMock : NSObject 7 | 8 | @property (nonatomic, strong) NSArray *requestedSignals; 9 | 10 | - (void)callSuccessCompletion:(UADSSCARSignals *)result; 11 | - (void)callErrorCompletion:(id)error; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/HeaderBiddingTokenReader/GMASCARHeaderBidding/Mocks/UADSDeviceIDFIReaderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSDeviceIDFIReader.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSDeviceIDFIReaderMock : NSObject 7 | 8 | @property (nonatomic) NSString* expectedIdfi; 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/HeaderBiddingTokenReader/GMASCARHeaderBidding/Mocks/UADSDeviceIDFIReaderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSDeviceIDFIReaderMock.h" 2 | 3 | @implementation UADSDeviceIDFIReaderMock 4 | 5 | - (NSString *)idfi { 6 | return self.expectedIdfi; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/HeaderBiddingTokenReader/GMASCARHeaderBidding/Mocks/UADSJSONCompressorMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVBodyBase64GzipCompressor.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSJSONCompressorMock : NSObject 6 | 7 | - (NSDictionary*)uncompress:(NSString*)compressedString; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/HeaderBiddingTokenReader/GMASCARHeaderBidding/Mocks/UADSSCARSignalReaderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSSCARSignalReader.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSSCARSignalReaderMock : NSObject 7 | 8 | @property (nonatomic) int callHistoryCount; 9 | @property (nonatomic) NSDictionary* signals; 10 | @property (nonatomic) bool shouldAutoComplete; 11 | 12 | - (void) triggerSignalCompletion; 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/HeaderBiddingTokenReader/GMASCARHeaderBidding/Mocks/UADSUniqueIdGeneratorMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSUniqueIdGenerator.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSUniqueIdGeneratorMock : NSObject 7 | 8 | @property (nonatomic) NSString* expectedValue; 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/HeaderBiddingTokenReader/GMASCARHeaderBidding/Mocks/UADSUniqueIdGeneratorMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSUniqueIdGeneratorMock.h" 2 | 3 | @implementation UADSUniqueIdGeneratorMock 4 | 5 | - (NSString *)generateId { 6 | return self.expectedValue; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/HeaderBiddingTokenReader/Mocks/UADSInitializationStatusReaderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSInitializationStatusReader.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSInitializationStatusReaderMock : NSObject 6 | @property (nonatomic) InitializationState currentState; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/HeaderBiddingTokenReader/Mocks/UADSInitializationStatusReaderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSInitializationStatusReaderMock.h" 2 | 3 | @implementation UADSInitializationStatusReaderMock 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/Mocks/UADSDeviceInfoStorageKeysProviderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSDeviceInfoStorageKeysProvider.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSDeviceInfoStorageKeysProviderMock : NSObject 6 | @property (nonatomic, strong) NSArray< NSString *> *topLevelKeysToInclude; 7 | @property (nonatomic, strong) NSArray< NSString *> *keysToReduce; 8 | @property (nonatomic, strong) NSArray< NSString *> *keysToExclude; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/Mocks/UADSDeviceInfoStorageKeysProviderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSDeviceInfoStorageKeysProviderMock.h" 2 | 3 | @implementation UADSDeviceInfoStorageKeysProviderMock 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/Mocks/UADSPIIDataProviderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSPIIDataProvider.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSPIIDataProviderMock : NSObject 6 | @property (nonatomic, strong) NSString *advertisingTrackingID; 7 | @property (nonatomic, strong) NSString *vendorID; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/Mocks/UADSPIIDataProviderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSPIIDataProviderMock.h" 2 | 3 | @implementation UADSPIIDataProviderMock 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/Mocks/UADSRetryInfoReaderMock.h: -------------------------------------------------------------------------------- 1 | #import "UADSInitializeEventsMetricSender.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSRetryInfoReaderMock : NSObject 6 | + (instancetype)newWithInfo: (NSDictionary *)info; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Core/Device/Mocks/UADSRetryInfoReaderMock.m: -------------------------------------------------------------------------------- 1 | 2 | #import "UADSRetryInfoReaderMock.h" 3 | 4 | @interface UADSRetryInfoReaderMock () 5 | @property (nonatomic, strong) NSDictionary *info; 6 | @end 7 | 8 | @implementation UADSRetryInfoReaderMock 9 | 10 | + (instancetype)newWithInfo: (NSDictionary *)info { 11 | UADSRetryInfoReaderMock *mock = [UADSRetryInfoReaderMock new]; 12 | 13 | mock.info = info; 14 | return mock; 15 | } 16 | 17 | - (NSDictionary *)retryTags { 18 | return _info; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/GMAInfo/GMASCARSignalsReaderDecorator/Mocks/GMASCARSignalsReaderMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GMASCARSignalsReader.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GMASCARSignalsReaderMock : NSObject 6 | 7 | - (void)emulateReturnOfAnEmptyDictionary; 8 | 9 | - (void)emulateReturnOfNil; 10 | 11 | - (void)emulateReturnOfADictionary: (UADSSCARSignals *)dictionary; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Mocks/SDKMetricsSenderMock.h: -------------------------------------------------------------------------------- 1 | #import "USRVSDKMetrics.h" 2 | #import 3 | 4 | @interface SDKMetricsSenderMock : NSObject 5 | @property (nonatomic, strong, nonnull) NSMutableArray *sentMetrics; 6 | @property (nonatomic, strong, nullable) NSString *metricEndpoint; 7 | @property (nonatomic, assign) UADSMetricSenderState state; 8 | @property (nonatomic, assign) int callCount; 9 | @property (nonatomic, strong, nullable) XCTestExpectation *exp; 10 | @end 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Mocks/UADSCurrentTimestampMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSCurrentTimestamp.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSCurrentTimestampMock : NSObject 6 | @property (nonatomic, assign) CFTimeInterval currentTime; 7 | @property (nonatomic, assign) CFTimeInterval epochCurrentTime; 8 | 9 | + (NSNumber *)mockedDuration; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Mocks/UADSLoggerMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSLogger.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSLoggerMock : NSObject 6 | @property (nonatomic, assign) UADSLogLevel currentLogLevel; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Mocks/UADSLoggerMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSLoggerMock.h" 2 | 3 | @implementation UADSLoggerMock 4 | 5 | - (void)logRecord: (nonnull id)event { 6 | } 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Mocks/UADSTimerFactoryMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSTimerFactory.h" 3 | #import "UADSRepeatableTimerMock.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface UADSTimerFactoryMock : NSObject 8 | @property (nonatomic, strong) NSMutableArray *timerMocks; 9 | - (UADSRepeatableTimerMock *)lastTimerMock; 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Swift/Initialization/Tasks/Mocks/LegacyTaskMock.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | @testable import UnityAds 3 | 4 | final class LegacyTaskMock: PerformanceMeasurableTask { 5 | func start(completion: @escaping ResultClosure) { 6 | completion(VoidSuccess) 7 | } 8 | 9 | var resultMetrics: ResultMetrics.Type { Constants.Metrics.Task.Reset.self } 10 | 11 | var startEventName: String? 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Swift/TestTools/Extensions/InputStream.Data.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | @testable import UnityAds 3 | 4 | extension InputStream { 5 | 6 | func decodableObject() throws -> T? { 7 | try T(from: try data()) 8 | } 9 | 10 | private func data() throws -> Data { 11 | self.open() 12 | let dictionary = try JSONSerialization.jsonObject(with: self, options: []) 13 | self.close() 14 | return try JSONSerialization.data(withJSONObject: dictionary, options: .fragmentsAllowed) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Swift/TestTools/Extensions/URLRequest.Test.Tools.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension URLRequest { 4 | func decodableObject() throws -> T? where T: Decodable { 5 | try httpBodyStream?.decodableObject() 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Swift/TestTools/Mocks/ExperimentsReaderMock.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | @testable import UnityAds 3 | 4 | struct ExperimentsReaderMock: ExperimentsReader, SessionTokenReader { 5 | let expectedExp: [String: Any] 6 | let sessionToken = "" 7 | 8 | var experiments: ConfigExperiments? { 9 | try? .init(dictionary: expectedExp) 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Swift/TestTools/Mocks/Factories/InitTaskFactoryMock.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | @testable import UnityAds 3 | 4 | final class InitTaskFactoryMock: TaskFactory { 5 | var taskMock = TaskMock() 6 | func task(of type: String) -> Task { 7 | return taskMock 8 | } 9 | 10 | typealias Element = String 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Swift/TestTools/Mocks/Network/Legacy/UnityAdsDelegateWrapper.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | @testable import UnityAds 3 | 4 | final class UnityAdsDelegateWrapper: NSObject, UnityAdsInitializationDelegate { 5 | 6 | var complete: VoidClosure? 7 | var failure: Closure? 8 | func initializationComplete() { 9 | complete?() 10 | } 11 | 12 | func initializationFailed(_ error: UnityAdsInitializationError, 13 | withMessage message: String) { 14 | 15 | failure?(message) 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Swift/TestTools/Mocks/Network/MockedResponseObject.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | @testable import UnityAds 3 | 4 | struct MockedResponseObject: Codable, Equatable, DictionaryMappable { 5 | let name: String 6 | let id: Int 7 | 8 | init(name: String = "MockedResponseObject", 9 | id: Int = 10) { 10 | self.name = name 11 | self.id = id 12 | } 13 | } 14 | 15 | struct MockedDefaultError: Error {} 16 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Swift/TestTools/Mocks/Tasks/TaskMock.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | @testable import UnityAds 3 | 4 | final class TaskMock: PerformanceMeasurableTask { 5 | private(set) var startCalled = 0 6 | func start(completion: @escaping ResultClosure) { 7 | startCalled += 1 8 | completion(VoidSuccess) 9 | } 10 | 11 | var resultMetrics: ResultMetrics.Type { Constants.Metrics.Task.Reset.self } 12 | 13 | var startEventName: String? 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/Swift/TestTools/Mocks/Tasks/USRVInitializeWebViewCreateTask.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | final class USRVInitializeTaskWebViewCreate: NSObject, USRVInitializeTask { 4 | var errorToFail: Error? 5 | 6 | func systemName() -> String { 7 | return "MockWebView" 8 | } 9 | 10 | func start(completion: @escaping () -> Void, error: @escaping (Error) -> Void) { 11 | errorToFail.do(error) 12 | .onNone(completion) 13 | } 14 | 15 | func retryCount() -> Int { 16 | 0 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/TestUtilities.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface TestUtilities : NSObject 4 | 5 | + (NSString *)getTestServerAddress; 6 | + (NSString *)getTestVideoUrl; 7 | + (int) getTestVideoExpectedSize; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADSTools/Categories/NSArray/NSArray+Sort.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface NSArray(Sort) 6 | 7 | - (NSArray *)defaultSorted; 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADSTools/Categories/NSArray/NSArray+Sort.m: -------------------------------------------------------------------------------- 1 | #import "NSArray+Sort.h" 2 | #import "NSArray+Convenience.h" 3 | 4 | @implementation NSArray (Sort) 5 | 6 | 7 | - (NSArray *)defaultSorted { 8 | return [self sortedArrayWithOptions: 0 9 | usingComparator:^NSComparisonResult (id obj1, id obj2) { 10 | return [obj1 compare: obj2 11 | options: NSCaseInsensitiveSearch]; 12 | }]; 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADSTools/Categories/USRVConfiguration/USRVConfiguration+TestConvenience.h: -------------------------------------------------------------------------------- 1 | #import "USRVConfiguration.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface USRVConfiguration (TestConvenience) 6 | + (instancetype)newEmpty; 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADSTools/Categories/USRVConfiguration/USRVConfiguration+TestConvenience.m: -------------------------------------------------------------------------------- 1 | 2 | #import "USRVConfiguration+TestConvenience.h" 3 | 4 | @implementation USRVConfiguration (TestConvenience) 5 | + (instancetype)newEmpty { 6 | return [self newFromJSON: @{}]; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADSTools/UADSProxyReflection/Mocks/UADSBridgeMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSProxyReflection.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSBridgeMock : UADSProxyReflection 7 | @property (nonatomic, readonly) NSString *testValue; 8 | + (instancetype)createDefault; 9 | - (NSString *) nonExistingKVO; 10 | + (void) setMockSelectors: (NSArray *)names; 11 | + (void)setMockKeys: (NSArray *)names; 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADSTools/UADSProxyReflection/Mocks/UADSNullInitializedMock.h: -------------------------------------------------------------------------------- 1 | #import "UADSProxyReflection.h" 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | @interface UADSNullInitializedMock : NSObject 5 | @end 6 | 7 | @interface UADSNullInitializedReflectionMock : UADSProxyReflection 8 | @end 9 | 10 | @interface UADSNSObjectReflectionMock : UADSProxyReflection 11 | + (NSNumber *)proxyDeallocationCount; 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADSTools/UADSProxyReflection/Mocks/UADSProxyReflectionMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSProxyReflection.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface UADSProxyReflectionMock : UADSProxyReflection 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADSTools/UADSProxyReflection/Mocks/UADSProxyReflectionMock.m: -------------------------------------------------------------------------------- 1 | 2 | #import "UADSProxyReflectionMock.h" 3 | 4 | @implementation UADSProxyReflectionMock 5 | + (NSString *)className { 6 | return @"NSMutableArray"; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/Categories/NSData+JSONSerialization.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface NSData (JSONSerialization) 6 | - (nonnull NSDictionary *)uads_jsonRepresentation; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/Categories/NSData+JSONSerialization.m: -------------------------------------------------------------------------------- 1 | #import "NSData+JSONSerialization.h" 2 | 3 | @implementation NSData (JSONSerialization) 4 | 5 | - (nonnull NSDictionary *)uads_jsonRepresentation { 6 | NSError *error; 7 | NSDictionary *configDictionary = [NSJSONSerialization JSONObjectWithData: self 8 | options: kNilOptions 9 | error: &error]; 10 | 11 | return error == nil ? configDictionary : @{}; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/Categories/UADSHeaderBiddingToken+Compressed.h: -------------------------------------------------------------------------------- 1 | #import "UADSHeaderBiddingToken.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UADSHeaderBiddingToken (Compressed) 6 | - (NSDictionary *)tokenDictionary; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/GMAError+XCTest/GMAError+XCTest.h: -------------------------------------------------------------------------------- 1 | #import "GMAError.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface GMAError (XCTest) 6 | - (void)testWithEventName: (NSString *)name 7 | expParams: (NSArray *)params; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/GMAError+XCTest/GMAError+XCTest.m: -------------------------------------------------------------------------------- 1 | #import "GMAError+XCTest.h" 2 | #import 3 | #import "GMATestCommonConstants.h" 4 | 5 | @implementation GMAError (XCTest) 6 | 7 | - (void)testWithEventName: (NSString *)name 8 | expParams: (NSArray *)params { 9 | idevent = [self convertToEvent]; 10 | 11 | XCTAssertEqualObjects(event.eventName, name); 12 | XCTAssertEqualObjects(event.categoryName, kGMAEventName); 13 | XCTAssertEqualObjects(event.params, params); 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/GMAIntegrationTestsConstants.h: -------------------------------------------------------------------------------- 1 | #ifndef GMATestsCommonConstants_h 2 | #define GMATestsCommonConstants_h 3 | 4 | #define DEFAULT_WAITING_INTERVAL 15 5 | static NSString *const kDefaultAdUnitID = @"ca-app-pub-3940256099942544/4411468910"; 6 | 7 | #endif /* GMATestsCommonConstants_h */ 8 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/GMATestCommonConstants.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef GMATestCommonConstants_h 3 | #define GMATestCommonConstants_h 4 | static NSString *const kFakePlacementID = @"TEST"; 5 | static NSString *const kGMAEventName = @"GMA"; 6 | static NSString *const kGMAQueryID = @"kGMAQueryID"; 7 | static NSString *const kGMABannerAdId = @"kBannerAdId"; 8 | #endif /* GMATestCommonConstants_h */ 9 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/GMATestsHelper/USRVWebViewCallbackMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "USRVWebViewCallback.h" 3 | #import "UADSGenericCompletion.h" 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | typedef void (^UADSWebViewCallbackCompletion)(NSArray*); 7 | 8 | @interface USRVWebViewCallbackMock : USRVWebViewCallback 9 | 10 | + (instancetype)newWithCompletion: (UADSSuccessCompletion)completion; 11 | 12 | + (instancetype)newSwiftCompletion: (UADSWebViewCallbackCompletion)completion; 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/NSDate+Mock.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSDate (Mock) 4 | + (instancetype) date; 5 | + (NSTimeInterval)currentTimeInterval; 6 | + (void) setMockDate: (BOOL)mock; 7 | @end 8 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/NSDate+Mock.m: -------------------------------------------------------------------------------- 1 | #import "NSDate+Mock.h" 2 | 3 | static BOOL mockDate = true; 4 | 5 | @implementation NSDate (Mock) 6 | + (instancetype)date { 7 | if (mockDate) { 8 | return [NSDate dateWithTimeIntervalSince1970: 12345]; 9 | } 10 | 11 | return [NSDate dateWithTimeIntervalSinceNow: 0]; 12 | } 13 | 14 | + (NSTimeInterval)currentTimeInterval { 15 | return [[NSDate date] timeIntervalSince1970]; 16 | } 17 | 18 | + (void)setMockDate: (BOOL)mock { 19 | mockDate = mock; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UADTestsTools/XCTestAssert+Fail.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | #import 4 | NS_ASSUME_NONNULL_BEGIN 5 | /*! 6 | * @define XCTAssertFail(...) 7 | * Generates a failure 8 | * @param ... An optional supplementary description of the failure. A literal NSString, optionally with string format specifiers. This parameter can be completely omitted. 9 | */ 10 | #define XCTAssertFail(message) XCTAssertFalse(true, message); 11 | 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UnitTestsPrefixHeader.pch: -------------------------------------------------------------------------------- 1 | #ifndef UnitTestsPrefixHeader_pch 2 | #define UnitTestsPrefixHeader_pch 3 | 4 | #import 5 | #import "USRVDeviceLog.h" 6 | #import "UADSTools.h" 7 | #import "XCTestCase+Convenience.h" 8 | #import "XCTestAssert+Fail.h" 9 | #import 10 | #import "GMATestCommonConstants.h" 11 | 12 | #endif /* UnitTestsPrefixHeader_pch */ 13 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UnityServices/Ads/Load/UADSAbstractModule/Mocks/UADSEventHandlerMock/UADSEventHandlerMock.h: -------------------------------------------------------------------------------- 1 | #import "UADSEventHandler.h" 2 | NS_ASSUME_NONNULL_BEGIN 3 | 4 | 5 | @interface UADSEventHandlerMock : NSObject 6 | @property (nonatomic, strong) NSMutableDictionary *> *errors; 7 | @property (nonatomic, strong) NSMutableDictionary *startedCalls; 8 | @property (nonatomic, strong) NSMutableDictionary *onSuccessCalls; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UnityServices/Ads/Load/UADSShowModule/Mocks/UIViewControllerMock.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface UIViewControllerMock : UIViewController 6 | - (NSInteger)presentViewControllerCalledNumberOfTimes; 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UnityServices/Banners/BannerTestDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UADSBannerViewDelegate.h" 3 | 4 | @interface BannerTestDelegate : NSObject 5 | 6 | @property (nonatomic, copy) void (^ didLoadBlock)(UADSBannerView *); 7 | @property (nonatomic, copy) void (^ didClickBlock)(UADSBannerView *); 8 | @property (nonatomic, copy) void (^ didLeaveApplicationBlock)(UADSBannerView *); 9 | @property (nonatomic, copy) void (^ didErrorBlock)(UADSBannerView *, UADSBannerError *error); 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UnityServices/Store/Transactions/StoreKitBridges/Mocks/NSLocale+CustomInit.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NSLocale+PriceDictionary.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface NSLocale (CustomInit) 6 | + (instancetype) newForUS; 7 | + (NSDictionary *)defaultTestData; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UnityServices/Store/Transactions/StoreKitBridges/Mocks/SKProduct+CustomInit.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "SKProductBridge+Dictionary.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SKProduct (CustomInit) 6 | + (instancetype)newFromDictionary: (NSDictionary *)dictionary; 7 | + (NSDictionary *)defaultTestData; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UnityServices/Store/Transactions/StoreKitBridges/Mocks/SKProductDiscount+CustomInit.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "SKProductDiscountBridge.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SKProductDiscount (CustomInit) 6 | + (instancetype)newFromDictionary: (NSDictionary *)dictionary; 7 | + (NSDictionary *)defaultTestData; 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/UnityServices/Store/Transactions/StoreKitBridges/Mocks/SKProductSubscriptionPeriod+CustomInit.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "SKProductSubscriptionPeriodBridge.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface SKProductSubscriptionPeriod (CustomInit) 7 | + (instancetype)newFromDictionary: (NSDictionary *)dictionary; 8 | + (NSDictionary *)defaultTestData; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/WebExposedApi/Mocks/UADSEventSenderMock.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | #import "UADSWebViewEventSender.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface UADSEventSenderMock : NSObject 8 | @property (nonatomic, strong) NSArray > *receivedEvents; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Tests/UnityAdsTests/WebExposedApi/Mocks/UADSEventSenderMock.m: -------------------------------------------------------------------------------- 1 | #import "UADSEventSenderMock.h" 2 | #import "UADSTools.h" 3 | 4 | @implementation UADSEventSenderMock 5 | 6 | - (instancetype)init { 7 | SUPER_INIT; 8 | self.receivedEvents = [NSArray new]; 9 | return self; 10 | } 11 | 12 | - (void)sendEvent: (id)event { 13 | _receivedEvents = [_receivedEvents arrayByAddingObject: event]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Tests/UnityAdsUITests/Tools/Extensions/XCUIApplication+Extension.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTest 3 | 4 | extension XCUIApplication { 5 | 6 | func setInterstitialPlacement(_ interstitialPlacementId: String) { 7 | launchArguments += ["-interstitialPlacementId", interstitialPlacementId] 8 | } 9 | 10 | func setGameID(_ gameID: String) { 11 | launchArguments += ["-adsExampleAppGameId", gameID] 12 | } 13 | 14 | } 15 | --------------------------------------------------------------------------------