├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── .swift-version ├── .travis.yml ├── ChatExample ├── MobileChatExample.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── MobileChatExample.xcscheme │ │ └── MobileMessagingNotificationExtension.xcscheme ├── MobileChatExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ └── InAppChatLogo.png │ │ ├── Contents.json │ │ ├── icon-user-border.imageset │ │ │ ├── Contents.json │ │ │ └── icon-user-border.svg │ │ └── phone-ringing-sound.dataset │ │ │ ├── Contents.json │ │ │ └── phone-ringing-sound.mp3 │ ├── AuthenticatedChatVC.swift │ ├── BadgeCounterHandler.swift │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Constants.swift │ ├── ExternalChatInputViewController.swift │ ├── Info.plist │ ├── JWTClaims.swift │ ├── LanguageTableVC.swift │ ├── LiveChatAPIView.swift │ ├── MobileChatExample.entitlements │ ├── OptionListVC.swift │ ├── PersonalizationVC.swift │ ├── PrivacyInfo.xcprivacy │ ├── Resources │ │ ├── alphaLogo.png │ │ ├── attachIcon.svg │ │ └── sendIcon.svg │ ├── Sounds │ │ └── MMInboundCall.wav │ ├── SwiftUIChatView.swift │ └── ViewController.swift ├── MobileMessagingNotificationExtension.entitlements ├── NotificationExtension │ ├── MobileMessagingNotificationServiceExtension.plist │ └── NotificationService.swift └── Podfile ├── ChatSwiftUIDemo ├── ChatSwiftUIDemo.xcodeproj │ └── project.pbxproj └── ChatSwiftUIDemo │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ └── InAppChatLogo.png │ └── Contents.json │ ├── ChatSwiftUIDemo.entitlements │ ├── ChatSwiftUIDemoApp.swift │ ├── ContentView.swift │ ├── Info.plist │ └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json ├── Classes ├── .gitkeep ├── Chat │ ├── API │ │ ├── ChatAPIKeys.swift │ │ ├── ChatRequests.swift │ │ ├── GetChatRegistrationOperation.swift │ │ └── GetChatWidgetOperation.swift │ ├── ChatAttachment.swift │ ├── ChatAttachmentUtils.swift │ ├── ChatCore │ │ ├── ChatWebViewHandler.swift │ │ ├── ChatWebViewHandlerProtocol.swift │ │ ├── LiveChatAPI+Models.swift │ │ └── LiveChatAPI.swift │ ├── ChatExports.swift │ ├── ChatExtensions.swift │ ├── ChatLocalization.swift │ ├── ChatMessageCounterService.swift │ ├── ChatService.swift │ ├── ChatSettings.swift │ ├── ChatWidget.swift │ ├── Localization │ │ ├── ar.lproj │ │ │ └── InAppChat.strings │ │ ├── cs.lproj │ │ │ └── InAppChat.strings │ │ ├── da.lproj │ │ │ └── InAppChat.strings │ │ ├── de.lproj │ │ │ └── InAppChat.strings │ │ ├── en.lproj │ │ │ └── InAppChat.strings │ │ ├── es-419.lproj │ │ │ └── InAppChat.strings │ │ ├── es.lproj │ │ │ └── InAppChat.strings │ │ ├── fi.lproj │ │ │ └── InAppChat.strings │ │ ├── fr.lproj │ │ │ └── InAppChat.strings │ │ ├── he.lproj │ │ │ └── InAppChat.strings │ │ ├── hi.lproj │ │ │ └── InAppChat.strings │ │ ├── hr.lproj │ │ │ └── InAppChat.strings │ │ ├── hu.lproj │ │ │ └── InAppChat.strings │ │ ├── id.lproj │ │ │ └── InAppChat.strings │ │ ├── it.lproj │ │ │ └── InAppChat.strings │ │ ├── ja.lproj │ │ │ └── InAppChat.strings │ │ ├── ko.lproj │ │ │ └── InAppChat.strings │ │ ├── ms.lproj │ │ │ └── InAppChat.strings │ │ ├── nb.lproj │ │ │ └── InAppChat.strings │ │ ├── nl.lproj │ │ │ └── InAppChat.strings │ │ ├── pl.lproj │ │ │ └── InAppChat.strings │ │ ├── pt-PT.lproj │ │ │ └── InAppChat.strings │ │ ├── pt.lproj │ │ │ └── InAppChat.strings │ │ ├── ro.lproj │ │ │ └── InAppChat.strings │ │ ├── ru.lproj │ │ │ └── InAppChat.strings │ │ ├── sk.lproj │ │ │ └── InAppChat.strings │ │ ├── sq.lproj │ │ │ └── InAppChat.strings │ │ ├── sr.lproj │ │ │ └── InAppChat.strings │ │ ├── sv.lproj │ │ │ └── InAppChat.strings │ │ ├── th.lproj │ │ │ └── InAppChat.strings │ │ ├── tr.lproj │ │ │ └── InAppChat.strings │ │ ├── uk.lproj │ │ │ └── InAppChat.strings │ │ ├── vi.lproj │ │ │ └── InAppChat.strings │ │ ├── zh-Hans.lproj │ │ │ └── InAppChat.strings │ │ └── zh-Hant.lproj │ │ │ └── InAppChat.strings │ ├── MMChatError.swift │ ├── Resources │ │ ├── ChatConnector.html │ │ └── MobileMessagingChatImages.xcassets │ │ │ ├── Contents.json │ │ │ ├── attachmentButton.imageset │ │ │ ├── Contents.json │ │ │ ├── attachmentButton.png │ │ │ ├── attachmentButton@2x.png │ │ │ └── attachmentButton@3x.png │ │ │ ├── backButton.imageset │ │ │ ├── Contents.json │ │ │ ├── backButton.png │ │ │ ├── backButton@2x.png │ │ │ └── backButton@3x.png │ │ │ ├── fileNotFound.imageset │ │ │ ├── Contents.json │ │ │ ├── fileNotFound.png │ │ │ ├── fileNotFound@2x.png │ │ │ └── fileNotfound@3x.png │ │ │ └── sendButton.imageset │ │ │ ├── ChatSendBtnImage.png │ │ │ ├── ChatSendBtnImage@2x.png │ │ │ ├── ChatSendBtnImage@3x.png │ │ │ └── Contents.json │ ├── UI │ │ ├── AttachmentPreviewController.swift │ │ ├── CPChatComposing.swift │ │ ├── CPKeyboardAwareScrollViewController.swift │ │ ├── CPKeyboardAwareViewController.swift │ │ ├── CPLabel.swift │ │ ├── CPMessageComposingViewController.swift │ │ ├── CPUtils.swift │ │ ├── CPViewController.swift │ │ ├── ChatAttachmentImageView.swift │ │ ├── ChatAttachmentPicker.swift │ │ ├── ChatCoverHorisontalTransition.swift │ │ ├── ChatNavigationVC.swift │ │ ├── ChatNotAvailableLabel.swift │ │ ├── ChatViewController.swift │ │ └── ComposeBar │ │ │ ├── ComposeBar.swift │ │ │ ├── ComposeBar_Button.swift │ │ │ └── ComposeBar_TextView.swift │ ├── Vendor │ │ └── MimeType.swift │ └── WebView │ │ ├── AsyncJSExecutor.swift │ │ ├── ChatJSMessageHandler.swift │ │ ├── ChatJSWrapper.swift │ │ └── ChatWebView.swift ├── Inbox │ ├── InboxExports.swift │ ├── InboxSeenRequestDataMapper.swift │ ├── MMInbox.swift │ ├── MMInboxFilterOptions.swift │ ├── MMInboxService.swift │ └── extensions.swift ├── Logging │ └── CocoaLumberjack │ │ └── MMLumberjackLogger.swift ├── MobileMessaging │ ├── Core │ │ ├── CustomEvents │ │ │ ├── CustomEventMapper.swift │ │ │ └── EventsService.swift │ │ ├── Exports.swift │ │ ├── HTTP │ │ │ ├── DynamicBaseUrlHTTPSessionManager.swift │ │ │ ├── JWT │ │ │ │ ├── MMJwtSupplier.swift │ │ │ │ └── MMJwtUtils.swift │ │ │ ├── MMAPIKeysAndValues.swift │ │ │ ├── MMRequests.swift │ │ │ ├── MMResponses.swift │ │ │ └── RemoteAPIProvider.swift │ │ ├── Installation │ │ │ ├── InstallationAttributeModels.swift │ │ │ ├── InstallationDataMapper.swift │ │ │ └── InstallationDataService.swift │ │ ├── InternalStorage │ │ │ ├── Archivable.swift │ │ │ ├── CustomEventObject+CoreDataClass.swift │ │ │ ├── CustomEventObject+CoreDataProperties.swift │ │ │ ├── InstallationManagedObject+CoreDataProperties.swift │ │ │ ├── InstallationManagedObject.swift │ │ │ ├── InstallationMigrationPolicy.swift │ │ │ ├── MMCoreDataExtensions.swift │ │ │ ├── MMCoreDataStorage.swift │ │ │ ├── MessageManagedObject+CoreDataProperties.swift │ │ │ ├── MessageManagedObject.swift │ │ │ ├── Transformer.swift │ │ │ ├── UserSessionReportObject+CoreDataProperties.swift │ │ │ ├── UserSessionReportObject.swift │ │ │ ├── WebInAppClickObject+CoreDataProperties.swift │ │ │ └── WebInAppClickObject.swift │ │ ├── Localization │ │ │ └── MMLanguage.swift │ │ ├── MMKeychain.swift │ │ ├── MMLoggingUtil.swift │ │ ├── MMVersion.swift │ │ ├── Message │ │ │ ├── BaseMessage.swift │ │ │ ├── MOMessage.swift │ │ │ ├── MOSendingMapper.swift │ │ │ ├── MTMessage.swift │ │ │ ├── MessageSyncMapper.swift │ │ │ └── MessageUtils.swift │ │ ├── MessageHandlingDelegate.swift │ │ ├── MobileMessaging+PluginsMethods.swift │ │ ├── MobileMessaging.swift │ │ ├── MobileMessagingService │ │ │ └── MobileMessagingService.swift │ │ ├── Operations │ │ │ ├── AppOperations │ │ │ │ ├── CreateInstanceOperation.swift │ │ │ │ ├── CustomEventReportingOperation.swift │ │ │ │ ├── DeleteInstanceOperation.swift │ │ │ │ ├── DepersonalizeOperation.swift │ │ │ │ ├── EventPersistingOperation.swift │ │ │ │ ├── FetchInstanceOperation.swift │ │ │ │ ├── FetchUserOperation.swift │ │ │ │ ├── LocalMessageFetchingOperation.swift │ │ │ │ ├── MMOperation.swift │ │ │ │ ├── MessageFetchingOperation.swift │ │ │ │ ├── MessageHandlingOperation.swift │ │ │ │ ├── MessagePostingOperation.swift │ │ │ │ ├── MessagesEvictionOperation.swift │ │ │ │ ├── MessagesSyncOperation.swift │ │ │ │ ├── PersonalizeOperation.swift │ │ │ │ ├── RegistrationResetOperation.swift │ │ │ │ ├── SeenStatusPersistingOperation.swift │ │ │ │ ├── SeenStatusSendingOperation.swift │ │ │ │ ├── UpdateInstanceOperation.swift │ │ │ │ ├── UpdateUserOperation.swift │ │ │ │ ├── UserSessionPersistingOperation.swift │ │ │ │ ├── UserSessionsReportingOperation.swift │ │ │ │ ├── WebInAppClickPersistingOperation.swift │ │ │ │ └── WebInAppClickReportingOperation.swift │ │ │ ├── Conditions │ │ │ │ ├── HealthyRegistrationCondition.swift │ │ │ │ └── NotPendingDepersonalizationCondition.swift │ │ │ ├── MMMessageHandler.swift │ │ │ └── MMOperationQueue.swift │ │ ├── PrivacySettings.swift │ │ ├── PrivacySettings │ │ │ └── PrivacySettingsService.swift │ │ ├── SeenReports │ │ │ └── SeenReportMapper.swift │ │ ├── User │ │ │ ├── CustomAttributeModels.swift │ │ │ ├── UserDataMapper.swift │ │ │ ├── UserDataService.swift │ │ │ └── UserStandardAttributeModels.swift │ │ ├── UserEventsManager.swift │ │ ├── UserNotificationCenterDelegate.swift │ │ └── Utils │ │ │ ├── ApnsRegistrationManager.swift │ │ │ ├── BaseUrlManager.swift │ │ │ ├── MMDispatchQueue.swift │ │ │ ├── MMGCD.swift │ │ │ ├── MMLoc.swift │ │ │ ├── MMLocalNotifications.swift │ │ │ ├── MMLocalization.swift │ │ │ ├── MMNSErrorExtension.swift │ │ │ ├── MMPostponer.swift │ │ │ ├── MMRenamedClassesMapping.swift │ │ │ ├── MMUserAgent.swift │ │ │ ├── MMUtils.swift │ │ │ ├── MMVersionManager.swift │ │ │ └── UserNotificationType.swift │ ├── InteractiveNotifications │ │ ├── MMInAppMessage.swift │ │ ├── MMNotificationAction.swift │ │ ├── MMNotificationCategory.swift │ │ ├── MessageAlert │ │ │ ├── AlertQueue │ │ │ │ ├── AlertOperation.swift │ │ │ │ └── AlertQueue.swift │ │ │ ├── InAppMessagePresenter │ │ │ │ ├── DocumentReadyState.swift │ │ │ │ ├── InAppMessagePresenter.swift │ │ │ │ ├── NativeInAppMessagePresenter.swift │ │ │ │ ├── ScriptEventRecipient.swift │ │ │ │ ├── ScriptMethodInvoker.swift │ │ │ │ └── WebInAppMessagePresenter.swift │ │ │ ├── InteractiveMessageAlertManager.swift │ │ │ ├── InteractiveMessageButton.swift │ │ │ ├── LoadingImageView.swift │ │ │ ├── NativeInteractiveMessageAlertController.swift │ │ │ ├── WebInAppBannerManager.swift │ │ │ ├── WebInAppMessageView.swift │ │ │ └── WebInteractiveMessageAlertController.swift │ │ ├── NotificationsInteractionService.swift │ │ ├── WebInAppClickService.swift │ │ └── WebViewController │ │ │ ├── WebViewController.swift │ │ │ ├── WebViewSettings.swift │ │ │ └── WebViewToolbar.swift │ ├── MessageStorage │ │ ├── MMDefaultMessageStorage.swift │ │ ├── Message+CoreDataProperties.swift │ │ ├── Message.swift │ │ └── StorageProtocols.swift │ ├── Resources │ │ ├── InteractiveNotifications │ │ │ ├── LoadingImageView.xib │ │ │ ├── NativeInteractiveMessageAlertController.xib │ │ │ ├── PredefinedNotificationCategories.plist │ │ │ └── WebInteractiveMessageAlertController.xib │ │ ├── InternalStorage │ │ │ ├── MMInternalStorageModel.xcdatamodeld │ │ │ │ ├── .xccurrentversion │ │ │ │ ├── MMStorageModel_0.xcdatamodel │ │ │ │ │ └── contents │ │ │ │ ├── MMStorageModel_1.xcdatamodel │ │ │ │ │ └── contents │ │ │ │ ├── MMStorageModel_2.xcdatamodel │ │ │ │ │ └── contents │ │ │ │ ├── MMStorageModel_3.xcdatamodel │ │ │ │ │ └── contents │ │ │ │ ├── MMStorageModel_4.xcdatamodel │ │ │ │ │ └── contents │ │ │ │ └── MMStorageModel_5.xcdatamodel │ │ │ │ │ └── contents │ │ │ ├── Migration_0_3.xcmappingmodel │ │ │ │ └── xcmapping.xml │ │ │ ├── Migration_1_3.xcmappingmodel │ │ │ │ └── xcmapping.xml │ │ │ └── Migration_2_3.xcmappingmodel │ │ │ │ └── xcmapping.xml │ │ ├── Localization │ │ │ ├── ar.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── cs.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── da.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── de.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── en.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── es-419.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── es.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── fi.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── fr.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── he.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── hi.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── hr.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── hu.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── id.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── it.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── ja.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── ko.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── ms.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── nb.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── nl.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── pl.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── pt-PT.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── pt.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── ro.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── ru.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── sk.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── sq.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── sr.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── sv.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── th.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── tr.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── uk.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── vi.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ ├── zh-Hans.lproj │ │ │ │ └── MobileMessaging.strings │ │ │ └── zh-Hant.lproj │ │ │ │ └── MobileMessaging.strings │ │ ├── MessageStorage │ │ │ └── MMMessageStorageModel.xcdatamodeld │ │ │ │ └── MMMessageStorage.xcdatamodel │ │ │ │ └── contents │ │ └── PrivacyInfo.xcprivacy │ ├── RichNotifications │ │ ├── RetryableDownloadTask.swift │ │ └── RichNotificationsExtensions.swift │ ├── UserSession │ │ ├── RepeatingTimer.swift │ │ ├── UserSessionMapper.swift │ │ └── UserSessionService.swift │ └── Vendor │ │ ├── Alamofire │ │ ├── AFError.swift │ │ ├── Alamofire.swift │ │ ├── DispatchQueue+Alamofire.swift │ │ ├── MultipartFormData.swift │ │ ├── NetworkReachabilityManager.swift │ │ ├── Notifications.swift │ │ ├── ParameterEncoding.swift │ │ ├── Request.swift │ │ ├── Response.swift │ │ ├── ResponseSerialization.swift │ │ ├── Result.swift │ │ ├── ServerTrustPolicy.swift │ │ ├── SessionDelegate.swift │ │ ├── SessionManager.swift │ │ ├── TaskDelegate.swift │ │ ├── Timeline.swift │ │ └── Validation.swift │ │ ├── Keychain │ │ ├── KeychainSwift.swift │ │ ├── KeychainSwiftAccessOptions.swift │ │ └── TegKeychainConstants.swift │ │ ├── Kingsfisher │ │ ├── AnimatedImageView.swift │ │ ├── Box.swift │ │ ├── CacheSerializer.swift │ │ ├── Filter.swift │ │ ├── FormatIndicatedCacheSerializer.swift │ │ ├── Image.swift │ │ ├── ImageCache.swift │ │ ├── ImageDownloader.swift │ │ ├── ImageModifier.swift │ │ ├── ImagePrefetcher.swift │ │ ├── ImageProcessor.swift │ │ ├── ImageTransition.swift │ │ ├── ImageView+Kingfisher.swift │ │ ├── Indicator.swift │ │ ├── Kingfisher.swift │ │ ├── KingfisherManager.swift │ │ ├── KingfisherOptionsInfo.swift │ │ ├── Placeholder.swift │ │ ├── RequestModifier.swift │ │ ├── Resource.swift │ │ ├── String+MD5.swift │ │ ├── ThreadHelper.swift │ │ └── UIButton+Kingfisher.swift │ │ ├── PSOperations │ │ ├── BlockObserver.swift │ │ ├── BlockOperation.swift │ │ ├── Dictionary+Operations.swift │ │ ├── ExclusivityController.swift │ │ ├── GroupOperation.swift │ │ ├── NSLock+Operations.swift │ │ ├── NSOperation+Operations.swift │ │ ├── Operation.swift │ │ ├── OperationCondition.swift │ │ ├── OperationErrors.swift │ │ ├── OperationObserver.swift │ │ ├── OperationQueue.swift │ │ └── State.swift │ │ └── SwiftyJSON │ │ └── SwiftyJSON.swift ├── MobileMessagingObjC │ ├── Core │ │ ├── MMNotifications.m │ │ └── Plugins │ │ │ └── MobileMessagingPluginApplicationDelegate.m │ ├── Headers │ │ ├── Alamofire.h │ │ ├── Kingfisher.h │ │ ├── MMNotifications.h │ │ ├── MobileMessagingPluginApplicationDelegate.h │ │ └── SwiftTryCatch.h │ └── Vendor │ │ └── SwiftTryCatch │ │ └── SwiftTryCatch.m └── WebRTCUI │ ├── MMWebRTCService+Push.swift │ ├── MMWebRTCService+UI.swift │ ├── MMWebRTCService.swift │ ├── MMWebRTCSettings.swift │ ├── Models │ ├── MMCallFactory.swift │ ├── MMCallKitManager.swift │ ├── MMCallNotificationData.swift │ ├── MMUserActivityExtension.swift │ └── MMWebRTCToken.swift │ ├── PIP │ ├── AVPIPKit │ │ ├── AVPIPKitRenderer.swift │ │ ├── AVPIPKitUsable+UIKit.swift │ │ ├── AVPIPKitUsable.swift │ │ ├── AVPIPKitVideoController.swift │ │ └── AVPIPKitVideoProvider.swift │ ├── Extension │ │ ├── UIView+Associated.swift │ │ ├── UIViewController+Associated.swift │ │ └── UIWindow+Extension.swift │ └── PIPKit │ │ ├── PIPKit.swift │ │ ├── PIPKitEventDispatcher.swift │ │ └── PIPUsable.swift │ ├── Resources │ └── MobileMessagingCallUIIcons.xcassets │ │ ├── Call Icons │ │ ├── Contents.json │ │ ├── camera.switch.imageset │ │ │ ├── Contents.json │ │ │ └── icon-switch-camera-m-white.svg │ │ ├── clockWrap.imageset │ │ │ ├── Contents.json │ │ │ └── icon-clock-s-grayscale.pdf │ │ ├── collapseIcon.imageset │ │ │ ├── Contents.json │ │ │ └── icon-collapse-m-grayscale.svg │ │ ├── defaultCallAppIcon.imageset │ │ │ ├── Contents.json │ │ │ └── InAppChatLogo.png │ │ ├── ellipsisStatus.imageset │ │ │ ├── Contents.json │ │ │ └── icon-ellipsis-m-white.svg │ │ ├── endcallIcon.imageset │ │ │ ├── Contents.json │ │ │ └── icon-endcall-m-grayscale.svg │ │ ├── expandIcon.imageset │ │ │ ├── Contents.json │ │ │ └── expand.svg │ │ ├── landscape.off.imageset │ │ │ ├── Contents.json │ │ │ └── Vector.svg │ │ ├── landscape.on.imageset │ │ │ ├── Contents.json │ │ │ └── Vector.svg │ │ ├── microphone.imageset │ │ │ ├── Contents.json │ │ │ └── icon-mute-m-grayscale.svg │ │ ├── microphone.off.imageset │ │ │ ├── Contents.json │ │ │ └── Group 1532.svg │ │ ├── mutedParticipant.imageset │ │ │ ├── Contents.json │ │ │ └── mutedParticipant.svg │ │ ├── placeholder.imageset │ │ │ ├── Contents.json │ │ │ └── icon-user-s-dark.svg │ │ ├── screenshareOff.imageset │ │ │ ├── Contents.json │ │ │ └── icon-share-screen-off-m-grayscale.svg │ │ ├── screenshareOn.imageset │ │ │ ├── Contents.json │ │ │ └── icon-share-screen-m-grayscale.svg │ │ ├── speakerphone.off.imageset │ │ │ ├── Contents.json │ │ │ └── Frame 1686.svg │ │ ├── speakerphone.on.imageset │ │ │ ├── Contents.json │ │ │ └── speakeron.svg │ │ ├── video.off.imageset │ │ │ ├── Contents.json │ │ │ └── icon-video-off-m-grayscale.svg │ │ └── video.on.imageset │ │ │ ├── Contents.json │ │ │ └── icon-video-s-grayscale.svg │ │ ├── Call Sounds │ │ ├── Contents.json │ │ ├── MMDisconnectedCall.dataset │ │ │ ├── Contents.json │ │ │ └── MMDisconnectedCall.wav │ │ ├── MMOutboundCall.dataset │ │ │ ├── Contents.json │ │ │ └── MMOutboundCall.wav │ │ ├── reconnected.dataset │ │ │ ├── Contents.json │ │ │ └── reconnected.wav │ │ └── reconnecting.dataset │ │ │ ├── Contents.json │ │ │ └── reconnecting.wav │ │ ├── Contents.json │ │ └── alertBarIcon.imageset │ │ ├── Contents.json │ │ └── ph_warning-circle-light.svg │ ├── UI │ ├── CallUI │ │ ├── CallControlButtonsView.swift │ │ ├── CallInteractor.swift │ │ ├── CallTableOptionsView.swift │ │ ├── CallView.swift │ │ ├── FloatWindowView.swift │ │ ├── LocalScreenshareView.swift │ │ ├── MMCallController.swift │ │ ├── MMCallEventListener.swift │ │ ├── MediaCallView.swift │ │ ├── MediaCallViewHeader.swift │ │ ├── RootSheetView.swift │ │ └── VoiceCallView.swift │ ├── MMOpenSettings.swift │ ├── MMPopOverBar.swift │ ├── MMPopupView.swift │ └── UIAlertController+MMSetup.swift │ └── WebRTCUIExports.swift ├── Example ├── Gemfile ├── MobileMessagingExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ ├── MobileMessagingExample.xcscheme │ │ └── MobileMessagingExample_Tests_Device.xcscheme ├── MobileMessagingExample │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon-io.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-40.png │ │ │ ├── Icon-40@2x-1.png │ │ │ ├── Icon-40@2x.png │ │ │ ├── Icon-40@3x.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-72.png │ │ │ ├── Icon-72@2x.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-76@2x.png │ │ │ ├── Icon-83.5@2x.png │ │ │ ├── Icon-Small-50.png │ │ │ ├── Icon-Small-50@2x.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-Small@2x-1.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Icon-Small@3x-1.png │ │ │ ├── Icon-Small@3x.png │ │ │ ├── Icon.png │ │ │ ├── Icon@2x.png │ │ │ ├── iTunesArtwork.png │ │ │ └── iTunesArtwork@2x.png │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-40.png │ │ │ ├── Icon-40@2x.png │ │ │ ├── Icon-40@3x.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-76@2x.png │ │ │ ├── Icon-83.5@2x.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-Small@2x.png │ │ │ └── Icon-Small@3x.png │ │ ├── Contents.json │ │ ├── Info.imageset │ │ │ ├── Contents.json │ │ │ ├── Info.png │ │ │ ├── Info@3.png │ │ │ └── info@2.png │ │ ├── list.imageset │ │ │ ├── Contents.json │ │ │ ├── list.png │ │ │ ├── list@2x.png │ │ │ └── list@3x.png │ │ └── settings.imageset │ │ │ ├── Contents.json │ │ │ ├── settings.png │ │ │ ├── settings@2x.png │ │ │ └── settings@3x.png │ ├── Info.plist │ ├── InteractiveNotifications.swift │ ├── LinksHandler.swift │ ├── MobileMessagingExample.entitlements │ ├── Models │ │ └── MessagesManager.swift │ ├── Utils │ │ ├── JwtSupplierExampleImpl.swift │ │ ├── NSErrorExtension.swift │ │ ├── UIToolbarExtension.swift │ │ └── WindowExtension.swift │ ├── ViewControllers │ │ ├── DeeplinkViewControllers.swift │ │ ├── InfoTableViewController.swift │ │ ├── ListViewController.swift │ │ ├── MessageDetailsViewController.swift │ │ ├── SettingsViewController.swift │ │ └── ViewControllerWithToolbar.swift │ └── Views │ │ ├── CopyableCell.swift │ │ └── MessageCell.swift ├── NotificationServiceExtension │ ├── Info.plist │ ├── NotificationService.swift │ └── NotificationServiceExtension.entitlements ├── Podfile ├── PrivacyInfo.xcprivacy ├── Tests │ ├── Info.plist │ ├── MobileMessagingExample_Tests_Device-Info.plist │ ├── MobileMessagingTests │ │ ├── ApnsRegistrationManagerTests.swift │ │ ├── ApplicationCodeHashingTests.swift │ │ ├── Base │ │ │ ├── InstallationCoreDataProvider.swift │ │ │ ├── MMTestCase.swift │ │ │ ├── Mocks.swift │ │ │ └── TestUtils.swift │ │ ├── BaseSettingsTests.swift │ │ ├── CheckVersionTests.swift │ │ ├── CodingDecodingTests.swift │ │ ├── CoreDataHelpersTests.swift │ │ ├── DataModelsTests.swift │ │ ├── DeliveryReportingTests.swift │ │ ├── DepersonalizeTests.swift │ │ ├── DynamicBaseUrlTests.swift │ │ ├── EscapingQueryTests.swift │ │ ├── EventsTests.swift │ │ ├── FetchMessagesTest.swift │ │ ├── InAppAlertTests.swift │ │ ├── InboxDataModelsTests.swift │ │ ├── InboxServiceTests.swift │ │ ├── InstallationDataServiceTests.swift │ │ ├── InstallationMigrationTests.swift │ │ ├── InstallationsManagementTests.swift │ │ ├── InteractiveMessageTests.swift │ │ ├── InteractiveNotificationsTests.swift │ │ ├── JwtSupplierTests.swift │ │ ├── JwtValidatorTests.swift │ │ ├── KeychainTests.swift │ │ ├── LocalMessageFetchingTests.swift │ │ ├── MMInAppMessageTests.swift │ │ ├── MMInboxFilterOptionsTests.swift │ │ ├── MOMessageSendingTests.swift │ │ ├── MessageReceivingTests.swift │ │ ├── MessageSeenTests.swift │ │ ├── MessageStorageTests.swift │ │ ├── NSEDeliveryReportingTests.swift │ │ ├── OtherVendorsTests.swift │ │ ├── PersonalizeTests.swift │ │ ├── PrimaryDeviceTests.swift │ │ ├── RegistrationTests.swift │ │ ├── ServicesSynchronizationTests.swift │ │ ├── SyncMessagesTest.swift │ │ ├── SystemDataTests.swift │ │ ├── TimezoneFormatterTests.swift │ │ ├── TrustedDomainsTests.swift │ │ ├── UserDataTests.swift │ │ ├── UserSessionTests.swift │ │ ├── UtilsTests.swift │ │ └── WebInAppClickTests.swift │ └── mocks │ │ └── mobile │ │ ├── 1 │ │ ├── data │ │ │ └── system │ │ │ │ └── POST.json │ │ └── messages │ │ │ ├── mo │ │ │ └── POST.json │ │ │ └── seen │ │ │ └── POST.json │ │ ├── 2 │ │ └── data │ │ │ └── system │ │ │ └── POST.json │ │ └── 5 │ │ └── messages │ │ └── POST.json ├── en.lproj │ └── Localizable.strings ├── fastlane │ ├── Appfile │ ├── Fastfile │ ├── Matchfile │ ├── Pluginfile │ ├── README.md │ ├── keys.template │ └── report.xml └── ru.lproj │ └── Localizable.strings ├── Example_SPM ├── Gemfile ├── MobileMessagingExample │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Info.plist │ └── MobileMessagingExample.entitlements ├── MobileMessagingExample_SPM.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── MobileMessagingExample.xcscheme │ │ └── MobileMessagingExample_Tests_Device.xcscheme ├── NotificationServiceExtension │ ├── Info.plist │ ├── NotificationService.swift │ └── NotificationServiceExtension.entitlements └── fastlane │ ├── Appfile │ ├── Matchfile │ └── keys.template ├── Example_static ├── .swift-version ├── Gemfile ├── MobileMessagingExample │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Info.plist │ └── MobileMessagingExample.entitlements ├── MobileMessagingExample_static.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── MobileMessagingExample.xcscheme │ │ └── MobileMessagingExample_Tests_Device.xcscheme ├── NotificationServiceExtension │ ├── Info.plist │ ├── NotificationService.swift │ └── NotificationServiceExtension.entitlements ├── Podfile ├── Tests │ ├── Info.plist │ └── MobileMessagingExample_static_Tests_Device-Info.plist └── fastlane │ ├── Appfile │ ├── Fastfile │ ├── Matchfile │ ├── Pluginfile │ ├── README.md │ ├── keys.template │ └── report.xml ├── Framework ├── Info.plist ├── MobileMessaging-dummy.m ├── MobileMessaging-prefix.pch └── MobileMessaging.xcconfig ├── InboxExample ├── InboxExample.xcodeproj │ └── project.pbxproj ├── InboxExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── InboxExample.entitlements │ ├── InboxViewController.swift │ ├── Info.plist │ ├── SceneDelegate.swift │ ├── Utils │ │ ├── BadgeButton.swift │ │ ├── ViewControllerWithActivity.swift │ │ └── utils.swift │ └── ViewController.swift ├── Podfile └── fastlane │ ├── Appfile │ ├── Matchfile │ ├── Pluginfile │ └── report.xml ├── LICENSE ├── MobileMessaging-umbrella.h ├── MobileMessaging.modulemap ├── MobileMessaging.podspec ├── MobileMessaging.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── MobileMessaging.xcscheme ├── Package.resolved ├── Package.swift ├── README.md ├── SPMChatExample ├── MobileChatExample.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── MobileChatExample.xcscheme └── MobileChatExample │ ├── Info.plist │ └── MobileChatExample.entitlements ├── localiseStrings.sh ├── sonar-project.properties └── xccov-to-sonarqube-generic.sh /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Please fill out the following form to help us to resolve you issue faster. 2 | 3 | Notice: for security reasons, don't ever disclose your Application Code and other sensitive information, Github is a public resource, anyone can see comments that you post here. 4 | 5 | * MobileMessaging SDK version: [FILL THIS OUT] 6 | * Xcode version: [FILL THIS OUT] 7 | * Your application language: [FILL THIS OUT. Objective-C or Swift, for Swift - specify which the version] 8 | * Cocoapods version: [FILL THIS OUT. Not sure which version you are on? - Use a terminal command: 'pod --version'] 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | /build/* 5 | *.pbxuser 6 | !default.pbxuser 7 | *.mode1v3 8 | !default.mode1v3 9 | *.mode2v3 10 | !default.mode2v3 11 | *.perspectivev3 12 | !default.perspectivev3 13 | xcuserdata 14 | profile 15 | *.moved-aside 16 | DerivedData 17 | .idea/ 18 | *.hmap 19 | *.xccheckout 20 | 21 | Carthage 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Note: if you ignore the Pods directory, make sure to uncomment 27 | # `pod install` in .travis.yml 28 | # 29 | # Pods/ 30 | 31 | ChatExample/Pods/ 32 | Pods/ 33 | 34 | *.xcworkspace 35 | */Podfile.lock 36 | */Pods/ 37 | */fastlane/keys 38 | */fastlane/test_output 39 | */*.app.* 40 | */*.ipa 41 | */tmp 42 | macos/ 43 | .application-code 44 | 45 | ### Sonar ### 46 | #Sonar generated dir 47 | /.sonar/ 48 | 49 | ### SonarQube ### 50 | # SonarQube ignore files. 51 | # 52 | # https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner 53 | # Sonar Scanner working directories 54 | .sonar/ 55 | .sonarqube/ 56 | .scannerwork/ 57 | 58 | # http://www.sonarlint.org/commandline/ 59 | # SonarLint working directories, configuration files (including credentials) 60 | .sonarlint/ 61 | sonarqube-generic-coverage.xml 62 | 63 | # SPM 64 | /.build/ -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 5 -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | # cache: cocoapods 7 | # podfile: Example/Podfile 8 | # before_install: 9 | # - gem install cocoapods # Since Travis is not always on latest version 10 | # - pod install --project-directory=Example 11 | script: 12 | - set -o pipefail && xcodebuild test -workspace Example/MobileMessaging.xcworkspace -scheme MobileMessaging-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty 13 | - pod lib lint 14 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "InAppChatLogo.png", 5 | "idiom" : "universal", 6 | "platform" : "ios", 7 | "size" : "1024x1024" 8 | } 9 | ], 10 | "info" : { 11 | "author" : "xcode", 12 | "version" : 1 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Assets.xcassets/AppIcon.appiconset/InAppChatLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/ChatExample/MobileChatExample/Assets.xcassets/AppIcon.appiconset/InAppChatLogo.png -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Assets.xcassets/icon-user-border.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-user-border.svg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Assets.xcassets/phone-ringing-sound.dataset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "data" : [ 3 | { 4 | "filename" : "phone-ringing-sound.mp3", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Assets.xcassets/phone-ringing-sound.dataset/phone-ringing-sound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/ChatExample/MobileChatExample/Assets.xcassets/phone-ringing-sound.dataset/phone-ringing-sound.mp3 -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/LanguageTableVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LanguageTableVC.swift 3 | // MobileChatExample 4 | // 5 | // Created by Francisco Fortes on 08/06/2022. 6 | // Copyright © 2022 Infobip d.o.o. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | import MobileMessaging 12 | #if USING_SPM 13 | import WebRTCUI 14 | import InAppChat 15 | import MobileMessagingLogging 16 | #endif 17 | 18 | class LanguageTableVC: UITableViewController { 19 | override func numberOfSections(in tableView: UITableView) -> Int { 20 | return 1 21 | } 22 | 23 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 24 | return MMLanguage.allCases.count 25 | } 26 | 27 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 28 | let cell = tableView.dequeueReusableCell(withIdentifier: "LanguageCell", for: indexPath) 29 | let mmLanguage = MMLanguage.allCases[indexPath.row] 30 | cell.textLabel?.text = mmLanguage.localisedName 31 | return cell 32 | } 33 | 34 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 35 | MobileMessaging.inAppChat?.setLanguage(MMLanguage.allCases[indexPath.row].locale) 36 | dismiss(animated: true) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/MobileChatExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.developer.icloud-container-identifiers 8 | 9 | com.apple.developer.icloud-services 10 | 11 | CloudDocuments 12 | 13 | com.apple.developer.ubiquity-container-identifiers 14 | 15 | com.apple.security.application-groups 16 | 17 | group.com.infobip.inappchat.demo 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyCollectedDataTypes 6 | 7 | 8 | NSPrivacyCollectedDataType 9 | NSPrivacyCollectedDataTypeName 10 | NSPrivacyCollectedDataTypeLinked 11 | 12 | NSPrivacyCollectedDataTypeTracking 13 | 14 | NSPrivacyCollectedDataTypePurposes 15 | 16 | NSPrivacyCollectedDataTypePurposeAppFunctionality 17 | 18 | 19 | 20 | NSPrivacyCollectedDataType 21 | NSPrivacyCollectedDataTypeEmailAddress 22 | NSPrivacyCollectedDataTypeLinked 23 | 24 | NSPrivacyCollectedDataTypeTracking 25 | 26 | NSPrivacyCollectedDataTypePurposes 27 | 28 | NSPrivacyCollectedDataTypePurposeAppFunctionality 29 | 30 | 31 | 32 | NSPrivacyCollectedDataType 33 | NSPrivacyCollectedDataTypePhoneNumber 34 | NSPrivacyCollectedDataTypeLinked 35 | 36 | NSPrivacyCollectedDataTypeTracking 37 | 38 | NSPrivacyCollectedDataTypePurposes 39 | 40 | NSPrivacyCollectedDataTypePurposeAppFunctionality 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Resources/alphaLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/ChatExample/MobileChatExample/Resources/alphaLogo.png -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Resources/attachIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Resources/sendIcon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ChatExample/MobileChatExample/Sounds/MMInboundCall.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/ChatExample/MobileChatExample/Sounds/MMInboundCall.wav -------------------------------------------------------------------------------- /ChatExample/MobileMessagingNotificationExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.infobip.inappchat.demo 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ChatExample/NotificationExtension/MobileMessagingNotificationServiceExtension.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | MobileMessagingNotificationExtension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | NSAppTransportSecurity 20 | 21 | NSAllowsArbitraryLoads 22 | 23 | 24 | CFBundleShortVersionString 25 | 1.0 26 | CFBundleVersion 27 | 1 28 | NSExtension 29 | 30 | NSExtensionPointIdentifier 31 | com.apple.usernotifications.service 32 | NSExtensionPrincipalClass 33 | $(PRODUCT_MODULE_NAME).NotificationService 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /ChatSwiftUIDemo/ChatSwiftUIDemo/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ChatSwiftUIDemo/ChatSwiftUIDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "InAppChatLogo.png", 5 | "idiom" : "universal", 6 | "platform" : "ios", 7 | "size" : "1024x1024" 8 | } 9 | ], 10 | "info" : { 11 | "author" : "xcode", 12 | "version" : 1 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ChatSwiftUIDemo/ChatSwiftUIDemo/Assets.xcassets/AppIcon.appiconset/InAppChatLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/ChatSwiftUIDemo/ChatSwiftUIDemo/Assets.xcassets/AppIcon.appiconset/InAppChatLogo.png -------------------------------------------------------------------------------- /ChatSwiftUIDemo/ChatSwiftUIDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ChatSwiftUIDemo/ChatSwiftUIDemo/ChatSwiftUIDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /ChatSwiftUIDemo/ChatSwiftUIDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSMicrophoneUsageDescription 6 | MobileChatExample wants to use microphone to record audio 7 | NSCameraUsageDescription 8 | MobileChatExample wants to use camera to take photos and videos 9 | NSPhotoLibraryUsageDescription 10 | MobileChatExample wants to use photo library to send attachments 11 | NSPhotoLibraryAddUsageDescription 12 | MobileChatExample wants to save attachments to photo library 13 | UIBackgroundModes 14 | 15 | fetch 16 | remote-notification 17 | voip 18 | 19 | UIUserInterfaceStyle 20 | Light 21 | 22 | 23 | -------------------------------------------------------------------------------- /ChatSwiftUIDemo/ChatSwiftUIDemo/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/.gitkeep -------------------------------------------------------------------------------- /Classes/Chat/API/ChatAPIKeys.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatAPIKeys.swift 3 | // MobileMessaging 4 | // 5 | // Created by okoroleva on 29.04.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | struct ChatAPIKeys { 11 | struct QueryParams { 12 | static let pushRegId = "pushRegId" 13 | static let widgetId = "widgetId" 14 | static let jwt = "jwt" 15 | static let theme = "theme" 16 | static let io = "io" 17 | static let domain = "domain" 18 | static let language = "language" 19 | } 20 | 21 | struct JSMessageKeys { 22 | static let errorCode = "errorCode" 23 | static let errorMessage = "errorMessage" 24 | static let enabled = "enabled" 25 | static let isVisibleControls = "isVisibleControls" 26 | static let attachmentUrl = "url" 27 | static let attachmentType = "type" 28 | static let attachmentCaption = "caption" 29 | static let additionalInfo = "additionalInfo" 30 | } 31 | 32 | struct DestinationKeys { 33 | static let liveChat = "liveChatDestinations" 34 | static let userId = "userId" 35 | static let applicationId = "applicationId" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Classes/Chat/API/GetChatRegistrationOperation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatRegistrationOperation.swift 3 | // MobileMessaging 4 | // 5 | // Created by okoroleva on 14.09.2023. 6 | // 7 | 8 | import Foundation 9 | 10 | class GetChatRegistrationsOperation: MMOperation { 11 | let mmContext: MobileMessaging 12 | let finishBlock: ((NSError?, [String: String]?) -> Void) 13 | var operationResult = MMGetChatRegistrationsResult.Cancel 14 | 15 | init(mmContext: MobileMessaging, finishBlock: @escaping ((NSError?, [String: String]?) -> Void)) { 16 | self.mmContext = mmContext 17 | self.finishBlock = finishBlock 18 | super.init(isUserInitiated: false) 19 | self.addCondition(HealthyRegistrationCondition(mmContext: mmContext)) 20 | } 21 | 22 | override func execute() { 23 | guard !isCancelled else { 24 | logDebug("cancelled...") 25 | finish() 26 | return 27 | } 28 | logDebug("Started...") 29 | 30 | performRequest() 31 | } 32 | 33 | private func performRequest() { 34 | mmContext.remoteApiProvider.getChatRegistrations( 35 | applicationCode: mmContext.applicationCode, 36 | pushRegistrationId: mmContext.currentInstallation().pushRegistrationId, 37 | queue: underlyingQueue) { (result) in 38 | self.operationResult = result 39 | self.finishWithError(result.error) 40 | } 41 | } 42 | 43 | override func finished(_ errors: [NSError]) { 44 | logDebug("finished with errors: \(errors)") 45 | finishBlock(errors.first, operationResult.value?.chatRegistrations) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Classes/Chat/API/GetChatWidgetOperation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GetChatWidgetOperation.swift 3 | // MobileMessaging 4 | // 5 | // Created by okoroleva on 24.04.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | class GetChatWidgetOperation: MMOperation { 11 | let mmContext: MobileMessaging 12 | let finishBlock: ((NSError?, ChatWidget?) -> Void) 13 | var operationResult = GetChatWidgetResult.Cancel 14 | 15 | init(mmContext: MobileMessaging, finishBlock: @escaping ((NSError?, ChatWidget?) -> Void)) { 16 | self.mmContext = mmContext 17 | self.finishBlock = finishBlock 18 | super.init(isUserInitiated: false) 19 | self.addCondition(HealthyRegistrationCondition(mmContext: mmContext)) 20 | } 21 | 22 | override func execute() { 23 | guard !isCancelled else { 24 | logDebug("cancelled...") 25 | finish() 26 | return 27 | } 28 | logDebug("Started...") 29 | 30 | performRequest() 31 | } 32 | 33 | private func performRequest() { 34 | mmContext.remoteApiProvider.getChatWidget( 35 | applicationCode: mmContext.applicationCode, 36 | pushRegistrationId: mmContext.currentInstallation().pushRegistrationId, 37 | queue: underlyingQueue) { (result) in 38 | self.operationResult = result 39 | self.finishWithError(result.error) 40 | } 41 | } 42 | 43 | override func finished(_ errors: [NSError]) { 44 | logDebug("finished with errors: \(errors)") 45 | finishBlock(errors.first, operationResult.value?.widget) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Classes/Chat/ChatExports.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Exports.swift 3 | // 4 | // 5 | // Created by Maksym Svitlovskyi on 29/05/2023. 6 | // 7 | 8 | import Foundation 9 | #if SWIFT_PACKAGE 10 | @_exported import MobileMessaging 11 | #endif 12 | -------------------------------------------------------------------------------- /Classes/Chat/ChatExtensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Utils.swift 3 | // MobileMessaging 4 | // 5 | // Created by Olga Koroleva on 16.05.2022. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | extension UIImage { 12 | convenience init?(mm_chat_named: String) { 13 | self.init(named: mm_chat_named, in: MMInAppChatService.resourceBundle, compatibleWith: nil) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Classes/Chat/ChatLocalization.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // MobileMessaging 4 | // 5 | // Created by Olga Koroleva on 14.06.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | class ChatLocalization { 11 | class func localizedString(forKey key: String?, defaultString: String) -> String { 12 | guard let key = key else { 13 | return defaultString 14 | } 15 | return ChatLocalization.languageBundle().localizedString( 16 | forKey: key, 17 | value: defaultString, 18 | table: "InAppChat") 19 | } 20 | 21 | private class func languageBundle() -> Bundle { 22 | guard let langBundleURL = MMInAppChatService.resourceBundle.url( 23 | forResource: MMLanguage.sessionLanguage.stringValue, 24 | withExtension: "lproj"), 25 | let langBundle = Bundle(url: langBundleURL) else { 26 | return MMInAppChatService.resourceBundle 27 | } 28 | return langBundle 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Classes/Chat/ChatWidget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatWidget.swift 3 | // MobileMessaging 4 | // 5 | // Created by okoroleva on 24.04.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | public struct ChatWidgetAttachmentSettings: Decodable { 11 | public let maxSize: UInt 12 | public let isEnabled: Bool 13 | public let allowedExtensions: [String] 14 | } 15 | 16 | public struct ChatWidget: Decodable { 17 | public let id: String 18 | public let title: String? 19 | public let primaryColor: String? 20 | public let primaryTextColor: String? 21 | public let backgroundColor: String? 22 | public let multiThread: Bool? 23 | public let callsEnabled: Bool? 24 | public let themeNames: [String]? 25 | public let attachments: ChatWidgetAttachmentSettings 26 | } 27 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/ar.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "لا يوجد اتصال"; 2 | "mm_send_message_placeholder" = "ارسل رسالة"; 3 | "mm_action_sheet_take_photo_or_video" = "التقاط صورة أو فيديو"; 4 | "mm_action_sheet_photo_library" = "مكتبة الصور"; 5 | "mm_action_sheet_browse" = "تصفح"; 6 | "mm_button_settings" = "الإعدادات"; 7 | "mm_attachment_upload_failed_alert_title" = "فشل تحميل المرفق"; 8 | "mm_attachment_upload_failed_alert_message" = "تم تجاوز الحجم الأقصى المسموح به"; 9 | "mm_permissions_alert_message" = "لمنح الأذونات ، انتقل إلى الإعدادات"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/cs.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Žádné připojení"; 2 | "mm_send_message_placeholder" = "Poslat zprávu..."; 3 | "mm_action_sheet_take_photo_or_video" = "Pořiďte fotografii nebo video"; 4 | "mm_action_sheet_photo_library" = "Knihovna fotografií"; 5 | "mm_action_sheet_browse" = "Procházet"; 6 | "mm_button_settings" = "Nastavení"; 7 | "mm_attachment_upload_failed_alert_title" = "Nahrávání přílohy se nezdařilo"; 8 | "mm_attachment_upload_failed_alert_message" = "Maximální povolená velikost byla překročena"; 9 | "mm_permissions_alert_message" = "Chcete-li udělit oprávnění, přejděte na Nastavení"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/da.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Ingen forbindelse"; 2 | "mm_send_message_placeholder" = "Send en besked..."; 3 | "mm_action_sheet_take_photo_or_video" = "Tag foto eller video"; 4 | "mm_action_sheet_photo_library" = "Fotobibliotek"; 5 | "mm_action_sheet_browse" = "Gennemse"; 6 | "mm_button_settings" = "Indstillinger"; 7 | "mm_attachment_upload_failed_alert_title" = "Upload af vedhæftet fil mislykkedes"; 8 | "mm_attachment_upload_failed_alert_message" = "Maksimal tilladt størrelse overskredet"; 9 | "mm_permissions_alert_message" = "Gå til Indstillinger for at give tilladelser"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/de.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Keine Verbindung"; 2 | "mm_send_message_placeholder" = "Eine Nachricht schicken..."; 3 | "mm_action_sheet_take_photo_or_video" = "Foto oder Video aufnehmen"; 4 | "mm_action_sheet_photo_library" = "Fotobibliothek"; 5 | "mm_action_sheet_browse" = "Durchsuche"; 6 | "mm_button_settings" = "Einstellungen"; 7 | "mm_attachment_upload_failed_alert_title" = "Anhang-Upload fehlgeschlagen"; 8 | "mm_attachment_upload_failed_alert_message" = "Maximal zulässige Größe überschritten"; 9 | "mm_permissions_alert_message" = "Um Berechtigungen zu erteilen, gehen Sie zu Einstellungen"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/en.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "No connection"; 2 | "mm_send_message_placeholder" = "Send a message..."; 3 | "mm_action_sheet_take_photo_or_video" = "Take Photo or Video"; 4 | "mm_action_sheet_photo_library" = "Photo Library"; 5 | "mm_action_sheet_browse" = "Browse"; 6 | "mm_button_settings" = "Settings"; 7 | "mm_attachment_upload_failed_alert_title" = "Attachment upload failed"; 8 | "mm_attachment_upload_failed_alert_message" = "Maximum allowed size exceeded"; 9 | "mm_permissions_alert_message" = "To give permissions go to Settings"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/es-419.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Sin conexión"; 2 | "mm_send_message_placeholder" = "Enviar un mensaje..."; 3 | "mm_action_sheet_take_photo_or_video" = "Tomar foto o video"; 4 | "mm_action_sheet_photo_library" = "Librería fotográfica"; 5 | "mm_action_sheet_browse" = "Vistazo"; 6 | "mm_button_settings" = "Configuraciones"; 7 | "mm_attachment_upload_failed_alert_title" = "Error al cargar el archivo adjunto"; 8 | "mm_attachment_upload_failed_alert_message" = "Tamaño máximo permitido excedido"; 9 | "mm_permissions_alert_message" = "Para otorgar permisos, vaya a Configuración"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/es.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Sin conexión"; 2 | "mm_send_message_placeholder" = "Enviar un mensaje..."; 3 | "mm_action_sheet_take_photo_or_video" = "Tomar foto o video"; 4 | "mm_action_sheet_photo_library" = "Librería fotográfica"; 5 | "mm_action_sheet_browse" = "Vistazo"; 6 | "mm_button_settings" = "Configuraciones"; 7 | "mm_attachment_upload_failed_alert_title" = "Error al cargar el archivo adjunto"; 8 | "mm_attachment_upload_failed_alert_message" = "Tamaño máximo permitido excedido"; 9 | "mm_permissions_alert_message" = "Para otorgar permisos, vaya a Configuración"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/fi.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Ei yhteyttä"; 2 | "mm_send_message_placeholder" = "Lähetä viesti..."; 3 | "mm_action_sheet_take_photo_or_video" = "Ota valokuva tai video"; 4 | "mm_action_sheet_photo_library" = "Valokuvakirjasto"; 5 | "mm_action_sheet_browse" = "Selaa"; 6 | "mm_button_settings" = "Asetukset"; 7 | "mm_attachment_upload_failed_alert_title" = "Liitteen lähettäminen epäonnistui"; 8 | "mm_attachment_upload_failed_alert_message" = "Suurin sallittu koko ylitetty"; 9 | "mm_permissions_alert_message" = "Voit myöntää käyttöoikeudet siirtymällä kohtaan Asetukset"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/fr.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Pas de connection"; 2 | "mm_send_message_placeholder" = "Envoyer un message..."; 3 | "mm_action_sheet_take_photo_or_video" = "Prendre une photo ou une vidéo"; 4 | "mm_action_sheet_photo_library" = "Galerie de photos"; 5 | "mm_action_sheet_browse" = "Feuilleter"; 6 | "mm_button_settings" = "Paramètres"; 7 | "mm_attachment_upload_failed_alert_title" = "Échec du téléchargement des pièces jointes"; 8 | "mm_attachment_upload_failed_alert_message" = "Dépassement de la taille maximale autorisée"; 9 | "mm_permissions_alert_message" = "Pour accorder des autorisations, accédez à Paramètres"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/he.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "אין חיבור"; 2 | "mm_send_message_placeholder" = "שלח הודעה"; 3 | "mm_action_sheet_take_photo_or_video" = "צלם תמונה או וידאו"; 4 | "mm_action_sheet_photo_library" = "ספריית תמונות"; 5 | "mm_action_sheet_browse" = "לְדַפדֵף"; 6 | "mm_button_settings" = "הגדרות"; 7 | "mm_attachment_upload_failed_alert_title" = "העלאת הקובץ המצורף נכשלה"; 8 | "mm_attachment_upload_failed_alert_message" = "חרג מהגודל המרבי המותר"; 9 | "mm_permissions_alert_message" = "כדי להעניק הרשאות כנסו להגדרות"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/hi.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "कोई कनेक्शन नहीं"; 2 | "mm_send_message_placeholder" = "एक संदेश भेजें"; 3 | "mm_action_sheet_take_photo_or_video" = "फोटो या वीडियो लें"; 4 | "mm_action_sheet_photo_library" = "फोटो लाइब्रेरी"; 5 | "mm_action_sheet_browse" = "ब्राउज़"; 6 | "mm_button_settings" = "समायोजन"; 7 | "mm_attachment_upload_failed_alert_title" = "अनुलग्नक अपलोड विफल रहा"; 8 | "mm_attachment_upload_failed_alert_message" = "अधिकतम अनुमत आकार पार हो गया"; 9 | "mm_permissions_alert_message" = "अनुमतियाँ देने के लिए सेटिंग्स पर जाएँ"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/hr.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Nema veze"; 2 | "mm_send_message_placeholder" = "Pošalji poruku..."; 3 | "mm_action_sheet_take_photo_or_video" = "Snimite fotografiju ili video"; 4 | "mm_action_sheet_photo_library" = "Biblioteka fotografija"; 5 | "mm_action_sheet_browse" = "pretraživati"; 6 | "mm_button_settings" = "Postavke"; 7 | "mm_attachment_upload_failed_alert_title" = "Prijenos privitka nije uspio"; 8 | "mm_attachment_upload_failed_alert_message" = "Premašena je najveća dopuštena veličina"; 9 | "mm_permissions_alert_message" = "Da biste odobrili odobrenja, idite na Postavke"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/hu.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Nincs kapcsolat"; 2 | "mm_send_message_placeholder" = "Üzenetet küldeni..."; 3 | "mm_action_sheet_take_photo_or_video" = "Készítsen fényképet vagy videót"; 4 | "mm_action_sheet_photo_library" = "Fotókönyvtár"; 5 | "mm_action_sheet_browse" = "Böngészés"; 6 | "mm_button_settings" = "Beállítások"; 7 | "mm_attachment_upload_failed_alert_title" = "A melléklet feltöltése sikertelen"; 8 | "mm_attachment_upload_failed_alert_message" = "A maximális megengedett méret meghaladta"; 9 | "mm_permissions_alert_message" = "Az engedélyek megadásához nyissa meg a Beállítások menüpontot"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/id.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Tidak ada koneksi"; 2 | "mm_send_message_placeholder" = "Kirim pesan"; 3 | "mm_action_sheet_take_photo_or_video" = "Ambil Foto atau Video"; 4 | "mm_action_sheet_photo_library" = "Perpustakaan Foto"; 5 | "mm_action_sheet_browse" = "Telusuri"; 6 | "mm_button_settings" = "Pengaturan"; 7 | "mm_attachment_upload_failed_alert_title" = "Unggahan lampiran gagal"; 8 | "mm_attachment_upload_failed_alert_message" = "Ukuran maksimum yang diizinkan terlampaui"; 9 | "mm_permissions_alert_message" = "Untuk memberikan izin, buka Pengaturan"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/it.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Nessuna connessione"; 2 | "mm_send_message_placeholder" = "Mandare un messaggio..."; 3 | "mm_action_sheet_take_photo_or_video" = "Scatta foto o video"; 4 | "mm_action_sheet_photo_library" = "Fototeca"; 5 | "mm_action_sheet_browse" = "Navigare"; 6 | "mm_button_settings" = "impostazioni"; 7 | "mm_attachment_upload_failed_alert_title" = "Caricamento allegato non riuscito"; 8 | "mm_attachment_upload_failed_alert_message" = "Dimensione massima consentita superata"; 9 | "mm_permissions_alert_message" = "Per concedere le autorizzazioni, vai su Impostazioni"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/ja.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "接続なし"; 2 | "mm_send_message_placeholder" = "メッセージを送る"; 3 | "mm_action_sheet_take_photo_or_video" = "写真やビデオを撮る"; 4 | "mm_action_sheet_photo_library" = "フォトライブラリー"; 5 | "mm_action_sheet_browse" = "ブラウズ"; 6 | "mm_button_settings" = "設定"; 7 | "mm_attachment_upload_failed_alert_title" = "添付ファイルのアップロードに失敗しました"; 8 | "mm_attachment_upload_failed_alert_message" = "最大許容サイズを超えています"; 9 | "mm_permissions_alert_message" = "権限を付与するには、[設定]に移動します"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/ko.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "연결이 없습니다"; 2 | "mm_send_message_placeholder" = "메시지를 보내다"; 3 | "mm_action_sheet_take_photo_or_video" = "사진 또는 비디오 찍기"; 4 | "mm_action_sheet_photo_library" = "사진 자료실"; 5 | "mm_action_sheet_browse" = "검색"; 6 | "mm_button_settings" = "설정"; 7 | "mm_attachment_upload_failed_alert_title" = "첨부 파일 업로드 실패"; 8 | "mm_attachment_upload_failed_alert_message" = "최대 허용 크기를 초과했습니다"; 9 | "mm_permissions_alert_message" = "권한을 부여하려면 설정으로 이동하십시오"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/ms.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Tiada sambungan"; 2 | "mm_send_message_placeholder" = "Hantar satu mesej..."; 3 | "mm_action_sheet_take_photo_or_video" = "Ambil Foto atau Video"; 4 | "mm_action_sheet_photo_library" = "Perpustakaan Foto"; 5 | "mm_action_sheet_browse" = "Semak imbas"; 6 | "mm_button_settings" = "Tetapan"; 7 | "mm_attachment_upload_failed_alert_title" = "Gagal memuat naik lampiran"; 8 | "mm_attachment_upload_failed_alert_message" = "Melebihi saiz maksimum yang dibenarkan"; 9 | "mm_permissions_alert_message" = "Untuk memberikan kebenaran, pergi ke Tetapan"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/nb.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Ingen forbindelse"; 2 | "mm_send_message_placeholder" = "Send en melding..."; 3 | "mm_action_sheet_take_photo_or_video" = "Ta bilde eller video"; 4 | "mm_action_sheet_photo_library" = "Fotobibliotek"; 5 | "mm_action_sheet_browse" = "Bla"; 6 | "mm_button_settings" = "Innstillinger"; 7 | "mm_attachment_upload_failed_alert_title" = "Opplastingen av vedlegg mislyktes"; 8 | "mm_attachment_upload_failed_alert_message" = "Maksimal tillatt størrelse overskredet"; 9 | "mm_permissions_alert_message" = "Gå til Innstillinger for å gi tillatelser"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/nl.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Geen connectie"; 2 | "mm_send_message_placeholder" = "Stuur een bericht..."; 3 | "mm_action_sheet_take_photo_or_video" = "Maak een foto of video"; 4 | "mm_action_sheet_photo_library" = "Fotogalerij"; 5 | "mm_action_sheet_browse" = "Bladeren"; 6 | "mm_button_settings" = "Instellingen"; 7 | "mm_attachment_upload_failed_alert_title" = "Uploaden van bijlage mislukt"; 8 | "mm_attachment_upload_failed_alert_message" = "Maximaal toegestane grootte overschreden"; 9 | "mm_permissions_alert_message" = "Ga naar Instellingen om machtigingen te verlenen"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/pl.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Brak połączenia"; 2 | "mm_send_message_placeholder" = "Wysłać wiadomość..."; 3 | "mm_action_sheet_take_photo_or_video" = "Zrób zdjęcie lub wideo"; 4 | "mm_action_sheet_photo_library" = "Album zdjęć"; 5 | "mm_action_sheet_browse" = "Przeglądaj"; 6 | "mm_button_settings" = "Ustawienia"; 7 | "mm_attachment_upload_failed_alert_title" = "Przesyłanie załącznika nie powiodło się"; 8 | "mm_attachment_upload_failed_alert_message" = "Przekroczono maksymalny dozwolony rozmiar"; 9 | "mm_permissions_alert_message" = "Aby przyznać uprawnienia, przejdź do Ustawień"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/pt-PT.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Sem conexão"; 2 | "mm_send_message_placeholder" = "Envie uma mensagem..."; 3 | "mm_action_sheet_take_photo_or_video" = "Tirar foto ou vídeo"; 4 | "mm_action_sheet_photo_library" = "Biblioteca de fotos"; 5 | "mm_action_sheet_browse" = "Navegar"; 6 | "mm_button_settings" = "Configurações"; 7 | "mm_attachment_upload_failed_alert_title" = "Falha no upload do anexo"; 8 | "mm_attachment_upload_failed_alert_message" = "Tamanho máximo permitido excedido"; 9 | "mm_permissions_alert_message" = "Para conceder permissões, vá para Configurações"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/pt.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Sem conexão"; 2 | "mm_send_message_placeholder" = "Envie uma mensagem..."; 3 | "mm_action_sheet_take_photo_or_video" = "Tirar foto ou vídeo"; 4 | "mm_action_sheet_photo_library" = "Biblioteca de fotos"; 5 | "mm_action_sheet_browse" = "Navegar"; 6 | "mm_button_settings" = "Configurações"; 7 | "mm_attachment_upload_failed_alert_title" = "Falha no upload do anexo"; 8 | "mm_attachment_upload_failed_alert_message" = "Tamanho máximo permitido excedido"; 9 | "mm_permissions_alert_message" = "Para conceder permissões, vá para Configurações"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/ro.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Nici o legătură"; 2 | "mm_send_message_placeholder" = "Trimite un mesaj..."; 3 | "mm_action_sheet_take_photo_or_video" = "Faceți fotografie sau video"; 4 | "mm_action_sheet_photo_library" = "Biblioteca Foto"; 5 | "mm_action_sheet_browse" = "Naviga"; 6 | "mm_button_settings" = "Setări"; 7 | "mm_attachment_upload_failed_alert_title" = "Încărcarea atașamentului a eșuat"; 8 | "mm_attachment_upload_failed_alert_message" = "A fost depășită dimensiunea maximă permisă"; 9 | "mm_permissions_alert_message" = "Pentru a acorda permisiunile accesați Setări"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/ru.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Нет соединения"; 2 | "mm_send_message_placeholder" = "Отправить сообщение"; 3 | "mm_action_sheet_take_photo_or_video" = "Сделать фото или видео"; 4 | "mm_action_sheet_photo_library" = "Медиатека"; 5 | "mm_action_sheet_browse" = "Обзор"; 6 | "mm_button_settings" = "Настройки"; 7 | "mm_attachment_upload_failed_alert_title" = "Не удалось загрузить файл"; 8 | "mm_attachment_upload_failed_alert_message" = "Превышен максимально допустимый размер"; 9 | "mm_permissions_alert_message" = "Чтобы предоставить разрешения, перейдите в Настройки"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/sk.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Žiadne spojenie"; 2 | "mm_send_message_placeholder" = "Poslať správu..."; 3 | "mm_action_sheet_take_photo_or_video" = "Urobte fotografiu alebo video"; 4 | "mm_action_sheet_photo_library" = "Knižnica fotografií"; 5 | "mm_action_sheet_browse" = "Prehliadať"; 6 | "mm_button_settings" = "Nastavenie"; 7 | "mm_attachment_upload_failed_alert_title" = "Odovzdanie prílohy zlyhalo"; 8 | "mm_attachment_upload_failed_alert_message" = "Bola prekročená maximálna povolená veľkosť"; 9 | "mm_permissions_alert_message" = "Ak chcete udeliť povolenia, prejdite na Nastavenia"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/sq.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Nuk ka lidhje"; 2 | "mm_send_message_placeholder" = "Dërgo nje mesazh..."; 3 | "mm_action_sheet_take_photo_or_video" = "Bej nje foto ose video"; 4 | "mm_action_sheet_photo_library" = "Fototeka"; 5 | "mm_action_sheet_browse" = "Shfletoj"; 6 | "mm_button_settings" = "Cilësimet"; 7 | "mm_attachment_upload_failed_alert_title" = "Ngarkimi i bashkëngjitjes dështoi"; 8 | "mm_attachment_upload_failed_alert_message" = "Madhësia maksimale e lejuar është e kaluar"; 9 | "mm_permissions_alert_message" = "Për të dhënë leje, shkoni te Cilësimet"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/sr.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Nema konekcije"; 2 | "mm_send_message_placeholder" = "Pošalji poruku..."; 3 | "mm_action_sheet_take_photo_or_video" = "Snimite fotografiju ili video"; 4 | "mm_action_sheet_photo_library" = "Galerija fotografija"; 5 | "mm_action_sheet_browse" = "Pregled"; 6 | "mm_button_settings" = "Podešavanje"; 7 | "mm_attachment_upload_failed_alert_title" = "Otrpemanje priloga nije uspelo"; 8 | "mm_attachment_upload_failed_alert_message" = "Maksimalno dozvoljena veličina prekoračena"; 9 | "mm_permissions_alert_message" = "Da date dozvolu idetie na Podešavanja"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/sv.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Ingen förbindelse"; 2 | "mm_send_message_placeholder" = "Skicka ett meddelande..."; 3 | "mm_action_sheet_take_photo_or_video" = "Ta foto eller video"; 4 | "mm_action_sheet_photo_library" = "Fotobibliotek"; 5 | "mm_action_sheet_browse" = "Bläddra"; 6 | "mm_button_settings" = "Inställningar"; 7 | "mm_attachment_upload_failed_alert_title" = "Överföring av bilaga misslyckades"; 8 | "mm_attachment_upload_failed_alert_message" = "Maximal tillåten storlek överskridits"; 9 | "mm_permissions_alert_message" = "Gå till Inställningar för att bevilja behörigheter"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/th.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "ไม่มีการเชื่อมต่อ"; 2 | "mm_send_message_placeholder" = "ส่งข้อความ"; 3 | "mm_action_sheet_take_photo_or_video" = "ถ่ายภาพหรือวิดีโอ"; 4 | "mm_action_sheet_photo_library" = "ห้องสมุดภาพถ่าย"; 5 | "mm_action_sheet_browse" = "หมวด"; 6 | "mm_button_settings" = "การตั้งค่า"; 7 | "mm_attachment_upload_failed_alert_title" = "การอัปโหลดไฟล์แนบล้มเหลว"; 8 | "mm_attachment_upload_failed_alert_message" = "เกินขนาดสูงสุดที่อนุญาต"; 9 | "mm_permissions_alert_message" = "หากต้องการให้สิทธิ์ไปที่การตั้งค่า"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/tr.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Bağlantı yok"; 2 | "mm_send_message_placeholder" = "Bir mesaj göndermek..."; 3 | "mm_action_sheet_take_photo_or_video" = "Fotoğraf veya Video Çekin"; 4 | "mm_action_sheet_photo_library" = "Fotoğraf kütüphanesi"; 5 | "mm_action_sheet_browse" = "Araştır"; 6 | "mm_button_settings" = "Ayarlar"; 7 | "mm_attachment_upload_failed_alert_title" = "Ek yüklenemedi"; 8 | "mm_attachment_upload_failed_alert_message" = "İzin verilen maksimum boyut aşıldı"; 9 | "mm_permissions_alert_message" = "İzin vermek için Ayarlar'a gidin"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/uk.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Немає з'єднання"; 2 | "mm_send_message_placeholder" = "Надіслати повідомлення"; 3 | "mm_action_sheet_take_photo_or_video" = "Зробити фото або відео"; 4 | "mm_action_sheet_photo_library" = "Бібліотека фотографій"; 5 | "mm_action_sheet_browse" = "Переглянути"; 6 | "mm_button_settings" = "Параметри"; 7 | "mm_attachment_upload_failed_alert_title" = "Не вдалося завантажити вкладений файл"; 8 | "mm_attachment_upload_failed_alert_message" = "Перевищено максимально дозволений розмір"; 9 | "mm_permissions_alert_message" = "Щоб надати дозволи, перейдіть у Параметри"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/vi.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "Không có kết nối"; 2 | "mm_send_message_placeholder" = "Gửi tin nhắn"; 3 | "mm_action_sheet_take_photo_or_video" = "Chụp ảnh hoặc quay video"; 4 | "mm_action_sheet_photo_library" = "Thư viện ảnh"; 5 | "mm_action_sheet_browse" = "Duyệt"; 6 | "mm_button_settings" = "Cài đặt"; 7 | "mm_attachment_upload_failed_alert_title" = "Tải lên tệp đính kèm không thành công"; 8 | "mm_attachment_upload_failed_alert_message" = "Vượt quá kích thước tối đa cho phép"; 9 | "mm_permissions_alert_message" = "Để cấp quyền, hãy đi tới Cài đặt"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/zh-Hans.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "无网络连接"; 2 | "mm_send_message_placeholder" = "发送消息"; 3 | "mm_action_sheet_take_photo_or_video" = "拍摄照片或视频"; 4 | "mm_action_sheet_photo_library" = "照片库"; 5 | "mm_action_sheet_browse" = "浏览"; 6 | "mm_button_settings" = "设置"; 7 | "mm_attachment_upload_failed_alert_title" = "附件上传失败"; 8 | "mm_attachment_upload_failed_alert_message" = "超过最大文件大小"; 9 | "mm_permissions_alert_message" = "前往设置授予权限"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Localization/zh-Hant.lproj/InAppChat.strings: -------------------------------------------------------------------------------- 1 | "mm_no_connection_label" = "無連接"; 2 | "mm_send_message_placeholder" = "發送信息"; 3 | "mm_action_sheet_take_photo_or_video" = "拍照或錄像"; 4 | "mm_action_sheet_photo_library" = "照片庫"; 5 | "mm_action_sheet_browse" = "瀏覽"; 6 | "mm_button_settings" = "設定值"; 7 | "mm_attachment_upload_failed_alert_title" = "附件上傳失敗"; 8 | "mm_attachment_upload_failed_alert_message" = "超過最大允許大小"; 9 | "mm_permissions_alert_message" = "要授予權限,請轉到設置"; 10 | -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/attachmentButton.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "attachmentButton.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "attachmentButton@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "attachmentButton@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/attachmentButton.imageset/attachmentButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/attachmentButton.imageset/attachmentButton.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/attachmentButton.imageset/attachmentButton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/attachmentButton.imageset/attachmentButton@2x.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/attachmentButton.imageset/attachmentButton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/attachmentButton.imageset/attachmentButton@3x.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/backButton.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "backButton.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "backButton@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "backButton@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/backButton.imageset/backButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/backButton.imageset/backButton.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/backButton.imageset/backButton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/backButton.imageset/backButton@2x.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/backButton.imageset/backButton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/backButton.imageset/backButton@3x.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/fileNotFound.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "fileNotFound.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "fileNotFound@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "fileNotfound@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/fileNotFound.imageset/fileNotFound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/fileNotFound.imageset/fileNotFound.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/fileNotFound.imageset/fileNotFound@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/fileNotFound.imageset/fileNotFound@2x.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/fileNotFound.imageset/fileNotfound@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/fileNotFound.imageset/fileNotfound@3x.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/sendButton.imageset/ChatSendBtnImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/sendButton.imageset/ChatSendBtnImage.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/sendButton.imageset/ChatSendBtnImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/sendButton.imageset/ChatSendBtnImage@2x.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/sendButton.imageset/ChatSendBtnImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/Chat/Resources/MobileMessagingChatImages.xcassets/sendButton.imageset/ChatSendBtnImage@3x.png -------------------------------------------------------------------------------- /Classes/Chat/Resources/MobileMessagingChatImages.xcassets/sendButton.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ChatSendBtnImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "ChatSendBtnImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "ChatSendBtnImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Classes/Chat/UI/CPChatComposing.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CPChatComposing.swift 3 | // 4 | // Created by Andrey Kadochnikov on 10.09.15. 5 | // 6 | import Foundation 7 | import UIKit 8 | 9 | //MARK: Compose bar 10 | public protocol MMComposeBarDelegate: UITextViewDelegate { 11 | @available(*, deprecated, message: "Method 'send' needs to be used instead. This method will be removed in a future release") 12 | func sendText(_ text: String, completion: @escaping (_ error: NSError?) -> Void) 13 | @available(*, deprecated, message: "Method 'send' needs to be used instead. This method will be removed in a future release") 14 | func sendAttachment(_ fileName: String?, data: Data, completion: @escaping (_ error: NSError?) -> Void) 15 | @available(*, deprecated, message: "Method 'send' needs to be used instead. This method will be removed in a future release") 16 | func sendDraft(_ message: String?, completion: @escaping (_ error: NSError?) -> Void) 17 | func send(_ payload: MMLivechatPayload, completion: @escaping (_ error: NSError?) -> Void) 18 | func textDidChange(_ text: String?, completion: @escaping (_ error: NSError?) -> Void) 19 | func attachmentButtonTapped() 20 | func composeBarWillChangeFrom(_ startFrame: CGRect, to endFrame: CGRect, 21 | duration: TimeInterval, animationCurve: UIView.AnimationCurve) 22 | func composeBarDidChangeFrom(_ startFrame: CGRect, to endFrame: CGRect) 23 | } 24 | 25 | public protocol MMChatComposer: UIView { 26 | var delegate: MMComposeBarDelegate? { set get } 27 | } 28 | -------------------------------------------------------------------------------- /Classes/Chat/UI/CPLabel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CPLabel.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 01/11/2017. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | class MMLabel: UILabel { 12 | var maxLineHeight: CGFloat? = nil 13 | 14 | override var text: String? { 15 | didSet { 16 | if let text = text { 17 | let ats = NSMutableAttributedString(string: text) 18 | let paragraphStyle = NSMutableParagraphStyle() 19 | paragraphStyle.alignment = textAlignment 20 | if let maxLineHeight = maxLineHeight { 21 | paragraphStyle.maximumLineHeight = maxLineHeight 22 | } 23 | ats.addAttributes([ 24 | NSAttributedString.Key.paragraphStyle: paragraphStyle, 25 | NSAttributedString.Key.font: font as Any, 26 | NSAttributedString.Key.foregroundColor: textColor as Any], 27 | range: NSRange(location: 0, length: ats.length)) 28 | attributedText = ats 29 | } else { 30 | attributedText = nil 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Classes/Chat/UI/ComposeBar/ComposeBar_Button.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ComposeBar_Button.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 08/12/2017. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | class ComposeBar_Button: UIButton { 12 | var enabledTintColor: UIColor! = UIColor.black { 13 | didSet { 14 | if (isEnabled) { 15 | tintColor = enabledTintColor 16 | } 17 | } 18 | } 19 | var disabledTintColor: UIColor! = UIColor.gray 20 | override var isHighlighted: Bool { 21 | didSet { 22 | if (isHighlighted) { 23 | alpha = 0.2 24 | } else { 25 | UIView.animate(withDuration: 0.2, delay: 0, options: .beginFromCurrentState, animations: { self.alpha = 1.0 }, completion: nil) 26 | } 27 | } 28 | } 29 | override var isEnabled: Bool { 30 | didSet { 31 | if (isEnabled) { 32 | tintColor = enabledTintColor 33 | } else { 34 | tintColor = disabledTintColor 35 | } 36 | } 37 | } 38 | } 39 | 40 | class ComposeBar_Send_Button: ComposeBar_Button { 41 | init() { 42 | super.init(frame: CGRect.zero) 43 | titleEdgeInsets = UIEdgeInsets(top: 0.5, left: 0, bottom: 0, right: 0) 44 | tintColor = enabledTintColor 45 | } 46 | 47 | required init?(coder: NSCoder) { 48 | fatalError("init(coder:) has not been implemented") 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Classes/Chat/UI/ComposeBar/ComposeBar_TextView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ComposeBar_TextView.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 08/12/2017. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | class ComposeBar_TextView: UITextView { 12 | var primitiveContentOffset: CGPoint { 13 | set { 14 | if selectedRange.length != 0 || isTracking || isDecelerating { 15 | super.contentOffset = newValue 16 | } 17 | } 18 | get { 19 | return super.contentOffset 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Classes/Inbox/InboxExports.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // 4 | // 5 | // Created by Olga Koroleva on 01.06.2023. 6 | // 7 | 8 | #if SWIFT_PACKAGE 9 | @_exported import MobileMessaging 10 | #endif 11 | -------------------------------------------------------------------------------- /Classes/Inbox/InboxSeenRequestDataMapper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InboxSeenRequestDataMapper.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 27.04.2022. 6 | // 7 | 8 | import Foundation 9 | 10 | class InboxSeenRequestDataMapper { 11 | static func requestBody(messageIds: [String], externalUserId: String, seenDate: Date) -> RequestBody { 12 | return [ 13 | MMConsts.APIKeys.seenExternalUserId: externalUserId, 14 | MMConsts.APIKeys.seenMessages: messageIds.compactMap({ (id) -> DictionaryRepresentation? in 15 | 16 | return [ 17 | MMConsts.APIKeys.messageId: id, 18 | MMConsts.APIKeys.seenTimestampDelta: seenDate.timestampDelta, 19 | MMConsts.APIKeys.seenMessageInbox: true 20 | ] 21 | })] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Classes/Inbox/extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // extensions.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 02.03.2022. 6 | // 7 | 8 | import Foundation 9 | 10 | extension RemoteAPIProvider { 11 | func getInbox(applicationCode: String, accessToken: String?, externalUserId: String, from: Date?, to: Date?, limit: Int?, topic: String?, queue: DispatchQueue, completion: @escaping (FetchInboxResult) -> Void) { 12 | let request = GetInbox(applicationCode: applicationCode, accessToken: accessToken, externalUserId: externalUserId, from: from, to: to, limit: limit, topic: topic) 13 | performRequest(request: request, queue: queue, completion: completion) 14 | } 15 | } 16 | 17 | extension MobileMessaging { 18 | public class var inbox: MMInboxService? { 19 | if MMInboxService.sharedInstance == nil { 20 | guard let defaultContext = MobileMessaging.sharedInstance else { 21 | return nil 22 | } 23 | MMInboxService.sharedInstance = MMInboxService(mmContext: defaultContext) 24 | } 25 | return MMInboxService.sharedInstance 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Exports.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Exports.swift 3 | // 4 | // 5 | // Created by Olga Koroleva on 02.05.2023. 6 | // 7 | 8 | #if SWIFT_PACKAGE 9 | @_exported import MobileMessagingObjC 10 | #endif 11 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/HTTP/JWT/MMJwtSupplier.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MMJwtSupplier.swift 3 | // MobileMessaging 4 | // 5 | // Created by Luka Ilic on 28.04.2025. 6 | // 7 | 8 | import Foundation 9 | 10 | /** 11 | * Protocol for supplying JSON Web Tokens (JWT) for API authorization. 12 | * 13 | * Implementations of this protocol supply JWT tokens that will be used 14 | * by the SDK to authorize API calls which support JWT-based authorization. 15 | */ 16 | @objc public protocol MMJwtSupplier { 17 | /** 18 | * Returns a JSON Web Token (JWT) for authorization. 19 | * 20 | * This method is called each time the SDK makes an API call that can use JWT authorization. 21 | * The returned token will be checked to ensure it has a valid structure and is not expired. 22 | * Return `nil` in case user is anonymous and has no external user ID in which case API key authorization will be used. 23 | * 24 | * - Returns: a JWT as a String, or `nil` if no token is available 25 | */ 26 | @objc func getJwt() -> String? 27 | } 28 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/CustomEventObject+CoreDataClass.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomEventObject+CoreDataClass.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 31.01.2020. 6 | // 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | @objc(CustomEventObject) 13 | final class CustomEventObject: NSManagedObject, FetchableResult { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/CustomEventObject+CoreDataProperties.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomEventObject+CoreDataProperties.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 31.01.2020. 6 | // 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | extension CustomEventObject { 13 | @NSManaged public var eventDate: Date 14 | @NSManaged public var payload: [String: Any]? 15 | @NSManaged public var pushRegistrationId: String 16 | @NSManaged public var definitionId: String 17 | } 18 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/InstallationManagedObject+CoreDataProperties.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InstallationManagedObject+CoreDataProperties.swift 3 | // 4 | // 5 | // Created by Andrey K. on 24/02/16. 6 | // 7 | // 8 | // Choose "Create NSManagedObject Subclass…" from the Core Data editor menu 9 | // to delete and recreate this implementation file for your updated model. 10 | // 11 | 12 | import Foundation 13 | import CoreData 14 | import CoreLocation 15 | 16 | extension InstallationManagedObject { 17 | } 18 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/InstallationManagedObject.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InstallationManagedObject.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey K. on 18/02/16. 6 | // 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | @objc(InstallationManagedObject) 13 | final class InstallationManagedObject: NSManagedObject, FetchableResult { 14 | } 15 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/MessageManagedObject+CoreDataProperties.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageManagedObject+CoreDataProperties.swift 3 | // 4 | // Created by okoroleva on 16.05.16. 5 | // 6 | // 7 | // Choose "Create NSManagedObject Subclass…" from the Core Data editor menu 8 | // to delete and recreate this implementation file for your updated model. 9 | // 10 | 11 | import Foundation 12 | import CoreData 13 | 14 | public extension MessageManagedObject { 15 | @NSManaged var creationDate: Date 16 | @NSManaged var messageId: String 17 | @NSManaged var reportSent: Bool 18 | @NSManaged var seenDate: Date? 19 | @NSManaged var payload: DictionaryRepresentation? 20 | @NSManaged var messageTypeValue: Int16 21 | @NSManaged var seenStatusValue: Int16 22 | @NSManaged var isSilent: Bool 23 | @NSManaged var campaignStateValue: Int16 24 | @NSManaged var campaignId: String? 25 | @NSManaged var deliveryReportedDate: Date? 26 | @NSManaged var deliveryMethod: Int16 27 | } 28 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/MessageManagedObject.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageManagedObject.swift 3 | // 4 | // 5 | // Created by Andrey K. on 24/02/16. 6 | // 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | @objc public enum MMInAppNotificationStyle: Int16 { 13 | case Modal = 0 14 | case Banner 15 | } 16 | 17 | @objc public enum MMSeenStatus: Int16 { 18 | case NotSeen = 0 19 | case SeenNotSent 20 | case SeenSent 21 | } 22 | 23 | public enum MMMessageType : Int16 { 24 | case Default = 0 25 | case Geo 26 | case MO 27 | } 28 | 29 | @objc public enum MMCampaignState : Int16 { 30 | case Active = 0 31 | case Suspended 32 | case Finished 33 | } 34 | 35 | @objc(MessageManagedObject) 36 | final public class MessageManagedObject: NSManagedObject, FetchableResult, UpdatableResult { 37 | public var seenStatus: MMSeenStatus { 38 | get { return MMSeenStatus(rawValue: seenStatusValue) ?? .NotSeen } 39 | set { seenStatusValue = newValue.rawValue } 40 | } 41 | public var messageType: MMMessageType { 42 | get { return MMMessageType(rawValue: messageTypeValue) ?? .Default } 43 | set { messageTypeValue = newValue.rawValue } 44 | } 45 | 46 | public var campaignState: MMCampaignState { 47 | get { return MMCampaignState(rawValue: campaignStateValue) ?? .Active } 48 | set { campaignStateValue = newValue.rawValue } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/UserSessionReportObject+CoreDataProperties.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserSessionReportObject+CoreDataProperties.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 20.01.2020. 6 | // 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | extension UserSessionReportObject { 13 | @NSManaged public var pushRegistrationId: String 14 | @NSManaged public var startDate: Date 15 | @NSManaged public var endDate: Date 16 | @NSManaged public var startReported: Bool 17 | } 18 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/UserSessionReportObject.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserSessionReportObject+CoreDataClass.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 20.01.2020. 6 | // 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | @objc(UserSessionReportObject) 13 | final class UserSessionReportObject: NSManagedObject, FetchableResult { 14 | var sessionId: String { 15 | return "\(self.pushRegistrationId)_\(self.startDate.timeIntervalSince1970)" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/WebInAppClickObject+CoreDataProperties.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebInAppClickObject+CoreDataProperties.swift 3 | // MobileMessaging 4 | // 5 | // Created by Luka Ilic on 19.09.2024.. 6 | // 7 | 8 | import Foundation 9 | import CoreData 10 | 11 | extension WebInAppClickObject { 12 | @NSManaged public var clickUrl: String 13 | @NSManaged public var pushRegistrationId: String 14 | @NSManaged public var buttonIdx: String 15 | @NSManaged public var attempt: Int16 16 | } 17 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/InternalStorage/WebInAppClickObject.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebInAppClickObject.swift 3 | // MobileMessaging 4 | // 5 | // Created by Luka Ilic on 19.09.2024.. 6 | // 7 | 8 | import Foundation 9 | import CoreData 10 | 11 | @objc(WebInAppClickObject) 12 | final class WebInAppClickObject: NSManagedObject, FetchableResult { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/MMVersion.swift: -------------------------------------------------------------------------------- 1 | class MMVersion { 2 | static let mobileMessagingVersion = "13.12.5" 3 | } 4 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Message/MOSendingMapper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MOSendingMapper.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 01.02.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | class MOSendingMapper { 11 | static func requestBody(pushRegistrationId: String, messages: [MM_MOMessage]) -> RequestBody { 12 | var result = RequestBody() 13 | result[Consts.APIKeys.MO.from] = pushRegistrationId 14 | result[Consts.APIKeys.MO.messages] = messages.map { msg -> RequestBody in 15 | var dict = msg.dictRepresentation 16 | dict[Consts.APIKeys.MO.messageSentStatusCode] = nil // this attribute is redundant, the Mobile API would not expect it. 17 | return dict 18 | } 19 | return result 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Message/MessageSyncMapper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageSyncMapper.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 01.02.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | class MessageSyncMapper { 11 | static func requestBody(archiveMsgIds: [String]?, dlrMsgIds: [String]?) -> RequestBody { 12 | var result = RequestBody() 13 | result[Consts.APIKeys.archiveMsgIds] = (archiveMsgIds?.isEmpty ?? true) ? nil : archiveMsgIds 14 | result[Consts.APIKeys.DLRMsgIds] = (dlrMsgIds?.isEmpty ?? true) ? nil : dlrMsgIds 15 | return result 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Operations/AppOperations/EventPersistingOperation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EventPersistingOperation.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 19.08.2020. 6 | // 7 | 8 | import Foundation 9 | import CoreData 10 | 11 | class EventPersistingOperation : MMOperation { 12 | let context: NSManagedObjectContext 13 | let finishBlock: (Error?) -> Void 14 | let pushRegId: String 15 | let customEvent: MMCustomEvent 16 | 17 | init(customEvent: MMCustomEvent, mmContext: MobileMessaging, pushRegId: String, context: NSManagedObjectContext, finishBlock: @escaping ((Error?) -> Void)) { 18 | self.pushRegId = pushRegId 19 | self.customEvent = customEvent 20 | self.finishBlock = finishBlock 21 | self.context = context 22 | super.init(isUserInitiated: false) 23 | } 24 | 25 | override func execute() { 26 | guard !isCancelled else { 27 | logDebug("cancelled...") 28 | finish() 29 | return 30 | } 31 | logVerbose("started...") 32 | self.context.performAndWait { 33 | let new = CustomEventObject.MM_createEntityInContext(context: self.context) 34 | new.eventDate = MobileMessaging.date.now 35 | new.definitionId = customEvent.definitionId 36 | new.payload = customEvent.properties 37 | new.pushRegistrationId = self.pushRegId 38 | self.context.MM_saveToPersistentStoreAndWait() 39 | } 40 | finish() 41 | } 42 | 43 | override func finished(_ errors: [NSError]) { 44 | logVerbose("finished: \(errors)") 45 | finishBlock(errors.first) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Operations/AppOperations/MMOperation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MMOperation.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 18.08.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Operation : NamedLogger {} 11 | open class MMOperation : Operation {} 12 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Operations/AppOperations/MessagesSyncOperation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessagesSyncOperation.swift 3 | // 4 | // Created by Andrey K. on 18/04/16. 5 | // 6 | // 7 | 8 | import UIKit 9 | import CoreData 10 | 11 | final class MessagesSyncOperation: GroupOperation { 12 | let context: NSManagedObjectContext 13 | let finishBlock: ((NSError?) -> Void)? 14 | let mmContext: MobileMessaging 15 | 16 | init(userInitiated: Bool, context: NSManagedObjectContext, mmContext: MobileMessaging, finishBlock: ((NSError?) -> Void)? = nil) { 17 | self.context = context 18 | self.finishBlock = finishBlock 19 | self.mmContext = mmContext 20 | 21 | let seenStatusSending = SeenStatusSendingOperation(userInitiated: false, context: context, mmContext: mmContext) 22 | 23 | super.init(operations: [seenStatusSending]) 24 | logDebug("Adding SeenStatusSendingOperation...") 25 | 26 | let messageFetching = MessageFetchingOperation(userInitiated: userInitiated, context: context, mmContext: mmContext, finishBlock: { _ in }) 27 | messageFetching.addDependency(seenStatusSending) 28 | logDebug("Adding MessageFetchingOperation...") 29 | self.addOperation(messageFetching) 30 | } 31 | 32 | override func finished(_ errors: [NSError]) { 33 | logDebug("finished with errors: \(errors)") 34 | finishBlock?(errors.first) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Operations/AppOperations/RegistrationResetOperation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RegistrationResetOperation.swift 3 | // 4 | // Created by Andrey K. on 12/02/17. 5 | // 6 | // 7 | 8 | import UIKit 9 | import CoreData 10 | 11 | final class RegistrationResetOperation: MMOperation { 12 | 13 | let mmContext: MobileMessaging 14 | let finishBlock: ((NSError?) -> Void)? 15 | let apnsRegistrationManager: ApnsRegistrationManager 16 | 17 | init(userInitiated: Bool, mmContext: MobileMessaging, apnsRegistrationManager: ApnsRegistrationManager, finishBlock: ((NSError?) -> Void)?) { 18 | self.finishBlock = finishBlock 19 | self.apnsRegistrationManager = apnsRegistrationManager 20 | self.mmContext = mmContext 21 | super.init(isUserInitiated: userInitiated) 22 | } 23 | 24 | override func execute() { 25 | logDebug("Started...") 26 | MMInstallation.empty.archiveAll() 27 | apnsRegistrationManager.setRegistrationIsHealthy() 28 | 29 | finish() 30 | } 31 | 32 | override func finished(_ errors: [NSError]) { 33 | logDebug("finished with errors: \(errors)") 34 | finishBlock?(errors.first) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Operations/Conditions/HealthyRegistrationCondition.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HealthyRegistrationCondition.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 18.08.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | public class HealthyRegistrationCondition : OperationCondition { 11 | public static var name: String { get { return String(describing: self) } } 12 | 13 | let mmContext: MobileMessaging 14 | 15 | public init(mmContext: MobileMessaging) { 16 | self.mmContext = mmContext 17 | } 18 | 19 | public static var isMutuallyExclusive: Bool = false 20 | 21 | public func dependencyForOperation(_ operation: Operation) -> Foundation.Operation? { 22 | return nil 23 | } 24 | 25 | public func evaluateForOperation(_ operation: Operation, completion: @escaping (OperationConditionResult) -> Void) { 26 | 27 | guard mmContext.apnsRegistrationManager != nil && mmContext.apnsRegistrationManager.isRegistrationHealthy else { 28 | operation.logWarn("Registration is not healthy. Finishing...") 29 | completion(OperationConditionResult.failed(NSError(type: MMInternalErrorType.InvalidRegistration))) 30 | return 31 | } 32 | completion(OperationConditionResult.satisfied) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Operations/Conditions/NotPendingDepersonalizationCondition.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotPendingDepersonalizationCondition.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 18.08.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | class NotPendingDepersonalizationCondition : OperationCondition { 11 | static var name: String { get { return String(describing: self) } } 12 | 13 | let mmContext: MobileMessaging 14 | 15 | init(mmContext: MobileMessaging) { 16 | self.mmContext = mmContext 17 | } 18 | 19 | static var isMutuallyExclusive: Bool = false 20 | 21 | func dependencyForOperation(_ operation: Operation) -> Foundation.Operation? { 22 | return nil 23 | } 24 | 25 | func evaluateForOperation(_ operation: Operation, completion: @escaping (OperationConditionResult) -> Void) { 26 | guard mmContext.internalData().currentDepersonalizationStatus != .pending else { 27 | operation.logWarn("Depersonalization is in pending state. Cancelling...") 28 | completion(OperationConditionResult.failed(NSError(type: MMInternalErrorType.ProtectedDataUnavailable))) 29 | return 30 | } 31 | completion(OperationConditionResult.satisfied) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Operations/MMOperationQueue.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MMOperationQueue.swift 3 | // 4 | // Created by Andrey Kadochnikov on 16/02/2017. 5 | // 6 | // 7 | 8 | import UIKit 9 | 10 | public class MMOperationQueue: OperationQueue, NamedLogger { 11 | public func addOperationExclusively(_ operation: Foundation.Operation) -> Bool { 12 | guard operations.contains(where: { type(of: $0) == type(of: operation) && ($0.isFinished || $0.isCancelled) }) == false else 13 | { 14 | logDebug("\(type(of: operation)) was not queued because a queue is already taken with the same kind of operation.") 15 | return false 16 | } 17 | addOperation(operation) 18 | return true 19 | } 20 | 21 | public override init() { 22 | super.init() 23 | self.name = self.queueName 24 | } 25 | 26 | init(name: String) { 27 | super.init() 28 | self.name = name 29 | } 30 | 31 | var queueName: String { 32 | return "com.mobile-messaging.default-queue" 33 | } 34 | 35 | public static func newSerialQueue(underlyingQueue: DispatchQueue?, name: String) -> MMOperationQueue { 36 | let newQ = MMOperationQueue() 37 | newQ.maxConcurrentOperationCount = 1 38 | newQ.underlyingQueue = underlyingQueue 39 | newQ.name = name 40 | return newQ 41 | } 42 | 43 | static func userInitiatedQueue(underlyingQueue: DispatchQueue?, name: String) -> MMOperationQueue { 44 | let newQ = MMOperationQueue() 45 | newQ.qualityOfService = .userInitiated 46 | newQ.maxConcurrentOperationCount = 1 47 | newQ.underlyingQueue = underlyingQueue 48 | newQ.name = name 49 | return newQ 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/SeenReports/SeenReportMapper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SeenReportMapper.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 01.02.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | class SeenReportMapper { 11 | static func requestBody(_ seenNotSentMessages: [MessageManagedObject]) -> RequestBody { 12 | return [Consts.APIKeys.seenMessages: seenNotSentMessages.compactMap({ (obj) -> DictionaryRepresentation? in 13 | guard let seenDate = obj.seenDate else { 14 | return nil 15 | } 16 | return [ 17 | Consts.APIKeys.messageId: obj.messageId, 18 | Consts.APIKeys.seenTimestampDelta: seenDate.timestampDelta 19 | ] 20 | })] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Utils/MMDispatchQueue.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MMDispatchQueue.swift 3 | // MobileMessaging 4 | // 5 | // Created by Francisco Fortes on 22/03/2024. 6 | // 7 | 8 | import Foundation 9 | 10 | extension DispatchQueue { 11 | // This method makes sure the completion is triggered in main thread. If it is already, it will be called synchronously. 12 | // Otherwise, the completion will be called in main asynchronously 13 | public static func mmEnsureMain(completion: @escaping @convention(block) () -> Void) { 14 | if Thread.isMainThread { 15 | completion() 16 | } else { 17 | DispatchQueue.main.async { 18 | completion() 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Utils/MMLocalization.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MMLocalization.swift 3 | // 4 | // Created by okoroleva on 27.07.17. 5 | // 6 | // 7 | 8 | import Foundation 9 | 10 | public class MMLocalization { 11 | static let sharedInstance = MMLocalization() 12 | public func localizedString(forKey key: String?, defaultString: String) -> String { 13 | guard let key = key else { 14 | return defaultString 15 | } 16 | return MMLocalization.languageBundle().localizedString(forKey: key, value: defaultString, table: "MobileMessaging") 17 | } 18 | public class func localizedString(forKey key: String?, defaultString: String) -> String { 19 | guard let key = key else { 20 | return defaultString 21 | } 22 | #if SWIFT_PACKAGE 23 | return NSLocalizedString(key, tableName: "MobileMessaging", bundle: Bundle.module, value: defaultString, comment: "") 24 | #else 25 | return MMLocalization.sharedInstance.localizedString(forKey: key, defaultString: defaultString) 26 | #endif 27 | } 28 | 29 | private class func languageBundle() -> Bundle { 30 | guard let langBundleURL = MobileMessaging.resourceBundle.url( 31 | forResource: MMLanguage.sessionLanguage.stringValue, // if never set, default will be current installation language 32 | withExtension: "lproj"), 33 | let langBundle = Bundle(url: langBundleURL) else { 34 | return MobileMessaging.resourceBundle 35 | } 36 | return langBundle 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Utils/MMPostponer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MMPostponer.swift 3 | // 4 | // Created by Andrey K. on 05/07/16. 5 | // 6 | 7 | import Foundation 8 | public class MMPostponer: NSObject { 9 | private var block: (() -> Void)? 10 | private var schedulerQueue = MMQueue.Serial.New.PostponerQueue.queue 11 | private var timer: DispatchSourceTimer? 12 | private var executionQueue: DispatchQueue 13 | 14 | public init(executionQueue: DispatchQueue) { 15 | self.executionQueue = executionQueue 16 | } 17 | 18 | public func postponeBlock(delay: Double = 2000, block: @escaping () -> Void) { 19 | schedulerQueue.async { 20 | self.invalidateTimer() 21 | self.block = block 22 | self.timer = self.createDispatchTimer(delay, queue: self.executionQueue, block: 23 | { 24 | var blockToExecute: (() -> Void)? 25 | self.schedulerQueue.sync { 26 | blockToExecute = self.block 27 | self.invalidateTimer() 28 | } 29 | blockToExecute?() 30 | } 31 | ) 32 | } 33 | } 34 | 35 | private func invalidateTimer() { 36 | self.block = nil 37 | timer?.cancel() 38 | } 39 | 40 | private func createDispatchTimer(_ delay: Double, queue: DispatchQueue, block: @escaping () -> Void) -> DispatchSourceTimer { 41 | let timer : DispatchSourceTimer = DispatchSource.makeTimerSource(queue: queue) 42 | let deadline = DispatchTime.now() + DispatchTimeInterval.milliseconds(Int(delay)) 43 | let leeway = DispatchTimeInterval.milliseconds(0) 44 | timer.schedule(deadline: deadline, leeway: leeway) 45 | timer.setEventHandler(handler: block) 46 | timer.resume() 47 | return timer 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Core/Utils/MMRenamedClassesMapping.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MMRenamedClassesMapping.swift 3 | // MobileMessaging 4 | // 5 | // Created by Olga Koroleva on 02.03.2021. 6 | // 7 | 8 | import Foundation 9 | 10 | extension NSKeyedUnarchiver { 11 | static func mm_setMappingForRenamedClasses() { 12 | setClass(MMInstallation.self, forClassName: "MobileMessaging.Installation") 13 | setClass(MMUser.self, forClassName: "MobileMessaging.User") 14 | setClass(MMPhone.self, forClassName: "MobileMessaging.Phone") 15 | setClass(MMEmail.self, forClassName: "MobileMessaging.Email") 16 | setClass(MMDateTime.self, forClassName: "MobileMessaging.DateTime") 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/InteractiveNotifications/MessageAlert/InAppMessagePresenter/DocumentReadyState.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Possible values of browser's `document.readyState`. 4 | enum DocumentReadyState: String { 5 | /// The document is loading. 6 | case loading 7 | /// The document was fully read. 8 | case interactive 9 | /// The document and all resources were loaded. 10 | case complete 11 | } 12 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/InteractiveNotifications/MessageAlert/InAppMessagePresenter/InAppMessagePresenter.swift: -------------------------------------------------------------------------------- 1 | /// Loads message resources and presents the message to the UI. 2 | protocol InAppMessagePresenter: AnyObject { 3 | /// Asynchronously loads message resources and shows the message to the UI. 4 | func presentMessage() 5 | 6 | /// Dismisses the presented message if there is one. 7 | /// - Precondition: Must be called on the **main thread**. 8 | func dismissPresentedMessage() 9 | } 10 | 11 | /// Protocol which provides one the ability to control `InAppMessagePresenter`'s behavior, listen to its progress and also supply it with information which 12 | /// it cannot acquire by itself. 13 | protocol InAppMessagePresenterDelegate: AnyObject { 14 | /// Called when resources are about to be loaded. 15 | /// - Returns: An instruction wheather to continue the process. 16 | func shouldLoadResources() -> Bool 17 | 18 | /// Called when `InAppMessagePresenter` needs a presenting view controller to present the message. 19 | /// - Returns: The view controller which will be used to present the message. If it's `nil`, the process will not continue. 20 | func getPresenterViewController() -> UIViewController? 21 | 22 | /// Called after the message has been dismissed. 23 | func didDismissMessage() 24 | 25 | /// Called when it becomes evidend that the message cannot be presented. 26 | func didFailToPresent() 27 | 28 | /// Called when presented the message successfully. 29 | func didPresent() 30 | } 31 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/InteractiveNotifications/WebViewController/WebViewToolbar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebViewToolbar.swift 3 | // MobileMessaging 4 | // 5 | // Created by Andrey Kadochnikov on 28.04.2020. 6 | // 7 | 8 | import Foundation 9 | 10 | protocol WebViewToolbarDelegate { 11 | func webViewToolbarDidPressDismiss() 12 | } 13 | 14 | class WebViewToolbar: UIToolbar { 15 | 16 | var dismissDelegate: WebViewToolbarDelegate? 17 | lazy private var titleLabel: UILabel = UILabel(frame: CGRect.zero) 18 | 19 | var titleColor: UIColor? { 20 | set { 21 | titleLabel.textColor = newValue 22 | } 23 | get { 24 | return titleLabel.textColor 25 | } 26 | } 27 | 28 | var title: String? { 29 | set { 30 | titleLabel.text = newValue 31 | titleLabel.sizeToFit() 32 | } 33 | get { 34 | return titleLabel.text 35 | } 36 | } 37 | 38 | override init(frame: CGRect) { 39 | super.init(frame: frame) 40 | titleLabel.backgroundColor = UIColor.clear 41 | titleLabel.textAlignment = .center 42 | let dismissBtn = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(dismiss)) 43 | let labelItem = UIBarButtonItem.init(customView: titleLabel) 44 | let flexible = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil) 45 | self.setItems([flexible, labelItem, flexible, dismissBtn], animated: false) 46 | } 47 | 48 | required init?(coder: NSCoder) { 49 | fatalError("init(coder:) has not been implemented") 50 | } 51 | 52 | @objc func dismiss() { 53 | dismissDelegate?.webViewToolbarDidPressDismiss() 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/MessageStorage/Message+CoreDataProperties.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Message+CoreDataProperties.swift 3 | // 4 | // Created by Andrey K. on 15/09/16. 5 | // 6 | // 7 | // Choose "Create NSManagedObject Subclass…" from the Core Data editor menu 8 | // to delete and recreate this implementation file for your updated model. 9 | // 10 | 11 | import Foundation 12 | import CoreData 13 | 14 | public extension Message { 15 | 16 | @NSManaged var messageId: String 17 | @NSManaged var payload: DictionaryRepresentation 18 | @NSManaged var isDeliveryReportSent: Bool 19 | @NSManaged var seenStatusValue: Int16 20 | @NSManaged var createdDate: Date 21 | @NSManaged var deliveryMethod: Int16 22 | @NSManaged var direction: Int16 23 | @NSManaged var sentStatusValue: Int16 24 | @NSManaged var deliveryReportedDate: Date? 25 | @NSManaged var seenDate: Date? 26 | } 27 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Resources/InteractiveNotifications/PredefinedNotificationCategories.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | identifier 7 | mm_accept_decline 8 | actions 9 | 10 | 11 | moRequired 12 | 13 | identifier 14 | mm_decline 15 | title 16 | Decline 17 | titleLocalizationKey 18 | mm_button_decline 19 | foreground 20 | 21 | authenticationRequired 22 | 23 | destructive 24 | 25 | 26 | 27 | moRequired 28 | 29 | identifier 30 | mm_accept 31 | title 32 | Accept 33 | titleLocalizationKey 34 | mm_button_accept 35 | foreground 36 | 37 | authenticationRequired 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Resources/InternalStorage/MMInternalStorageModel.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | MMStorageModel_5.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Resources/Localization/he.lproj/MobileMessaging.strings: -------------------------------------------------------------------------------- 1 | "mm_button_accept" = "אשר"; 2 | "mm_button_decline" = "דחה"; 3 | "mm_button_cancel" = "לְבַטֵל"; 4 | "mm_button_open" = "פתח"; 5 | "mm_bad_request" = "בקשה גרועה"; 6 | "mm_cancel" = "לְבַטֵל"; 7 | "mm_no_internet_connection" = "אין חיבור אינטרנט"; 8 | "mm_ok" = "בסדר"; 9 | "mm_settings" = "הגדרות"; 10 | "mm_something_went_wrong" = "משהו השתבש."; 11 | "mm_something_went_wrong_please_contact_support" = "משהו השתבש. אנא צור קשר עם התמיכה."; 12 | "mm_video_call" = "שיחת וידאו"; 13 | "mm_flip_camera" = "מצלמה להעיף"; 14 | "mm_speaker" = "רַמקוֹל"; 15 | "mm_calling" = "מתקשר (%1$@)"; 16 | "mm_microphone_muted" = "שפה אלבנית"; 17 | "mm_notification_ringing" = "מצלצל..."; 18 | "mm_audio_permission_not_granted" = "הרשאת שמע לא ניתנה"; 19 | "mm_calls_usage_error" = "אירעה שגיאה במניעת שימוש נכון בשיחות, אנא צור קשר עם התמיכה"; 20 | "mm_dialpad" = "משטח חיוג"; 21 | "mm_permission_needed" = "צריך רשות"; 22 | "mm_camera_permission_permanently_denied" = "המצלמה נדחתה לצמיתות."; 23 | "mm_microphone_permission_permanently_denied" = "המיקרופון נדחה לצמיתות."; 24 | "mm_microphone" = "מִיקרוֹפוֹן"; 25 | "mm_finish_current_call" = "סיים את השיחה הנוכחית כדי להתחיל שיחה חדשה."; 26 | "mm_user_busy" = "המשתמש היה עסוק"; 27 | "mm_user_not_found_destination" = "משתמש קצה לא נמצא ביעד"; 28 | "mm_user_declined_call" = "השיחה נדחתה על ידי משתמש הקצה"; 29 | "mm_screen_share" = "שיתוף מסך"; 30 | "mm_user_sharing_screen" = "אתה משתף מסךאתה משתף את המסך"; 31 | "mm_stop_sharing" = "הפסק לשתף מסך"; 32 | "mm_connection_problems" = "השיחה נותקה. מנסה להתחבר מחדש"; 33 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Resources/Localization/ja.lproj/MobileMessaging.strings: -------------------------------------------------------------------------------- 1 | "mm_button_accept" = "同意"; 2 | "mm_button_decline" = "拒否"; 3 | "mm_button_cancel" = "キャンセルする"; 4 | "mm_button_open" = "開く"; 5 | "mm_bad_request" = "リクエストが正しくありません"; 6 | "mm_cancel" = "キャンセル"; 7 | "mm_no_internet_connection" = "インターネット接続がありません"; 8 | "mm_ok" = "OK"; 9 | "mm_settings" = "設定"; 10 | "mm_something_went_wrong" = "何かがうまくいかなかった。"; 11 | "mm_something_went_wrong_please_contact_support" = "エラーが発生しました。サポートにお問い合わせください。"; 12 | "mm_video_call" = "ビデオ通話"; 13 | "mm_flip_camera" = "フリップカメラ"; 14 | "mm_speaker" = "スピーカー"; 15 | "mm_calling" = "通話中(%1$@)"; 16 | "mm_microphone_muted" = "マイクがミュートになっています。"; 17 | "mm_notification_ringing" = "呼び出し中..."; 18 | "mm_audio_permission_not_granted" = "音声が許可されていません"; 19 | "mm_calls_usage_error" = "適切な通話の使用を妨げるエラーが発生しました。サポートにお問い合わせください"; 20 | "mm_dialpad" = "ダイアルパッド"; 21 | "mm_permission_needed" = "許可が必要です"; 22 | "mm_camera_permission_permanently_denied" = "カメラは永久に拒否されます。"; 23 | "mm_microphone_permission_permanently_denied" = "マイクは永久に拒否されます。"; 24 | "mm_microphone" = "マイク"; 25 | "mm_finish_current_call" = "現在の通話を終了して新しい通話を開始します。"; 26 | "mm_user_busy" = "ユーザーは取り込み中です"; 27 | "mm_user_not_found_destination" = "エンドユーザーが宛先に見つかりません"; 28 | "mm_user_declined_call" = "エンドユーザーによって通話が拒否されました"; 29 | "mm_screen_share" = "画面共有"; 30 | "mm_user_sharing_screen" = "画面を共有しています。"; 31 | "mm_stop_sharing" = "画面共有を停止する"; 32 | "mm_connection_problems" = "通話が切断されました。再接続しようとしています"; 33 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Resources/Localization/ko.lproj/MobileMessaging.strings: -------------------------------------------------------------------------------- 1 | "mm_button_accept" = "수락"; 2 | "mm_button_decline" = "거절"; 3 | "mm_button_cancel" = "취소"; 4 | "mm_button_open" = "열기"; 5 | "mm_bad_request" = "잘못된 요청"; 6 | "mm_cancel" = "취소"; 7 | "mm_no_internet_connection" = "인터넷에 연결되지 않음"; 8 | "mm_ok" = "확인"; 9 | "mm_settings" = "설정"; 10 | "mm_something_went_wrong" = "문제가 발생했습니다."; 11 | "mm_something_went_wrong_please_contact_support" = "오류가 발생했습니다. 지원팀에 문의하십시오."; 12 | "mm_video_call" = "영상 통화"; 13 | "mm_flip_camera" = "카메라로 전환"; 14 | "mm_speaker" = "스피커"; 15 | "mm_calling" = "통화 중 (%1$@)"; 16 | "mm_microphone_muted" = "마이크가 음소거 상태입니다."; 17 | "mm_notification_ringing" = "벨소리 울림 ..."; 18 | "mm_audio_permission_not_granted" = "오디오 권한이 부여되지 않음"; 19 | "mm_calls_usage_error" = "적절한 통화 사용을 방해하는 에러가 발생했습니다. 지원팀에 문의하십시오."; 20 | "mm_dialpad" = "다이얼패드"; 21 | "mm_permission_needed" = "권한 필요"; 22 | "mm_camera_permission_permanently_denied" = "카메라가 영구적으로 거부됩니다."; 23 | "mm_microphone_permission_permanently_denied" = "마이크가 영구적으로 거부되었습니다."; 24 | "mm_microphone" = "마이크"; 25 | "mm_finish_current_call" = "새 통화를 시작하려면 현재 통화를 종료합니다."; 26 | "mm_user_busy" = "사용자가 다른 용무 중이었습니다"; 27 | "mm_user_not_found_destination" = "목적지에서 최종 사용자를 찾을 수 없습니다"; 28 | "mm_user_declined_call" = "최종 사용자가 통화를 거부했습니다"; 29 | "mm_screen_share" = "화면 공유"; 30 | "mm_user_sharing_screen" = "화면을 공유하고 있습니다."; 31 | "mm_stop_sharing" = "화면 공유 중지"; 32 | "mm_connection_problems" = "통화가 끊어졌습니다. 다시 연결하는 중…"; 33 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Resources/Localization/zh-Hans.lproj/MobileMessaging.strings: -------------------------------------------------------------------------------- 1 | "mm_button_accept" = "接受"; 2 | "mm_button_decline" = "拒绝"; 3 | "mm_button_cancel" = "取消"; 4 | "mm_button_open" = "打开"; 5 | "mm_bad_request" = "请求错误"; 6 | "mm_cancel" = "取消"; 7 | "mm_no_internet_connection" = "无网络连接"; 8 | "mm_ok" = "好的"; 9 | "mm_settings" = "设置"; 10 | "mm_something_went_wrong" = "出现错误"; 11 | "mm_something_went_wrong_please_contact_support" = "出现错误。请联系技术支持。"; 12 | "mm_video_call" = "视频通话"; 13 | "mm_flip_camera" = "切换相机"; 14 | "mm_speaker" = "扬声器"; 15 | "mm_calling" = "呼叫(%1$@)"; 16 | "mm_microphone_muted" = "您的麦克风未开启"; 17 | "mm_notification_ringing" = "响铃中…"; 18 | "mm_audio_permission_not_granted" = "未授予音频权限"; 19 | "mm_calls_usage_error" = "出现错误无法正常使用通话功能,请联系技术支持"; 20 | "mm_dialpad" = "拨号盘"; 21 | "mm_permission_needed" = "需要获取权限"; 22 | "mm_camera_permission_permanently_denied" = "相机被永久拒绝"; 23 | "mm_microphone_permission_permanently_denied" = "麦克风被永久拒绝"; 24 | "mm_microphone" = "麦克风"; 25 | "mm_finish_current_call" = "结束当前通话以开始一个新的通话"; 26 | "mm_user_busy" = "用户忙"; 27 | "mm_user_not_found_destination" = "该用户不存在"; 28 | "mm_user_declined_call" = "用户已拒绝"; 29 | "mm_screen_share" = "共享屏幕"; 30 | "mm_user_sharing_screen" = "您正在共享屏幕。"; 31 | "mm_stop_sharing" = "停止共享屏幕"; 32 | "mm_connection_problems" = "通话被挂断。 尝试重新连接…"; 33 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Resources/Localization/zh-Hant.lproj/MobileMessaging.strings: -------------------------------------------------------------------------------- 1 | "mm_button_accept" = "接受"; 2 | "mm_button_decline" = "拒絕"; 3 | "mm_button_cancel" = "取消"; 4 | "mm_button_open" = "打開"; 5 | "mm_bad_request" = "不良的要求"; 6 | "mm_cancel" = "取消"; 7 | "mm_no_internet_connection" = "沒有網際網路連線"; 8 | "mm_ok" = "好"; 9 | "mm_settings" = "設定"; 10 | "mm_something_went_wrong" = "請稍後再試。"; 11 | "mm_something_went_wrong_please_contact_support" = "發現異常。請聯絡支援人員。"; 12 | "mm_video_call" = "視訊通話"; 13 | "mm_flip_camera" = "翻轉相機"; 14 | "mm_speaker" = "喇叭"; 15 | "mm_calling" = "撥號中 (%1$@)"; 16 | "mm_microphone_muted" = "您的麥克風已靜音。"; 17 | "mm_notification_ringing" = "響鈴中……"; 18 | "mm_audio_permission_not_granted" = "未授予音訊權限"; 19 | "mm_calls_usage_error" = "出現錯誤妨礙正確使用通話,請聯絡支援人員"; 20 | "mm_dialpad" = "撥號鍵盤"; 21 | "mm_permission_needed" = "需要權限"; 22 | "mm_camera_permission_permanently_denied" = "攝影機 被永久拒絕。"; 23 | "mm_microphone_permission_permanently_denied" = "麥克風 被永久拒絕。"; 24 | "mm_microphone" = "麥克風"; 25 | "mm_finish_current_call" = "結束目前通話以開始新的通話。"; 26 | "mm_user_busy" = "使用者忙碌"; 27 | "mm_user_not_found_destination" = "在目的地找不到終端使用者"; 28 | "mm_user_declined_call" = "終端使用者拒絕的來電"; 29 | "mm_screen_share" = "屏幕共享"; 30 | "mm_user_sharing_screen" = "您正在共享螢幕。"; 31 | "mm_stop_sharing" = "停止共享螢幕"; 32 | "mm_connection_problems" = "通話被掛斷。 正在嘗試重新連線…"; 33 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Resources/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyCollectedDataTypes 6 | 7 | 8 | NSPrivacyCollectedDataType 9 | NSPrivacyCollectedDataTypeOtherDataTypes 10 | NSPrivacyCollectedDataTypeLinked 11 | 12 | NSPrivacyCollectedDataTypeTracking 13 | 14 | NSPrivacyCollectedDataTypePurposes 15 | 16 | NSPrivacyCollectedDataTypePurposeAppFunctionality 17 | 18 | 19 | 20 | NSPrivacyAccessedAPITypes 21 | 22 | 23 | NSPrivacyAccessedAPIType 24 | NSPrivacyAccessedAPICategoryUserDefaults 25 | NSPrivacyAccessedAPITypeReasons 26 | 27 | CA92.1 28 | 1C8F.1 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Vendor/Kingsfisher/Box.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Box.swift 3 | // Kingfisher 4 | // 5 | // Created by Wei Wang on 2018/3/17. 6 | // Copyright (c) 2018 Wei Wang 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | import Foundation 27 | 28 | class Box { 29 | let value: T 30 | 31 | init(_ value: T) { 32 | self.value = value 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Vendor/PSOperations/Dictionary+Operations.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Apple Inc. All Rights Reserved. 3 | See LICENSE.txt for this sample’s licensing information 4 | 5 | Abstract: 6 | A convenient extension to Swift.Dictionary. 7 | */ 8 | 9 | extension Dictionary { 10 | /** 11 | It's not uncommon to want to turn a sequence of values into a dictionary, 12 | where each value is keyed by some unique identifier. This initializer will 13 | do that. 14 | 15 | - parameter sequence: The sequence to be iterated 16 | 17 | - parameter keyer: The closure that will be executed for each element in 18 | the `sequence`. The return value of this closure, if there is one, will 19 | be used as the key for the value in the `Dictionary`. If the closure 20 | returns `nil`, then the value will be omitted from the `Dictionary`. 21 | */ 22 | init(sequence: Sequence, keyMapper: (Value) -> Key?) where Sequence.Iterator.Element == Value { 23 | self.init() 24 | 25 | for item in sequence { 26 | if let key = keyMapper(item) { 27 | self[key] = item 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Vendor/PSOperations/NSLock+Operations.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Apple Inc. All Rights Reserved. 3 | See LICENSE.txt for this sample’s licensing information 4 | 5 | Abstract: 6 | An extension to NSLock to simplify executing critical code. 7 | */ 8 | 9 | import Foundation 10 | 11 | extension NSLock { 12 | func withCriticalScope(_ block: () -> T) -> T { 13 | lock() 14 | let value = block() 15 | unlock() 16 | return value 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Vendor/PSOperations/NSOperation+Operations.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Apple Inc. All Rights Reserved. 3 | See LICENSE.txt for this sample’s licensing information 4 | 5 | Abstract: 6 | A convenient extension to Foundation.NSOperation. 7 | */ 8 | 9 | import Foundation 10 | 11 | extension Foundation.Operation { 12 | /** 13 | Add a completion block to be executed after the `NSOperation` enters the 14 | "finished" state. 15 | */ 16 | func addCompletionBlock(_ block: @escaping () -> Void) { 17 | if let existing = completionBlock { 18 | /* 19 | If we already have a completion block, we construct a new one by 20 | chaining them together. 21 | */ 22 | completionBlock = { 23 | existing() 24 | block() 25 | } 26 | } 27 | else { 28 | completionBlock = block 29 | } 30 | } 31 | 32 | /// Add multiple depdendencies to the operation. 33 | func addDependencies(_ dependencies: [Foundation.Operation]) { 34 | for dependency in dependencies { 35 | addDependency(dependency) 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Vendor/PSOperations/OperationErrors.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Apple Inc. All Rights Reserved. 3 | See LICENSE.txt for this sample’s licensing information 4 | 5 | Abstract: 6 | This file defines the error codes and convenience functions for interacting with Operation-related errors. 7 | */ 8 | 9 | import Foundation 10 | 11 | public let OperationErrorDomain = "OperationErrors" 12 | 13 | public enum OperationErrorCode: Int { 14 | case conditionFailed = 1 15 | case executionFailed = 2 16 | } 17 | 18 | public extension NSError { 19 | convenience init(code: OperationErrorCode, userInfo: [String : Any]? = nil) { 20 | self.init(domain: OperationErrorDomain, code: code.rawValue, userInfo: userInfo) 21 | } 22 | } 23 | 24 | // This makes it easy to compare an `NSError.code` to an `OperationErrorCode`. 25 | public func ==(lhs: Int, rhs: OperationErrorCode) -> Bool { 26 | return lhs == rhs.rawValue 27 | } 28 | 29 | public func ==(lhs: OperationErrorCode, rhs: Int) -> Bool { 30 | return lhs.rawValue == rhs 31 | } 32 | -------------------------------------------------------------------------------- /Classes/MobileMessaging/Vendor/PSOperations/OperationObserver.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Apple Inc. All Rights Reserved. 3 | See LICENSE.txt for this sample’s licensing information 4 | 5 | Abstract: 6 | This file defines the OperationObserver protocol. 7 | */ 8 | 9 | import Foundation 10 | 11 | /** 12 | The protocol that types may implement if they wish to be notified of significant 13 | operation lifecycle events. 14 | */ 15 | public protocol OperationObserver { 16 | 17 | /// Invoked immediately prior to the `Operation`'s `execute()` method. 18 | func operationDidStart(_ operation: Operation) 19 | 20 | /// Invoked immediately after the first time the `Operation`'s `cancel()` method is called 21 | func operationDidCancel(_ operation: Operation) 22 | 23 | /// Invoked when `Operation.produceOperation(_:)` is executed. 24 | func operation(_ operation: Operation, didProduceOperation newOperation: Foundation.Operation) 25 | 26 | /** 27 | Invoked as an `Operation` finishes, along with any errors produced during 28 | execution (or readiness evaluation). 29 | */ 30 | func operationDidFinish(_ operation: Operation, errors: [NSError]) 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Classes/MobileMessagingObjC/Headers/Alamofire.h: -------------------------------------------------------------------------------- 1 | // 2 | // Alamofire.h 3 | // 4 | // Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | @import Foundation; 26 | 27 | FOUNDATION_EXPORT double AlamofireVersionNumber; 28 | FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; 29 | -------------------------------------------------------------------------------- /Classes/MobileMessagingObjC/Headers/MobileMessagingPluginApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Goran Tomasic on 10/10/2016. 3 | // 4 | 5 | #import 6 | #import 7 | 8 | extern NSString *ApplicationLaunchedByNotification_Key; 9 | 10 | @interface MobileMessagingPluginApplicationDelegate : UIResponder 11 | 12 | + (instancetype)sharedInstaller; 13 | + (void) install; 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | @property (readonly, nonatomic) BOOL installed; 17 | 18 | - (void)forwardInvocation:(NSInvocation *)anInvocation; 19 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Models/MMCallNotificationData.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MMCallNotificationData.swift 3 | // MobileMessaging 4 | // 5 | // Created by Francisco Fortes on 19/07/2022. 6 | // Copyright © 2022 Infobip Ltd. All rights reserved. 7 | // 8 | import Foundation 9 | import PushKit 10 | #if WEBRTCUI_ENABLED 11 | import InfobipRTC 12 | 13 | public struct MMWebRTCNotificationData { 14 | internal var activeCall: ActiveCall? 15 | internal var customData: [AnyHashable: Any]? 16 | internal var pushPKCredentials: PKPushCredentials? 17 | internal var hasVideo: Bool { 18 | if let customData = customData, 19 | let isVideoString = customData["isVideo"] as? String { 20 | return isVideoString == "true" ? true : false 21 | } 22 | return false 23 | } 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Models/MMUserActivityExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MMUserActivityExtension.swift 3 | // MobileMessaging 4 | // 5 | // Created by Francisco Fortes on 19/08/2021. 6 | // Copyright © 2021 Infobip Ltd. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Intents 11 | 12 | extension NSUserActivity { 13 | var startCallHandle: String? { 14 | return (interaction?.intent as? INStartCallIntent)?.contacts?.first?.personHandle?.value 15 | } 16 | 17 | var video: Bool? { 18 | guard 19 | let interaction = interaction, 20 | let startCallIntent = interaction.intent as? SupportedStartCallIntent 21 | else { 22 | return nil 23 | } 24 | 25 | return startCallIntent is INStartCallIntent 26 | } 27 | 28 | } 29 | 30 | protocol SupportedStartCallIntent { 31 | var contacts: [INPerson]? { get } 32 | } 33 | 34 | extension INStartCallIntent: SupportedStartCallIntent {} 35 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/camera.switch.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-switch-camera-m-white.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/clockWrap.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-clock-s-grayscale.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/collapseIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-collapse-m-grayscale.svg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/defaultCallAppIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "InAppChatLogo.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/defaultCallAppIcon.imageset/InAppChatLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/defaultCallAppIcon.imageset/InAppChatLogo.png -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/ellipsisStatus.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-ellipsis-m-white.svg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/ellipsisStatus.imageset/icon-ellipsis-m-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/endcallIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-endcall-m-grayscale.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/endcallIcon.imageset/icon-endcall-m-grayscale.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/expandIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "expand.svg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/expandIcon.imageset/expand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/landscape.off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Vector.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/landscape.off.imageset/Vector.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/landscape.on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Vector.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/landscape.on.imageset/Vector.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/microphone.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-mute-m-grayscale.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/microphone.imageset/icon-mute-m-grayscale.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/microphone.off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Group 1532.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/microphone.off.imageset/Group 1532.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/mutedParticipant.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "mutedParticipant.svg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/mutedParticipant.imageset/mutedParticipant.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/placeholder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-user-s-dark.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/placeholder.imageset/icon-user-s-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/screenshareOff.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-share-screen-off-m-grayscale.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/screenshareOff.imageset/icon-share-screen-off-m-grayscale.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/screenshareOn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-share-screen-m-grayscale.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/screenshareOn.imageset/icon-share-screen-m-grayscale.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/speakerphone.off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Frame 1686.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/speakerphone.off.imageset/Frame 1686.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/speakerphone.on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "speakeron.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/video.off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-video-off-m-grayscale.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/video.off.imageset/icon-video-off-m-grayscale.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Icons/video.on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-video-s-grayscale.svg", 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 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/MMDisconnectedCall.dataset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "data" : [ 3 | { 4 | "filename" : "MMDisconnectedCall.wav", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/MMDisconnectedCall.dataset/MMDisconnectedCall.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/MMDisconnectedCall.dataset/MMDisconnectedCall.wav -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/MMOutboundCall.dataset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "data" : [ 3 | { 4 | "filename" : "MMOutboundCall.wav", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/MMOutboundCall.dataset/MMOutboundCall.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/MMOutboundCall.dataset/MMOutboundCall.wav -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/reconnected.dataset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "data" : [ 3 | { 4 | "filename" : "reconnected.wav", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/reconnected.dataset/reconnected.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/reconnected.dataset/reconnected.wav -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/reconnecting.dataset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "data" : [ 3 | { 4 | "filename" : "reconnecting.wav", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/reconnecting.dataset/reconnecting.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Call Sounds/reconnecting.dataset/reconnecting.wav -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/Resources/MobileMessagingCallUIIcons.xcassets/alertBarIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ph_warning-circle-light.svg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Classes/WebRTCUI/WebRTCUIExports.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Exports.swift 3 | // 4 | // 5 | // Created by Maksym Svitlovskyi on 29/05/2023. 6 | // 7 | 8 | import Foundation 9 | #if SWIFT_PACKAGE 10 | @_exported import MobileMessaging 11 | #endif 12 | -------------------------------------------------------------------------------- /Example/Gemfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | source "https://rubygems.org" 6 | 7 | gem 'cocoapods' 8 | gem 'cocoapods-keys' 9 | gem 'fastlane' 10 | 11 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') 12 | eval(File.read(plugins_path), binding) if File.exist?(plugins_path) 13 | -------------------------------------------------------------------------------- /Example/MobileMessagingExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-40.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-40@2x-1.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-72.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-72@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-76.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small-50.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small@2x-1.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small@3x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small@3x-1.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/Icon@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/iTunesArtwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/iTunesArtwork.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon-io.appiconset/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/Info.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Info.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "info@2.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Info@3.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/Info.imageset/Info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/Info.imageset/Info.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/Info.imageset/Info@3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/Info.imageset/Info@3.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/Info.imageset/info@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/Info.imageset/info@2.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/list.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "list.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "list@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "list@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/list.imageset/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/list.imageset/list.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/list.imageset/list@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/list.imageset/list@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/list.imageset/list@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/list.imageset/list@3x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/settings.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "settings.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "settings@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "settings@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/settings.imageset/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/settings.imageset/settings.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/settings.imageset/settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/settings.imageset/settings@2x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Images.xcassets/settings.imageset/settings@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infobip/mobile-messaging-sdk-ios/6f370e31cbfad040fc7bc20df549e850dfd14d7f/Example/MobileMessagingExample/Images.xcassets/settings.imageset/settings@3x.png -------------------------------------------------------------------------------- /Example/MobileMessagingExample/MobileMessagingExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.security.application-groups 8 | 9 | group.com.infobip.Example 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Utils/NSErrorExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Utils.swift 3 | // MobileMessaging 4 | // 5 | // Created by okoroleva on 18.05.16. 6 | // 7 | 8 | import Foundation 9 | 10 | public let CustomErrorDomain = "customDomain" 11 | 12 | public enum CustomErrorType : Error { 13 | case invalidMSISDNFormat 14 | 15 | fileprivate var errorCode: Int { 16 | switch self { 17 | case .invalidMSISDNFormat: 18 | return 0 19 | } 20 | } 21 | 22 | var userInfo: [String: String] { 23 | var errorDescription: String = "" 24 | 25 | switch self { 26 | case .invalidMSISDNFormat: 27 | errorDescription = NSLocalizedString("Invalid MSISDN format", comment: "") 28 | } 29 | return [NSLocalizedDescriptionKey: errorDescription] 30 | } 31 | } 32 | 33 | extension NSError { 34 | public convenience init(type: CustomErrorType) { 35 | self.init(domain: CustomErrorDomain, code: type.errorCode, userInfo: type.userInfo) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Utils/WindowExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WindowExtension.swift 3 | // MobileMessagingExample 4 | // 5 | // Created by Andrew Berezhnoy on 04/08/2017. 6 | // 7 | 8 | import UIKit 9 | 10 | public extension UIWindow { 11 | var visibleViewController: UIViewController? { 12 | return UIWindow.getVisibleViewControllerFrom(self.rootViewController) 13 | } 14 | 15 | static func getVisibleViewControllerFrom(_ vc: UIViewController?) -> UIViewController? { 16 | if let nc = vc as? UINavigationController { 17 | return UIWindow.getVisibleViewControllerFrom(nc.visibleViewController) 18 | } else if let tc = vc as? UITabBarController { 19 | return UIWindow.getVisibleViewControllerFrom(tc.selectedViewController) 20 | } else { 21 | if let pvc = vc?.presentedViewController { 22 | return UIWindow.getVisibleViewControllerFrom(pvc) 23 | } else { 24 | return vc 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Example/MobileMessagingExample/ViewControllers/ViewControllerWithToolbar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewControllerWithToolbar.swift 3 | // MobileMessagingExample 4 | // 5 | // Created by okoroleva on 01.09.17. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewControllerWithToolbar: UIViewController { 11 | static let toolbarHeight: CGFloat = 64 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // init toolbar 17 | let toolbarView = UIToolbar(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: ViewControllerWithToolbar.toolbarHeight)) 18 | toolbarView.autoresizingMask = [.flexibleWidth] 19 | toolbarView.setItems([UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(close)), 20 | UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil), 21 | UIBarButtonItem(title: self.title, style: .plain, target: nil, action: nil), 22 | UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)], 23 | animated: true) 24 | 25 | view.addSubview(toolbarView) 26 | } 27 | 28 | @objc func close() { 29 | dismiss(animated: true) 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /Example/MobileMessagingExample/Views/CopyableCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CopyableLable.swift 3 | // MobileMessaging 4 | // 5 | // Created by okoroleva on 06.04.16. 6 | // 7 | 8 | import UIKit 9 | 10 | class CopyableCell: UITableViewCell { 11 | 12 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 13 | super.init(style: style, reuseIdentifier: reuseIdentifier) 14 | sharedInit() 15 | } 16 | 17 | required init?(coder aDecoder: NSCoder) { 18 | super.init(coder: aDecoder) 19 | sharedInit() 20 | } 21 | 22 | func sharedInit() { 23 | isUserInteractionEnabled = true 24 | addGestureRecognizer(UILongPressGestureRecognizer(target: self, action: #selector(CopyableCell.showMenu(_:)))) 25 | } 26 | 27 | @objc func showMenu(_ sender: Any?) { 28 | guard textLabel?.text != nil else { 29 | return 30 | } 31 | becomeFirstResponder() 32 | let menu = UIMenuController.shared 33 | if !menu.isMenuVisible { 34 | menu.showMenu(from: self, rect: bounds) 35 | } 36 | } 37 | 38 | override func copy(_ sender: Any?) { 39 | guard let text = textLabel?.text else { 40 | return 41 | } 42 | UIPasteboard.general.string = text 43 | UIMenuController.shared.hideMenu() 44 | } 45 | 46 | override var canBecomeFirstResponder: Bool { 47 | return true 48 | } 49 | 50 | override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { 51 | if action == #selector(copy(_:)) { 52 | return true 53 | } 54 | return false 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Example/NotificationServiceExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | NotificationServiceExtension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 13.12.5 21 | CFBundleVersion 22 | 1460136654095 23 | NSAppTransportSecurity 24 | 25 | NSAllowsArbitraryLoads 26 | 27 | 28 | NSExtension 29 | 30 | NSExtensionPointIdentifier 31 | com.apple.usernotifications.service 32 | NSExtensionPrincipalClass 33 | $(PRODUCT_MODULE_NAME).NotificationService 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Example/NotificationServiceExtension/NotificationService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationService.swift 3 | // NotificationServiceExtension 4 | // 5 | 6 | import UserNotifications 7 | import MobileMessaging 8 | 9 | class NotificationService: UNNotificationServiceExtension { 10 | 11 | var contentHandler: ((UNNotificationContent) -> Void)? 12 | var originalContent: UNNotificationContent? 13 | 14 | override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { 15 | self.contentHandler = contentHandler 16 | self.originalContent = request.content 17 | if MM_MTMessage.isCorrectPayload(request.content.userInfo) { 18 | MobileMessaging.logger = MMLumberjackLogger(logOutput: MMLogOutput.Console, logLevel: MMLogLevel.All) 19 | MobileMessagingNotificationServiceExtension.didReceive(request, withContentHandler: contentHandler) 20 | } else { 21 | //handling by another push provider 22 | } 23 | } 24 | 25 | override func serviceExtensionTimeWillExpire() { 26 | MobileMessagingNotificationServiceExtension.serviceExtensionTimeWillExpire() 27 | if let originalContent = originalContent { 28 | contentHandler?(originalContent) 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Example/NotificationServiceExtension/NotificationServiceExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.infobip.Example 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyCollectedDataTypes 6 | 7 | 8 | NSPrivacyCollectedDataType 9 | NSPrivacyCollectedDataTypeEmailAddress 10 | NSPrivacyCollectedDataTypeLinked 11 | 12 | NSPrivacyCollectedDataTypeTracking 13 | 14 | NSPrivacyCollectedDataTypePurposes 15 | 16 | NSPrivacyCollectedDataTypePurposeAppFunctionality 17 | 18 | 19 | 20 | NSPrivacyCollectedDataType 21 | NSPrivacyCollectedDataTypeCoarseLocation 22 | NSPrivacyCollectedDataTypeLinked 23 | 24 | NSPrivacyCollectedDataTypeTracking 25 | 26 | NSPrivacyCollectedDataTypePurposes 27 | 28 | NSPrivacyCollectedDataTypePurposeAppFunctionality 29 | 30 | 31 | 32 | NSPrivacyAccessedAPITypes 33 | 34 | 35 | NSPrivacyAccessedAPIType 36 | NSPrivacyAccessedAPICategoryUserDefaults 37 | NSPrivacyAccessedAPITypeReasons 38 | 39 | CA92.1 40 | 1C8F.1 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 13.12.5 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1460136654095 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/MobileMessagingExample_Tests_Device-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 13.12.5 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1460136654095 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/MobileMessagingTests/ApplicationCodeHashingTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ApplicationCodeHashingTests.swift 3 | // MobileMessagingExample 4 | // 5 | // Created by Andrey Kadochnikov on 16/04/2018. 6 | // 7 | 8 | import Foundation 9 | import XCTest 10 | @testable import MobileMessaging 11 | 12 | class ApplicationCodeHashingTests: XCTestCase { 13 | 14 | func testThatAppCodeHashCalculatedRightWay() { 15 | XCTAssertEqual("b9ff7d254e", calculateAppCodeHash("3c59f6e341a6896fc15b8cd7e3f3fdf8-031a75db-fd8f-46b0-9f2b-a2e915d7b952")) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Tests/MobileMessagingTests/BaseSettingsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseSettingsTests.swift 3 | // MobileMessagingExample 4 | // 5 | // Created by okoroleva on 24.11.16. 6 | // 7 | 8 | import XCTest 9 | @testable import MobileMessaging 10 | 11 | class BaseSettingsTests: XCTestCase { 12 | func testBaseSettings() { 13 | XCTAssertEqual(Consts.APIValues.prodDynamicBaseURLString, "https://mobile.infobip.com") 14 | XCTAssertEqual(Consts.APIValues.platformType, "APNS") 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Example/Tests/MobileMessagingTests/EscapingQueryTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EscapingQueryTests.swift 3 | // MobileMessagingExample 4 | // 5 | // Created by okoroleva on 26.05.16. 6 | // 7 | 8 | import Foundation 9 | import XCTest 10 | @testable import MobileMessaging 11 | 12 | class EscapingQueryTests : XCTestCase { 13 | func testNumber() { 14 | let urlRequest = try! URLEncoding.queryString.encode( 15 | URLRequest(url: URL(string: "http://url.com")!), 16 | with: ["number":12321432] 17 | ) 18 | XCTAssertEqual("http://url.com?number=12321432", urlRequest.url!.absoluteString) 19 | } 20 | 21 | func testEscape() { 22 | let urlRequest = try! URLEncoding.queryString.encode( 23 | URLRequest(url: URL(string: "http://url.com")!), 24 | with: ["Key!*'();:@&=+$,/?%#[]": "Value!*'();:@&=+$,/?%#[]"] 25 | ) 26 | XCTAssertEqual( 27 | "http://url.com?Key%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C/?%25%23%5B%5D=Value%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C/?%25%23%5B%5D", 28 | urlRequest.url!.absoluteString) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Example/Tests/MobileMessagingTests/KeychainTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeychainTests.swift 3 | // MobileMessagingExample 4 | // 5 | // Created by Andrey Kadochnikov on 01.09.2025. 6 | // 7 | 8 | import XCTest 9 | @testable import MobileMessaging 10 | 11 | class KeychainTests: XCTestCase { 12 | 13 | override class func setUp() { 14 | let nonsharedKeychain = MMKeychain(accessGroup: nil) 15 | nonsharedKeychain.clear() 16 | 17 | let sharedKeychain = MMKeychain(accessGroup: Bundle.mainAppBundle.appGroupId) 18 | sharedKeychain.clear() 19 | } 20 | 21 | override class func tearDown() { 22 | let nonsharedKeychain = MMKeychain(accessGroup: nil) 23 | nonsharedKeychain.clear() 24 | 25 | let sharedKeychain = MMKeychain(accessGroup: Bundle.mainAppBundle.appGroupId) 26 | sharedKeychain.clear() 27 | } 28 | 29 | func testThatNonSharedKeychainDataIsMigratedToSharedKeychain() { 30 | let nonsharedKeychain = MMKeychain(accessGroup: nil) 31 | nonsharedKeychain.applicationCode = "appcode" 32 | nonsharedKeychain.pushRegId = "pushRegId" 33 | 34 | let sharedKeychain = MMKeychain(accessGroup: Bundle.mainAppBundle.appGroupId) 35 | 36 | XCTAssertEqual("appcode", sharedKeychain.applicationCode) 37 | XCTAssertEqual("pushRegId", sharedKeychain.pushRegId) 38 | XCTAssertNil(nonsharedKeychain.applicationCode) 39 | XCTAssertNil(nonsharedKeychain.pushRegId) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Example/Tests/MobileMessagingTests/TimezoneFormatterTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TimezoneFormatterTests.swift 3 | // MobileMessagingExample 4 | // 5 | // Created by Andrey Kadochnikov on 11/02/2019. 6 | // 7 | // 8 | 9 | import XCTest 10 | import Foundation 11 | 12 | @testable import MobileMessaging 13 | 14 | class TimezoneFormatterTests: XCTestCase { 15 | func shouldReturnProperTimezonFormat() { 16 | 17 | MobileMessaging.timeZone = TimeZone(secondsFromGMT: 0)! 18 | XCTAssertEqual(DateStaticFormatters.CurrentJavaCompatibleTimeZoneOffset, "GMT+00:00") 19 | 20 | MobileMessaging.timeZone = TimeZone(secondsFromGMT: Int(3.5 * 60.0 * 60.0))! 21 | XCTAssertEqual(DateStaticFormatters.CurrentJavaCompatibleTimeZoneOffset, "GMT+03:30") 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Example/Tests/MobileMessagingTests/UtilsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UtilsTests.swift 3 | // MobileMessagingExample 4 | // 5 | // Created by Andrey Kadochnikov on 12.03.2021. 6 | // 7 | 8 | import XCTest 9 | @testable import MobileMessaging 10 | 11 | class UtilsTests: XCTestCase { 12 | 13 | func testChecksAnyValuesForNil() { 14 | let megaOptionalString: String?????? = nil 15 | let nilString: String? = nil 16 | let string: String = "some string" 17 | let dict: [String: Any] = ["nilString": nilString as Any] 18 | 19 | XCTAssertTrue(checkIfAnyIsNil(megaOptionalString as Any)) 20 | XCTAssertTrue(checkIfAnyIsNil(dict["nilString"] as Any)) 21 | XCTAssertTrue(checkIfAnyIsNil(dict["absentKey"] as Any)) 22 | XCTAssertTrue(checkIfAnyIsNil(nilString as Any)) 23 | XCTAssertFalse(checkIfAnyIsNil(string as Any)) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example/Tests/mocks/mobile/1/data/system/POST.json: -------------------------------------------------------------------------------- 1 | { 2 | "method": "POST", 3 | "path": "/mobile/1/data/system", 4 | "mocks": [ 5 | { 6 | "headers": { 7 | "authorization": "App someCorrectApplicationID" 8 | }, 9 | "parameters": { 10 | "deviceApplicationInstanceId": "someExistingInternalID" 11 | }, 12 | "requestBody": { 13 | "sdkVersion": "1.0.0", 14 | "osVersion": "1.0", 15 | "deviceManufacturer": "GoogleApple", 16 | "deviceModel": "iPhone Galaxy", 17 | "applicationVersion": "1.0", 18 | "notificationsEnabled": false 19 | }, 20 | 21 | "responseStatus": 200, 22 | "responseBody": { } 23 | }, 24 | { 25 | "headers": { 26 | "authorization": "App someCorrectApplicationID" 27 | }, 28 | "parameters": { 29 | "deviceApplicationInstanceId": "someExistingInternalID" 30 | }, 31 | "requestBody": { 32 | "sdkVersion": "1.0.0", 33 | "osVersion": "1.0", 34 | "deviceManufacturer": "GoogleApple", 35 | "deviceModel": "iPhone Galaxy", 36 | "applicationVersion": "1.0", 37 | "notificationsEnabled": false 38 | }, 39 | "responseStatus": 200, 40 | "responseBody": { } 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /Example/Tests/mocks/mobile/1/messages/seen/POST.json: -------------------------------------------------------------------------------- 1 | { 2 | "method": "POST", 3 | "path": "/mobile/1/messages/seen", 4 | "mocks": [ 5 | { 6 | "responseStatus": 200, 7 | "headers": { 8 | "authorization": "App someCorrectApplicationID" 9 | }, 10 | "responseBody": { 11 | "message": "OK" 12 | } 13 | }, 14 | { 15 | "responseStatus": 401, 16 | "headers": { 17 | "authorization": "App someWrongApplicationID" 18 | }, 19 | "responseBody": { 20 | "requestError": { 21 | "serviceException": { 22 | "text": "Invalid Application Id", 23 | "messageId": "1" 24 | } 25 | } 26 | } 27 | }, 28 | { 29 | "responseStatus": 200, 30 | "headers": { 31 | "authorization": "App CorrectIdMergeSynchronization" 32 | }, 33 | "responseBody": { 34 | "message": "OK" 35 | } 36 | }, 37 | { 38 | "default": true, 39 | "responseStatus": 200, 40 | "headers": { 41 | "authorization": "App someCorrectApplicationID" 42 | }, 43 | "responseBody": { 44 | "message": "OK" 45 | } 46 | } 47 | ], 48 | "outputType": "SeenMessagesResponse" 49 | } 50 | -------------------------------------------------------------------------------- /Example/Tests/mocks/mobile/2/data/system/POST.json: -------------------------------------------------------------------------------- 1 | { 2 | "method": "POST", 3 | "path": "/mobile/2/data/system", 4 | "mocks": [ 5 | { 6 | "headers": { 7 | "authorization": "App someCorrectApplicationID", 8 | "pushregistrationid": "someExistingInternalID" 9 | }, 10 | "requestBody": { 11 | "sdkVersion": "1.0.0", 12 | "osVersion": "1.0", 13 | "deviceManufacturer": "GoogleApple", 14 | "deviceModel": "iPhone Galaxy", 15 | "applicationVersion": "1.0", 16 | "notificationsEnabled": false, 17 | "deviceSecure": false 18 | }, 19 | 20 | "responseStatus": 200, 21 | "responseBody": { } 22 | }, 23 | { 24 | "headers": { 25 | "authorization": "App someCorrectApplicationID", 26 | "pushregistrationid": "someExistingInternalID" 27 | }, 28 | "requestBody": { 29 | "sdkVersion": "1.0.0", 30 | "osVersion": "1.0", 31 | "deviceManufacturer": "GoogleApple", 32 | "deviceModel": "iPhone Galaxy", 33 | "applicationVersion": "1.0", 34 | "notificationsEnabled": false, 35 | "deviceSecure": true 36 | }, 37 | "responseStatus": 200, 38 | "responseBody": { } 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /Example/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | MobileMessagingExample 4 | 5 | Created by Andrey Kadochnikov on 28/09/2017. 6 | */ 7 | 8 | "LOCALIZABLE_MESSAGE_KEY" = "A localizable message with a placeholder %@"; 9 | -------------------------------------------------------------------------------- /Example/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier "com.infobip.mobilemessaging.example" # The bundle identifier of your app 2 | team_id "T6U248P7YM" # Developer Portal Team ID 3 | -------------------------------------------------------------------------------- /Example/fastlane/Matchfile: -------------------------------------------------------------------------------- 1 | git_url "ssh://git@git.ib-ci.com:7999/mml/ios-certificates.git" 2 | 3 | type "development" 4 | 5 | readonly true 6 | 7 | app_identifier ["com.infobip.mobilemessaging.example", "com.infobip.mobilemessaging.example.NotificationServiceExtension"] 8 | 9 | username "andrey.kadochnikov@infobip.com" 10 | -------------------------------------------------------------------------------- /Example/fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-wait_xcrun' -------------------------------------------------------------------------------- /Example/fastlane/README.md: -------------------------------------------------------------------------------- 1 | fastlane documentation 2 | ================ 3 | # Installation 4 | ``` 5 | sudo gem install fastlane 6 | ``` 7 | # Available Actions 8 | ## iOS 9 | ### ios test 10 | ``` 11 | fastlane ios test 12 | ``` 13 | Runs all the tests 14 | ### ios local_test 15 | ``` 16 | fastlane ios local_test 17 | ``` 18 | 19 | ### ios snapshot 20 | ``` 21 | fastlane ios snapshot 22 | ``` 23 | Runs all the tests on Simulators 24 | 25 | Runs all the tests on iPhone 5 26 | 27 | Build a snapshot version 28 | ### ios release 29 | ``` 30 | fastlane ios release 31 | ``` 32 | Build a release version, publish to Cocoapods 33 | 34 | ---- 35 | 36 | This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. 37 | More information about fastlane can be found on [https://fastlane.tools](https://fastlane.tools). 38 | The documentation of fastlane can be found on [GitHub](https://github.com/fastlane/fastlane/tree/master/fastlane). 39 | -------------------------------------------------------------------------------- /Example/fastlane/keys.template: -------------------------------------------------------------------------------- 1 | ENV["CRASHLYTICS_API_TOKEN"] = "" 2 | ENV["CRASHLYTICS_BUILD_SECRET"] = "" 3 | ENV["APPLE_ID"] = "" 4 | ENV["SIGH_USERNAME"] = ENV["APPLE_ID"] 5 | ENV["PILOT_APPLE_ID"] = ENV["APPLE_ID"] 6 | ENV["DELIVER_USERNAME"] = ENV["APPLE_ID"] 7 | -------------------------------------------------------------------------------- /Example/ru.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | MobileMessagingExample 4 | 5 | Created by Andrey Kadochnikov on 28/09/2017. 6 | */ 7 | 8 | "LOCALIZABLE_MESSAGE_KEY" = "локализуемое сообщение с плейсхолдером %@"; 9 | -------------------------------------------------------------------------------- /Example_SPM/Gemfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | source "https://rubygems.org" 6 | 7 | gem 'cocoapods' 8 | gem 'cocoapods-keys' 9 | gem 'fastlane' 10 | 11 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') 12 | eval(File.read(plugins_path), binding) if File.exist?(plugins_path) 13 | -------------------------------------------------------------------------------- /Example_SPM/MobileMessagingExample/MobileMessagingExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.security.application-groups 8 | 9 | group.com.infobip.Example 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Example_SPM/NotificationServiceExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | NotificationServiceExtension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 10.0.3 21 | CFBundleVersion 22 | 1460136653961 23 | NSAppTransportSecurity 24 | 25 | NSAllowsArbitraryLoads 26 | 27 | 28 | NSExtension 29 | 30 | NSExtensionPointIdentifier 31 | com.apple.usernotifications.service 32 | NSExtensionPrincipalClass 33 | $(PRODUCT_MODULE_NAME).NotificationService 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Example_SPM/NotificationServiceExtension/NotificationService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationService.swift 3 | // NotificationServiceExtension 4 | // 5 | 6 | import UserNotifications 7 | import MobileMessaging 8 | import MobileMessagingLogging 9 | 10 | class NotificationService: UNNotificationServiceExtension { 11 | 12 | var contentHandler: ((UNNotificationContent) -> Void)? 13 | var originalContent: UNNotificationContent? 14 | 15 | override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { 16 | self.contentHandler = contentHandler 17 | self.originalContent = request.content 18 | MobileMessagingNotificationServiceExtension.startWithApplicationCode("<# your application code #>") 19 | MobileMessaging.logger = MMLumberjackLogger(logOutput: MMLogOutput.Console, logLevel: MMLogLevel.All) 20 | MobileMessagingNotificationServiceExtension.didReceive(request, withContentHandler: contentHandler) 21 | } 22 | 23 | override func serviceExtensionTimeWillExpire() { 24 | MobileMessagingNotificationServiceExtension.serviceExtensionTimeWillExpire() 25 | if let originalContent = originalContent { 26 | contentHandler?(originalContent) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Example_SPM/NotificationServiceExtension/NotificationServiceExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.infobip.Example 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example_SPM/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier "com.infobip.mobilemessaging.example" # The bundle identifier of your app 2 | team_id "T6U248P7YM" # Developer Portal Team ID 3 | -------------------------------------------------------------------------------- /Example_SPM/fastlane/Matchfile: -------------------------------------------------------------------------------- 1 | git_url "ssh://git@git.ib-ci.com:7999/mml/ios-certificates.git" 2 | 3 | type "development" 4 | 5 | readonly true 6 | 7 | app_identifier ["com.infobip.mobilemessaging.example", "com.infobip.mobilemessaging.example.NotificationServiceExtension"] 8 | 9 | username "andrey.kadochnikov@infobip.com" -------------------------------------------------------------------------------- /Example_SPM/fastlane/keys.template: -------------------------------------------------------------------------------- 1 | ENV["CRASHLYTICS_API_TOKEN"] = "" 2 | ENV["CRASHLYTICS_BUILD_SECRET"] = "" 3 | ENV["APPLE_ID"] = "" 4 | ENV["SIGH_USERNAME"] = ENV["APPLE_ID"] 5 | ENV["PILOT_APPLE_ID"] = ENV["APPLE_ID"] 6 | ENV["DELIVER_USERNAME"] = ENV["APPLE_ID"] 7 | -------------------------------------------------------------------------------- /Example_static/.swift-version: -------------------------------------------------------------------------------- 1 | 4.0 -------------------------------------------------------------------------------- /Example_static/Gemfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | source "https://rubygems.org" 6 | 7 | gem 'cocoapods' 8 | gem 'cocoapods-keys' 9 | gem 'fastlane' 10 | 11 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') 12 | eval(File.read(plugins_path), binding) if File.exist?(plugins_path) 13 | -------------------------------------------------------------------------------- /Example_static/MobileMessagingExample/MobileMessagingExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.security.application-groups 8 | 9 | group.com.infobip.Example 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Example_static/NotificationServiceExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | NotificationServiceExtension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 10.0.3 21 | CFBundleVersion 22 | 1460136653961 23 | NSAppTransportSecurity 24 | 25 | NSAllowsArbitraryLoads 26 | 27 | 28 | NSExtension 29 | 30 | NSExtensionPointIdentifier 31 | com.apple.usernotifications.service 32 | NSExtensionPrincipalClass 33 | $(PRODUCT_MODULE_NAME).NotificationService 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Example_static/NotificationServiceExtension/NotificationService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationService.swift 3 | // NotificationServiceExtension 4 | // 5 | 6 | import UserNotifications 7 | import MobileMessaging 8 | 9 | class NotificationService: UNNotificationServiceExtension { 10 | 11 | var contentHandler: ((UNNotificationContent) -> Void)? 12 | var originalContent: UNNotificationContent? 13 | 14 | override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { 15 | self.contentHandler = contentHandler 16 | self.originalContent = request.content 17 | MobileMessagingNotificationServiceExtension.startWithApplicationCode("<# your application code #>") 18 | MobileMessaging.logger = MMLumberjackLogger(logOutput: MMLogOutput.Console, logLevel: MMLogLevel.All) 19 | MobileMessagingNotificationServiceExtension.didReceive(request, withContentHandler: contentHandler) 20 | } 21 | 22 | override func serviceExtensionTimeWillExpire() { 23 | MobileMessagingNotificationServiceExtension.serviceExtensionTimeWillExpire() 24 | if let originalContent = originalContent { 25 | contentHandler?(originalContent) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Example_static/NotificationServiceExtension/NotificationServiceExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.infobip.Example 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example_static/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | platform :ios, '13.0' 4 | 5 | $podName = 'MobileMessaging' 6 | $chatPodName = 'MobileMessaging/InAppChat' 7 | 8 | def includeMobileMessagingPods 9 | pod $podName, :path => '../' 10 | pod $chatPodName, :path => '../' 11 | end 12 | 13 | target 'MobileMessagingExample_static' do 14 | includeMobileMessagingPods 15 | 16 | target 'NotificationServiceExtension' do 17 | inherit! :search_paths 18 | end 19 | 20 | target 'MobileMessagingExample_static_Tests' do 21 | inherit! :search_paths 22 | end 23 | 24 | end 25 | 26 | target 'MobileMessagingExample_static_Tests_Device' do 27 | includeMobileMessagingPods 28 | end 29 | 30 | post_install do |installer| 31 | installer.pods_project.targets.each do |target| 32 | target.build_configurations.each do |config| 33 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' 34 | if target.name == 'MobileMessaging' 35 | config.build_settings['ENABLE_TESTABILITY'] = 'YES' # for this particular project we want the SDK to be testable 36 | config.build_settings['CLANG_WARN_DOCUMENTATION_COMMENTS'] = 'NO' 37 | end 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /Example_static/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 10.0.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1460136653961 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example_static/Tests/MobileMessagingExample_static_Tests_Device-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 10.0.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1460136653961 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example_static/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier "com.infobip.mobilemessaging.example" # The bundle identifier of your app 2 | team_id "T6U248P7YM" # Developer Portal Team ID 3 | -------------------------------------------------------------------------------- /Example_static/fastlane/Matchfile: -------------------------------------------------------------------------------- 1 | git_url "ssh://git@git.ib-ci.com:7999/mml/ios-certificates.git" 2 | 3 | type "development" 4 | 5 | readonly true 6 | 7 | app_identifier ["com.infobip.mobilemessaging.example", "com.infobip.mobilemessaging.example.NotificationServiceExtension"] 8 | 9 | username "andrey.kadochnikov@infobip.com" -------------------------------------------------------------------------------- /Example_static/fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-wait_xcrun' -------------------------------------------------------------------------------- /Example_static/fastlane/README.md: -------------------------------------------------------------------------------- 1 | fastlane documentation 2 | ================ 3 | # Installation 4 | ``` 5 | sudo gem install fastlane 6 | ``` 7 | # Available Actions 8 | ## iOS 9 | ### ios test 10 | ``` 11 | fastlane ios test 12 | ``` 13 | Runs all the tests 14 | ### ios local_test 15 | ``` 16 | fastlane ios local_test 17 | ``` 18 | 19 | ### ios snapshot 20 | ``` 21 | fastlane ios snapshot 22 | ``` 23 | Runs all the tests on Simulators 24 | 25 | Runs all the tests on iPhone 5 26 | 27 | Build a snapshot version 28 | ### ios release 29 | ``` 30 | fastlane ios release 31 | ``` 32 | Build a release version, publish to Cocoapods 33 | 34 | ---- 35 | 36 | This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. 37 | More information about fastlane can be found on [https://fastlane.tools](https://fastlane.tools). 38 | The documentation of fastlane can be found on [GitHub](https://github.com/fastlane/fastlane/tree/master/fastlane). 39 | -------------------------------------------------------------------------------- /Example_static/fastlane/keys.template: -------------------------------------------------------------------------------- 1 | ENV["CRASHLYTICS_API_TOKEN"] = "" 2 | ENV["CRASHLYTICS_BUILD_SECRET"] = "" 3 | ENV["APPLE_ID"] = "" 4 | ENV["SIGH_USERNAME"] = ENV["APPLE_ID"] 5 | ENV["PILOT_APPLE_ID"] = ENV["APPLE_ID"] 6 | ENV["DELIVER_USERNAME"] = ENV["APPLE_ID"] 7 | -------------------------------------------------------------------------------- /Framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 13.12.5 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1460136654095 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Framework/MobileMessaging-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MobileMessaging : NSObject 3 | @end 4 | @implementation PodsDummy_MobileMessaging 5 | @end 6 | -------------------------------------------------------------------------------- /Framework/MobileMessaging-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Framework/MobileMessaging.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MobileMessaging 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "CoreData" -framework "CoreLocation" -framework "CoreTelephony" -framework "SystemConfiguration" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | OTHER_SWIFT_FLAGS[config=Debug] = -DDEBUG 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | -------------------------------------------------------------------------------- /InboxExample/InboxExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // InboxExample 4 | // 5 | // Created by Andrey Kadochnikov on 25.05.2022. 6 | // 7 | 8 | import UIKit 9 | import MobileMessaging 10 | 11 | @main 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 14 | MobileMessaging.withApplicationCode(<# use your own Application Code #>, notificationType: [MMUserNotificationType.alert, MMUserNotificationType.sound])?.start() 15 | MobileMessaging.logger = MMDefaultLogger() 16 | return true 17 | } 18 | 19 | func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { 20 | MobileMessaging.didRegisterForRemoteNotificationsWithDeviceToken(deviceToken) 21 | } 22 | 23 | func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { 24 | MobileMessaging.didReceiveRemoteNotification(userInfo, fetchCompletionHandler: completionHandler) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /InboxExample/InboxExample/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /InboxExample/InboxExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /InboxExample/InboxExample/InboxExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /InboxExample/InboxExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | UIWindowSceneSessionRoleApplication 12 | 13 | 14 | UISceneConfigurationName 15 | Default Configuration 16 | UISceneDelegateClassName 17 | $(PRODUCT_MODULE_NAME).SceneDelegate 18 | UISceneStoryboardFile 19 | Main 20 | 21 | 22 | 23 | 24 | UIBackgroundModes 25 | 26 | remote-notification 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /InboxExample/InboxExample/Utils/utils.swift: -------------------------------------------------------------------------------- 1 | // 2 | // utils.swift 3 | // InboxExample 4 | // 5 | // Created by Andrey Kadochnikov on 26.05.2022. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | enum NotificationKeys { 12 | static let unreadCount: String = "unreadCount" 13 | } 14 | 15 | extension Notification.Name { 16 | // Notifications 17 | static let inboxCountersUpdated = Notification.Name("inboxCountersUpdated") 18 | } 19 | 20 | func showAlertInRootVC(_ error: NSError) { 21 | UIApplication.shared.keyWindow!.rootViewController?.showAlertIfErrorPresent(error) 22 | } 23 | 24 | func showAlertInRootVC(_ title: String, message: String) { 25 | UIApplication.shared.keyWindow!.rootViewController?.showAlert(title, message: message) 26 | } 27 | 28 | extension UIViewController { 29 | var isVisible: Bool { 30 | return self.isViewLoaded && self.view.window != nil 31 | } 32 | func showAlert(_ title: String, message: String, dismissActionHandler: ((UIAlertAction) -> Swift.Void)? = nil) { 33 | DispatchQueue.main.async { 34 | let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) 35 | alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: dismissActionHandler)) 36 | self.present(alert, animated: true, completion: nil) 37 | } 38 | } 39 | func showAlertIfErrorPresent(_ error: Error?) { 40 | guard let error = error else { 41 | return 42 | } 43 | self.showAlert("Error", message: error.localizedDescription) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /InboxExample/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | use_frameworks! 3 | platform :ios, '13.0' 4 | 5 | target 'InboxExample' do 6 | pod 'MobileMessaging', :path => '../' 7 | pod 'MobileMessaging/Inbox', :path => '../' 8 | end 9 | 10 | # Fix Xcode 14 resource bundle signing issues 11 | # https://github.com/CocoaPods/CocoaPods/issues/11402#issuecomment-1259231655 12 | post_install do |installer| 13 | installer.pods_project.targets.each do |target| 14 | if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" 15 | target.build_configurations.each do |config| 16 | config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /InboxExample/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier "com.infobip.mobilemessaging.inbox.example" 2 | team_id "T6U248P7YM" -------------------------------------------------------------------------------- /InboxExample/fastlane/Matchfile: -------------------------------------------------------------------------------- 1 | git_url "ssh://git@git.ib-ci.com:7999/mml/ios-certificates.git" 2 | 3 | type "development" 4 | 5 | readonly true 6 | 7 | app_identifier ["com.infobip.mobilemessaging.inbox.example"] 8 | 9 | username "andrey.kadochnikov@infobip.com" -------------------------------------------------------------------------------- /InboxExample/fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-wait_xcrun' -------------------------------------------------------------------------------- /MobileMessaging-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "MMNotifications.h" 14 | #import "MobileMessagingPluginApplicationDelegate.h" 15 | #import "SwiftTryCatch.h" 16 | 17 | FOUNDATION_EXPORT double MobileMessagingVersionNumber; 18 | FOUNDATION_EXPORT const unsigned char MobileMessagingVersionString[]; 19 | -------------------------------------------------------------------------------- /MobileMessaging.modulemap: -------------------------------------------------------------------------------- 1 | framework module MobileMessaging { 2 | umbrella header "MobileMessaging-umbrella.h" 3 | 4 | export * 5 | 6 | explicit module Private { 7 | private header "SwiftTryCatch.h" 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /MobileMessaging.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MobileMessaging.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SPMChatExample/MobileChatExample/MobileChatExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.developer.icloud-container-identifiers 8 | 9 | com.apple.developer.icloud-services 10 | 11 | CloudDocuments 12 | 13 | com.apple.developer.ubiquity-container-identifiers 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.host.url=https://sonar.ib-ci.com 2 | sonar.sources=. 3 | sonar.swift.project=MobileMessaging.xcodeproj 4 | sonar.projectKey=infobip-mobile-messaging-ios 5 | sonar.exclusions=Example/**/*, Example_static/**/*, ChatExample/**/*, InboxExample/**/*, Example_SPM/**/*, SPMChatExample/**/*, sonarqube-generic-coverage.xml, *.sh 6 | sonar.coverageReportPaths=sonarqube-generic-coverage.xml 7 | sonar.swift.swiftlint.report=swiftlint.json 8 | sonar.tests=Example/Tests 9 | 10 | #We exclude c, cpp and objc files from the analysis: we consider ourselves a pure swift project 11 | sonar.c.file.suffixes=- 12 | sonar.cpp.file.suffixes=- 13 | sonar.objc.file.suffixes=- 14 | --------------------------------------------------------------------------------