├── .github
└── workflows
│ ├── build_docs.yml
│ ├── build_sample_workflow.yml
│ ├── nightly_build_worklow.yml
│ ├── on_new_tag_workflow.yml
│ └── on_push_workflow.yml
├── .gitignore
├── .reuse
└── dep5
├── Dockerfile.codescan
├── Emarsys Sample
├── .DS_Store
├── Emarsys Sample
│ └── .DS_Store
├── Emarsys-Sample.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Emarsys-Sample.xcscheme
├── Emarsys-Sample.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── Emarsys-Sample
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── 1024.png
│ │ │ ├── 114.png
│ │ │ ├── 120.png
│ │ │ ├── 180.png
│ │ │ ├── 29.png
│ │ │ ├── 40.png
│ │ │ ├── 57.png
│ │ │ ├── 58.png
│ │ │ ├── 60.png
│ │ │ ├── 80.png
│ │ │ ├── 87.png
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── placeholderImage.imageset
│ │ │ ├── Contents.json
│ │ │ └── placeholderImage.png
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ConfigUserDefaultsKey.swift
│ ├── Emarsys-Sample.entitlements
│ ├── Extensions
│ │ ├── ShakeGesture.swift
│ │ └── UIApplication+Keyboard.swift
│ ├── Inbox
│ │ ├── MessageManager.swift
│ │ └── UserCentricManager.swift
│ ├── Info.plist
│ ├── Models
│ │ ├── LoginData.swift
│ │ ├── Message.swift
│ │ └── Product.swift
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ ├── SceneDelegate.swift
│ ├── SignInWithAppleDelegate.swift
│ ├── ViewComponents
│ │ ├── FloatingTextField.swift
│ │ ├── ImageView.swift
│ │ ├── InfoPanelView.swift
│ │ ├── InlineInAppView.swift
│ │ ├── MessagesView.swift
│ │ ├── MultilineTextView.swift
│ │ ├── ProductsView.swift
│ │ ├── PullToRefreshView.swift
│ │ └── SignInWithAppleButton.swift
│ ├── Views
│ │ ├── ContentView.swift
│ │ ├── DashboardView.swift
│ │ ├── InAppView.swift
│ │ ├── InboxView.swift
│ │ ├── MobileEngageView.swift
│ │ └── PredictView.swift
│ └── Wrappers
│ │ └── StoredValue.swift
├── Emarsys-SampleTests
│ ├── Emarsys_SampleTests.swift
│ └── Info.plist
├── Emarsys-SampleUITests
│ ├── Emarsys_SampleUITests.swift
│ └── Info.plist
├── NotificationService
│ ├── Info.plist
│ └── NotificationService.swift
├── Podfile
└── README.md
├── EmarsysNotificationService.podspec
├── EmarsysNotificationService.podspec.template
├── EmarsysSDK.podspec
├── EmarsysSDK.podspec.template
├── EmarsysSDK.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── xcshareddata
│ └── xcschemes
│ ├── E2ETests.xcscheme
│ ├── EmarsysSDK.xcscheme
│ ├── PredictTests.xcscheme
│ └── Tests.xcscheme
├── Jenkinsfile
├── LICENSE
├── LICENSES
└── MPL-2.0.txt
├── Package.resolved
├── Package.swift
├── Podfile
├── README.md
├── SdkHost
├── AppDelegate.h
├── AppDelegate.m
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
├── SdkHost.entitlements
├── ViewController.h
├── ViewController.m
└── main.m
├── Sources
├── Core
│ ├── Batch
│ │ ├── EMSBatchingShardTrigger.m
│ │ ├── EMSCountPredicate.m
│ │ ├── EMSListChunker.m
│ │ └── EMSPredicate.m
│ ├── Categories
│ │ ├── EMSRequestModel+RequestIds.m
│ │ ├── EMSResponseModel+EMSCore.m
│ │ ├── NSDate+EMSCore.m
│ │ ├── NSDictionary+EMSCore.m
│ │ ├── NSError+EMSCore.m
│ │ ├── NSHTTPURLResponse+EMSCore.m
│ │ ├── NSMutableDictionary+EMSCore.m
│ │ ├── NSOperationQueue+EMSCore.m
│ │ ├── NSString+EMSCore.m
│ │ ├── NSURL+EMSCore.m
│ │ └── NSURLRequest+EMSCore.m
│ ├── ConnectionWatchdog
│ │ └── EMSConnectionWatchdog.m
│ ├── Crypto
│ │ └── EMSCrypto.m
│ ├── Database
│ │ ├── EMSCountMapper.m
│ │ ├── EMSRequestModelMapper.m
│ │ ├── EMSSQLStatementFactory.m
│ │ ├── EMSSQLiteHelper.m
│ │ ├── EMSShardMapper.m
│ │ ├── EMSSqliteSchemaHandler.m
│ │ └── Trigger
│ │ │ ├── EMSDBTrigger.m
│ │ │ └── EMSDBTriggerKey.m
│ ├── EMSAuthentication.m
│ ├── EMSDeviceInfo.m
│ ├── EMSRequestManager.m
│ ├── Flipper
│ │ └── MEExperimental.m
│ ├── Log
│ │ ├── EMSLogLevel.m
│ │ ├── EMSLogMapper.m
│ │ ├── EMSLogger.m
│ │ ├── EMSSdkStateLogger.m
│ │ └── LogEntry
│ │ │ ├── EMSAppEventLog.m
│ │ │ ├── EMSCrashLog.m
│ │ │ ├── EMSInAppLog.m
│ │ │ ├── EMSMethodNotAllowed.m
│ │ │ ├── EMSOfflineQueueSize.m
│ │ │ ├── EMSRequestLog.m
│ │ │ └── EMSStatusLog.m
│ ├── Middlewares
│ │ └── EMSCompletionMiddleware.m
│ ├── Models
│ │ ├── EMSCompositeRequestModel.m
│ │ ├── EMSRequestModel.m
│ │ ├── EMSRequestModelBuilder.m
│ │ ├── EMSResponseModel.m
│ │ ├── EMSShard.m
│ │ └── EMSShardBuilder.m
│ ├── Networking
│ │ ├── EMSCoreCompletionHandler.m
│ │ ├── EMSCoreCompletionHandlerMiddleware.m
│ │ ├── EMSRESTClient.m
│ │ └── EMSRESTClientCompletionProxyFactory.m
│ ├── Operation
│ │ ├── EMSOperationQueue.m
│ │ └── Proxy
│ │ │ ├── EMSDispatchWaiter.m
│ │ │ └── EMSQueueDelegator.m
│ ├── Providers
│ │ ├── EMSCompletionBlockProvider.m
│ │ ├── EMSCompletionProvider.m
│ │ ├── EMSRandomProvider.m
│ │ ├── EMSTimestampProvider.m
│ │ └── EMSUUIDProvider.m
│ ├── Repository
│ │ ├── RequestModel
│ │ │ └── EMSRequestModelRepository.m
│ │ ├── Shard
│ │ │ └── EMSShardRepository.m
│ │ └── Specifications
│ │ │ ├── EMSCommonSQLSpecification.m
│ │ │ ├── EMSFilterByNothingSpecification.m
│ │ │ ├── EMSFilterByTypeSpecification.m
│ │ │ ├── EMSFilterByValuesSpecification.m
│ │ │ └── EMSQueryOldestRowSpecification.m
│ ├── ResponseHandlers
│ │ └── EMSAbstractResponseHandler.m
│ ├── Router
│ │ └── EMSInstanceRouter.m
│ ├── Schedulers
│ │ ├── EMSAgenda.m
│ │ └── EMSScheduler.m
│ ├── Store
│ │ ├── EMSInMemoryStorage.m
│ │ └── EMSStorage.m
│ ├── Validators
│ │ └── EMSDictionaryValidator.m
│ └── Worker
│ │ └── EMSDefaultWorker.m
├── EmarsysSDK
│ ├── AppStart
│ │ ├── EMSAppStartBlockProvider.m
│ │ └── EMSWrapperChecker.m
│ ├── DI
│ │ ├── EMSDependencyContainer.m
│ │ └── EMSDependencyInjection.m
│ ├── DeepLink
│ │ └── EMSDeepLinkInternal.m
│ ├── EMSAppDelegate.m
│ ├── Emarsys.m
│ ├── Endpoints
│ │ └── EMSEndpoint.m
│ ├── EventHandler
│ │ ├── EMSEventHandlerProtocolBlockConverter.m
│ │ └── EMSEventHandlerProtocolImplementation.m
│ ├── FlipperFeatures
│ │ └── EMSInnerFeature.m
│ ├── Info.plist
│ ├── RequestTools
│ │ └── EMSEmarsysRequestFactory.m
│ └── Setup
│ │ ├── EMSConfig.m
│ │ ├── EMSConfigBuilder.m
│ │ ├── EMSConfigInternal.m
│ │ ├── EMSRemoteConfig.m
│ │ ├── EMSRemoteConfigResponseMapper.m
│ │ └── EMSValueProvider.m
├── MobileEngage
│ ├── Actions
│ │ ├── EMSAppEventActionModel.m
│ │ ├── EMSCustomEventActionModel.m
│ │ ├── EMSDismissActionModel.m
│ │ └── EMSOpenExternalUrlActionModel.m
│ ├── Category
│ │ ├── EMSDeviceInfo+MEClientPayload.m
│ │ ├── NSData+MobileEngine.m
│ │ └── NSDictionary+MobileEngage.m
│ ├── Geofence
│ │ ├── EMSGeofenceInternal.m
│ │ ├── EMSGeofenceResponseMapper.m
│ │ ├── EMSLoggingGeofenceInternal.m
│ │ └── Models
│ │ │ ├── EMSGeofence.m
│ │ │ ├── EMSGeofenceGroup.m
│ │ │ ├── EMSGeofenceResponse.m
│ │ │ └── EMSGeofenceTrigger.m
│ ├── IAM
│ │ ├── EMSInAppInternal.m
│ │ ├── EMSLoggingInApp.m
│ │ ├── JSCommands
│ │ │ ├── MEIAMButtonClicked.m
│ │ │ ├── MEIAMClose.m
│ │ │ ├── MEIAMCommandResultUtils.m
│ │ │ ├── MEIAMCopyToClipboard.m
│ │ │ ├── MEIAMJSCommandFactory.m
│ │ │ ├── MEIAMOpenExternalLink.m
│ │ │ ├── MEIAMRequestPushPermission.m
│ │ │ ├── MEIAMTriggerAppEvent.m
│ │ │ └── MEIAMTriggerMEEvent.m
│ │ ├── MEInApp.m
│ │ ├── MEInAppMessage.m
│ │ ├── MEJSBridge.m
│ │ ├── Providers
│ │ │ ├── EMSIAMViewControllerProvider.m
│ │ │ ├── EMSMainWindowProvider.m
│ │ │ ├── EMSSceneProvider.m
│ │ │ ├── EMSViewControllerProvider.m
│ │ │ └── EMSWindowProvider.m
│ │ └── UI
│ │ │ ├── EMSInlineInAppView.m
│ │ │ └── MEIAMViewController.m
│ ├── InboxV3
│ │ ├── EMSInboxResult.m
│ │ ├── EMSInboxResultParser.m
│ │ ├── EMSInboxV3.m
│ │ ├── EMSLoggingInboxV3.m
│ │ └── EMSMessage.m
│ ├── Info.plist
│ ├── Internal
│ │ ├── EMSDeviceInfoV3ClientInternal.m
│ │ ├── EMSLoggingMobileEngageInternal.m
│ │ └── EMSMobileEngageV3Internal.m
│ ├── Mappers
│ │ ├── EMSContactTokenMapper.m
│ │ ├── EMSDeviceEventStateRequestMapper.m
│ │ ├── EMSMobileEngageMapper.m
│ │ └── EMSOpenIdTokenMapper.m
│ ├── OnEventAction
│ │ ├── EMSLoggingOnEventActionInternal.m
│ │ └── EMSOnEventActionInternal.m
│ ├── Parser
│ │ └── EMSMobileEngageNullSafeBodyParser.m
│ ├── Push
│ │ ├── Actions
│ │ │ ├── EMSActionFactory.m
│ │ │ ├── EMSAppEventAction.m
│ │ │ ├── EMSBadgeCountAction.m
│ │ │ ├── EMSCustomEventAction.m
│ │ │ └── EMSOpenExternalUrlAction.m
│ │ ├── EMSLoggingPushInternal.m
│ │ ├── EMSNotificationInformation.m
│ │ └── EMSPushV3Internal.m
│ ├── RequestTools
│ │ ├── EMSCompletionProxyFactory.m
│ │ ├── EMSMobileEngageRefreshTokenCompletionProxy.m
│ │ ├── EMSRequestFactory.m
│ │ ├── MEDefaultHeaders.m
│ │ └── MERequestContext.m
│ ├── ResponseHandlers
│ │ ├── EMSClientStateResponseHandler.m
│ │ ├── EMSContactTokenResponseHandler.m
│ │ ├── EMSDeviceEventStateResponseHandler.m
│ │ ├── EMSOnEventResponseHandler.m
│ │ ├── EMSRefreshTokenResponseHandler.m
│ │ └── InappMessage
│ │ │ ├── MEIAMCleanupResponseHandlerV3.m
│ │ │ ├── MEIAMCleanupResponseHandlerV4.m
│ │ │ └── MEIAMResponseHandler.m
│ ├── RichNotification
│ │ └── EMSNotificationCenterManager.m
│ ├── RichNotificationExtension
│ │ ├── EMSNotificationService+Actions.m
│ │ ├── EMSNotificationService+Attachment.m
│ │ ├── EMSNotificationService+PushToInApp.m
│ │ ├── EMSNotificationService.m
│ │ ├── MEDownloader.m
│ │ └── Validators
│ │ │ └── EMSServiceDictionaryValidator.m
│ ├── Session
│ │ ├── EMSSession.m
│ │ └── EMSSessionIdHolder.m
│ └── Storage
│ │ ├── IAM
│ │ ├── ButtonClick
│ │ │ ├── MEButtonClick.m
│ │ │ ├── MEButtonClickMapper.m
│ │ │ └── MEButtonClickRepository.m
│ │ └── DisplayedIAM
│ │ │ ├── MEDisplayedIAM.m
│ │ │ ├── MEDisplayedIAMMapper.m
│ │ │ └── MEDisplayedIAMRepository.m
│ │ ├── MERequestModelRepositoryFactory.m
│ │ ├── MERequestRepositoryProxy.m
│ │ └── MERequestTools.m
├── Predict
│ ├── EMSCartItemUtils.m
│ ├── EMSLoggingPredictInternal.m
│ ├── EMSPredictInternal.m
│ ├── EMSPredictMapper.m
│ ├── Mapper
│ │ └── EMSProductMapper.m
│ ├── Models
│ │ ├── EMSCartItem.m
│ │ ├── EMSProduct.m
│ │ └── EMSProductBuilder.m
│ ├── PRERequestContext.m
│ ├── Recommendations
│ │ ├── EMSLogic.m
│ │ └── EMSRecommendationFilter.m
│ ├── Requests
│ │ ├── EMSPredictRequestModelBuilder.m
│ │ └── EMSPredictRequestModelBuilderProvider.m
│ └── ResponseHandlers
│ │ ├── EMSVisitorIdResponseHandler.m
│ │ └── EMSXPResponseHandler.m
├── PrivacyInfo.xcprivacy
├── Private
│ ├── EMSAbstractResponseHandler.h
│ ├── EMSActionFactory.h
│ ├── EMSActionProtocol.h
│ ├── EMSAgenda.h
│ ├── EMSAppEventAction.h
│ ├── EMSAppEventLog.h
│ ├── EMSAppStartBlockProvider.h
│ ├── EMSAuthentication.h
│ ├── EMSBadgeCountAction.h
│ ├── EMSBatchingShardTrigger.h
│ ├── EMSCartItemUtils.h
│ ├── EMSClientStateResponseHandler.h
│ ├── EMSCommonSQLSpecification.h
│ ├── EMSCompletionBlockProvider.h
│ ├── EMSCompletionMiddleware.h
│ ├── EMSCompletionProvider.h
│ ├── EMSCompletionProxyFactory.h
│ ├── EMSCompositeRequestModel.h
│ ├── EMSConfigInternal.h
│ ├── EMSConnectionWatchdog.h
│ ├── EMSContactTokenMapper.h
│ ├── EMSContactTokenResponseHandler.h
│ ├── EMSCoreCompletion.h
│ ├── EMSCoreCompletionHandler.h
│ ├── EMSCoreCompletionHandlerMiddleware.h
│ ├── EMSCountMapper.h
│ ├── EMSCountPredicate.h
│ ├── EMSCrashLog.h
│ ├── EMSCrypto.h
│ ├── EMSCustomEventAction.h
│ ├── EMSDBTrigger.h
│ ├── EMSDBTriggerKey.h
│ ├── EMSDBTriggerProtocol.h
│ ├── EMSDeepLinkInternal.h
│ ├── EMSDeepLinkProtocol.h
│ ├── EMSDefaultWorker.h
│ ├── EMSDependencyContainer.h
│ ├── EMSDependencyContainerProtocol.h
│ ├── EMSDependencyInjection.h
│ ├── EMSDeviceEventStateRequestMapper.h
│ ├── EMSDeviceEventStateResponseHandler.h
│ ├── EMSDeviceInfo+MEClientPayload.h
│ ├── EMSDeviceInfo.h
│ ├── EMSDeviceInfoClientProtocol.h
│ ├── EMSDeviceInfoV3ClientInternal.h
│ ├── EMSDictionaryValidator.h
│ ├── EMSDispatchWaiter.h
│ ├── EMSEmarsysRequestFactory.h
│ ├── EMSEndpoint.h
│ ├── EMSEventHandlerProtocolBlockConverter.h
│ ├── EMSEventHandlerProtocolImplementation.h
│ ├── EMSFilterByNothingSpecification.h
│ ├── EMSFilterByTypeSpecification.h
│ ├── EMSFilterByValuesSpecification.h
│ ├── EMSGeofenceGroup.h
│ ├── EMSGeofenceInternal.h
│ ├── EMSGeofenceResponse.h
│ ├── EMSGeofenceResponseMapper.h
│ ├── EMSIAMAppEventProtocol.h
│ ├── EMSIAMCloseProtocol.h
│ ├── EMSIAMViewControllerProvider.h
│ ├── EMSInAppInternal.h
│ ├── EMSInAppLog.h
│ ├── EMSInMemoryStorage.h
│ ├── EMSInboxResultParser.h
│ ├── EMSInboxV3.h
│ ├── EMSInnerFeature.h
│ ├── EMSInstanceRouter.h
│ ├── EMSListChunker.h
│ ├── EMSLockableProtocol.h
│ ├── EMSLogEndpoints.h
│ ├── EMSLogEntryProtocol.h
│ ├── EMSLogMapper.h
│ ├── EMSLogger.h
│ ├── EMSLoggingGeofenceInternal.h
│ ├── EMSLoggingInApp.h
│ ├── EMSLoggingInboxV3.h
│ ├── EMSLoggingMobileEngageInternal.h
│ ├── EMSLoggingOnEventActionInternal.h
│ ├── EMSLoggingPredictInternal.h
│ ├── EMSLoggingPushInternal.h
│ ├── EMSMacros.h
│ ├── EMSMainWindowProvider.h
│ ├── EMSMethodNotAllowed.h
│ ├── EMSMobileEngageMapper.h
│ ├── EMSMobileEngageNullSafeBodyParser.h
│ ├── EMSMobileEngageProtocol.h
│ ├── EMSMobileEngageRefreshTokenCompletionProxy.h
│ ├── EMSMobileEngageV3Internal.h
│ ├── EMSModelMapperProtocol.h
│ ├── EMSNotificationCenterManager.h
│ ├── EMSNotificationService+Actions.h
│ ├── EMSNotificationService+Attachment.h
│ ├── EMSNotificationService+PushToInApp.h
│ ├── EMSOfflineQueueSize.h
│ ├── EMSOnEventActionInternal.h
│ ├── EMSOnEventResponseHandler.h
│ ├── EMSOpenExternalUrlAction.h
│ ├── EMSOpenIdTokenMapper.h
│ ├── EMSOperationQueue.h
│ ├── EMSPredicate.h
│ ├── EMSPredictInternal.h
│ ├── EMSPredictInternalProtocol.h
│ ├── EMSPredictMapper.h
│ ├── EMSPredictRequestModelBuilder.h
│ ├── EMSPredictRequestModelBuilderProvider.h
│ ├── EMSProduct+Emarsys.h
│ ├── EMSProductBuilder.h
│ ├── EMSProductMapper.h
│ ├── EMSPushV3Internal.h
│ ├── EMSQueryOldestRowSpecification.h
│ ├── EMSQueueDelegator.h
│ ├── EMSRESTClient.h
│ ├── EMSRESTClientCompletionProxyFactory.h
│ ├── EMSRESTClientCompletionProxyProtocol.h
│ ├── EMSRandomProvider.h
│ ├── EMSRefreshTokenResponseHandler.h
│ ├── EMSRemoteConfig.h
│ ├── EMSRemoteConfigResponseMapper.h
│ ├── EMSRepositoryProtocol.h
│ ├── EMSRequestFactory.h
│ ├── EMSRequestFromShardsMapperProtocol.h
│ ├── EMSRequestLog.h
│ ├── EMSRequestManager.h
│ ├── EMSRequestModel+RequestIds.h
│ ├── EMSRequestModel.h
│ ├── EMSRequestModelBuilder.h
│ ├── EMSRequestModelMapper.h
│ ├── EMSRequestModelMapperProtocol.h
│ ├── EMSRequestModelRepository.h
│ ├── EMSRequestModelRepositoryProtocol.h
│ ├── EMSResponseBodyParserProtocol.h
│ ├── EMSResponseModel+EMSCore.h
│ ├── EMSResponseModel.h
│ ├── EMSSQLSpecificationProtocol.h
│ ├── EMSSQLStatementFactory.h
│ ├── EMSSQLiteHelper.h
│ ├── EMSSQLiteHelperProtocol.h
│ ├── EMSSQLiteHelperSchemaHandlerProtocol.h
│ ├── EMSSceneProvider.h
│ ├── EMSScheduler.h
│ ├── EMSSchemaContract.h
│ ├── EMSSdkStateLogger.h
│ ├── EMSServiceDictionaryValidator.h
│ ├── EMSSession.h
│ ├── EMSSessionIdHolder.h
│ ├── EMSShard.h
│ ├── EMSShardBuilder.h
│ ├── EMSShardMapper.h
│ ├── EMSShardRepository.h
│ ├── EMSShardRepositoryProtocol.h
│ ├── EMSSqliteSchemaHandler.h
│ ├── EMSStatusLog.h
│ ├── EMSStorage.h
│ ├── EMSStorageProtocol.h
│ ├── EMSTimestampProvider.h
│ ├── EMSTrigger.h
│ ├── EMSUUIDProvider.h
│ ├── EMSValueProvider.h
│ ├── EMSViewControllerProvider.h
│ ├── EMSVisitorIdResponseHandler.h
│ ├── EMSWindowProvider.h
│ ├── EMSWorkerProtocol.h
│ ├── EMSWrapperChecker.h
│ ├── EMSXPResponseHandler.h
│ ├── EmarsysSDKVersion.h
│ ├── MEButtonClick.h
│ ├── MEButtonClickContract.h
│ ├── MEButtonClickMapper.h
│ ├── MEButtonClickRepository+Private.h
│ ├── MEButtonClickRepository.h
│ ├── MEDefaultHeaders.h
│ ├── MEDisplayedIAM.h
│ ├── MEDisplayedIAMContract.h
│ ├── MEDisplayedIAMMapper.h
│ ├── MEDisplayedIAMRepository.h
│ ├── MEDownloader.h
│ ├── MEExperimental.h
│ ├── MEIAMButtonClicked.h
│ ├── MEIAMCleanupResponseHandlerV3.h
│ ├── MEIAMCleanupResponseHandlerV4.h
│ ├── MEIAMClose.h
│ ├── MEIAMCommandResultUtils.h
│ ├── MEIAMCopyToClipboard.h
│ ├── MEIAMJSCommandFactory.h
│ ├── MEIAMJSCommandProtocol.h
│ ├── MEIAMOpenExternalLink.h
│ ├── MEIAMProtocol.h
│ ├── MEIAMRequestPushPermission.h
│ ├── MEIAMResponseHandler.h
│ ├── MEIAMTriggerAppEvent.h
│ ├── MEIAMTriggerMEEvent.h
│ ├── MEIAMViewController.h
│ ├── MEInApp.h
│ ├── MEInAppMessage.h
│ ├── MEInAppTrackingProtocol.h
│ ├── MEJSBridge.h
│ ├── MERequestContext.h
│ ├── MERequestModelRepositoryFactory.h
│ ├── MERequestRepositoryProxy.h
│ ├── MERequestTools.h
│ ├── NSData+MobileEngine.h
│ ├── NSDate+EMSCore.h
│ ├── NSDictionary+EMSCore.h
│ ├── NSDictionary+MobileEngage.h
│ ├── NSError+EMSCore.h
│ ├── NSHTTPURLResponse+EMSCore.h
│ ├── NSMutableDictionary+EMSCore.h
│ ├── NSOperationQueue+EMSCore.h
│ ├── NSString+EMSCore.h
│ ├── NSURL+EMSCore.h
│ ├── NSURLRequest+EMSCore.h
│ └── PRERequestContext.h
└── include
│ ├── EMSActionModelProtocol.h
│ ├── EMSAppDelegate.h
│ ├── EMSAppEventActionModel.h
│ ├── EMSBlocks.h
│ ├── EMSCartItem.h
│ ├── EMSCartItemProtocol.h
│ ├── EMSConfig.h
│ ├── EMSConfigBuilder.h
│ ├── EMSConfigProtocol.h
│ ├── EMSCustomEventActionModel.h
│ ├── EMSDismissActionModel.h
│ ├── EMSFlipperFeatures.h
│ ├── EMSGeofence.h
│ ├── EMSGeofenceProtocol.h
│ ├── EMSGeofenceTrigger.h
│ ├── EMSInAppProtocol.h
│ ├── EMSInboxResult.h
│ ├── EMSInboxTag.h
│ ├── EMSInlineInAppView.h
│ ├── EMSLogLevel.h
│ ├── EMSLogLevelProtocol.h
│ ├── EMSLogic.h
│ ├── EMSLogicProtocol.h
│ ├── EMSMessage.h
│ ├── EMSMessageInboxProtocol.h
│ ├── EMSNotificationInformation.h
│ ├── EMSNotificationService.h
│ ├── EMSOnEventActionProtocol.h
│ ├── EMSOpenExternalUrlActionModel.h
│ ├── EMSPredictProtocol.h
│ ├── EMSProduct.h
│ ├── EMSProductProtocol.h
│ ├── EMSPushNotificationProtocol.h
│ ├── EMSRecommendationFilter.h
│ ├── EMSRecommendationFilterProtocol.h
│ └── Emarsys.h
├── Tests
├── CoreTests.plist
├── CoreTests
│ ├── AuthenticationTests.m
│ ├── Batch
│ │ ├── EMSBatchingShardTriggerTests.m
│ │ ├── EMSCountPredicateTests.m
│ │ └── EMSListChunkerTests.m
│ ├── Categories
│ │ ├── NSDate+EMSCoreTests.m
│ │ ├── NSDictionary+EMSCoreTest.m
│ │ ├── NSDictionary+EMSCoreTests.m
│ │ ├── NSMutableDicitionary+EMSCoreTests.m
│ │ ├── NSURL+EMSCoreTests.m
│ │ └── NSURLRequest+CoreTests.m
│ ├── Crypto
│ │ ├── EMS11-C3FD3.json
│ │ ├── EMS11-C3FD3.sig
│ │ └── EMSCryptoTests.m
│ ├── Database
│ │ ├── EMSSQLStatementFactoryTests.m
│ │ ├── EMSSQLiteHelper+Test.h
│ │ ├── EMSSQLiteHelperTests.m
│ │ ├── EMSTestColumnInfo.h
│ │ ├── EMSTestColumnInfo.m
│ │ ├── EMSTestColumnInfoMapper.h
│ │ ├── EMSTestColumnInfoMapper.m
│ │ └── Triggers
│ │ │ └── DbTriggerTests.m
│ ├── DennaTests.m
│ ├── EMSDefaultWorker+Private.h
│ ├── EMSDefaultWorkerTests.m
│ ├── EMSDeviceInfoTests.m
│ ├── EMSDictionaryValidatorTests.m
│ ├── EMSResponseModelTests.m
│ ├── Fake
│ │ ├── FakeCompletionHandler.h
│ │ ├── FakeCompletionHandler.m
│ │ ├── FakeConnectionChangeListener.h
│ │ ├── FakeConnectionChangeListener.m
│ │ ├── FakeConnectionWatchdog.h
│ │ ├── FakeConnectionWatchdog.m
│ │ ├── FakeDBTrigger.h
│ │ ├── FakeDBTrigger.m
│ │ ├── FakeFlipperFeature.h
│ │ ├── FakeFlipperFeature.m
│ │ ├── FakeRESTClientCompletionProxy.h
│ │ ├── FakeRESTClientCompletionProxy.m
│ │ ├── FakeRequestModelMapper.h
│ │ ├── FakeRequestModelMapper.m
│ │ ├── FakeSQLSpecification.h
│ │ ├── FakeSQLSpecification.m
│ │ ├── FakeShardRepository.h
│ │ ├── FakeShardRepository.m
│ │ ├── FakeTimeStampProvider.h
│ │ └── FakeTimeStampProvider.m
│ ├── Flipper
│ │ ├── MEExperimental+Test.h
│ │ └── MEExperimentalTests.m
│ ├── Log
│ │ ├── EMSLogLevelTests.m
│ │ ├── EMSLogMapperTests.m
│ │ ├── EMSLoggerTests.m
│ │ ├── EMSSdkStateLoggerTests.m
│ │ └── LogEntry
│ │ │ ├── EMSAppEventLogTests.m
│ │ │ ├── EMSCrashLogTests.m
│ │ │ ├── EMSInAppLogTests.m
│ │ │ ├── EMSMethodNotAllowedTests.m
│ │ │ ├── EMSOfflineQueueSizeTests.m
│ │ │ ├── EMSRequestLogTests.m
│ │ │ └── EMSStatusLogTests.m
│ ├── Middlewares
│ │ └── EMSCompletionMiddlewareTests.m
│ ├── Networking
│ │ ├── EMSCoreCompletionHandlerMiddlewareTests.m
│ │ ├── EMSCoreCompletionHandlerTests.m
│ │ ├── EMSRESTClientCompletionProxyFactoryTests.m
│ │ └── EMSRESTClientTests.m
│ ├── OfflineTests.m
│ ├── OperationQueue
│ │ ├── EMSOperationQueueTests.m
│ │ └── Proxy
│ │ │ ├── EMSDispatchWaiterTests.m
│ │ │ └── EMSQueueDelegatorTests.m
│ ├── Providers
│ │ ├── EMSCompletionBlockProviderTests.m
│ │ ├── EMSRandomProviderTest.m
│ │ ├── EMSTimestampProviderTests.m
│ │ └── EMSUUIDProviderTests.m
│ ├── Repository
│ │ ├── EMSFilterByNothingSpecificationTests.m
│ │ ├── EMSFilterByTypeSpecificationTests.m
│ │ ├── EMSFilterByValuesSpecificationTests.m
│ │ ├── EMSQueryOldestRowSpecificationTests.m
│ │ ├── EMSRequestModelRepositoryTests.m
│ │ └── EMSShardRepositoryTests.m
│ ├── Request
│ │ ├── EMSRequestManagerTests.m
│ │ └── EMSRequestModelTests.m
│ ├── Router
│ │ └── EMSInstanceRouterTests.m
│ ├── Schedulers
│ │ └── EMSSchedulerTests.m
│ ├── Shard
│ │ └── EMSShardTests.m
│ ├── Store
│ │ ├── EMSInMemoryStorageTests.m
│ │ └── EMSStorageTests.m
│ └── Utils
│ │ ├── EMSSession+Tests.h
│ │ ├── EMSWaiter.h
│ │ ├── EMSWaiter.m
│ │ ├── Emarsys+Tests.h
│ │ ├── EmarsysTestUtils.h
│ │ ├── EmarsysTestUtils.m
│ │ ├── TestUtils.h
│ │ └── TestUtils.m
├── E2ETests-Bridging-Header.h
├── E2ETests
│ ├── EmarsysE2ETests.swift
│ ├── EmarsysInboxE2ETests.swift
│ └── Info.plist
├── EMSTestPrefixHeader.pch
├── EmarsysSDKTests-Bridging-Header.h
├── EmarsysSDKTests
│ ├── AppStart
│ │ ├── EMSAppStartBlockProviderTests.m
│ │ └── EMSWrapperCheckerTests.m
│ ├── Config
│ │ ├── EMSRemoteConfigResponseMapperTests.m
│ │ └── EmarsysConfigIntegrationTests.m
│ ├── DI
│ │ └── EMSDependencyInjectionTests.m
│ ├── DeepLink
│ │ └── EMSDeepLinkInternalTests.m
│ ├── EmarsysIntegrationTests.m
│ ├── EmarsysTests.m
│ ├── Endpoints
│ │ └── EMSEndpointTests.m
│ ├── EventHandler
│ │ ├── EMSEventHandlerProtocolBlockConverterTests.m
│ │ └── EMSEventHandlerProtocolImplementationTests.m
│ ├── Fake
│ │ ├── FakeRequestManager.h
│ │ └── FakeRequestManager.m
│ ├── FlipperFeatures
│ │ └── EMSInnerFeatureTests.m
│ ├── Info.plist
│ ├── Push
│ │ └── EmarsysPushIntegrationTests.m
│ ├── RequestTools
│ │ └── EMSEmarsysRequestFactoryTests.m
│ └── Setup
│ │ ├── BuilderTests.m
│ │ ├── EMSConfigInternalTests.m
│ │ ├── EMSConfigTests.m
│ │ └── EMSValueProviderTests.m
├── Info.plist
├── MobileEngageTests-Bridging-Header.h
├── MobileEngageTests.plist
├── MobileEngageTests
│ ├── Actions
│ │ ├── EMSAppEventActionModelTests.m
│ │ ├── EMSCustomEventActionModelTests.m
│ │ ├── EMSDismissActionModelTests.m
│ │ └── EMSOpenExternalUrlActionModelTests.m
│ ├── Category
│ │ ├── EMSDeviceInfo+MEClientPayloadTests.m
│ │ ├── NSData+MobileEngageTest.m
│ │ └── NSDictionary+MobileEngageTests.m
│ ├── DeviceInfoClient
│ │ ├── EMSDeviceInfoClientV3InternalIntegrationTests.m
│ │ └── EMSDeviceInfoV3ClientInternalTests.m
│ ├── EMSMobileEngageV3InternalTests.m
│ ├── EMSNotificationCenterManagerTests.m
│ ├── Fakes
│ │ ├── FakeCommand.h
│ │ ├── FakeCommand.m
│ │ ├── FakeDbHelper.h
│ │ ├── FakeDbHelper.m
│ │ ├── FakeDisplayedIAMRepository.swift
│ │ ├── FakeInAppTracker.h
│ │ ├── FakeInAppTracker.m
│ │ ├── FakeInboxNotificationRequestManager.h
│ │ ├── FakeInboxNotificationRequestManager.m
│ │ ├── FakeJSBridge.h
│ │ ├── FakeJSBridge.m
│ │ ├── FakeNotificationDelegate.h
│ │ ├── FakeNotificationDelegate.m
│ │ ├── FakeRequestFactory.swift
│ │ ├── FakeRequestRepository.h
│ │ ├── FakeRequestRepository.m
│ │ ├── FakeResponseHandler.h
│ │ ├── FakeResponseHandler.m
│ │ ├── FakeSpecification.h
│ │ └── FakeSpecification.m
│ ├── Geofence
│ │ ├── EMSGeofenceInternalTests.m
│ │ └── EMSGeofenceMapperTests.m
│ ├── HandlerTests
│ │ ├── AbstractResponseHandlerTests.m
│ │ ├── EMSAbstractResponseHandler+Private.h
│ │ ├── EMSClientStateResponseHandlerTests.m
│ │ ├── EMSContactTokenResponseHandlerTests.m
│ │ ├── EMSDeviceEventStateResponseHandlerTests.m
│ │ ├── EMSRefreshTokenResponseHandlerTests.m
│ │ ├── MEIAMCleanupResponseHandlerV3Tests.m
│ │ ├── MEIAMCleanupResponseHandlerV4Tests.m
│ │ ├── MEIAMResponseHandlerTests.m
│ │ └── OnEventResponseHandlerTests.swift
│ ├── IAM
│ │ ├── EMSInAppInternalTests.m
│ │ ├── EMSInAppProtocolTests.m
│ │ ├── EMSInAppTests.m
│ │ ├── EMSInlineInAppViewTests.m
│ │ ├── MEIAMViewControllerTests.m
│ │ ├── MEInAppMessageTests.m
│ │ ├── MEInAppTests.m
│ │ ├── MEJSBridgeTests.m
│ │ └── Providers
│ │ │ ├── EMSIAMViewControllerProviderTests.m
│ │ │ ├── EMSMainWindowProviderTests.m
│ │ │ ├── EMSSceneProviderTests.m
│ │ │ ├── EMSViewControllerProviderTests.m
│ │ │ └── EMSWindowProviderTests.m
│ ├── InboxV3
│ │ ├── EMSInboxResultParserTests.m
│ │ ├── EMSInboxV3IntegrationTests.m
│ │ └── EMSInboxV3Tests.m
│ ├── MEIAMJSCommandTests
│ │ ├── MEIAMButtonClickedTests.m
│ │ ├── MEIAMCloseTests.m
│ │ ├── MEIAMCopyToClipboardTests.m
│ │ ├── MEIAMJSCommandFactoryTests.m
│ │ ├── MEIAMOpenExternalLinkTests.m
│ │ ├── MEIAMRequestPushPermissionTests.m
│ │ ├── MEIAMTriggerAppEventTests.m
│ │ ├── MEIAMTriggerMEEventTests.m
│ │ └── TestCommands
│ │ │ ├── MEIAMDidAppear.h
│ │ │ └── MEIAMDidAppear.m
│ ├── Mappers
│ │ ├── EMSContactTokenMapperTests.m
│ │ ├── EMSDeviceEventStateRequestMapperTests.m
│ │ ├── EMSIdTokenMapperTests.m
│ │ └── EMSMobileEngageMapperTests.m
│ ├── OnEventAction
│ │ └── EMSOnEventActionInternalTests.m
│ ├── Parser
│ │ └── EMSMobileEngageNullSafeBodyParserTests.m
│ ├── Push
│ │ ├── Actions
│ │ │ ├── EMSActionFactoryTests.m
│ │ │ ├── EMSAppEventActionTests.m
│ │ │ ├── EMSBadgeCountActionTests.m
│ │ │ ├── EMSCustomEventActionTests.m
│ │ │ └── EMSOpenExternalEventActionTests.m
│ │ └── EMSPushV3InternalTests.m
│ ├── Request
│ │ ├── EMSCompletionProxyFactoryTests.m
│ │ ├── EMSMobileEngageRefreshTokenCompletionProxyTests.m
│ │ ├── EMSRequestFactoryTests.m
│ │ ├── EMSRequestModelMatcher.h
│ │ ├── EMSRequestModelMatcher.m
│ │ └── MERequestContextTests.m
│ ├── RichNotificationExtension
│ │ ├── EMSNotificationServiceExceptionHandlingTests.m
│ │ ├── MEDownloaderTests.m
│ │ └── MENotificationServiceTests.m
│ ├── Session
│ │ └── EMSSessionTests.m
│ └── Storage
│ │ ├── DisplayedIAMTests.m
│ │ ├── EMSRequestToolsTests.m
│ │ ├── MEButtonClickRepositoryTests.m
│ │ ├── MEButtonClickTests.m
│ │ ├── MEDisplayedIAMRepositoryTests.m
│ │ ├── MERequestModelRepositoryFactoryTests.m
│ │ ├── MERequestRepositoryProxyTests.m
│ │ └── RequestModelSpecificationTests.m
├── PredictTests-Bridging-Header.h
├── PredictTests
│ ├── EMSCartItemUtilsTests.m
│ ├── EMSPredictInternalProtocolTests.m
│ ├── EMSPredictInternalTests.m
│ ├── EMSPredictMapperTests.m
│ ├── Info.plist
│ ├── Mapper
│ │ ├── EMSProductMapperSwiftTests.swift
│ │ └── EMSProductMapperTests.m
│ ├── Models
│ │ └── EMSProductTests.m
│ ├── PRERequestContextTests.m
│ ├── PredictIntegrationTests.m
│ ├── Recommendations
│ │ ├── EMSLogicTests.m
│ │ └── EMSRecommendationFilterTests.m
│ ├── Requests
│ │ ├── EMSPredictRequestModelBuilderProviderTests.m
│ │ └── EMSPredictRequestModelBuilderTests.m
│ └── ResponseHandlers
│ │ ├── EMSVisitorIdResponseHandlerTests.m
│ │ └── EMSXPResponseHandlerTests.m
├── Tests-Bridging-Header.h
├── XCTestCase+Helper.h
└── XCTestCase+Helper.m
├── docs
├── antora.yml
└── modules
│ └── ROOT
│ ├── nav.adoc
│ └── pages
│ ├── index.adoc
│ └── push.adoc
├── private-NSRelease.sh
├── private-release.sh
├── release.sh
├── repo-info.json
└── revoke.sh
/.github/workflows/build_docs.yml:
--------------------------------------------------------------------------------
1 | name: Build Documentation
2 |
3 | on:
4 | push:
5 | branches:
6 | - dev
7 | paths:
8 | - docs/**
9 |
10 | jobs:
11 | build-docs:
12 | name: Build documentation
13 | uses: emartech/me-workflows/.github/workflows/build-docs.yaml@main
14 | secrets: inherit
--------------------------------------------------------------------------------
/.reuse/dep5:
--------------------------------------------------------------------------------
1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2 | Upstream-Name: ios-emarsys-sdk
3 | Upstream-Contact: sdk-team@emarsys.com
4 | Source: https://github.com/emartech/ios-emarsys-sdk
5 |
6 | Files: *
7 | Copyright: 2023 Emarsys
8 | License: MPL-2.0
--------------------------------------------------------------------------------
/Dockerfile.codescan:
--------------------------------------------------------------------------------
1 | FROM ubuntu:22.04
2 |
3 | RUN apt-get update
4 | RUN apt-get install -y ruby-full git curl build-essential
5 | RUN gem install cocoapods -v 1.10.0
6 |
7 | WORKDIR /workspace/source
8 |
9 | CMD pod install --allow-root && cat Podfile.lock
10 |
--------------------------------------------------------------------------------
/Emarsys Sample/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/.DS_Store
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys Sample/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys Sample/.DS_Store
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/1024.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/114.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/120.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/180.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/29.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/40.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/57.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/58.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/60.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/80.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/AppIcon.appiconset/87.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/placeholderImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "placeholderImage.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
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 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Assets.xcassets/placeholderImage.imageset/placeholderImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emartech/ios-emarsys-sdk/ddd6392b3d527770f6306c9d11fb332a9306006e/Emarsys Sample/Emarsys-Sample/Assets.xcassets/placeholderImage.imageset/placeholderImage.png
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/ConfigUserDefaultsKey.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | import Foundation
6 |
7 | enum ConfigUserDefaultsKey: String {
8 | case applicationCode = "applicationCode"
9 | case contactFieldId = "contactFieldId"
10 | case merchantId = "merchantId"
11 | }
12 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Emarsys-Sample.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | aps-environment
6 | development
7 | com.apple.developer.applesignin
8 |
9 | Default
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Extensions/ShakeGesture.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | import Foundation
6 | import UIKit
7 |
8 | extension NSNotification.Name {
9 | public static let deviceDidShakeNotification = NSNotification.Name("DeviceDidShakeNotification")
10 | }
11 |
12 | extension UIWindow {
13 | open override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
14 | super.motionEnded(motion, with: event)
15 | NotificationCenter.default.post(name: .deviceDidShakeNotification, object: event)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Extensions/UIApplication+Keyboard.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | import UIKit
6 |
7 | extension UIApplication {
8 | func endEditing() {
9 | sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Inbox/MessageManager.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | import EmarsysSDK
6 |
7 | import Foundation
8 |
9 | protocol MessageManager : ObservableObject {
10 | var messages: [Message] { get }
11 | var messagesPublished: Published<[Message]> { get }
12 | var messagesPublisher: Published<[Message]>.Publisher { get }
13 |
14 | func fetchMessages()
15 | init(messages: [Message])
16 | }
17 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Models/Message.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | import Foundation
6 |
7 | struct Message: Identifiable {
8 | var id = UUID()
9 |
10 | var title: String = ""
11 | var body: String = ""
12 | var imageUrl: String? = nil
13 | }
14 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Models/Product.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | import Foundation
6 |
7 | struct Product: Identifiable {
8 | var id = UUID()
9 |
10 | var title: String
11 | var feature: String
12 | var imageUrl: URL? = nil
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/ViewComponents/SignInWithAppleButton.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2021. Emarsys. All rights reserved.
3 | //
4 |
5 | import SwiftUI
6 | import AuthenticationServices
7 |
8 | struct SignInWithAppleButton: UIViewRepresentable {
9 |
10 | func makeUIView(context: Context) -> ASAuthorizationAppleIDButton {
11 | return ASAuthorizationAppleIDButton()
12 | }
13 |
14 | func updateUIView(_ uiView: ASAuthorizationAppleIDButton, context: Context) {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-Sample/Wrappers/StoredValue.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | import Foundation
6 |
7 | @propertyWrapper struct StoredValue {
8 | let key: String
9 | var storage: UserDefaults = .standard
10 |
11 | var wrappedValue: Value? {
12 | get { storage.value(forKey: key) as? Value }
13 | set { storage.setValue(newValue, forKey: key) }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-SampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Emarsys Sample/Emarsys-SampleUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Emarsys Sample/NotificationService/NotificationService.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | import UserNotifications
6 | import EmarsysNotificationService
7 |
8 | class NotificationService: EMSNotificationService {
9 | }
10 |
--------------------------------------------------------------------------------
/Emarsys Sample/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '11.0'
2 | use_frameworks!
3 |
4 | target "Emarsys-Sample" do
5 | if ENV["DEV"] then
6 | pod 'EmarsysSDK', :path => '../'
7 | else
8 | pod 'EmarsysSDK'
9 | end
10 | end
11 |
12 | target "NotificationService" do
13 | if ENV["DEV"] then
14 | pod 'EmarsysNotificationService', :path => '../'
15 | else
16 | pod 'EmarsysNotificationService'
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/EmarsysSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/EmarsysSDK.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": []
4 | },
5 | "version": 1
6 | }
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '14.0'
2 |
3 | target "Tests" do
4 | pod 'Kiwi', :git => 'https://github.com/kiwi-bdd/Kiwi.git', :tag => 'v3.0.0'
5 | pod 'OCMock', :git => 'https://github.com/erikdoe/ocmock.git', :tag => 'v3.9.4'
6 | end
7 |
8 |
--------------------------------------------------------------------------------
/SdkHost/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SdkHost
4 | //
5 | // Created by Laszlo Ori on 2018. 07. 24..
6 | // Copyright © 2018. Emarsys. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/SdkHost/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/SdkHost/SdkHost.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | keychain-access-groups
6 |
7 | $(AppIdentifierPrefix)com.emarsys.SdkHost
8 | $(AppIdentifierPrefix)com.emarsys.SdkHostTestGroup
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/SdkHost/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // SdkHost
4 | //
5 | // Created by Laszlo Ori on 2018. 07. 24..
6 | // Copyright © 2018. Emarsys. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/SdkHost/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // SdkHost
4 | //
5 | // Created by Laszlo Ori on 2018. 07. 24..
6 | // Copyright © 2018. Emarsys. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 |
23 | - (void)didReceiveMemoryWarning {
24 | [super didReceiveMemoryWarning];
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/SdkHost/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2018. Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "AppDelegate.h"
7 |
8 | int main(int argc, char * argv[]) {
9 | @autoreleasepool {
10 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Sources/Core/Batch/EMSCountPredicate.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import "EMSCountPredicate.h"
5 |
6 | @interface EMSCountPredicate ()
7 |
8 | @property(nonatomic, assign) int threshold;
9 |
10 | @end
11 |
12 | @implementation EMSCountPredicate
13 |
14 | - (instancetype)initWithThreshold:(int)threshold {
15 | NSParameterAssert(threshold > 0);
16 | if (self = [super init]) {
17 | _threshold = threshold;
18 | }
19 | return self;
20 | }
21 |
22 | - (BOOL)evaluate:(NSArray *)value {
23 | NSParameterAssert(value);
24 | return [value count] >= self.threshold;
25 | }
26 |
27 |
28 | @end
--------------------------------------------------------------------------------
/Sources/Core/Batch/EMSPredicate.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import "EMSPredicate.h"
5 |
6 | @implementation EMSPredicate
7 |
8 | - (BOOL)evaluate:(id)value {
9 | NSAssert(NO, @"Abstract method must be implemented!");
10 | return NO;
11 | }
12 |
13 | @end
--------------------------------------------------------------------------------
/Sources/Core/Categories/EMSRequestModel+RequestIds.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2018. Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSRequestModel+RequestIds.h"
6 | #import "EMSCompositeRequestModel.h"
7 |
8 | @implementation EMSRequestModel (RequestIds)
9 |
10 | - (NSArray *)requestIds {
11 | if ([self isKindOfClass:[EMSCompositeRequestModel class]]) {
12 | EMSCompositeRequestModel *compositeModel = (EMSCompositeRequestModel *) self;
13 | NSMutableArray *originalRequestIds = [NSMutableArray array];
14 | for (EMSRequestModel *emsRequestModel in compositeModel.originalRequests) {
15 | [originalRequestIds addObject:emsRequestModel.requestId];
16 | }
17 | return [NSArray arrayWithArray:originalRequestIds];
18 | }
19 |
20 | return @[self.requestId];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Sources/Core/Categories/EMSResponseModel+EMSCore.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import "EMSResponseModel+EMSCore.h"
5 |
6 | @implementation EMSResponseModel (EMSCore)
7 |
8 | - (BOOL)isSuccess {
9 | return self.statusCode >= 200 && self.statusCode <= 299;;
10 | }
11 |
12 | @end
--------------------------------------------------------------------------------
/Sources/Core/Categories/NSError+EMSCore.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "NSError+EMSCore.h"
6 |
7 | @implementation NSError (EMSCore)
8 |
9 | + (NSError *)errorWithCode:(int)errorCode
10 | localizedDescription:(NSString *)localizedDescription {
11 | return [NSError errorWithDomain:@"com.emarsys.emarsys-sdk"
12 | code:errorCode
13 | userInfo:@{
14 | NSLocalizedDescriptionKey: localizedDescription
15 | }];
16 | }
17 |
18 | @end
--------------------------------------------------------------------------------
/Sources/Core/Categories/NSHTTPURLResponse+EMSCore.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2022 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "NSHTTPURLResponse+EMSCore.h"
6 |
7 |
8 | @implementation NSHTTPURLResponse (EMSCore)
9 |
10 | - (BOOL)isSuccess {
11 | return self.statusCode >= 200 && self.statusCode <= 299;
12 | }
13 |
14 | @end
--------------------------------------------------------------------------------
/Sources/Core/Categories/NSMutableDictionary+EMSCore.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "NSMutableDictionary+EMSCore.h"
6 |
7 |
8 | @implementation NSMutableDictionary (EMSCore)
9 |
10 | - (id)takeValueForKey:(NSString *)key {
11 | id value = self[key];
12 | if ([value isMemberOfClass:[NSNull class]]) {
13 | value = nil;
14 | }
15 | [self removeObjectForKey:key];
16 | return value;
17 | }
18 |
19 | @end
--------------------------------------------------------------------------------
/Sources/Core/Categories/NSOperationQueue+EMSCore.m:
--------------------------------------------------------------------------------
1 | ////
2 | //
3 | // Copyright © 2024 Emarsys-Technologies Kft. All rights reserved.
4 | //
5 |
6 | #import "NSOperationQueue+EMSCore.h"
7 |
8 | @implementation NSOperationQueue (EMSCore)
9 |
10 | - (void)runSynchronized:(EMSRunnerBlock)runnerBlock {
11 | NSOperation *operation = [NSBlockOperation blockOperationWithBlock:runnerBlock];
12 | [self addOperations:@[operation]
13 | waitUntilFinished:YES];
14 | }
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Sources/Core/Categories/NSString+EMSCore.m:
--------------------------------------------------------------------------------
1 | ////
2 | //
3 | // Copyright © 2024 Emarsys-Technologies Kft. All rights reserved.
4 | //
5 |
6 | #import "NSString+EMSCore.h"
7 |
8 | @implementation NSString (EMSCore)
9 |
10 | - (NSString *)percentEncode {
11 | NSCharacterSet *allowedCharacters = [[NSCharacterSet characterSetWithCharactersInString:@"\"`;/?:^%#@&=$+{}<>,|\\ !'()*[]"] invertedSet];
12 | return [self stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacters];
13 | }
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Sources/Core/Database/EMSCountMapper.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSCountMapper.h"
6 |
7 |
8 | @implementation EMSCountMapper
9 |
10 | - (id)modelFromStatement:(sqlite3_stmt *)statement {
11 | return @(sqlite3_column_int(statement, 0));
12 | }
13 |
14 | - (sqlite3_stmt *)bindStatement:(sqlite3_stmt *)statement fromModel:(id)model {
15 | NSAssert(NO, @"NOT IMPLEMENTED");
16 | return NULL;
17 | }
18 |
19 | - (NSString *)tableName {
20 | return nil;
21 | }
22 |
23 |
24 | - (NSUInteger)fieldCount {
25 | return 1;
26 | }
27 |
28 | @end
--------------------------------------------------------------------------------
/Sources/Core/EMSAuthentication.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSAuthentication.h"
6 |
7 | @implementation EMSAuthentication
8 |
9 | + (NSString *)createBasicAuthWithUsername:(NSString *)username {
10 | NSParameterAssert(username);
11 | NSString *credentials = [NSString stringWithFormat:@"%@:", username];
12 | NSData *credentialsData = [credentials dataUsingEncoding:NSUTF8StringEncoding];
13 | NSString *base64Credentials = [credentialsData base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithCarriageReturn];
14 | return [NSString stringWithFormat:@"Basic %@", base64Credentials];
15 | }
16 |
17 | @end
--------------------------------------------------------------------------------
/Sources/Core/Flipper/MEExperimental.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "MEExperimental.h"
6 |
7 |
8 | @implementation MEExperimental
9 | static NSMutableSet *_enabledFeatures;
10 |
11 | + (BOOL)isFeatureEnabled:(id )feature {
12 | return [_enabledFeatures containsObject:feature];
13 | }
14 |
15 | + (void)enableFeature:(id )feature {
16 | if (_enabledFeatures == nil) {
17 | _enabledFeatures = [NSMutableSet new];
18 | }
19 | [_enabledFeatures addObject:feature];
20 | }
21 |
22 | + (void)disableFeature:(id )feature {
23 | [_enabledFeatures removeObject:feature];
24 | }
25 |
26 | + (void)reset {
27 | _enabledFeatures = nil;
28 | }
29 |
30 | @end
--------------------------------------------------------------------------------
/Sources/Core/Log/LogEntry/EMSOfflineQueueSize.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import "EMSOfflineQueueSize.h"
5 |
6 | @interface EMSOfflineQueueSize ()
7 |
8 | @property(nonatomic, strong) NSDictionary *data;
9 |
10 | @end
11 |
12 | @implementation EMSOfflineQueueSize
13 |
14 | - (instancetype)initWithQueueSize:(NSUInteger)queueSize {
15 | if (self = [super init]) {
16 | NSMutableDictionary *mutableData = [NSMutableDictionary dictionary];
17 | mutableData[@"offlineQueueSize"] = [NSString stringWithFormat:@"%@", @(queueSize)];
18 | _data = [NSDictionary dictionaryWithDictionary:mutableData];
19 | }
20 | return self;
21 | }
22 |
23 | - (NSString *)topic {
24 | return @"log_offline_queue_size";
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Sources/Core/Models/EMSCompositeRequestModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import "EMSCompositeRequestModel.h"
5 |
6 |
7 | @implementation EMSCompositeRequestModel {
8 |
9 | }
10 | @end
--------------------------------------------------------------------------------
/Sources/Core/Operation/EMSOperationQueue.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import "EMSOperationQueue.h"
5 | #import "EMSMacros.h"
6 | #import "EMSCrashLog.h"
7 |
8 | @implementation EMSOperationQueue
9 |
10 | - (void)addOperationWithBlock:(void (^)(void))block {
11 | [super addOperationWithBlock:^{
12 | @try {
13 | block();
14 | } @catch (NSException *exception) {
15 | EMSLog([[EMSCrashLog alloc] initWithException:exception], LogLevelError);
16 | }
17 | }];
18 | }
19 |
20 | @end
--------------------------------------------------------------------------------
/Sources/Core/Operation/Proxy/EMSDispatchWaiter.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSDispatchWaiter.h"
6 |
7 | @interface EMSDispatchWaiter()
8 |
9 | @property(nonatomic, strong) dispatch_group_t dispatchGroup;
10 |
11 | @end
12 |
13 | @implementation EMSDispatchWaiter
14 |
15 | - (instancetype)init {
16 | if (self = [super init]) {
17 | _dispatchGroup = dispatch_group_create();
18 | }
19 | return self;
20 | }
21 |
22 | - (void)enter {
23 | dispatch_group_enter(self.dispatchGroup);
24 | }
25 |
26 | - (void)exit {
27 | dispatch_group_leave(self.dispatchGroup);
28 | }
29 |
30 | - (void)waitWithInterval:(int)interval {
31 | dispatch_time_t dispatchTime = interval == 0 ? DISPATCH_TIME_FOREVER : dispatch_time(DISPATCH_TIME_NOW, (interval * NSEC_PER_SEC));
32 | dispatch_group_wait(self.dispatchGroup, dispatchTime);
33 | }
34 |
35 | @end
--------------------------------------------------------------------------------
/Sources/Core/Providers/EMSCompletionProvider.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import "EMSCompletionProvider.h"
5 |
6 | @interface EMSCompletionProvider ()
7 |
8 | @property(nonatomic, strong) NSOperationQueue *operationQueue;
9 |
10 | @end
11 |
12 | @implementation EMSCompletionProvider
13 |
14 | - (instancetype)initWithOperationQueue:(NSOperationQueue *)operationQueue {
15 | NSParameterAssert(operationQueue);
16 |
17 | if (self = [super init]) {
18 | _operationQueue = operationQueue;
19 | }
20 | return self;
21 | }
22 |
23 | - (EMSCompletion)provideCompletion:(EMSCompletion)completionBlock {
24 | __weak typeof(self) weakSelf = self;
25 | return ^{
26 | [weakSelf.operationQueue addOperationWithBlock:completionBlock];
27 | };
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Sources/Core/Providers/EMSRandomProvider.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSRandomProvider.h"
6 |
7 | @implementation EMSRandomProvider {
8 |
9 | }
10 |
11 | - (NSNumber *)provideDoubleUntil:(NSNumber *)until {
12 | return @((double) arc4random() / UINT32_MAX * [until doubleValue]);
13 | }
14 |
15 | @end
--------------------------------------------------------------------------------
/Sources/Core/Providers/EMSTimestampProvider.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSTimestampProvider.h"
6 |
7 | @implementation EMSTimestampProvider
8 |
9 | - (NSDate *)provideTimestamp {
10 | return [NSDate date];
11 | }
12 |
13 | @end
--------------------------------------------------------------------------------
/Sources/Core/Providers/EMSUUIDProvider.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import "EMSUUIDProvider.h"
5 |
6 | @implementation EMSUUIDProvider
7 |
8 | - (NSString *)provideUUIDString {
9 | return [[NSUUID UUID] UUIDString];
10 | }
11 |
12 | @end
--------------------------------------------------------------------------------
/Sources/Core/Repository/Specifications/EMSFilterByNothingSpecification.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import "EMSFilterByNothingSpecification.h"
5 |
6 | @implementation EMSFilterByNothingSpecification
7 |
8 | - (BOOL)isEqual:(id)other {
9 | if (other == self)
10 | return YES;
11 | if (!other || ![[other class] isEqual:[self class]])
12 | return NO;
13 |
14 | return [self isEqualToSpecification:other];
15 | }
16 |
17 | - (BOOL)isEqualToSpecification:(EMSFilterByNothingSpecification *)specification {
18 | if (self == specification)
19 | return YES;
20 | if (specification == nil)
21 | return NO;
22 | return YES;
23 | }
24 |
25 | - (NSUInteger)hash {
26 | return [super hash];
27 | }
28 |
29 |
30 | @end
--------------------------------------------------------------------------------
/Sources/Core/Repository/Specifications/EMSQueryOldestRowSpecification.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import "EMSQueryOldestRowSpecification.h"
5 |
6 | @implementation EMSQueryOldestRowSpecification
7 |
8 | - (NSString *)orderBy {
9 | return @"ROWID ASC";
10 | }
11 |
12 | - (NSString *)limit {
13 | return @"1";
14 | }
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Sources/Core/ResponseHandlers/EMSAbstractResponseHandler.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSAbstractResponseHandler.h"
6 |
7 | @implementation EMSAbstractResponseHandler
8 |
9 | - (void)processResponse:(EMSResponseModel *)response {
10 | if ([self shouldHandleResponse:response]) {
11 | [self handleResponse:response];
12 | }
13 | }
14 |
15 | - (BOOL)shouldHandleResponse:(EMSResponseModel *)response {
16 | NSAssert(NO, @"implement me please");
17 | return NO;
18 | }
19 |
20 | - (void)handleResponse:(EMSResponseModel *)response {
21 | NSAssert(NO, @"implement me please");
22 | }
23 |
24 | @end
--------------------------------------------------------------------------------
/Sources/Core/Schedulers/EMSAgenda.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import "EMSAgenda.h"
5 |
6 | @implementation EMSAgenda
7 |
8 | - (instancetype)initWithTag:(NSString *)tag
9 | delay:(NSTimeInterval)delay
10 | interval:(NSNumber *)interval
11 | dispatchTimer:(dispatch_source_t)dispatchTimer
12 | triggerBlock:(EMSTriggerBlock)triggerBlock {
13 | if (self = [super init]) {
14 | _tag = tag;
15 | _delay = delay;
16 | _interval = interval;
17 | _dispatchTimer = dispatchTimer;
18 | _triggerBlock = triggerBlock;
19 | }
20 | return self;
21 | }
22 |
23 | @end
--------------------------------------------------------------------------------
/Sources/EmarsysSDK/EventHandler/EMSEventHandlerProtocolBlockConverter.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSEventHandlerProtocolBlockConverter.h"
6 |
7 | @implementation EMSEventHandlerProtocolBlockConverter
8 |
9 | - (instancetype)init {
10 | if (self = [super init]) {
11 | _eventHandler = [EMSEventHandlerProtocolImplementation new];
12 | }
13 | return self;
14 | }
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Sources/EmarsysSDK/EventHandler/EMSEventHandlerProtocolImplementation.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSEventHandlerProtocolImplementation.h"
6 |
7 | @implementation EMSEventHandlerProtocolImplementation
8 |
9 | - (void)handleEvent:(NSString *)eventName
10 | payload:(NSDictionary *)payload {
11 | if (self.handlerBlock) {
12 | dispatch_async(dispatch_get_main_queue(), ^{
13 | self.handlerBlock(eventName, payload);
14 | });
15 | }
16 | }
17 |
18 | @end
--------------------------------------------------------------------------------
/Sources/EmarsysSDK/Setup/EMSConfig.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSConfig.h"
6 |
7 | @implementation EMSConfig
8 |
9 | + (nonnull EMSConfig *)makeWithBuilder:(MEConfigBuilderBlock)builderBlock {
10 | NSParameterAssert(builderBlock);
11 | EMSConfigBuilder *builder = [EMSConfigBuilder new];
12 | builderBlock(builder);
13 |
14 | return [[EMSConfig alloc] initWithBuilder:builder];
15 | }
16 |
17 | - (id)initWithBuilder:(EMSConfigBuilder *)builder {
18 | if (self = [super init]) {
19 | _applicationCode = builder.applicationCode;
20 | _experimentalFeatures = builder.experimentalFeatures;
21 | _enabledConsoleLogLevels = builder.enabledConsoleLogLevels;
22 | _merchantId = builder.merchantId;
23 | _sharedKeychainAccessGroup = builder.sharedKeychainAccessGroup;
24 | }
25 | return self;
26 | }
27 |
28 | @end
--------------------------------------------------------------------------------
/Sources/MobileEngage/Category/EMSDeviceInfo+MEClientPayload.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import "EMSDeviceInfo+MEClientPayload.h"
5 |
6 | @implementation EMSDeviceInfo (MEClientPayload)
7 |
8 | - (NSDictionary *)clientPayload {
9 | return @{
10 | @"platform": self.platform,
11 | @"applicationVersion": self.applicationVersion,
12 | @"deviceModel": self.deviceModel,
13 | @"osVersion": self.osVersion,
14 | @"sdkVersion": self.sdkVersion,
15 | @"language": self.languageCode,
16 | @"timezone": self.timeZone,
17 | @"pushSettings": self.pushSettings
18 | };
19 | }
20 |
21 | @end
--------------------------------------------------------------------------------
/Sources/MobileEngage/Category/NSData+MobileEngine.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "NSData+MobileEngine.h"
6 |
7 |
8 | @implementation NSData (MobileEngine)
9 |
10 | - (NSString *)deviceTokenString {
11 | NSMutableString *token = [NSMutableString new];
12 | const char *data = [self bytes];
13 | for (int i = 0; i < self.length; ++i) {
14 | [token appendFormat:@"%02.2hhx", data[i]];
15 | }
16 | return token;
17 | }
18 |
19 | @end
--------------------------------------------------------------------------------
/Sources/MobileEngage/IAM/JSCommands/MEIAMClose.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "MEIAMClose.h"
6 | #import "MEIAMProtocol.h"
7 |
8 | @interface MEIAMClose ()
9 |
10 | @property(weak, nonatomic) id closeProtocol;
11 |
12 | @end
13 |
14 | @implementation MEIAMClose
15 |
16 | + (NSString *)commandName {
17 | return @"close";
18 | }
19 |
20 | - (instancetype)initWithEMSIAMCloseProtocol:(id )closeProtocol {
21 | if (self = [super init]) {
22 | _closeProtocol = closeProtocol;
23 | }
24 | return self;
25 | }
26 |
27 | - (void)handleMessage:(NSDictionary *)message
28 | resultBlock:(MEIAMJSResultBlock)resultBlock {
29 | [self.closeProtocol closeInAppWithCompletionHandler:nil];
30 | }
31 |
32 | @end
--------------------------------------------------------------------------------
/Sources/MobileEngage/IAM/Providers/EMSIAMViewControllerProvider.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import "EMSIAMViewControllerProvider.h"
5 | #import "MEJSBridge.h"
6 | #import "MEIAMViewController.h"
7 |
8 | @interface EMSIAMViewControllerProvider ()
9 |
10 | @property(nonatomic, strong) MEJSBridge *jsBridge;
11 |
12 | @end
13 |
14 | @implementation EMSIAMViewControllerProvider
15 |
16 | - (instancetype)initWithJSBridge:(MEJSBridge *)jsBridge {
17 | NSParameterAssert(jsBridge);
18 | if (self = [super init]) {
19 | _jsBridge = jsBridge;
20 | }
21 | return self;
22 | }
23 |
24 | - (MEIAMViewController *)provideViewController {
25 | return [[MEIAMViewController alloc] initWithJSBridge:self.jsBridge];
26 | }
27 |
28 |
29 | @end
--------------------------------------------------------------------------------
/Sources/MobileEngage/IAM/Providers/EMSMainWindowProvider.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import "EMSMainWindowProvider.h"
5 |
6 | @interface EMSMainWindowProvider ()
7 |
8 | @property(nonatomic, strong) UIApplication *application;
9 |
10 | @end
11 |
12 | @implementation EMSMainWindowProvider
13 |
14 | - (instancetype)initWithApplication:(UIApplication *)application {
15 | NSParameterAssert(application);
16 | if (self = [super init]) {
17 | _application = application;
18 | }
19 | return self;
20 | }
21 |
22 | - (UIWindow *)provideMainWindow {
23 | return [[_application delegate] window];
24 | }
25 |
26 |
27 | @end
--------------------------------------------------------------------------------
/Sources/MobileEngage/IAM/Providers/EMSViewControllerProvider.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSViewControllerProvider.h"
6 |
7 |
8 | @implementation EMSViewControllerProvider
9 |
10 | - (UIViewController *)provideViewController {
11 | UIViewController *viewController = [UIViewController new];
12 | viewController.view.backgroundColor = [UIColor clearColor];
13 | return viewController;
14 | }
15 |
16 | @end
--------------------------------------------------------------------------------
/Sources/MobileEngage/InboxV3/EMSInboxResult.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSInboxResult.h"
6 |
7 | @implementation EMSInboxResult
8 |
9 | - (BOOL)isEqual:(id)other {
10 | if (other == self)
11 | return YES;
12 | if (!other || ![[other class] isEqual:[self class]])
13 | return NO;
14 |
15 | return [self isEqualToResult:other];
16 | }
17 |
18 | - (BOOL)isEqualToResult:(EMSInboxResult *)result {
19 | if (self == result)
20 | return YES;
21 | if (result == nil)
22 | return NO;
23 | if (self.messages != result.messages && ![self.messages isEqualToArray:result.messages])
24 | return NO;
25 | return YES;
26 | }
27 |
28 | - (NSUInteger)hash {
29 | return [self.messages hash];
30 | }
31 |
32 | @end
--------------------------------------------------------------------------------
/Sources/MobileEngage/OnEventAction/EMSOnEventActionInternal.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSOnEventActionInternal.h"
6 |
7 | @interface EMSOnEventActionInternal()
8 |
9 | @property(nonatomic, strong) EMSActionFactory *actionFactory;
10 |
11 | @end
12 |
13 | @implementation EMSOnEventActionInternal
14 |
15 | @synthesize eventHandler = _eventHandler;
16 |
17 | - (instancetype)initWithActionFactory:(EMSActionFactory *)actionFactory {
18 | if (self = [super init]) {
19 | _actionFactory = actionFactory;
20 | }
21 | return self;
22 | }
23 |
24 | - (void)setEventHandler:(EMSEventHandlerBlock)eventHandler {
25 | _eventHandler = eventHandler;
26 | self.actionFactory.eventHandler = eventHandler;
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Sources/MobileEngage/RequestTools/MEDefaultHeaders.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSAuthentication.h"
6 | #import "MEDefaultHeaders.h"
7 | #import "EmarsysSDKVersion.h"
8 |
9 | @implementation MEDefaultHeaders
10 |
11 | + (NSDictionary *)additionalHeaders {
12 | return @{@"Content-Type": @"application/json",
13 | @"X-EMARSYS-SDK-VERSION": EMARSYS_SDK_VERSION,
14 | #if DEBUG
15 | @"X-EMARSYS-SDK-MODE": @"debug"
16 | #else
17 | @"X-EMARSYS-SDK-MODE" : @"production"
18 | #endif
19 | };
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Sources/MobileEngage/Session/EMSSessionIdHolder.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSSessionIdHolder.h"
6 |
7 | @implementation EMSSessionIdHolder
8 |
9 | @end
--------------------------------------------------------------------------------
/Sources/MobileEngage/Storage/MERequestTools.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "MERequestTools.h"
6 | #import "EMSRequestModel.h"
7 |
8 |
9 | @implementation MERequestTools
10 |
11 | + (BOOL)isRequestCustomEvent:(EMSRequestModel *)request {
12 | NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"https://mobile-events\\.eservice\\.emarsys\\.net/(.+)/events$"
13 | options:NSRegularExpressionCaseInsensitive
14 | error:nil];
15 | NSString *url = [request.url absoluteString];
16 | return url && [regex numberOfMatchesInString:url options:0 range:NSMakeRange(0, [url length])] > 0;
17 | }
18 |
19 | @end
--------------------------------------------------------------------------------
/Sources/Predict/Models/EMSCartItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSCartItem.h"
6 |
7 |
8 | @implementation EMSCartItem {
9 |
10 | }
11 |
12 | - (instancetype)initWithItemId:(NSString *)itemId price:(double)price quantity:(double)quantity {
13 | self = [super init];
14 | if (self) {
15 | self.itemId = itemId;
16 | self.price = price;
17 | self.quantity = quantity;
18 | }
19 |
20 | return self;
21 | }
22 |
23 | + (instancetype)itemWithItemId:(NSString *)itemId price:(double)price quantity:(double)quantity {
24 | return [[self alloc] initWithItemId:itemId price:price quantity:quantity];
25 | }
26 |
27 |
28 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSAbstractResponseHandler.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSResponseModel.h"
7 |
8 | @interface EMSAbstractResponseHandler : NSObject
9 |
10 | - (void)processResponse:(EMSResponseModel *)response;
11 |
12 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSActionProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @protocol EMSActionProtocol
8 |
9 | - (void)execute;
10 |
11 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSAgenda.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSTrigger.h"
6 |
7 | @interface EMSAgenda : NSObject
8 |
9 | @property(nonatomic, strong) NSString *tag;
10 | @property(nonatomic, assign) NSTimeInterval delay;
11 | @property(nonatomic, strong) NSNumber *interval;
12 | @property(nonatomic, strong) EMSTriggerBlock triggerBlock;
13 | @property(nonatomic, assign) dispatch_source_t dispatchTimer;
14 |
15 | - (instancetype)initWithTag:(NSString *)tag
16 | delay:(NSTimeInterval)delay
17 | interval:(NSNumber *)interval
18 | dispatchTimer:(dispatch_source_t)dispatchTimer
19 | triggerBlock:(EMSTriggerBlock)triggerBlock;
20 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSAppEventAction.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSActionProtocol.h"
7 | #import "EMSBlocks.h"
8 |
9 |
10 | @interface EMSAppEventAction : NSObject
11 |
12 | @property(nonatomic, strong) EMSEventHandlerBlock eventHandler;
13 |
14 | - (instancetype)init NS_UNAVAILABLE;
15 |
16 | - (instancetype)initWithActionDictionary:(NSDictionary *)action
17 | eventHandler:(EMSEventHandlerBlock)eventHandler;
18 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSAppEventLog.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSLogEntryProtocol.h"
6 |
7 | NS_ASSUME_NONNULL_BEGIN
8 |
9 | @interface EMSAppEventLog : NSObject
10 |
11 | - (instancetype)initWithEventName:(NSString *)eventName
12 | attributes:(nullable NSDictionary *)attributes;
13 |
14 | @end
15 |
16 | NS_ASSUME_NONNULL_END
17 |
--------------------------------------------------------------------------------
/Sources/Private/EMSAuthentication.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | NS_ASSUME_NONNULL_BEGIN
8 |
9 | @interface EMSAuthentication : NSObject
10 |
11 | + (NSString *)createBasicAuthWithUsername:(NSString *)username;
12 | @end
13 |
14 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSBadgeCountAction.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSActionProtocol.h"
7 | #import
8 |
9 | @class UNUserNotificationCenter;
10 |
11 | @interface EMSBadgeCountAction : NSObject
12 |
13 | - (instancetype)init NS_UNAVAILABLE;
14 |
15 | - (instancetype)initWithActionDictionary:(NSDictionary *)action
16 | application:(UIApplication *)application
17 | userNotificationCenter:(UNUserNotificationCenter *)userNotificationCenter
18 | operationQueue:(NSOperationQueue *)operationQueue;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Sources/Private/EMSCartItemUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSCartItemProtocol.h"
7 |
8 | @interface EMSCartItemUtils : NSObject
9 |
10 | + (NSString *)queryParamFromCartItems:(NSArray> *)cartItems;
11 |
12 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSClientStateResponseHandler.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSAbstractResponseHandler.h"
6 | #import "MERequestContext.h"
7 |
8 | @class EMSEndpoint;
9 |
10 | static NSString *const CLIENT_STATE = @"X-Client-State";
11 |
12 | @interface EMSClientStateResponseHandler : EMSAbstractResponseHandler
13 |
14 | @property(nonatomic, readonly) MERequestContext *requestContext;
15 | @property(nonatomic, readonly) EMSEndpoint *endpoint;
16 |
17 | - (instancetype)initWithRequestContext:(MERequestContext *)requestContext
18 | endpoint:(EMSEndpoint *)endpoint;
19 |
20 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSCommonSQLSpecification.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSSQLSpecificationProtocol.h"
6 |
7 | @interface EMSCommonSQLSpecification : NSObject
8 |
9 | - (NSString *)generateInStatementWithArgs:(NSArray *)args;
10 |
11 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSCompletionBlockProvider.h:
--------------------------------------------------------------------------------
1 | ////
2 | //
3 | // Copyright © 2024 Emarsys-Technologies Kft. All rights reserved.
4 | //
5 |
6 | #import
7 | #import "EMSBlocks.h"
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | @interface EMSCompletionBlockProvider: NSObject
12 |
13 | - (instancetype)initWithOperationQueue:(NSOperationQueue *)operationQueue;
14 |
15 | - (EMSCompletionBlock)provideCompletionBlock:(EMSCompletionBlock)completionBlock;
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/Sources/Private/EMSCompletionMiddleware.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSCoreCompletion.h"
6 | #import "EMSBlocks.h"
7 | #import "EMSRequestModel.h"
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | @interface EMSCompletionMiddleware : NSObject
12 |
13 | @property(nonatomic, readonly) CoreSuccessBlock successBlock;
14 | @property(nonatomic, readonly) CoreErrorBlock errorBlock;
15 |
16 | - (instancetype)initWithSuccessBlock:(CoreSuccessBlock)successBlock
17 | errorBlock:(CoreErrorBlock)errorBlock;
18 |
19 | - (void)registerCompletionBlock:(EMSCompletionBlock)completionBlock
20 | forRequestModel:(EMSRequestModel *)requestModel;
21 |
22 | @end
23 |
24 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSCompletionProvider.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSBlocks.h"
6 |
7 | @interface EMSCompletionProvider : NSObject
8 |
9 | - (instancetype)initWithOperationQueue:(NSOperationQueue *)operationQueue;
10 |
11 | - (EMSCompletion)provideCompletion:(EMSCompletion)completionBlock;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Sources/Private/EMSCompositeRequestModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSRequestModel.h"
6 |
7 |
8 | @interface EMSCompositeRequestModel : EMSRequestModel
9 |
10 | @property(nonatomic, strong) NSArray *originalRequests;
11 |
12 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSConnectionWatchdog.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | typedef enum : NSInteger {
7 | NotReachable = 0,
8 | ReachableViaWiFi,
9 | ReachableViaWWAN,
10 | ReachableViaWire,
11 | ReachableViaLoopback,
12 | ReachableViaOther
13 | } EMSNetworkStatus;
14 |
15 | @protocol EMSConnectionChangeListener
16 |
17 | - (void)connectionChangedToNetworkStatus:(EMSNetworkStatus)networkStatus
18 | connectionStatus:(BOOL)connected;
19 |
20 | @end
21 |
22 | @interface EMSConnectionWatchdog : NSObject
23 |
24 | @property(nonatomic, weak) id connectionChangeListener;
25 |
26 | - (instancetype)initWithOperationQueue:(NSOperationQueue *)operationQueue;
27 |
28 | - (EMSNetworkStatus)connectionState;
29 |
30 | - (BOOL)isConnected;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Sources/Private/EMSContactTokenMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSRequestModelMapperProtocol.h"
6 |
7 | @class MERequestContext;
8 | @class EMSEndpoint;
9 |
10 | @interface EMSContactTokenMapper : NSObject
11 |
12 | @property(nonatomic, readonly) MERequestContext *requestContext;
13 | @property(nonatomic, readonly) EMSEndpoint *endpoint;
14 |
15 | - (instancetype)initWithRequestContext:(MERequestContext *)requestContext
16 | endpoint:(EMSEndpoint *)endpoint;
17 |
18 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSContactTokenResponseHandler.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSAbstractResponseHandler.h"
7 |
8 | @class MERequestContext;
9 | @class EMSEndpoint;
10 |
11 | @interface EMSContactTokenResponseHandler : EMSAbstractResponseHandler
12 |
13 | @property(nonatomic, readonly) MERequestContext *requestContext;
14 | @property(nonatomic, readonly) EMSEndpoint *endpoint;
15 |
16 | - (instancetype)initWithRequestContext:(MERequestContext *)requestContext
17 | endpoint:(EMSEndpoint *)endpoint;
18 |
19 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSCoreCompletion.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @class EMSResponseModel;
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | typedef void (^CoreErrorBlock)(NSString *requestId, NSError *error);
12 |
13 | typedef void (^CoreSuccessBlock)(NSString *requestId, EMSResponseModel *response);
14 |
15 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSCoreCompletionHandler.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSCoreCompletion.h"
6 | #import "EMSRESTClientCompletionProxyProtocol.h"
7 |
8 | @interface EMSCoreCompletionHandler : NSObject
9 |
10 | @property(nonatomic, readonly) CoreSuccessBlock successBlock;
11 | @property(nonatomic, readonly) CoreErrorBlock errorBlock;
12 |
13 | - (instancetype)initWithSuccessBlock:(CoreSuccessBlock)successBlock
14 | errorBlock:(CoreErrorBlock)errorBlock;
15 |
16 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSCountMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSModelMapperProtocol.h"
7 |
8 |
9 | @interface EMSCountMapper : NSObject
10 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSCountPredicate.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSPredicate.h"
6 |
7 | @interface EMSCountPredicate : EMSPredicate
8 |
9 | - (instancetype)initWithThreshold:(int)threshold;
10 |
11 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSCrashLog.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSLogEntryProtocol.h"
6 |
7 | @interface EMSCrashLog : NSObject
8 |
9 | - (instancetype)initWithException:(NSException *)exception;
10 |
11 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSCrypto.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @interface EMSCrypto : NSObject
8 |
9 | - (BOOL)verifyContent:(NSData *)content
10 | withSignature:(NSData *)signature;
11 |
12 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSCustomEventAction.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSActionProtocol.h"
7 |
8 | @protocol EMSMobileEngageProtocol;
9 |
10 |
11 | @interface EMSCustomEventAction : NSObject
12 |
13 | - (instancetype)init NS_UNAVAILABLE;
14 |
15 | -(instancetype) initWithAction:(NSDictionary *)action
16 | mobileEngage:(id)mobileEngage;
17 |
18 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDBTrigger.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSTrigger.h"
6 |
7 | @interface EMSDBTriggerType : NSObject
8 |
9 | + (EMSDBTriggerType *)beforeType;
10 |
11 | + (EMSDBTriggerType *)afterType;
12 |
13 | - (BOOL)isEqual:(id)other;
14 |
15 | - (BOOL)isEqualToType:(EMSDBTriggerType *)type;
16 |
17 | - (NSUInteger)hash;
18 |
19 | - (NSString *)description;
20 |
21 | @end
22 |
23 |
24 | @interface EMSDBTriggerEvent : NSObject
25 |
26 | + (EMSDBTriggerEvent *)insertEvent;
27 |
28 | + (EMSDBTriggerEvent *)deleteEvent;
29 |
30 | - (NSString *)eventName;
31 |
32 | - (BOOL)isEqual:(id)other;
33 |
34 | - (BOOL)isEqualToEvent:(EMSDBTriggerEvent *)event;
35 |
36 | - (NSUInteger)hash;
37 |
38 | - (NSString *)description;
39 |
40 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDBTriggerKey.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSDBTrigger.h"
7 |
8 | @interface EMSDBTriggerKey : NSObject
9 | @property(nonatomic, readonly) NSString *tableName;
10 | @property(nonatomic, readonly) EMSDBTriggerEvent *triggerEvent;
11 | @property(nonatomic, readonly) EMSDBTriggerType *triggerType;
12 |
13 | - (instancetype)initWithTableName:(NSString *)tableName
14 | withEvent:(EMSDBTriggerEvent *)triggerEvent
15 | withType:(EMSDBTriggerType *)triggerType;
16 |
17 | - (BOOL)isEqual:(id)other;
18 |
19 | - (BOOL)isEqualToKey:(EMSDBTriggerKey *)key;
20 |
21 | - (NSUInteger)hash;
22 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDBTriggerProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @protocol EMSDBTriggerProtocol
7 |
8 | - (void)trigger;
9 |
10 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDeepLinkInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSDeepLinkProtocol.h"
6 |
7 | @class EMSRequestFactory;
8 | @class EMSRequestManager;
9 |
10 | @interface EMSDeepLinkInternal : NSObject
11 |
12 | - (instancetype)initWithRequestManager:(EMSRequestManager *)requestManager
13 | requestFactory:(EMSRequestFactory *)requestFactory;
14 |
15 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDeepLinkProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSBlocks.h"
6 |
7 | NS_ASSUME_NONNULL_BEGIN
8 |
9 | @protocol EMSDeepLinkProtocol
10 |
11 | - (BOOL)trackDeepLinkWith:(NSUserActivity *)userActivity
12 | sourceHandler:(_Nullable EMSSourceHandler)sourceHandler;
13 |
14 | - (BOOL)trackDeepLinkWith:(NSUserActivity *)userActivity
15 | sourceHandler:(_Nullable EMSSourceHandler)sourceHandler
16 | withCompletionBlock:(_Nullable EMSCompletionBlock)completionBlock;
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Sources/Private/EMSDependencyContainer.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSConfig.h"
6 | #import "EMSDependencyContainerProtocol.h"
7 |
8 | @class EMSTimestampProvider;
9 | @class EMSResponseModel;
10 |
11 | @interface EMSDependencyContainer : NSObject
12 |
13 | - (instancetype)initWithConfig:(EMSConfig *)config;
14 |
15 | - (void (^)(NSString *, EMSResponseModel *))createSuccessBlock;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Sources/Private/EMSDependencyInjection.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSDependencyContainer.h"
6 |
7 | @interface EMSDependencyInjection : NSObject
8 |
9 | @property(class, nonatomic, readonly) id dependencyContainer;
10 |
11 | + (void)setupWithDependencyContainer:(id )dependencyContainer;
12 |
13 | + (void)tearDown;
14 |
15 | + (id )mobileEngage;
16 |
17 | + (id )push;
18 |
19 | + (id )deepLink;
20 |
21 | + (id )iam;
22 |
23 | + (id )predict;
24 |
25 | + (id )geofence;
26 |
27 | + (id )messageInbox;
28 |
29 | + (id )onEventAction;
30 |
31 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDeviceEventStateRequestMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2022 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSRequestModelMapperProtocol.h"
7 |
8 | #define kDeviceEventStateKey @"DEVICE_EVENT_STATE_KEY"
9 |
10 | @class EMSEndpoint;
11 | @protocol EMSStorageProtocol;
12 |
13 | @interface EMSDeviceEventStateRequestMapper: NSObject
14 |
15 | @property(nonatomic, readonly) EMSEndpoint *endpoint;
16 | @property(nonatomic, readonly) id storage;
17 |
18 | - (instancetype)initWithEndpoint:(EMSEndpoint *)endpoint
19 | storage:(id )storage;
20 |
21 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDeviceEventStateResponseHandler.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSAbstractResponseHandler.h"
7 |
8 | #define kDeviceEventStateKey @"DEVICE_EVENT_STATE_KEY"
9 |
10 | @protocol EMSStorageProtocol;
11 | @class EMSEndpoint;
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface EMSDeviceEventStateResponseHandler : EMSAbstractResponseHandler
16 |
17 | - (instancetype)initWithStorage:(id)storage
18 | endpoint:(EMSEndpoint *)endpoint;
19 |
20 | @end
21 |
22 | NS_ASSUME_NONNULL_END
23 |
--------------------------------------------------------------------------------
/Sources/Private/EMSDeviceInfo+MEClientPayload.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSDeviceInfo.h"
6 |
7 | @interface EMSDeviceInfo (MEClientPayload)
8 |
9 | - (NSDictionary *)clientPayload;
10 |
11 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDeviceInfoClientProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSBlocks.h"
6 |
7 | @protocol EMSDeviceInfoClientProtocol
8 |
9 | - (void)trackDeviceInfoWithCompletionBlock:(EMSCompletionBlock)completionBlock;
10 |
11 | - (void)sendDeviceInfoWithCompletionBlock:(EMSCompletionBlock)completionBlock;
12 |
13 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDeviceInfoV3ClientInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSDeviceInfoClientProtocol.h"
6 |
7 | @class EMSRequestManager;
8 | @class EMSRequestFactory;
9 | @class EMSDeviceInfo;
10 | @class MERequestContext;
11 |
12 | #define kDEVICE_INFO @"kDEVICE_INFO"
13 |
14 | @interface EMSDeviceInfoV3ClientInternal : NSObject
15 |
16 | - (instancetype)initWithRequestManager:(EMSRequestManager *)requestManager
17 | requestFactory:(EMSRequestFactory *)requestFactory
18 | deviceInfo:(EMSDeviceInfo *)deviceInfo
19 | requestContext:(MERequestContext *)requestContext;
20 |
21 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSDictionaryValidator.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @interface EMSDictionaryValidator : NSObject
8 |
9 | @property(nonatomic, readonly) NSDictionary *dictionary;
10 |
11 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary;
12 |
13 | - (void)valueExistsForKey:(id)key withType:(Class)type;
14 |
15 | - (NSArray *)failureReasons;
16 |
17 | @end
18 |
19 |
20 | typedef void (^ValidatorBlock)(EMSDictionaryValidator *validate);
21 |
22 | @interface NSDictionary (Validator)
23 |
24 | - (NSArray *)validate:(ValidatorBlock)validator;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Sources/Private/EMSDispatchWaiter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @interface EMSDispatchWaiter : NSObject
8 |
9 | - (void)enter;
10 | - (void)exit;
11 | - (void)waitWithInterval:(int)interval;
12 |
13 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSEmarsysRequestFactory.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @class EMSTimestampProvider;
7 | @class EMSUUIDProvider;
8 | @class EMSRequestModel;
9 | @class EMSEndpoint;
10 | @class MERequestContext;
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface EMSEmarsysRequestFactory : NSObject
15 |
16 | - (instancetype)initWithTimestampProvider:(EMSTimestampProvider *)timestampProvider
17 | uuidProvider:(EMSUUIDProvider *)uuidProvider
18 | endpoint:(EMSEndpoint *)endpoint
19 | requestContext:(MERequestContext *)requestContext;
20 |
21 | - (EMSRequestModel * _Nullable)createRemoteConfigRequestModel;
22 | - (EMSRequestModel * _Nullable)createRemoteConfigSignatureRequestModel;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/Sources/Private/EMSEventHandlerProtocolBlockConverter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSIAMAppEventProtocol.h"
7 | #import "EMSEventHandlerProtocolImplementation.h"
8 |
9 | @interface EMSEventHandlerProtocolBlockConverter: NSObject
10 |
11 | @property(nonatomic, strong) EMSEventHandlerProtocolImplementation *eventHandler;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Sources/Private/EMSEventHandlerProtocolImplementation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSBlocks.h"
7 |
8 | @interface EMSEventHandlerProtocolImplementation: NSObject
9 |
10 | @property(nonatomic, strong) EMSEventHandlerBlock handlerBlock;
11 |
12 | - (void)handleEvent:(NSString *)eventName
13 | payload:(NSDictionary *)payload;
14 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSFilterByNothingSpecification.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSSQLSpecificationProtocol.h"
6 | #import "EMSCommonSQLSpecification.h"
7 |
8 | @interface EMSFilterByNothingSpecification : EMSCommonSQLSpecification
9 |
10 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSFilterByTypeSpecification.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2018. Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSCommonSQLSpecification.h"
6 |
7 | NS_ASSUME_NONNULL_BEGIN
8 |
9 | @interface EMSFilterByTypeSpecification : EMSCommonSQLSpecification
10 |
11 | - (instancetype)initWitType:(NSString *)type
12 | column:(NSString *)column;
13 |
14 | @end
15 |
16 | NS_ASSUME_NONNULL_END
17 |
--------------------------------------------------------------------------------
/Sources/Private/EMSFilterByValuesSpecification.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2018. Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSCommonSQLSpecification.h"
6 |
7 | NS_ASSUME_NONNULL_BEGIN
8 |
9 | @interface EMSFilterByValuesSpecification : EMSCommonSQLSpecification
10 |
11 | - (instancetype)initWithValues:(NSArray *)values
12 | column:(NSString *)column;
13 |
14 | @end
15 |
16 | NS_ASSUME_NONNULL_END
17 |
--------------------------------------------------------------------------------
/Sources/Private/EMSGeofenceGroup.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @class EMSGeofence;
8 |
9 | @interface EMSGeofenceGroup : NSObject
10 |
11 | @property(nonatomic, strong) NSString *id;
12 | @property(nonatomic, assign) double waitInterval;
13 | @property(nonatomic, strong) NSArray *geofences;
14 |
15 | - (instancetype)initWithId:(NSString *)id
16 | waitInterval:(double)waitInterval
17 | geofences:(NSArray *)geofences;
18 |
19 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSGeofenceResponse.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @class EMSGeofenceGroup;
8 |
9 | @interface EMSGeofenceResponse : NSObject
10 |
11 | @property(nonatomic, strong) NSArray *groups;
12 | @property(nonatomic, assign) double refreshRadiusRatio;
13 |
14 | - (instancetype)initWithGroups:(NSArray *)groups
15 | refreshRadiusRatio:(double)refreshRadiusRatio;
16 |
17 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSGeofenceResponseMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @class EMSResponseModel;
8 | @class EMSGeofenceResponse;
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | @interface EMSGeofenceResponseMapper : NSObject
13 |
14 | - (nullable EMSGeofenceResponse *)mapFromResponseModel:(EMSResponseModel *)responseModel;
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSIAMAppEventProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSBlocks.h"
7 |
8 | @protocol EMSIAMAppEventProtocol
9 | - (_Nullable EMSEventHandlerBlock)eventHandler;
10 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSIAMCloseProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSBlocks.h"
7 |
8 | @protocol EMSIAMCloseProtocol
9 | - (void)closeInAppWithCompletionHandler:(_Nullable EMSCompletion)completionHandler;
10 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSIAMViewControllerProvider.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @class MEJSBridge;
7 | @class MEIAMViewController;
8 |
9 | @interface EMSIAMViewControllerProvider : NSObject
10 |
11 | - (instancetype)initWithJSBridge:(MEJSBridge *)jsBridge;
12 |
13 | - (MEIAMViewController *)provideViewController;
14 |
15 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSInAppInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "MEInAppTrackingProtocol.h"
7 |
8 | @class EMSRequestManager;
9 | @class EMSRequestFactory;
10 | @class MEInApp;
11 | @class EMSTimestampProvider;
12 | @class EMSUUIDProvider;
13 |
14 | @interface EMSInAppInternal : NSObject
15 |
16 | - (instancetype)initWithRequestManager:(EMSRequestManager *)requestManager
17 | requestFactory:(EMSRequestFactory *)requestFactory
18 | meInApp:(MEInApp *)meInApp
19 | timestampProvider:(EMSTimestampProvider *)timestampProvider
20 | uuidProvider:(EMSUUIDProvider *)uuidProvider;
21 |
22 | - (void)handleInApp:(NSDictionary *)userInfo
23 | inApp:(NSDictionary *)inApp;
24 |
25 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSInAppLog.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSLogEntryProtocol.h"
6 |
7 | @class MEInAppMessage;
8 |
9 | @interface EMSInAppLog : NSObject
10 |
11 | - (instancetype)initWithMessage:(MEInAppMessage *)message
12 | loadingTimeEnd:(NSDate *)loadingTimeEnd;
13 |
14 | - (void)setOnScreenTimeStart:(NSDate *)onScreenTimeStart;
15 |
16 | - (void)setOnScreenTimeEnd:(NSDate *)onScreenTimeEnd;
17 |
18 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSInMemoryStorage.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2022 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSStorageProtocol.h"
7 |
8 | @interface EMSInMemoryStorage: NSObject
9 |
10 | @property(nonatomic, readonly) NSDictionary *inMemoryStore;
11 |
12 | - (instancetype)initWithStorage:(id)storage;
13 |
14 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSInboxResultParser.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @class EMSResponseModel;
8 | @class EMSInboxResult;
9 |
10 | @interface EMSInboxResultParser : NSObject
11 |
12 | - (EMSInboxResult *)parseFromResponse:(EMSResponseModel *)response;
13 |
14 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSInboxV3.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSMessageInboxProtocol.h"
7 |
8 | @class EMSRequestFactory;
9 | @class EMSRequestManager;
10 | @class EMSInboxResultParser;
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface EMSInboxV3 : NSObject
15 |
16 | @property(nonatomic, strong, nullable) NSArray *messages;
17 |
18 | - (instancetype)initWithRequestFactory:(EMSRequestFactory *)requestFactory
19 | requestManager:(EMSRequestManager *)requestManager
20 | inboxResultParser:(EMSInboxResultParser *)inboxResultParser;
21 |
22 | @end
23 |
24 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSInnerFeature.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSFlipperFeatures.h"
6 |
7 | @interface EMSInnerFeature : NSObject
8 |
9 | @property(class, nonatomic, readonly) id mobileEngage;
10 | @property(class, nonatomic, readonly) id predict;
11 | @property(class, nonatomic, readonly) id eventServiceV4;
12 |
13 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSInstanceRouter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | typedef BOOL (^RouterLogicBlock)(void);
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | @interface EMSInstanceRouter: NSObject
12 |
13 | - (instancetype)initWithDefaultInstance:(id)defaultInstance
14 | loggingInstance:(id)loggingInstance
15 | routerLogic:(RouterLogicBlock)routerLogic;
16 |
17 | - (id)instance;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/Sources/Private/EMSListChunker.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @interface EMSListChunker : NSObject
7 |
8 | - (instancetype)initWithChunkSize:(int)size;
9 |
10 | - (NSArray *)chunk:(NSArray *)array;
11 |
12 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSLockableProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @protocol EMSLockableProtocol
8 |
9 | - (void)lock;
10 |
11 | - (void)unlock;
12 |
13 | - (BOOL)isLocked;
14 |
15 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSLogEndpoints.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | #define EMSLogEndpoint @"https://log-dealer.eservice.emarsys.net/v1/log"
7 |
8 |
--------------------------------------------------------------------------------
/Sources/Private/EMSLogEntryProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @protocol EMSLogEntryProtocol
7 |
8 | - (NSString *)topic;
9 |
10 | - (NSDictionary *)data;
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/Sources/Private/EMSLogMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSRequestFromShardsMapperProtocol.h"
6 | #import "MERequestContext.h"
7 |
8 | @interface EMSLogMapper : NSObject
9 |
10 | - (instancetype)initWithRequestContext:(MERequestContext *)requestContext
11 | applicationCode:(NSString *)applicationCode
12 | merchantId:(NSString *)merchantId;
13 |
14 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSLoggingGeofenceInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSGeofenceProtocol.h"
7 |
8 | @interface EMSLoggingGeofenceInternal : NSObject
9 |
10 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSLoggingInApp.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSInAppProtocol.h"
6 | #import "MEIAMProtocol.h"
7 |
8 | @interface EMSLoggingInApp : NSObject
9 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSLoggingInboxV3.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSMessageInboxProtocol.h"
7 |
8 | @interface EMSLoggingInboxV3 : NSObject
9 |
10 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSLoggingMobileEngageInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSMobileEngageProtocol.h"
6 |
7 | @interface EMSLoggingMobileEngageInternal : NSObject
8 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSLoggingOnEventActionInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSOnEventActionProtocol.h"
7 |
8 | @interface EMSLoggingOnEventActionInternal : NSObject
9 |
10 | @end
11 |
--------------------------------------------------------------------------------
/Sources/Private/EMSLoggingPredictInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSPredictProtocol.h"
6 | #import "EMSPredictInternalProtocol.h"
7 |
8 | @interface EMSLoggingPredictInternal : NSObject
9 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSLoggingPushInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSPushNotificationProtocol.h"
6 |
7 | @interface EMSLoggingPushInternal : NSObject
8 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSMacros.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2018. Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSDependencyInjection.h"
7 | #import "EMSDependencyContainer.h"
8 | #import "EMSLogger.h"
9 |
10 | #define EMSLog(logEntry, logLevel) [EMSDependencyInjection.dependencyContainer.logger log:logEntry level:logLevel];
11 |
12 | #define EMSStrictLog(logEntry, entryLogLevel) \
13 | EMSLogger *logger = EMSDependencyInjection.dependencyContainer.logger; \
14 | if (logger.logLevel == entryLogLevel) { \
15 | [logger log:logEntry level:entryLogLevel]; \
16 | }
--------------------------------------------------------------------------------
/Sources/Private/EMSMainWindowProvider.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import
6 |
7 | @interface EMSMainWindowProvider : NSObject
8 |
9 | - (instancetype)initWithApplication:(UIApplication *)application;
10 |
11 | - (UIWindow *)provideMainWindow;
12 |
13 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSMethodNotAllowed.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSLogEntryProtocol.h"
6 |
7 | NS_ASSUME_NONNULL_BEGIN
8 |
9 | @interface EMSMethodNotAllowed : NSObject
10 |
11 | - (instancetype)initWithClass:(Class)klass
12 | sel:(SEL)sel
13 | parameters:(nullable NSDictionary *)parameters;
14 |
15 | - (instancetype)initWithProtocol:(Protocol *)proto
16 | sel:(SEL)sel
17 | parameters:(nullable NSDictionary *)parameters;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/Sources/Private/EMSMobileEngageMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSRequestModelMapperProtocol.h"
6 | #import "MERequestContext.h"
7 |
8 | @class EMSEndpoint;
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | @interface EMSMobileEngageMapper : NSObject
13 |
14 | - (instancetype)initWithRequestContext:(MERequestContext *)requestContext
15 | endpoint:(EMSEndpoint *)endpoint;
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSMobileEngageNullSafeBodyParser.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2021 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSResponseBodyParserProtocol.h"
7 | #import "EMSEndpoint.h"
8 |
9 | @class EMSEndpoint;
10 |
11 |
12 | @interface EMSMobileEngageNullSafeBodyParser : NSObject
13 |
14 | @property(nonatomic, readonly) EMSEndpoint *endpoint;
15 |
16 | - (instancetype)initWithEndpoint:(EMSEndpoint *)endpoint;
17 |
18 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSModelMapperProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import
7 |
8 | @protocol EMSModelMapperProtocol
9 |
10 | - (id)modelFromStatement:(sqlite3_stmt *)statement;
11 |
12 | - (sqlite3_stmt *)bindStatement:(sqlite3_stmt *)statement fromModel:(id)model;
13 |
14 | - (NSString *)tableName;
15 |
16 | - (NSUInteger)fieldCount;
17 |
18 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSNotificationCenterManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 |
8 | typedef void (^MEHandlerBlock)(void);
9 |
10 | @interface EMSNotificationCenterManager : NSObject
11 |
12 | @property(nonatomic, readonly) NSArray *observers;
13 |
14 | - (instancetype)initWithNotificationCenter:(NSNotificationCenter *)notificationCenter;
15 |
16 | - (void)addHandlerBlock:(MEHandlerBlock)handlerBlock
17 | forNotification:(NSString *)notificationName;
18 |
19 | - (void)removeHandlers;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Sources/Private/EMSNotificationService+Actions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSNotificationService.h"
6 |
7 | typedef void(^ActionsCompletionHandler)(UNNotificationCategory *category);
8 |
9 | @interface EMSNotificationService (Actions)
10 |
11 | - (void)createCategoryForContent:(UNMutableNotificationContent *)content
12 | completionHandler:(ActionsCompletionHandler)completionHandler;
13 |
14 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSNotificationService+Attachment.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSNotificationService.h"
6 | #import "MEDownloader.h"
7 |
8 | typedef void(^AttachmentsCompletionHandler)(NSArray *attachments);
9 |
10 | @interface EMSNotificationService (Attachment)
11 |
12 | - (void)createAttachmentForContent:(UNNotificationContent *)content
13 | withDownloader:(MEDownloader *)downloader
14 | completionHandler:(AttachmentsCompletionHandler)completionHandler;
15 |
16 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSNotificationService+PushToInApp.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSNotificationService.h"
6 | #import "MEDownloader.h"
7 |
8 | typedef void(^PushToInAppCompletionHandler)(NSDictionary *userInfo);
9 |
10 | @interface EMSNotificationService (PushToInApp)
11 |
12 | - (void)createUserInfoWithInAppForContent:(UNMutableNotificationContent *)content
13 | withDownloader:(MEDownloader *)downloader
14 | completionHandler:(PushToInAppCompletionHandler)completionHandler;
15 |
16 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSOfflineQueueSize.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSLogEntryProtocol.h"
6 |
7 | @interface EMSOfflineQueueSize : NSObject
8 |
9 | - (instancetype)initWithQueueSize:(NSUInteger)queueSize;
10 |
11 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSOnEventActionInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSOnEventActionProtocol.h"
7 | #import "EMSActionFactory.h"
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | @interface EMSOnEventActionInternal : NSObject
12 |
13 | - (instancetype)initWithActionFactory:(EMSActionFactory *)actionFactory;
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/Sources/Private/EMSOnEventResponseHandler.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSAbstractResponseHandler.h"
7 | #import "EMSRequestManager.h"
8 | #import "EMSRequestFactory.h"
9 | #import "EMSRepositoryProtocol.h"
10 | #import "EMSActionFactory.h"
11 | #import "EMSTimestampProvider.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface EMSOnEventResponseHandler : EMSAbstractResponseHandler
16 |
17 | - (instancetype)initWithRequestManager:(EMSRequestManager *)requestManager
18 | requestFactory:(EMSRequestFactory *)requestFactory
19 | displayedIAMRepository:(id )repository
20 | actionFactory:(EMSActionFactory *)actionFactory
21 | timestampProvider:(EMSTimestampProvider *)timestampProvider;
22 |
23 | @end
24 |
25 | NS_ASSUME_NONNULL_END
26 |
--------------------------------------------------------------------------------
/Sources/Private/EMSOpenExternalUrlAction.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSActionProtocol.h"
7 |
8 | @interface EMSOpenExternalUrlAction : NSObject
9 |
10 | - (instancetype)init NS_UNAVAILABLE;
11 |
12 | - (instancetype)initWithActionDictionary:(NSDictionary *)action
13 | application:(UIApplication *)application;
14 |
15 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSOpenIdTokenMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2021 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSRequestModelMapperProtocol.h"
7 |
8 | @class EMSEndpoint;
9 | @class MERequestContext;
10 |
11 | @interface EMSOpenIdTokenMapper: NSObject
12 |
13 | @property(nonatomic, readonly) MERequestContext *requestContext;
14 | @property(nonatomic, readonly) EMSEndpoint *endpoint;
15 |
16 | - (instancetype)initWithRequestContext:(MERequestContext *)requestContext
17 | endpoint:(EMSEndpoint *)endpoint;
18 |
19 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSOperationQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @interface EMSOperationQueue : NSOperationQueue
7 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSPredicate.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @interface EMSPredicate<__covariant T> : NSObject
7 |
8 | - (BOOL)evaluate:(T)value;
9 |
10 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSPredictInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSPredictProtocol.h"
6 | #import "EMSPredictInternalProtocol.h"
7 |
8 | @class PRERequestContext;
9 | @class EMSRequestManager;
10 | @class EMSPredictRequestModelBuilderProvider;
11 | @class EMSProductMapper;
12 |
13 | @interface EMSPredictInternal : NSObject
14 |
15 | - (instancetype)initWithRequestContext:(PRERequestContext *)requestContext
16 | requestManager:(EMSRequestManager *)requestManager
17 | requestBuilderProvider:(EMSPredictRequestModelBuilderProvider *)requestBuilderProvider
18 | productMapper:(EMSProductMapper *)productMapper;
19 |
20 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSPredictInternalProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @protocol EMSPredictInternalProtocol
7 |
8 | - (void)setContactWithContactFieldId:(NSNumber *)contactFieldId
9 | contactFieldValue:(NSString *)contactFieldValue;
10 |
11 | - (void)clearContact;
12 |
13 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSPredictMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSRequestFromShardsMapperProtocol.h"
6 |
7 | @class EMSUUIDProvider;
8 | @class EMSTimestampProvider;
9 | @class PRERequestContext;
10 | @class EMSEndpoint;
11 |
12 | @interface EMSPredictMapper : NSObject
13 |
14 | @property(nonatomic, readonly) PRERequestContext *requestContext;
15 | @property(nonatomic, readonly) EMSEndpoint *endpoint;
16 |
17 | - (instancetype)initWithRequestContext:(PRERequestContext *)requestContext
18 | endpoint:(EMSEndpoint *)endpoint;
19 |
20 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSPredictRequestModelBuilderProvider.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @class EMSPredictRequestModelBuilder;
8 | @class PRERequestContext;
9 | @class EMSEndpoint;
10 |
11 |
12 | @interface EMSPredictRequestModelBuilderProvider : NSObject
13 |
14 | - (instancetype)initWithRequestContext:(PRERequestContext *)requestContext
15 | endpoint:(EMSEndpoint *)endpoint;
16 |
17 | - (EMSPredictRequestModelBuilder *)provideBuilder;
18 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSProduct+Emarsys.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSProduct.h"
6 | #import "EMSProductBuilder.h"
7 |
8 | NS_ASSUME_NONNULL_BEGIN
9 |
10 | typedef void(^EMSProductBuilderBlock)(EMSProductBuilder *builder);
11 |
12 | @interface EMSProduct (Emarsys)
13 |
14 | + (instancetype)makeWithBuilder:(EMSProductBuilderBlock)builderBlock;
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSProductMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @class EMSProduct;
8 | @class EMSResponseModel;
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | @interface EMSProductMapper : NSObject
13 |
14 | - (NSArray *)mapFromResponse:(EMSResponseModel *)responseModel;
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSQueryOldestRowSpecification.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSSQLSpecificationProtocol.h"
6 | #import "EMSCommonSQLSpecification.h"
7 |
8 | @interface EMSQueryOldestRowSpecification : EMSCommonSQLSpecification
9 |
10 | @end
11 |
--------------------------------------------------------------------------------
/Sources/Private/EMSQueueDelegator.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2020. Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSInstanceRouter.h"
7 |
8 | @class EMSDispatchWaiter;
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | @interface EMSQueueDelegator : NSProxy
13 |
14 | @property(nonatomic, strong) EMSInstanceRouter * instanceRouter;
15 |
16 | - (void)setupWithQueue:(NSOperationQueue *)queue
17 | emptyTarget:(id)emptyTarget;
18 |
19 | - (void)proxyWithInstanceRouter:(EMSInstanceRouter *)instanceRouter;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSRESTClientCompletionProxyProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSCoreCompletion.h"
6 |
7 | @class EMSRequestModel;
8 | @class EMSResponseModel;
9 |
10 | typedef void(^EMSRESTClientCompletionBlock)(EMSRequestModel *requestModel, EMSResponseModel *responseModel, NSError *error);
11 |
12 | @protocol EMSRESTClientCompletionProxyProtocol
13 |
14 | - (EMSRESTClientCompletionBlock)completionBlock;
15 |
16 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRandomProvider.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 |
8 | @interface EMSRandomProvider : NSObject
9 |
10 | - (NSNumber *)provideDoubleUntil:(NSNumber *)until;
11 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRefreshTokenResponseHandler.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSAbstractResponseHandler.h"
7 |
8 | @class MERequestContext;
9 | @class EMSEndpoint;
10 |
11 | @interface EMSRefreshTokenResponseHandler : EMSAbstractResponseHandler
12 |
13 | @property(nonatomic, readonly) MERequestContext *requestContext;
14 | @property(nonatomic, readonly) EMSEndpoint *endpoint;
15 |
16 | - (instancetype)initWithRequestContext:(MERequestContext *)requestContext
17 | endpoint:(EMSEndpoint *)endpoint;
18 |
19 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRemoteConfigResponseMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @class EMSRemoteConfig;
7 | @class EMSResponseModel;
8 | @class EMSRandomProvider;
9 | @class EMSDeviceInfo;
10 |
11 | @interface EMSRemoteConfigResponseMapper : NSObject
12 |
13 | @property(nonatomic, readonly) EMSRandomProvider *randomProvider;
14 |
15 | - (instancetype)initWithRandomProvider:(EMSRandomProvider *)randomProvider
16 | deviceInfo:(EMSDeviceInfo *)deviceInfo;
17 |
18 | - (EMSRemoteConfig *)map:(EMSResponseModel *)responseModel;
19 |
20 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRepositoryProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSSQLSpecificationProtocol.h"
7 |
8 | @protocol EMSRepositoryProtocol
9 |
10 | - (void)add:(id)item;
11 |
12 | - (void)remove:(id )sqlSpecification;
13 |
14 | - (NSArray *)query:(id )sqlSpecification;
15 |
16 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRequestFromShardsMapperProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @class EMSRequestModel;
7 | @class EMSShard;
8 |
9 | @protocol EMSRequestFromShardsMapperProtocol
10 |
11 | - (EMSRequestModel *)requestFromShards:(NSArray *)shards;
12 |
13 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRequestLog.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSLogEntryProtocol.h"
6 |
7 | @class EMSResponseModel;
8 |
9 | @interface EMSRequestLog : NSObject
10 |
11 | - (instancetype)initWithResponseModel:(EMSResponseModel *)responseModel
12 | networkingStartTime:(NSDate *)networkingStartTime
13 | headers:(NSDictionary *)headers
14 | payload:(NSDictionary *)payload;
15 |
16 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRequestModel+RequestIds.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright © 2018. Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSRequestModel.h"
6 |
7 | NS_ASSUME_NONNULL_BEGIN
8 |
9 | @interface EMSRequestModel (RequestIds)
10 |
11 | - (NSArray *)requestIds;
12 |
13 | @end
14 |
15 | NS_ASSUME_NONNULL_END
16 |
--------------------------------------------------------------------------------
/Sources/Private/EMSRequestModelMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSModelMapperProtocol.h"
7 |
8 | @interface EMSRequestModelMapper : NSObject
9 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRequestModelMapperProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @class EMSRequestModel;
7 |
8 | @protocol EMSRequestModelMapperProtocol
9 |
10 | - (BOOL)shouldHandleWithRequestModel:(EMSRequestModel *)requestModel;
11 |
12 | - (EMSRequestModel *)modelFromModel:(EMSRequestModel *)requestModel;
13 |
14 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRequestModelRepository.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSRequestModelRepositoryProtocol.h"
7 |
8 | @protocol EMSSQLiteHelperProtocol;
9 |
10 | @interface EMSRequestModelRepository : NSObject
11 |
12 | - (instancetype)initWithDbHelper:(id )sqliteHelper
13 | operationQueue:(NSOperationQueue *)operationQueue;
14 |
15 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSRequestModelRepositoryProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import "EMSRepositoryProtocol.h"
6 | #import "EMSRequestModel.h"
7 | #import "EMSSQLSpecificationProtocol.h"
8 |
9 | @protocol EMSRequestModelRepositoryProtocol
10 |
11 | - (void)add:(EMSRequestModel *)item;
12 |
13 | - (void)remove:(id )sqlSpecification;
14 |
15 | - (NSArray *)query:(id )sqlSpecification;
16 |
17 | - (BOOL)isEmpty;
18 |
19 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSResponseBodyParserProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2021 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @class EMSRequestModel;
8 |
9 | @protocol EMSResponseBodyParserProtocol
10 |
11 | - (BOOL)shouldParse:(EMSRequestModel *)requestModel
12 | responseBody:(NSData *)responseBody
13 | httpUrlResponse:(NSHTTPURLResponse *)httpUrlResponse;
14 |
15 | - (id)parseWithRequestModel:(EMSRequestModel *)requestModel
16 | responseBody:(NSData *)responseBody;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Sources/Private/EMSResponseModel+EMSCore.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSResponseModel.h"
6 |
7 | @interface EMSResponseModel (EMSCore)
8 |
9 | - (BOOL)isSuccess;
10 |
11 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSSQLSpecificationProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import
7 |
8 | @protocol EMSSQLSpecificationProtocol
9 |
10 | - (NSString *)selection;
11 |
12 | - (NSArray *)selectionArgs;
13 |
14 | - (NSString *)orderBy;
15 |
16 | - (NSString *)limit;
17 |
18 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSSQLStatementFactory.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 | @protocol EMSModelMapperProtocol;
7 | @protocol EMSSQLSpecificationProtocol;
8 |
9 | @interface EMSSQLStatementFactory : NSObject
10 |
11 | + (NSString *)createQueryStatementWithTableName:(NSString *)tableName
12 | selection:(NSString *)selection
13 | orderBy:(NSString *)orderBy
14 | limit:(NSString *)limit;
15 |
16 | + (NSString *)createDeleteStatementWithTableName:(NSString *)tableName
17 | selection:(NSString *)selection;
18 |
19 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSSQLiteHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSDBTrigger.h"
7 | #import "EMSSQLiteHelperProtocol.h"
8 |
9 | @class EMSSQLiteHelper;
10 | @protocol EMSModelMapperProtocol;
11 | @protocol EMSDBTriggerProtocol;
12 | @protocol EMSSQLiteHelperSchemaHandlerProtocol;
13 |
14 | @interface EMSSQLiteHelper: NSObject
15 |
16 | @property(nonatomic, strong) id schemaHandler;
17 | @property(nonatomic, readonly) NSDictionary *registeredTriggers;
18 |
19 | - (instancetype)initWithDatabasePath:(NSString *)path
20 | schemaDelegate:(id )schemaDelegate
21 | operationQueue:(NSOperationQueue *)operationQueue;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Sources/Private/EMSSQLiteHelperSchemaHandlerProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2021 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSSQLiteHelperProtocol.h"
7 |
8 | @protocol EMSSQLiteHelperSchemaHandlerProtocol
9 |
10 | - (void)onCreateWithDbHelper:(id )dbHelper;
11 |
12 | - (void)onUpgradeWithDbHelper:(id )dbHelper
13 | oldVersion:(int)oldVersion
14 | newVersion:(int)newVersion;
15 |
16 | - (int)schemaVersion;
17 |
18 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSSceneProvider.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import
6 |
7 | NS_ASSUME_NONNULL_BEGIN
8 |
9 | @interface EMSSceneProvider : NSObject
10 |
11 | - (instancetype)initWithApplication:(UIApplication *)application;
12 |
13 | - (nullable UIScene *)provideScene API_AVAILABLE(ios(13.0));
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
--------------------------------------------------------------------------------
/Sources/Private/EMSScheduler.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2018 Emarsys. All rights reserved.
3 | //
4 | #import
5 | #import "EMSTrigger.h"
6 |
7 | @class EMSAgenda;
8 |
9 | @interface EMSScheduler : NSObject
10 |
11 | @property(nonatomic, readonly) NSDictionary *scheduledAgendas;
12 |
13 | - (instancetype)initWithOperationQueue:(NSOperationQueue *)operationQueue
14 | leeway:(NSTimeInterval)leeway;
15 |
16 | - (void)scheduleTriggerWithTag:(NSString *)tag
17 | delay:(NSTimeInterval)delay
18 | interval:(NSNumber *)interval
19 | triggerBlock:(EMSTriggerBlock)trigger;
20 |
21 | - (void)cancelTriggerWithTag:(NSString *)tag;
22 |
23 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSSdkStateLogger.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2021 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @class EMSEndpoint;
8 | @class MERequestContext;
9 | @class EMSConfig;
10 | @protocol EMSStorageProtocol;
11 |
12 |
13 | @interface EMSSdkStateLogger : NSObject
14 | @property(nonatomic, readonly) EMSEndpoint *endpoint;
15 | @property(nonatomic, readonly) MERequestContext *meRequestContext;
16 | @property(nonatomic, readonly) EMSConfig *config;
17 | @property(nonatomic, readonly) id storage;
18 |
19 | - (instancetype)initWithEndpoint:(EMSEndpoint *)endpoint
20 | meRequestContext:(MERequestContext *)meRequestContext
21 | config:(EMSConfig *)config
22 | storage:(id)storage;
23 |
24 | - (void)log;
25 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSServiceDictionaryValidator.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2019 Emarsys. All rights reserved.
3 | //
4 | #import
5 |
6 |
7 | @interface EMSServiceDictionaryValidator : NSObject
8 |
9 | @property(nonatomic, readonly) NSDictionary *dictionary;
10 |
11 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary;
12 |
13 | - (void)valueExistsForKey:(id)key withType:(Class)type;
14 |
15 | - (NSArray *)failureReasons;
16 |
17 | @end
18 |
19 |
20 | typedef void (^ValidatorBlock)(EMSServiceDictionaryValidator *validate);
21 |
22 | @interface NSDictionary (Validator)
23 |
24 | - (NSArray *)validateWithBlock:(ValidatorBlock)validator;
25 |
26 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSSessionIdHolder.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 |
7 | @interface EMSSessionIdHolder : NSObject
8 |
9 | @property(nonatomic, strong, nullable) NSString *sessionId;
10 |
11 | @end
--------------------------------------------------------------------------------
/Sources/Private/EMSShardMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Emarsys. All rights reserved.
3 | //
4 |
5 | #import
6 | #import "EMSModelMapperProtocol.h"
7 |
8 | @interface EMSShardMapper : NSObject