├── .codebeatignore ├── .gitignore ├── .swiftpm └── xcode │ ├── package.xcworkspace │ └── contents.xcworkspacedata │ └── xcshareddata │ └── xcschemes │ └── CTNotificationService.xcscheme ├── CHANGELOG.md ├── CTNotificationService.podspec ├── CTNotificationService.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── CTNotificationService.xcscheme ├── CTNotificationService ├── .swiftpm │ └── xcode │ │ └── package.xcworkspace │ │ └── contents.xcworkspacedata ├── CTNotificationService.h ├── CTNotificationService.plist ├── CTNotificationServiceExtension.h ├── CTNotificationServiceExtension.m ├── PrivacyInfo.xcprivacy └── include │ ├── CTNotificationService.h │ └── CTNotificationServiceExtension.h ├── Example ├── CTNotificationServiceExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── CTNotificationServiceExample.xcscheme ├── CTNotificationServiceExample.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── CTNotificationServiceExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 100.png │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 167.png │ │ │ ├── 180.png │ │ │ ├── 20.png │ │ │ ├── 29.png │ │ │ ├── 40.png │ │ │ ├── 50.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── logo.imageset │ │ │ ├── Contents.json │ │ │ ├── Logo_Logotype Inverse Dark BG@2x.png │ │ │ └── Logo_Logotype White BG@2x.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── CTNotificationServiceExample.entitlements │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ ├── images │ │ └── logo.png │ └── main.m ├── NotificationService │ ├── Info.plist │ ├── NotificationService.h │ └── NotificationService.m └── Podfile ├── ExampleSwift ├── CTNotificationServiceExampleSwift.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── CTNotificationServiceExampleSwift.xcscheme ├── CTNotificationServiceExampleSwift.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── CTNotificationServiceExampleSwift │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 100.png │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 167.png │ │ │ ├── 180.png │ │ │ ├── 20.png │ │ │ ├── 29.png │ │ │ ├── 40.png │ │ │ ├── 50.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── logo.imageset │ │ │ ├── Contents.json │ │ │ ├── Logo_Logotype Inverse Dark BG@2x.png │ │ │ └── Logo_Logotype White BG@2x.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── CTNotificationServiceExampleSwift.entitlements │ ├── Info.plist │ └── ViewController.swift ├── NotificationService │ ├── Info.plist │ └── NotificationService.swift └── Podfile ├── ExampleSwiftPM ├── CTNotificationServiceExampleSPM.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved ├── CTNotificationServiceExampleSPM │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── 100.png │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 167.png │ │ │ ├── 180.png │ │ │ ├── 20.png │ │ │ ├── 29.png │ │ │ ├── 40.png │ │ │ ├── 50.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── logo.imageset │ │ │ ├── Contents.json │ │ │ ├── Logo_Logotype Inverse Dark BG@2x.png │ │ │ └── Logo_Logotype White BG@2x.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── CTNotificationServiceExampleSPM.entitlements │ ├── Info.plist │ └── ViewController.swift └── NotificationService │ ├── Info.plist │ └── NotificationService.swift ├── LICENSE.txt ├── Package.swift ├── README.md └── images └── service_extension.png /.codebeatignore: -------------------------------------------------------------------------------- 1 | Example/** 2 | ExampleSwift/** 3 | ExampleSwiftPM/** 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | 27 | Example/Podfile.lock 28 | Example/Pods 29 | 30 | ExampleSwift/Podfile.lock 31 | ExampleSwift/Pods 32 | 33 | # Swift Package Manager 34 | Package.resolved 35 | -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.swiftpm/xcode/xcshareddata/xcschemes/CTNotificationService.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Change Log 2 | ========== 3 | Version 0.1.7 (17 April, 2024) 4 | ----------------------------------------------- 5 | - Fixes a build error related to privacy manifests when statically linking the SDK using Cocoapods. 6 | - Fixes the error "Missing an expected key: 'NSPrivacyCollectedDataTypes'" when generating a privacy report. 7 | 8 | Version 0.1.6 (20 March, 2024) 9 | ----------------------------------------------- 10 | - Adds privacy manifests. 11 | 12 | Version 0.1.5 *(22 June, 2022)* 13 | ------------------------------------------- 14 | - Added support for media url having no extension. 15 | 16 | Version 0.1.4 *(2 December, 2021)* 17 | ------------------------------------------- 18 | - Adds support for installation via Swift Package Manager 19 | - Update Starter Applications 20 | 21 | Version 0.1.3 *(28 September, 2020)* 22 | ------------------------------------------- 23 | - Adds support for [Carthage](https://github.com/Carthage/Carthage) 24 | - Update Starter Applications 25 | 26 | Version 0.1.2 *(22 January, 2020)* 27 | ------------------------------------------- 28 | - Replace `FOUNDATION_EXPORT` with extern 29 | 30 | 31 | Version 0.1.1 *(19 September, 2017)* 32 | ------------------------------------------- 33 | 34 | - Update podspec to weak link `UserNotifications` framework to allow safe linking to < iOS 10 targets 35 | 36 | Version 0.1.0 *(28 February, 2017)* 37 | ------------------------------------------- 38 | 39 | - Initial release. 40 | -------------------------------------------------------------------------------- /CTNotificationService.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "CTNotificationService" 3 | s.version = "0.1.7" 4 | s.summary = "A simple Notification Service Extension class to add media attachments to iOS 10 rich push notifications." 5 | s.homepage = "https://github.com/CleverTap/CTNotificationService" 6 | s.license = "MIT" 7 | s.author = { "CleverTap" => "http://www.clevertap.com" } 8 | s.source = { :git => "https://github.com/CleverTap/CTNotificationService.git", :tag => s.version.to_s } 9 | s.requires_arc = true 10 | s.platform = :ios, '10.0' 11 | s.weak_frameworks = 'UserNotifications' 12 | s.source_files = 'CTNotificationService/*.{m,h}' 13 | s.resource_bundles = { 'CTNotificationService' => 'CTNotificationService/*.{xcprivacy}' } 14 | end 15 | -------------------------------------------------------------------------------- /CTNotificationService.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3210E7272BA345FB00C44F19 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 3210E7262BA345FB00C44F19 /* PrivacyInfo.xcprivacy */; }; 11 | 526389281E64F6D300C8F9B1 /* CTNotificationService.h in Headers */ = {isa = PBXBuildFile; fileRef = 526389261E64F6D300C8F9B1 /* CTNotificationService.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 526389301E64FB1C00C8F9B1 /* CTNotificationServiceExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 5263892E1E64FB1C00C8F9B1 /* CTNotificationServiceExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 526389311E64FB1C00C8F9B1 /* CTNotificationServiceExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 5263892F1E64FB1C00C8F9B1 /* CTNotificationServiceExtension.m */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | 3210E7262BA345FB00C44F19 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 18 | 526389231E64F6D300C8F9B1 /* CTNotificationService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CTNotificationService.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | 526389261E64F6D300C8F9B1 /* CTNotificationService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTNotificationService.h; sourceTree = ""; }; 20 | 526389271E64F6D300C8F9B1 /* CTNotificationService.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = CTNotificationService.plist; sourceTree = ""; }; 21 | 5263892E1E64FB1C00C8F9B1 /* CTNotificationServiceExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTNotificationServiceExtension.h; sourceTree = ""; }; 22 | 5263892F1E64FB1C00C8F9B1 /* CTNotificationServiceExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTNotificationServiceExtension.m; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | 5263891F1E64F6D300C8F9B1 /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | 526389191E64F6D300C8F9B1 = { 37 | isa = PBXGroup; 38 | children = ( 39 | 526389251E64F6D300C8F9B1 /* CTNotificationService */, 40 | 526389241E64F6D300C8F9B1 /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | 526389241E64F6D300C8F9B1 /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | 526389231E64F6D300C8F9B1 /* CTNotificationService.framework */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | 526389251E64F6D300C8F9B1 /* CTNotificationService */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | 3210E7262BA345FB00C44F19 /* PrivacyInfo.xcprivacy */, 56 | 526389261E64F6D300C8F9B1 /* CTNotificationService.h */, 57 | 5263892E1E64FB1C00C8F9B1 /* CTNotificationServiceExtension.h */, 58 | 5263892F1E64FB1C00C8F9B1 /* CTNotificationServiceExtension.m */, 59 | 526389271E64F6D300C8F9B1 /* CTNotificationService.plist */, 60 | ); 61 | path = CTNotificationService; 62 | sourceTree = ""; 63 | }; 64 | /* End PBXGroup section */ 65 | 66 | /* Begin PBXHeadersBuildPhase section */ 67 | 526389201E64F6D300C8F9B1 /* Headers */ = { 68 | isa = PBXHeadersBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | 526389301E64FB1C00C8F9B1 /* CTNotificationServiceExtension.h in Headers */, 72 | 526389281E64F6D300C8F9B1 /* CTNotificationService.h in Headers */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXHeadersBuildPhase section */ 77 | 78 | /* Begin PBXNativeTarget section */ 79 | 526389221E64F6D300C8F9B1 /* CTNotificationService */ = { 80 | isa = PBXNativeTarget; 81 | buildConfigurationList = 5263892B1E64F6D300C8F9B1 /* Build configuration list for PBXNativeTarget "CTNotificationService" */; 82 | buildPhases = ( 83 | 5263891E1E64F6D300C8F9B1 /* Sources */, 84 | 5263891F1E64F6D300C8F9B1 /* Frameworks */, 85 | 526389201E64F6D300C8F9B1 /* Headers */, 86 | 526389211E64F6D300C8F9B1 /* Resources */, 87 | ); 88 | buildRules = ( 89 | ); 90 | dependencies = ( 91 | ); 92 | name = CTNotificationService; 93 | productName = CTNotificationService; 94 | productReference = 526389231E64F6D300C8F9B1 /* CTNotificationService.framework */; 95 | productType = "com.apple.product-type.framework"; 96 | }; 97 | /* End PBXNativeTarget section */ 98 | 99 | /* Begin PBXProject section */ 100 | 5263891A1E64F6D300C8F9B1 /* Project object */ = { 101 | isa = PBXProject; 102 | attributes = { 103 | LastUpgradeCheck = 1250; 104 | ORGANIZATIONNAME = CleverTap; 105 | TargetAttributes = { 106 | 526389221E64F6D300C8F9B1 = { 107 | CreatedOnToolsVersion = 8.2.1; 108 | ProvisioningStyle = Manual; 109 | }; 110 | }; 111 | }; 112 | buildConfigurationList = 5263891D1E64F6D300C8F9B1 /* Build configuration list for PBXProject "CTNotificationService" */; 113 | compatibilityVersion = "Xcode 9.3"; 114 | developmentRegion = en; 115 | hasScannedForEncodings = 0; 116 | knownRegions = ( 117 | en, 118 | Base, 119 | ); 120 | mainGroup = 526389191E64F6D300C8F9B1; 121 | productRefGroup = 526389241E64F6D300C8F9B1 /* Products */; 122 | projectDirPath = ""; 123 | projectRoot = ""; 124 | targets = ( 125 | 526389221E64F6D300C8F9B1 /* CTNotificationService */, 126 | ); 127 | }; 128 | /* End PBXProject section */ 129 | 130 | /* Begin PBXResourcesBuildPhase section */ 131 | 526389211E64F6D300C8F9B1 /* Resources */ = { 132 | isa = PBXResourcesBuildPhase; 133 | buildActionMask = 2147483647; 134 | files = ( 135 | 3210E7272BA345FB00C44F19 /* PrivacyInfo.xcprivacy in Resources */, 136 | ); 137 | runOnlyForDeploymentPostprocessing = 0; 138 | }; 139 | /* End PBXResourcesBuildPhase section */ 140 | 141 | /* Begin PBXSourcesBuildPhase section */ 142 | 5263891E1E64F6D300C8F9B1 /* Sources */ = { 143 | isa = PBXSourcesBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | 526389311E64FB1C00C8F9B1 /* CTNotificationServiceExtension.m in Sources */, 147 | ); 148 | runOnlyForDeploymentPostprocessing = 0; 149 | }; 150 | /* End PBXSourcesBuildPhase section */ 151 | 152 | /* Begin XCBuildConfiguration section */ 153 | 526389291E64F6D300C8F9B1 /* Debug */ = { 154 | isa = XCBuildConfiguration; 155 | buildSettings = { 156 | ALWAYS_SEARCH_USER_PATHS = NO; 157 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 158 | CLANG_ANALYZER_NONNULL = YES; 159 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 160 | CLANG_CXX_LIBRARY = "libc++"; 161 | CLANG_ENABLE_MODULES = YES; 162 | CLANG_ENABLE_OBJC_ARC = YES; 163 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 164 | CLANG_WARN_BOOL_CONVERSION = YES; 165 | CLANG_WARN_COMMA = YES; 166 | CLANG_WARN_CONSTANT_CONVERSION = YES; 167 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 168 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 169 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 170 | CLANG_WARN_EMPTY_BODY = YES; 171 | CLANG_WARN_ENUM_CONVERSION = YES; 172 | CLANG_WARN_INFINITE_RECURSION = YES; 173 | CLANG_WARN_INT_CONVERSION = YES; 174 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 175 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 176 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 177 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 178 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 179 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 180 | CLANG_WARN_STRICT_PROTOTYPES = YES; 181 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 182 | CLANG_WARN_UNREACHABLE_CODE = YES; 183 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 184 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 185 | COPY_PHASE_STRIP = NO; 186 | CURRENT_PROJECT_VERSION = 1; 187 | DEBUG_INFORMATION_FORMAT = dwarf; 188 | ENABLE_STRICT_OBJC_MSGSEND = YES; 189 | ENABLE_TESTABILITY = YES; 190 | GCC_C_LANGUAGE_STANDARD = gnu99; 191 | GCC_DYNAMIC_NO_PIC = NO; 192 | GCC_NO_COMMON_BLOCKS = YES; 193 | GCC_OPTIMIZATION_LEVEL = 0; 194 | GCC_PREPROCESSOR_DEFINITIONS = ( 195 | "DEBUG=1", 196 | "$(inherited)", 197 | ); 198 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 199 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 200 | GCC_WARN_UNDECLARED_SELECTOR = YES; 201 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 202 | GCC_WARN_UNUSED_FUNCTION = YES; 203 | GCC_WARN_UNUSED_VARIABLE = YES; 204 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 205 | MTL_ENABLE_DEBUG_INFO = YES; 206 | ONLY_ACTIVE_ARCH = YES; 207 | SDKROOT = iphoneos; 208 | TARGETED_DEVICE_FAMILY = "1,2"; 209 | VERSIONING_SYSTEM = "apple-generic"; 210 | VERSION_INFO_PREFIX = ""; 211 | }; 212 | name = Debug; 213 | }; 214 | 5263892A1E64F6D300C8F9B1 /* Release */ = { 215 | isa = XCBuildConfiguration; 216 | buildSettings = { 217 | ALWAYS_SEARCH_USER_PATHS = NO; 218 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 219 | CLANG_ANALYZER_NONNULL = YES; 220 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 221 | CLANG_CXX_LIBRARY = "libc++"; 222 | CLANG_ENABLE_MODULES = YES; 223 | CLANG_ENABLE_OBJC_ARC = YES; 224 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 225 | CLANG_WARN_BOOL_CONVERSION = YES; 226 | CLANG_WARN_COMMA = YES; 227 | CLANG_WARN_CONSTANT_CONVERSION = YES; 228 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 229 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 230 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 231 | CLANG_WARN_EMPTY_BODY = YES; 232 | CLANG_WARN_ENUM_CONVERSION = YES; 233 | CLANG_WARN_INFINITE_RECURSION = YES; 234 | CLANG_WARN_INT_CONVERSION = YES; 235 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 236 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 237 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 238 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 239 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNREACHABLE_CODE = YES; 244 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 245 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 246 | COPY_PHASE_STRIP = NO; 247 | CURRENT_PROJECT_VERSION = 1; 248 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 249 | ENABLE_NS_ASSERTIONS = NO; 250 | ENABLE_STRICT_OBJC_MSGSEND = YES; 251 | GCC_C_LANGUAGE_STANDARD = gnu99; 252 | GCC_NO_COMMON_BLOCKS = YES; 253 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 254 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 255 | GCC_WARN_UNDECLARED_SELECTOR = YES; 256 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 257 | GCC_WARN_UNUSED_FUNCTION = YES; 258 | GCC_WARN_UNUSED_VARIABLE = YES; 259 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 260 | MTL_ENABLE_DEBUG_INFO = NO; 261 | SDKROOT = iphoneos; 262 | TARGETED_DEVICE_FAMILY = "1,2"; 263 | VALIDATE_PRODUCT = YES; 264 | VERSIONING_SYSTEM = "apple-generic"; 265 | VERSION_INFO_PREFIX = ""; 266 | }; 267 | name = Release; 268 | }; 269 | 5263892C1E64F6D300C8F9B1 /* Debug */ = { 270 | isa = XCBuildConfiguration; 271 | buildSettings = { 272 | APPLICATION_EXTENSION_API_ONLY = YES; 273 | CODE_SIGN_IDENTITY = ""; 274 | CODE_SIGN_STYLE = Manual; 275 | DEFINES_MODULE = YES; 276 | DEVELOPMENT_TEAM = ""; 277 | DYLIB_COMPATIBILITY_VERSION = 1; 278 | DYLIB_CURRENT_VERSION = 1; 279 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 280 | INFOPLIST_FILE = CTNotificationService/CTNotificationService.plist; 281 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 282 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 283 | LD_RUNPATH_SEARCH_PATHS = ( 284 | "$(inherited)", 285 | "@executable_path/Frameworks", 286 | "@loader_path/Frameworks", 287 | ); 288 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationService; 289 | PRODUCT_NAME = "$(TARGET_NAME)"; 290 | PROVISIONING_PROFILE_SPECIFIER = ""; 291 | "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = ""; 292 | SKIP_INSTALL = YES; 293 | }; 294 | name = Debug; 295 | }; 296 | 5263892D1E64F6D300C8F9B1 /* Release */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | APPLICATION_EXTENSION_API_ONLY = YES; 300 | CODE_SIGN_IDENTITY = ""; 301 | CODE_SIGN_STYLE = Manual; 302 | DEFINES_MODULE = YES; 303 | DEVELOPMENT_TEAM = ""; 304 | DYLIB_COMPATIBILITY_VERSION = 1; 305 | DYLIB_CURRENT_VERSION = 1; 306 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 307 | INFOPLIST_FILE = CTNotificationService/CTNotificationService.plist; 308 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 309 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 310 | LD_RUNPATH_SEARCH_PATHS = ( 311 | "$(inherited)", 312 | "@executable_path/Frameworks", 313 | "@loader_path/Frameworks", 314 | ); 315 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationService; 316 | PRODUCT_NAME = "$(TARGET_NAME)"; 317 | PROVISIONING_PROFILE_SPECIFIER = ""; 318 | "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = ""; 319 | SKIP_INSTALL = YES; 320 | }; 321 | name = Release; 322 | }; 323 | /* End XCBuildConfiguration section */ 324 | 325 | /* Begin XCConfigurationList section */ 326 | 5263891D1E64F6D300C8F9B1 /* Build configuration list for PBXProject "CTNotificationService" */ = { 327 | isa = XCConfigurationList; 328 | buildConfigurations = ( 329 | 526389291E64F6D300C8F9B1 /* Debug */, 330 | 5263892A1E64F6D300C8F9B1 /* Release */, 331 | ); 332 | defaultConfigurationIsVisible = 0; 333 | defaultConfigurationName = Release; 334 | }; 335 | 5263892B1E64F6D300C8F9B1 /* Build configuration list for PBXNativeTarget "CTNotificationService" */ = { 336 | isa = XCConfigurationList; 337 | buildConfigurations = ( 338 | 5263892C1E64F6D300C8F9B1 /* Debug */, 339 | 5263892D1E64F6D300C8F9B1 /* Release */, 340 | ); 341 | defaultConfigurationIsVisible = 0; 342 | defaultConfigurationName = Release; 343 | }; 344 | /* End XCConfigurationList section */ 345 | }; 346 | rootObject = 5263891A1E64F6D300C8F9B1 /* Project object */; 347 | } 348 | -------------------------------------------------------------------------------- /CTNotificationService.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CTNotificationService.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CTNotificationService.xcodeproj/xcshareddata/xcschemes/CTNotificationService.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /CTNotificationService/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CTNotificationService/CTNotificationService.h: -------------------------------------------------------------------------------- 1 | 2 | //! Project version number for CTNotificationService. 3 | extern double CTNotificationServiceVersionNumber; 4 | 5 | //! Project version string for CTNotificationService. 6 | extern const unsigned char CTNotificationServiceVersionString[]; 7 | 8 | #import "CTNotificationServiceExtension.h" 9 | -------------------------------------------------------------------------------- /CTNotificationService/CTNotificationService.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 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /CTNotificationService/CTNotificationServiceExtension.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface CTNotificationServiceExtension : UNNotificationServiceExtension 5 | 6 | @property (nonatomic, retain) NSString * _Nullable mediaUrlKey; 7 | @property (nonatomic, retain) NSString * _Nullable mediaTypeKey; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /CTNotificationService/CTNotificationServiceExtension.m: -------------------------------------------------------------------------------- 1 | 2 | #import "CTNotificationServiceExtension.h" 3 | 4 | static NSString * const kMediaUrlKey = @"ct_mediaUrl"; 5 | static NSString * const kMediaTypeKey = @"ct_mediaType"; 6 | 7 | static NSString * const kImage = @"image"; 8 | static NSString * const kVideo = @"video"; 9 | static NSString * const kAudio = @"audio"; 10 | static NSString * const kImageJpeg = @"image/jpeg"; 11 | static NSString * const kImagePng = @"image/png"; 12 | static NSString * const kImageGif = @"image/gif"; 13 | 14 | @interface CTNotificationServiceExtension() 15 | 16 | @property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver); 17 | @property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent; 18 | 19 | @end 20 | 21 | @implementation CTNotificationServiceExtension 22 | 23 | - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { 24 | 25 | self.contentHandler = contentHandler; 26 | self.bestAttemptContent = [request.content mutableCopy]; 27 | 28 | NSDictionary *userInfo = request.content.userInfo; 29 | if (userInfo == nil) { 30 | self.contentHandler(self.bestAttemptContent); 31 | return; 32 | } 33 | 34 | NSString *mediaUrlKey = self.mediaUrlKey ? self.mediaUrlKey : kMediaUrlKey; 35 | NSString *mediaTypeKey = self.mediaTypeKey ? self.mediaTypeKey : kMediaTypeKey; 36 | 37 | NSString *mediaUrl = userInfo[mediaUrlKey]; 38 | NSString *mediaType = userInfo[mediaTypeKey]; 39 | 40 | if (mediaUrl == nil || mediaType == nil) { 41 | #ifdef DEBUG 42 | if (mediaUrl == nil) { 43 | NSLog(@"unable to add attachment: %@ is nil", mediaUrlKey); 44 | } 45 | 46 | if (mediaType == nil) { 47 | NSLog(@"unable to add attachment: %@ is nil", mediaTypeKey); 48 | } 49 | 50 | #endif 51 | self.contentHandler(self.bestAttemptContent); 52 | return; 53 | } 54 | 55 | // load the attachment 56 | [self loadAttachmentForUrlString:mediaUrl 57 | withType:mediaType 58 | completionHandler:^(UNNotificationAttachment *attachment) { 59 | if (attachment) { 60 | self.bestAttemptContent.attachments = [NSArray arrayWithObject:attachment]; 61 | } 62 | self.contentHandler(self.bestAttemptContent); 63 | }]; 64 | 65 | } 66 | 67 | - (void)serviceExtensionTimeWillExpire { 68 | self.contentHandler(self.bestAttemptContent); 69 | } 70 | 71 | - (NSString *)fileExtensionForMediaType:(NSString *)mediaType mimeType:(NSString *)mimeType { 72 | NSString *ext; 73 | 74 | if ([mediaType isEqualToString:kImage]) { 75 | ext = @"jpg"; 76 | } else if ([mediaType isEqualToString:kVideo]) { 77 | ext = @"mp4"; 78 | } else if ([mediaType isEqualToString:kAudio]) { 79 | ext = @"mp3"; 80 | } else { 81 | // If mediaType is none, check for mimeType of url. 82 | if ([mimeType isEqualToString:kImageJpeg]) { 83 | ext = @"jpeg"; 84 | } else if ([mimeType isEqualToString:kImagePng]) { 85 | ext = @"png"; 86 | } else if ([mimeType isEqualToString:kImageGif]) { 87 | ext = @"gif"; 88 | } else { 89 | ext = @""; 90 | } 91 | } 92 | 93 | return [@"." stringByAppendingString:ext]; 94 | } 95 | 96 | - (void)loadAttachmentForUrlString:(NSString *)urlString withType:(NSString *)mediaType 97 | completionHandler:(void(^)(UNNotificationAttachment *))completionHandler { 98 | 99 | __block UNNotificationAttachment *attachment = nil; 100 | NSURL *attachmentURL = [NSURL URLWithString:urlString]; 101 | 102 | NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; 103 | [[session downloadTaskWithURL:attachmentURL 104 | completionHandler:^(NSURL *temporaryFileLocation, NSURLResponse *response, NSError *error) { 105 | if (error != nil) { 106 | #ifdef DEBUG 107 | NSLog(@"unable to add attachment: %@", error.localizedDescription); 108 | #endif 109 | } else { 110 | NSString *fileExt = [self fileExtensionForMediaType:mediaType mimeType:response.MIMEType]; 111 | NSFileManager *fileManager = [NSFileManager defaultManager]; 112 | NSURL *localURL = [NSURL fileURLWithPath:[temporaryFileLocation.path stringByAppendingString:fileExt]]; 113 | [fileManager moveItemAtURL:temporaryFileLocation toURL:localURL error:&error]; 114 | 115 | NSError *attachmentError = nil; 116 | attachment = [UNNotificationAttachment attachmentWithIdentifier:@"" URL:localURL options:nil error:&attachmentError]; 117 | if (attachmentError) { 118 | #ifdef DEBUG 119 | NSLog(@"unable to add attchment: %@", attachmentError.localizedDescription); 120 | #endif 121 | } 122 | } 123 | completionHandler(attachment); 124 | }] resume]; 125 | } 126 | 127 | 128 | @end 129 | -------------------------------------------------------------------------------- /CTNotificationService/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyCollectedDataTypes 6 | 7 | NSPrivacyTracking 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CTNotificationService/include/CTNotificationService.h: -------------------------------------------------------------------------------- 1 | ../CTNotificationService.h -------------------------------------------------------------------------------- /CTNotificationService/include/CTNotificationServiceExtension.h: -------------------------------------------------------------------------------- 1 | ../CTNotificationServiceExtension.h -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample.xcodeproj/xcshareddata/xcschemes/CTNotificationServiceExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (strong, nonatomic) UIWindow *window; 7 | 8 | 9 | @end 10 | 11 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | 2 | #import "AppDelegate.h" 3 | #import 4 | #import 5 | 6 | @interface AppDelegate () 7 | 8 | @end 9 | 10 | @implementation AppDelegate 11 | 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 14 | 15 | [CleverTap autoIntegrate]; 16 | [self registerPush]; 17 | 18 | return YES; 19 | } 20 | 21 | - (void)registerPush { 22 | 23 | UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; 24 | center.delegate = self; 25 | [center requestAuthorizationWithOptions:(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge) completionHandler:^(BOOL granted, NSError * _Nullable error){ 26 | if( granted ){ 27 | dispatch_async(dispatch_get_main_queue(), ^(void) { 28 | [[UIApplication sharedApplication] registerForRemoteNotifications]; 29 | }); 30 | } 31 | }]; 32 | } 33 | 34 | - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler { 35 | NSLog(@"APPDELEGATE: didReceiveRemoteNotification %@", response.notification.request.content.userInfo); 36 | } 37 | 38 | 39 | - (BOOL)application:(UIApplication *)app 40 | openURL:(NSURL *)url 41 | options:(NSDictionary *)options { 42 | 43 | NSLog(@"APPDELEGATE: open url %@", url); 44 | return YES; 45 | } 46 | 47 | - (void)openURL:(NSURL*)url options:(NSDictionary *)options 48 | completionHandler:(void (^ __nullable)(BOOL success))completion { 49 | NSLog(@"APPDELEGATE: openURL:options:completionHandler %@", url); 50 | if (completion) { 51 | completion(YES); 52 | } 53 | } 54 | 55 | - (void)applicationWillResignActive:(UIApplication *)application { 56 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 57 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 58 | } 59 | 60 | - (void)applicationDidEnterBackground:(UIApplication *)application { 61 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 62 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 63 | } 64 | 65 | - (void)applicationWillEnterForeground:(UIApplication *)application { 66 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 67 | } 68 | 69 | - (void)applicationDidBecomeActive:(UIApplication *)application { 70 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 71 | } 72 | 73 | - (void)applicationWillTerminate:(UIApplication *)application { 74 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 75 | } 76 | 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]} -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "idiom" : "universal", 15 | "scale" : "1x" 16 | }, 17 | { 18 | "filename" : "Logo_Logotype White BG@2x.png", 19 | "idiom" : "universal", 20 | "scale" : "2x" 21 | }, 22 | { 23 | "appearances" : [ 24 | { 25 | "appearance" : "luminosity", 26 | "value" : "dark" 27 | } 28 | ], 29 | "filename" : "Logo_Logotype Inverse Dark BG@2x.png", 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "universal", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "appearances" : [ 39 | { 40 | "appearance" : "luminosity", 41 | "value" : "dark" 42 | } 43 | ], 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/logo.imageset/Logo_Logotype Inverse Dark BG@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/logo.imageset/Logo_Logotype Inverse Dark BG@2x.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Assets.xcassets/logo.imageset/Logo_Logotype White BG@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/Assets.xcassets/logo.imageset/Logo_Logotype White BG@2x.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/CTNotificationServiceExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleURLTypes 20 | 21 | 22 | CFBundleURLSchemes 23 | 24 | com.clevertap.ctservice.example 25 | 26 | 27 | 28 | CFBundleVersion 29 | 1 30 | CleverTapAccountID 31 | W69-84R-884Z 32 | CleverTapToken 33 | 24b-c60 34 | LSRequiresIPhoneOS 35 | 36 | UILaunchStoryboardName 37 | LaunchScreen 38 | UIMainStoryboardFile 39 | Main 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UISupportedInterfaceOrientations~ipad 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationPortraitUpsideDown 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/ViewController.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface ViewController : UIViewController 5 | 6 | 7 | @end 8 | 9 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/ViewController.m: -------------------------------------------------------------------------------- 1 | 2 | #import "ViewController.h" 3 | 4 | @interface ViewController () 5 | 6 | 7 | @end 8 | 9 | @implementation ViewController 10 | 11 | - (void)viewDidLoad { 12 | [super viewDidLoad]; 13 | // Do any additional setup after loading the view, typically from a nib. 14 | } 15 | 16 | 17 | - (void)didReceiveMemoryWarning { 18 | [super didReceiveMemoryWarning]; 19 | // Dispose of any resources that can be recreated. 20 | } 21 | 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/Example/CTNotificationServiceExample/images/logo.png -------------------------------------------------------------------------------- /Example/CTNotificationServiceExample/main.m: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Example/NotificationService/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | NotificationService 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 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionPointIdentifier 26 | com.apple.usernotifications.service 27 | NSExtensionPrincipalClass 28 | CTNotificationServiceExtension 29 | 30 | NSAppTransportSecurity 31 | 32 | NSAllowsArbitraryLoads 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Example/NotificationService/NotificationService.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface NotificationService : CTNotificationServiceExtension 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Example/NotificationService/NotificationService.m: -------------------------------------------------------------------------------- 1 | 2 | #import "NotificationService.h" 3 | #import 4 | 5 | @implementation NotificationService 6 | 7 | - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { 8 | 9 | // self.mediaUrlKey = @"myMediaUrlKey"; 10 | // self.mediaTypeKey = @"myMediaTypeKey"; 11 | 12 | [super didReceiveNotificationRequest:request withContentHandler:contentHandler]; 13 | } 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '10.0' 2 | use_frameworks! 3 | 4 | target 'CTNotificationServiceExample' do 5 | pod "CleverTap-iOS-SDK" 6 | end 7 | 8 | target 'NotificationService' do 9 | pod "CTNotificationService", :path =>'../' 10 | pod "CleverTap-iOS-SDK" 11 | end 12 | 13 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 29FDE80639A2D7D1023A5A50 /* Pods_NotificationService.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94D30A5AD37635BC4A38555F /* Pods_NotificationService.framework */; }; 11 | 40AD528EE7FC6D0693D7F292 /* Pods_CTNotificationServiceExampleSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 651892092615F5E70CA04C5D /* Pods_CTNotificationServiceExampleSwift.framework */; }; 12 | 52387AE01E6606F200C63B80 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52387ADF1E6606F200C63B80 /* AppDelegate.swift */; }; 13 | 52387AE21E6606F200C63B80 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52387AE11E6606F200C63B80 /* ViewController.swift */; }; 14 | 52387AE51E6606F200C63B80 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52387AE31E6606F200C63B80 /* Main.storyboard */; }; 15 | 52387AE71E6606F200C63B80 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 52387AE61E6606F200C63B80 /* Assets.xcassets */; }; 16 | 52387AEA1E6606F200C63B80 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52387AE81E6606F200C63B80 /* LaunchScreen.storyboard */; }; 17 | 52387AF81E66078B00C63B80 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52387AF71E66078B00C63B80 /* NotificationService.swift */; }; 18 | 52387AFC1E66078B00C63B80 /* NotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 52387AF51E66078B00C63B80 /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 52387AFA1E66078B00C63B80 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 52387AD41E6606F200C63B80 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 52387AF41E66078B00C63B80; 27 | remoteInfo = NotificationService; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXCopyFilesBuildPhase section */ 32 | 52387B001E66078B00C63B80 /* Embed App Extensions */ = { 33 | isa = PBXCopyFilesBuildPhase; 34 | buildActionMask = 2147483647; 35 | dstPath = ""; 36 | dstSubfolderSpec = 13; 37 | files = ( 38 | 52387AFC1E66078B00C63B80 /* NotificationService.appex in Embed App Extensions */, 39 | ); 40 | name = "Embed App Extensions"; 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXCopyFilesBuildPhase section */ 44 | 45 | /* Begin PBXFileReference section */ 46 | 277DFAA4A303CF315443E45E /* Pods-NotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.debug.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.debug.xcconfig"; sourceTree = ""; }; 47 | 43B694190C5A47E47FC68914 /* Pods-NotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.release.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.release.xcconfig"; sourceTree = ""; }; 48 | 52387ADC1E6606F200C63B80 /* CTNotificationServiceExampleSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CTNotificationServiceExampleSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 52387ADF1E6606F200C63B80 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 50 | 52387AE11E6606F200C63B80 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 51 | 52387AE41E6606F200C63B80 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 52 | 52387AE61E6606F200C63B80 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 53 | 52387AE91E6606F200C63B80 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 54 | 52387AEB1E6606F200C63B80 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 52387AF51E66078B00C63B80 /* NotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 52387AF71E66078B00C63B80 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = ""; }; 57 | 52387AF91E66078B00C63B80 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 52387B041E66096600C63B80 /* CTNotificationServiceExampleSwift.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CTNotificationServiceExampleSwift.entitlements; sourceTree = ""; }; 59 | 651892092615F5E70CA04C5D /* Pods_CTNotificationServiceExampleSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CTNotificationServiceExampleSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 94D30A5AD37635BC4A38555F /* Pods_NotificationService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotificationService.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | E4577CCC02463260EF90786F /* Pods-CTNotificationServiceExampleSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CTNotificationServiceExampleSwift.debug.xcconfig"; path = "Target Support Files/Pods-CTNotificationServiceExampleSwift/Pods-CTNotificationServiceExampleSwift.debug.xcconfig"; sourceTree = ""; }; 62 | FDDA2B6482169F585F9F5A5E /* Pods-CTNotificationServiceExampleSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CTNotificationServiceExampleSwift.release.xcconfig"; path = "Target Support Files/Pods-CTNotificationServiceExampleSwift/Pods-CTNotificationServiceExampleSwift.release.xcconfig"; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 52387AD91E6606F200C63B80 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | 40AD528EE7FC6D0693D7F292 /* Pods_CTNotificationServiceExampleSwift.framework in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 52387AF21E66078B00C63B80 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | 29FDE80639A2D7D1023A5A50 /* Pods_NotificationService.framework in Frameworks */, 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | /* End PBXFrameworksBuildPhase section */ 83 | 84 | /* Begin PBXGroup section */ 85 | 52387AD31E6606F200C63B80 = { 86 | isa = PBXGroup; 87 | children = ( 88 | 52387ADE1E6606F200C63B80 /* CTNotificationServiceExampleSwift */, 89 | 52387AF61E66078B00C63B80 /* NotificationService */, 90 | 52387ADD1E6606F200C63B80 /* Products */, 91 | 8FF75E6CB2F5EE41906EF303 /* Pods */, 92 | E2ED8AB55168D2C6BC82D2F8 /* Frameworks */, 93 | ); 94 | sourceTree = ""; 95 | }; 96 | 52387ADD1E6606F200C63B80 /* Products */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 52387ADC1E6606F200C63B80 /* CTNotificationServiceExampleSwift.app */, 100 | 52387AF51E66078B00C63B80 /* NotificationService.appex */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 52387ADE1E6606F200C63B80 /* CTNotificationServiceExampleSwift */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 52387B041E66096600C63B80 /* CTNotificationServiceExampleSwift.entitlements */, 109 | 52387ADF1E6606F200C63B80 /* AppDelegate.swift */, 110 | 52387AE11E6606F200C63B80 /* ViewController.swift */, 111 | 52387AE31E6606F200C63B80 /* Main.storyboard */, 112 | 52387AE61E6606F200C63B80 /* Assets.xcassets */, 113 | 52387AE81E6606F200C63B80 /* LaunchScreen.storyboard */, 114 | 52387AEB1E6606F200C63B80 /* Info.plist */, 115 | ); 116 | path = CTNotificationServiceExampleSwift; 117 | sourceTree = ""; 118 | }; 119 | 52387AF61E66078B00C63B80 /* NotificationService */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 52387AF71E66078B00C63B80 /* NotificationService.swift */, 123 | 52387AF91E66078B00C63B80 /* Info.plist */, 124 | ); 125 | path = NotificationService; 126 | sourceTree = ""; 127 | }; 128 | 8FF75E6CB2F5EE41906EF303 /* Pods */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | E4577CCC02463260EF90786F /* Pods-CTNotificationServiceExampleSwift.debug.xcconfig */, 132 | FDDA2B6482169F585F9F5A5E /* Pods-CTNotificationServiceExampleSwift.release.xcconfig */, 133 | 277DFAA4A303CF315443E45E /* Pods-NotificationService.debug.xcconfig */, 134 | 43B694190C5A47E47FC68914 /* Pods-NotificationService.release.xcconfig */, 135 | ); 136 | path = Pods; 137 | sourceTree = ""; 138 | }; 139 | E2ED8AB55168D2C6BC82D2F8 /* Frameworks */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 651892092615F5E70CA04C5D /* Pods_CTNotificationServiceExampleSwift.framework */, 143 | 94D30A5AD37635BC4A38555F /* Pods_NotificationService.framework */, 144 | ); 145 | name = Frameworks; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | 52387ADB1E6606F200C63B80 /* CTNotificationServiceExampleSwift */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 52387AEE1E6606F200C63B80 /* Build configuration list for PBXNativeTarget "CTNotificationServiceExampleSwift" */; 154 | buildPhases = ( 155 | CCEA5AFD94D54B19ACD0FFE8 /* [CP] Check Pods Manifest.lock */, 156 | 52387AD81E6606F200C63B80 /* Sources */, 157 | 52387AD91E6606F200C63B80 /* Frameworks */, 158 | 52387ADA1E6606F200C63B80 /* Resources */, 159 | 52387B001E66078B00C63B80 /* Embed App Extensions */, 160 | 9CFCF5DD01D9FE6291426C1E /* [CP] Embed Pods Frameworks */, 161 | ); 162 | buildRules = ( 163 | ); 164 | dependencies = ( 165 | 52387AFB1E66078B00C63B80 /* PBXTargetDependency */, 166 | ); 167 | name = CTNotificationServiceExampleSwift; 168 | productName = CTNotificationServiceExampleSwift; 169 | productReference = 52387ADC1E6606F200C63B80 /* CTNotificationServiceExampleSwift.app */; 170 | productType = "com.apple.product-type.application"; 171 | }; 172 | 52387AF41E66078B00C63B80 /* NotificationService */ = { 173 | isa = PBXNativeTarget; 174 | buildConfigurationList = 52387AFD1E66078B00C63B80 /* Build configuration list for PBXNativeTarget "NotificationService" */; 175 | buildPhases = ( 176 | B6AD8DD2D6116536EE890DA5 /* [CP] Check Pods Manifest.lock */, 177 | 52387AF11E66078B00C63B80 /* Sources */, 178 | 52387AF21E66078B00C63B80 /* Frameworks */, 179 | 52387AF31E66078B00C63B80 /* Resources */, 180 | ); 181 | buildRules = ( 182 | ); 183 | dependencies = ( 184 | ); 185 | name = NotificationService; 186 | productName = NotificationService; 187 | productReference = 52387AF51E66078B00C63B80 /* NotificationService.appex */; 188 | productType = "com.apple.product-type.app-extension"; 189 | }; 190 | /* End PBXNativeTarget section */ 191 | 192 | /* Begin PBXProject section */ 193 | 52387AD41E6606F200C63B80 /* Project object */ = { 194 | isa = PBXProject; 195 | attributes = { 196 | LastSwiftUpdateCheck = 0820; 197 | LastUpgradeCheck = 1120; 198 | ORGANIZATIONNAME = CleverTap; 199 | TargetAttributes = { 200 | 52387ADB1E6606F200C63B80 = { 201 | CreatedOnToolsVersion = 8.2.1; 202 | DevelopmentTeam = A5J34NR598; 203 | ProvisioningStyle = Automatic; 204 | SystemCapabilities = { 205 | com.apple.Push = { 206 | enabled = 1; 207 | }; 208 | }; 209 | }; 210 | 52387AF41E66078B00C63B80 = { 211 | CreatedOnToolsVersion = 8.2.1; 212 | DevelopmentTeam = A5J34NR598; 213 | ProvisioningStyle = Automatic; 214 | }; 215 | }; 216 | }; 217 | buildConfigurationList = 52387AD71E6606F200C63B80 /* Build configuration list for PBXProject "CTNotificationServiceExampleSwift" */; 218 | compatibilityVersion = "Xcode 10.0"; 219 | developmentRegion = English; 220 | hasScannedForEncodings = 0; 221 | knownRegions = ( 222 | English, 223 | en, 224 | Base, 225 | ); 226 | mainGroup = 52387AD31E6606F200C63B80; 227 | productRefGroup = 52387ADD1E6606F200C63B80 /* Products */; 228 | projectDirPath = ""; 229 | projectRoot = ""; 230 | targets = ( 231 | 52387ADB1E6606F200C63B80 /* CTNotificationServiceExampleSwift */, 232 | 52387AF41E66078B00C63B80 /* NotificationService */, 233 | ); 234 | }; 235 | /* End PBXProject section */ 236 | 237 | /* Begin PBXResourcesBuildPhase section */ 238 | 52387ADA1E6606F200C63B80 /* Resources */ = { 239 | isa = PBXResourcesBuildPhase; 240 | buildActionMask = 2147483647; 241 | files = ( 242 | 52387AEA1E6606F200C63B80 /* LaunchScreen.storyboard in Resources */, 243 | 52387AE71E6606F200C63B80 /* Assets.xcassets in Resources */, 244 | 52387AE51E6606F200C63B80 /* Main.storyboard in Resources */, 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | 52387AF31E66078B00C63B80 /* Resources */ = { 249 | isa = PBXResourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | /* End PBXResourcesBuildPhase section */ 256 | 257 | /* Begin PBXShellScriptBuildPhase section */ 258 | 9CFCF5DD01D9FE6291426C1E /* [CP] Embed Pods Frameworks */ = { 259 | isa = PBXShellScriptBuildPhase; 260 | buildActionMask = 2147483647; 261 | files = ( 262 | ); 263 | inputFileListPaths = ( 264 | "${PODS_ROOT}/Target Support Files/Pods-CTNotificationServiceExampleSwift/Pods-CTNotificationServiceExampleSwift-frameworks-${CONFIGURATION}-input-files.xcfilelist", 265 | ); 266 | name = "[CP] Embed Pods Frameworks"; 267 | outputFileListPaths = ( 268 | "${PODS_ROOT}/Target Support Files/Pods-CTNotificationServiceExampleSwift/Pods-CTNotificationServiceExampleSwift-frameworks-${CONFIGURATION}-output-files.xcfilelist", 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | shellPath = /bin/sh; 272 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CTNotificationServiceExampleSwift/Pods-CTNotificationServiceExampleSwift-frameworks.sh\"\n"; 273 | showEnvVarsInLog = 0; 274 | }; 275 | B6AD8DD2D6116536EE890DA5 /* [CP] Check Pods Manifest.lock */ = { 276 | isa = PBXShellScriptBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | ); 280 | inputFileListPaths = ( 281 | ); 282 | inputPaths = ( 283 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 284 | "${PODS_ROOT}/Manifest.lock", 285 | ); 286 | name = "[CP] Check Pods Manifest.lock"; 287 | outputFileListPaths = ( 288 | ); 289 | outputPaths = ( 290 | "$(DERIVED_FILE_DIR)/Pods-NotificationService-checkManifestLockResult.txt", 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | shellPath = /bin/sh; 294 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 295 | showEnvVarsInLog = 0; 296 | }; 297 | CCEA5AFD94D54B19ACD0FFE8 /* [CP] Check Pods Manifest.lock */ = { 298 | isa = PBXShellScriptBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | ); 302 | inputFileListPaths = ( 303 | ); 304 | inputPaths = ( 305 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 306 | "${PODS_ROOT}/Manifest.lock", 307 | ); 308 | name = "[CP] Check Pods Manifest.lock"; 309 | outputFileListPaths = ( 310 | ); 311 | outputPaths = ( 312 | "$(DERIVED_FILE_DIR)/Pods-CTNotificationServiceExampleSwift-checkManifestLockResult.txt", 313 | ); 314 | runOnlyForDeploymentPostprocessing = 0; 315 | shellPath = /bin/sh; 316 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 317 | showEnvVarsInLog = 0; 318 | }; 319 | /* End PBXShellScriptBuildPhase section */ 320 | 321 | /* Begin PBXSourcesBuildPhase section */ 322 | 52387AD81E6606F200C63B80 /* Sources */ = { 323 | isa = PBXSourcesBuildPhase; 324 | buildActionMask = 2147483647; 325 | files = ( 326 | 52387AE21E6606F200C63B80 /* ViewController.swift in Sources */, 327 | 52387AE01E6606F200C63B80 /* AppDelegate.swift in Sources */, 328 | ); 329 | runOnlyForDeploymentPostprocessing = 0; 330 | }; 331 | 52387AF11E66078B00C63B80 /* Sources */ = { 332 | isa = PBXSourcesBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | 52387AF81E66078B00C63B80 /* NotificationService.swift in Sources */, 336 | ); 337 | runOnlyForDeploymentPostprocessing = 0; 338 | }; 339 | /* End PBXSourcesBuildPhase section */ 340 | 341 | /* Begin PBXTargetDependency section */ 342 | 52387AFB1E66078B00C63B80 /* PBXTargetDependency */ = { 343 | isa = PBXTargetDependency; 344 | target = 52387AF41E66078B00C63B80 /* NotificationService */; 345 | targetProxy = 52387AFA1E66078B00C63B80 /* PBXContainerItemProxy */; 346 | }; 347 | /* End PBXTargetDependency section */ 348 | 349 | /* Begin PBXVariantGroup section */ 350 | 52387AE31E6606F200C63B80 /* Main.storyboard */ = { 351 | isa = PBXVariantGroup; 352 | children = ( 353 | 52387AE41E6606F200C63B80 /* Base */, 354 | ); 355 | name = Main.storyboard; 356 | sourceTree = ""; 357 | }; 358 | 52387AE81E6606F200C63B80 /* LaunchScreen.storyboard */ = { 359 | isa = PBXVariantGroup; 360 | children = ( 361 | 52387AE91E6606F200C63B80 /* Base */, 362 | ); 363 | name = LaunchScreen.storyboard; 364 | sourceTree = ""; 365 | }; 366 | /* End PBXVariantGroup section */ 367 | 368 | /* Begin XCBuildConfiguration section */ 369 | 52387AEC1E6606F200C63B80 /* Debug */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ALWAYS_SEARCH_USER_PATHS = NO; 373 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 374 | CLANG_ANALYZER_NONNULL = YES; 375 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 376 | CLANG_CXX_LIBRARY = "libc++"; 377 | CLANG_ENABLE_MODULES = YES; 378 | CLANG_ENABLE_OBJC_ARC = YES; 379 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 380 | CLANG_WARN_BOOL_CONVERSION = YES; 381 | CLANG_WARN_COMMA = YES; 382 | CLANG_WARN_CONSTANT_CONVERSION = YES; 383 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 384 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 385 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 386 | CLANG_WARN_EMPTY_BODY = YES; 387 | CLANG_WARN_ENUM_CONVERSION = YES; 388 | CLANG_WARN_INFINITE_RECURSION = YES; 389 | CLANG_WARN_INT_CONVERSION = YES; 390 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 391 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 392 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 393 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 394 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 395 | CLANG_WARN_STRICT_PROTOTYPES = YES; 396 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 397 | CLANG_WARN_UNREACHABLE_CODE = YES; 398 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 399 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 400 | COPY_PHASE_STRIP = NO; 401 | DEBUG_INFORMATION_FORMAT = dwarf; 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | ENABLE_TESTABILITY = YES; 404 | GCC_C_LANGUAGE_STANDARD = gnu99; 405 | GCC_DYNAMIC_NO_PIC = NO; 406 | GCC_NO_COMMON_BLOCKS = YES; 407 | GCC_OPTIMIZATION_LEVEL = 0; 408 | GCC_PREPROCESSOR_DEFINITIONS = ( 409 | "DEBUG=1", 410 | "$(inherited)", 411 | ); 412 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 413 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 414 | GCC_WARN_UNDECLARED_SELECTOR = YES; 415 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 416 | GCC_WARN_UNUSED_FUNCTION = YES; 417 | GCC_WARN_UNUSED_VARIABLE = YES; 418 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 419 | MTL_ENABLE_DEBUG_INFO = YES; 420 | ONLY_ACTIVE_ARCH = YES; 421 | SDKROOT = iphoneos; 422 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 423 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 424 | TARGETED_DEVICE_FAMILY = "1,2"; 425 | }; 426 | name = Debug; 427 | }; 428 | 52387AED1E6606F200C63B80 /* Release */ = { 429 | isa = XCBuildConfiguration; 430 | buildSettings = { 431 | ALWAYS_SEARCH_USER_PATHS = NO; 432 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 433 | CLANG_ANALYZER_NONNULL = YES; 434 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 435 | CLANG_CXX_LIBRARY = "libc++"; 436 | CLANG_ENABLE_MODULES = YES; 437 | CLANG_ENABLE_OBJC_ARC = YES; 438 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 439 | CLANG_WARN_BOOL_CONVERSION = YES; 440 | CLANG_WARN_COMMA = YES; 441 | CLANG_WARN_CONSTANT_CONVERSION = YES; 442 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 443 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 444 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 445 | CLANG_WARN_EMPTY_BODY = YES; 446 | CLANG_WARN_ENUM_CONVERSION = YES; 447 | CLANG_WARN_INFINITE_RECURSION = YES; 448 | CLANG_WARN_INT_CONVERSION = YES; 449 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 450 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 451 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 452 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 453 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 454 | CLANG_WARN_STRICT_PROTOTYPES = YES; 455 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 456 | CLANG_WARN_UNREACHABLE_CODE = YES; 457 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 458 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 459 | COPY_PHASE_STRIP = NO; 460 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 461 | ENABLE_NS_ASSERTIONS = NO; 462 | ENABLE_STRICT_OBJC_MSGSEND = YES; 463 | GCC_C_LANGUAGE_STANDARD = gnu99; 464 | GCC_NO_COMMON_BLOCKS = YES; 465 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 466 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 467 | GCC_WARN_UNDECLARED_SELECTOR = YES; 468 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 469 | GCC_WARN_UNUSED_FUNCTION = YES; 470 | GCC_WARN_UNUSED_VARIABLE = YES; 471 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 472 | MTL_ENABLE_DEBUG_INFO = NO; 473 | SDKROOT = iphoneos; 474 | SWIFT_COMPILATION_MODE = wholemodule; 475 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 476 | TARGETED_DEVICE_FAMILY = "1,2"; 477 | VALIDATE_PRODUCT = YES; 478 | }; 479 | name = Release; 480 | }; 481 | 52387AEF1E6606F200C63B80 /* Debug */ = { 482 | isa = XCBuildConfiguration; 483 | baseConfigurationReference = E4577CCC02463260EF90786F /* Pods-CTNotificationServiceExampleSwift.debug.xcconfig */; 484 | buildSettings = { 485 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 486 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 487 | CODE_SIGN_ENTITLEMENTS = CTNotificationServiceExampleSwift/CTNotificationServiceExampleSwift.entitlements; 488 | DEVELOPMENT_TEAM = A5J34NR598; 489 | INFOPLIST_FILE = CTNotificationServiceExampleSwift/Info.plist; 490 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 491 | LD_RUNPATH_SEARCH_PATHS = ( 492 | "$(inherited)", 493 | "@executable_path/Frameworks", 494 | ); 495 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationServiceExample; 496 | PRODUCT_NAME = "$(TARGET_NAME)"; 497 | SWIFT_OBJC_BRIDGING_HEADER = ""; 498 | SWIFT_VERSION = 5.0; 499 | }; 500 | name = Debug; 501 | }; 502 | 52387AF01E6606F200C63B80 /* Release */ = { 503 | isa = XCBuildConfiguration; 504 | baseConfigurationReference = FDDA2B6482169F585F9F5A5E /* Pods-CTNotificationServiceExampleSwift.release.xcconfig */; 505 | buildSettings = { 506 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 507 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 508 | CODE_SIGN_ENTITLEMENTS = CTNotificationServiceExampleSwift/CTNotificationServiceExampleSwift.entitlements; 509 | DEVELOPMENT_TEAM = A5J34NR598; 510 | INFOPLIST_FILE = CTNotificationServiceExampleSwift/Info.plist; 511 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 512 | LD_RUNPATH_SEARCH_PATHS = ( 513 | "$(inherited)", 514 | "@executable_path/Frameworks", 515 | ); 516 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationServiceExample; 517 | PRODUCT_NAME = "$(TARGET_NAME)"; 518 | SWIFT_OBJC_BRIDGING_HEADER = ""; 519 | SWIFT_VERSION = 5.0; 520 | }; 521 | name = Release; 522 | }; 523 | 52387AFE1E66078B00C63B80 /* Debug */ = { 524 | isa = XCBuildConfiguration; 525 | baseConfigurationReference = 277DFAA4A303CF315443E45E /* Pods-NotificationService.debug.xcconfig */; 526 | buildSettings = { 527 | DEVELOPMENT_TEAM = A5J34NR598; 528 | INFOPLIST_FILE = NotificationService/Info.plist; 529 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 530 | LD_RUNPATH_SEARCH_PATHS = ( 531 | "$(inherited)", 532 | "@executable_path/Frameworks", 533 | "@executable_path/../../Frameworks", 534 | ); 535 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationServiceExample.NotificationService; 536 | PRODUCT_NAME = "$(TARGET_NAME)"; 537 | SKIP_INSTALL = YES; 538 | SWIFT_VERSION = 5.0; 539 | }; 540 | name = Debug; 541 | }; 542 | 52387AFF1E66078B00C63B80 /* Release */ = { 543 | isa = XCBuildConfiguration; 544 | baseConfigurationReference = 43B694190C5A47E47FC68914 /* Pods-NotificationService.release.xcconfig */; 545 | buildSettings = { 546 | DEVELOPMENT_TEAM = A5J34NR598; 547 | INFOPLIST_FILE = NotificationService/Info.plist; 548 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 549 | LD_RUNPATH_SEARCH_PATHS = ( 550 | "$(inherited)", 551 | "@executable_path/Frameworks", 552 | "@executable_path/../../Frameworks", 553 | ); 554 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationServiceExample.NotificationService; 555 | PRODUCT_NAME = "$(TARGET_NAME)"; 556 | SKIP_INSTALL = YES; 557 | SWIFT_VERSION = 5.0; 558 | }; 559 | name = Release; 560 | }; 561 | /* End XCBuildConfiguration section */ 562 | 563 | /* Begin XCConfigurationList section */ 564 | 52387AD71E6606F200C63B80 /* Build configuration list for PBXProject "CTNotificationServiceExampleSwift" */ = { 565 | isa = XCConfigurationList; 566 | buildConfigurations = ( 567 | 52387AEC1E6606F200C63B80 /* Debug */, 568 | 52387AED1E6606F200C63B80 /* Release */, 569 | ); 570 | defaultConfigurationIsVisible = 0; 571 | defaultConfigurationName = Release; 572 | }; 573 | 52387AEE1E6606F200C63B80 /* Build configuration list for PBXNativeTarget "CTNotificationServiceExampleSwift" */ = { 574 | isa = XCConfigurationList; 575 | buildConfigurations = ( 576 | 52387AEF1E6606F200C63B80 /* Debug */, 577 | 52387AF01E6606F200C63B80 /* Release */, 578 | ); 579 | defaultConfigurationIsVisible = 0; 580 | defaultConfigurationName = Release; 581 | }; 582 | 52387AFD1E66078B00C63B80 /* Build configuration list for PBXNativeTarget "NotificationService" */ = { 583 | isa = XCConfigurationList; 584 | buildConfigurations = ( 585 | 52387AFE1E66078B00C63B80 /* Debug */, 586 | 52387AFF1E66078B00C63B80 /* Release */, 587 | ); 588 | defaultConfigurationIsVisible = 0; 589 | defaultConfigurationName = Release; 590 | }; 591 | /* End XCConfigurationList section */ 592 | }; 593 | rootObject = 52387AD41E6606F200C63B80 /* Project object */; 594 | } 595 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift.xcodeproj/xcshareddata/xcschemes/CTNotificationServiceExampleSwift.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | 2 | import UIKit 3 | import CleverTapSDK 4 | import UserNotifications 5 | 6 | @UIApplicationMain 7 | class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate { 8 | 9 | var window: UIWindow? 10 | 11 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 12 | // Override point for customization after application launch. 13 | CleverTap.autoIntegrate() 14 | self.registerPush() 15 | return true 16 | } 17 | 18 | private func registerPush() { 19 | // request permissions 20 | if #available(iOS 10.0, *) { 21 | UNUserNotificationCenter.current().delegate = self 22 | UNUserNotificationCenter.current().requestAuthorization(options: [.sound, .alert, .badge]) { 23 | (granted, error) in 24 | if (granted) { 25 | DispatchQueue.main.async { 26 | UIApplication.shared.registerForRemoteNotifications() 27 | } 28 | } 29 | } 30 | } else { 31 | // Fallback on earlier versions 32 | } 33 | } 34 | 35 | func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { 36 | print("APPDELEGATE: open url \(url)") 37 | DispatchQueue.main.async { 38 | self.showAlert(message: "APPDELEGATE: open url \(url)") 39 | } 40 | return true 41 | } 42 | 43 | func open(_ url: URL, options: [String : Any] = [:], 44 | completionHandler completion: ((Bool) -> Swift.Void)? = nil){ 45 | print("APPDELEGATE: open url \(url) with completionHandler") 46 | DispatchQueue.main.async { 47 | self.showAlert(message: "APPDELEGATE: open url \(url) with completionHandler") 48 | } 49 | 50 | completion?(false) 51 | } 52 | 53 | func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { 54 | print("did receive remote notification \(response.notification.request.content.userInfo)") 55 | } 56 | 57 | func showAlert(message:String) { 58 | let alertController = UIAlertController(title: "Deeplink", message: message, preferredStyle: .alert) 59 | let okAction = UIAlertAction(title: "OK", style: .default) { (result : UIAlertAction) -> Void in 60 | print("OK") 61 | } 62 | alertController.addAction(okAction) 63 | self.window?.rootViewController?.present(alertController, animated: true, completion: nil) 64 | } 65 | 66 | func applicationWillResignActive(_ application: UIApplication) { 67 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 68 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 69 | } 70 | 71 | func applicationDidEnterBackground(_ application: UIApplication) { 72 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 73 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 74 | } 75 | 76 | func applicationWillEnterForeground(_ application: UIApplication) { 77 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 78 | } 79 | 80 | func applicationDidBecomeActive(_ application: UIApplication) { 81 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 82 | } 83 | 84 | func applicationWillTerminate(_ application: UIApplication) { 85 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 86 | } 87 | 88 | } 89 | 90 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]} -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "idiom" : "universal", 15 | "scale" : "1x" 16 | }, 17 | { 18 | "filename" : "Logo_Logotype White BG@2x.png", 19 | "idiom" : "universal", 20 | "scale" : "2x" 21 | }, 22 | { 23 | "appearances" : [ 24 | { 25 | "appearance" : "luminosity", 26 | "value" : "dark" 27 | } 28 | ], 29 | "filename" : "Logo_Logotype Inverse Dark BG@2x.png", 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "universal", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "appearances" : [ 39 | { 40 | "appearance" : "luminosity", 41 | "value" : "dark" 42 | } 43 | ], 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/logo.imageset/Logo_Logotype Inverse Dark BG@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/logo.imageset/Logo_Logotype Inverse Dark BG@2x.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/logo.imageset/Logo_Logotype White BG@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwift/CTNotificationServiceExampleSwift/Assets.xcassets/logo.imageset/Logo_Logotype White BG@2x.png -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/CTNotificationServiceExampleSwift.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleURLTypes 20 | 21 | 22 | CFBundleURLSchemes 23 | 24 | com.clevertap.ctservice.example 25 | 26 | 27 | 28 | CFBundleVersion 29 | 1 30 | CleverTapAccountID 31 | RKW-R77-KW6Z 32 | CleverTapToken 33 | aa2-032 34 | LSRequiresIPhoneOS 35 | 36 | UILaunchStoryboardName 37 | LaunchScreen 38 | UIMainStoryboardFile 39 | Main 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UISupportedInterfaceOrientations~ipad 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationPortraitUpsideDown 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /ExampleSwift/CTNotificationServiceExampleSwift/ViewController.swift: -------------------------------------------------------------------------------- 1 | 2 | import UIKit 3 | 4 | class ViewController: UIViewController { 5 | 6 | override func viewDidLoad() { 7 | super.viewDidLoad() 8 | // Do any additional setup after loading the view, typically from a nib. 9 | } 10 | 11 | override func didReceiveMemoryWarning() { 12 | super.didReceiveMemoryWarning() 13 | // Dispose of any resources that can be recreated. 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /ExampleSwift/NotificationService/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | NotificationService 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 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionPointIdentifier 26 | com.apple.usernotifications.service 27 | NSExtensionPrincipalClass 28 | CTNotificationServiceExtension 29 | 30 | NSAppTransportSecurity 31 | 32 | NSAllowsArbitraryLoads 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /ExampleSwift/NotificationService/NotificationService.swift: -------------------------------------------------------------------------------- 1 | 2 | import CTNotificationService 3 | 4 | class NotificationService: CTNotificationServiceExtension { 5 | 6 | var contentHandler: ((UNNotificationContent) -> Void)? 7 | var bestAttemptContent: UNMutableNotificationContent? 8 | 9 | override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { 10 | super.didReceive(request, withContentHandler: contentHandler) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ExampleSwift/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '10.0' 2 | 3 | use_frameworks! 4 | 5 | target 'CTNotificationServiceExampleSwift' do 6 | pod 'CleverTap-iOS-SDK' 7 | end 8 | 9 | target 'NotificationService' do 10 | pod "CTNotificationService", :path =>'../' 11 | end 12 | 13 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4927063327573D690036F80E /* CTNotificationService in Frameworks */ = {isa = PBXBuildFile; productRef = 4927063227573D690036F80E /* CTNotificationService */; }; 11 | 4978F37D27585A9500233D85 /* CleverTapSDK in Frameworks */ = {isa = PBXBuildFile; productRef = 4978F37C27585A9500233D85 /* CleverTapSDK */; }; 12 | 4992D0C826F58F8B000E3BFE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4992D0C726F58F8B000E3BFE /* AppDelegate.swift */; }; 13 | 4992D0CC26F58F8B000E3BFE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4992D0CB26F58F8B000E3BFE /* ViewController.swift */; }; 14 | 4992D0CF26F58F8B000E3BFE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4992D0CD26F58F8B000E3BFE /* Main.storyboard */; }; 15 | 4992D0D126F58F8B000E3BFE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4992D0D026F58F8B000E3BFE /* Assets.xcassets */; }; 16 | 4992D0D426F58F8B000E3BFE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4992D0D226F58F8B000E3BFE /* LaunchScreen.storyboard */; }; 17 | 4992D0E226F59005000E3BFE /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4992D0E126F59005000E3BFE /* NotificationService.swift */; }; 18 | 4992D0E626F59005000E3BFE /* NotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 4992D0DF26F59005000E3BFE /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 4992D0E426F59005000E3BFE /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 4992D0BC26F58F8B000E3BFE /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 4992D0DE26F59005000E3BFE; 27 | remoteInfo = NotificationService; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXCopyFilesBuildPhase section */ 32 | 4992D0E726F59005000E3BFE /* Embed App Extensions */ = { 33 | isa = PBXCopyFilesBuildPhase; 34 | buildActionMask = 2147483647; 35 | dstPath = ""; 36 | dstSubfolderSpec = 13; 37 | files = ( 38 | 4992D0E626F59005000E3BFE /* NotificationService.appex in Embed App Extensions */, 39 | ); 40 | name = "Embed App Extensions"; 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXCopyFilesBuildPhase section */ 44 | 45 | /* Begin PBXFileReference section */ 46 | 4992D0C426F58F8B000E3BFE /* CTNotificationServiceExampleSPM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CTNotificationServiceExampleSPM.app; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 4992D0C726F58F8B000E3BFE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 48 | 4992D0CB26F58F8B000E3BFE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 49 | 4992D0CE26F58F8B000E3BFE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | 4992D0D026F58F8B000E3BFE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 4992D0D326F58F8B000E3BFE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | 4992D0D526F58F8B000E3BFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | 4992D0DF26F59005000E3BFE /* NotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 4992D0E126F59005000E3BFE /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = ""; }; 55 | 4992D0E326F59005000E3BFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | 499B5D842758586800CAEBE5 /* CTNotificationServiceExampleSPM.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CTNotificationServiceExampleSPM.entitlements; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 4992D0C126F58F8B000E3BFE /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | 4978F37D27585A9500233D85 /* CleverTapSDK in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | 4992D0DC26F59005000E3BFE /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | 4927063327573D690036F80E /* CTNotificationService in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | 4992D0BB26F58F8B000E3BFE = { 80 | isa = PBXGroup; 81 | children = ( 82 | 4992D0C626F58F8B000E3BFE /* CTNotificationServiceExampleSPM */, 83 | 4992D0E026F59005000E3BFE /* NotificationService */, 84 | 4992D0C526F58F8B000E3BFE /* Products */, 85 | 4992D0EE26F5C0E5000E3BFE /* Frameworks */, 86 | ); 87 | sourceTree = ""; 88 | }; 89 | 4992D0C526F58F8B000E3BFE /* Products */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 4992D0C426F58F8B000E3BFE /* CTNotificationServiceExampleSPM.app */, 93 | 4992D0DF26F59005000E3BFE /* NotificationService.appex */, 94 | ); 95 | name = Products; 96 | sourceTree = ""; 97 | }; 98 | 4992D0C626F58F8B000E3BFE /* CTNotificationServiceExampleSPM */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 499B5D842758586800CAEBE5 /* CTNotificationServiceExampleSPM.entitlements */, 102 | 4992D0C726F58F8B000E3BFE /* AppDelegate.swift */, 103 | 4992D0CB26F58F8B000E3BFE /* ViewController.swift */, 104 | 4992D0CD26F58F8B000E3BFE /* Main.storyboard */, 105 | 4992D0D026F58F8B000E3BFE /* Assets.xcassets */, 106 | 4992D0D226F58F8B000E3BFE /* LaunchScreen.storyboard */, 107 | 4992D0D526F58F8B000E3BFE /* Info.plist */, 108 | ); 109 | path = CTNotificationServiceExampleSPM; 110 | sourceTree = ""; 111 | }; 112 | 4992D0E026F59005000E3BFE /* NotificationService */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 4992D0E126F59005000E3BFE /* NotificationService.swift */, 116 | 4992D0E326F59005000E3BFE /* Info.plist */, 117 | ); 118 | path = NotificationService; 119 | sourceTree = ""; 120 | }; 121 | 4992D0EE26F5C0E5000E3BFE /* Frameworks */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | ); 125 | name = Frameworks; 126 | sourceTree = ""; 127 | }; 128 | /* End PBXGroup section */ 129 | 130 | /* Begin PBXNativeTarget section */ 131 | 4992D0C326F58F8B000E3BFE /* CTNotificationServiceExampleSPM */ = { 132 | isa = PBXNativeTarget; 133 | buildConfigurationList = 4992D0D826F58F8B000E3BFE /* Build configuration list for PBXNativeTarget "CTNotificationServiceExampleSPM" */; 134 | buildPhases = ( 135 | 4992D0C026F58F8B000E3BFE /* Sources */, 136 | 4992D0C126F58F8B000E3BFE /* Frameworks */, 137 | 4992D0C226F58F8B000E3BFE /* Resources */, 138 | 4992D0E726F59005000E3BFE /* Embed App Extensions */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | 4992D0E526F59005000E3BFE /* PBXTargetDependency */, 144 | ); 145 | name = CTNotificationServiceExampleSPM; 146 | packageProductDependencies = ( 147 | 4978F37C27585A9500233D85 /* CleverTapSDK */, 148 | ); 149 | productName = CTNotificationServiceExampleSPM; 150 | productReference = 4992D0C426F58F8B000E3BFE /* CTNotificationServiceExampleSPM.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | 4992D0DE26F59005000E3BFE /* NotificationService */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = 4992D0EA26F59005000E3BFE /* Build configuration list for PBXNativeTarget "NotificationService" */; 156 | buildPhases = ( 157 | 4992D0DB26F59005000E3BFE /* Sources */, 158 | 4992D0DC26F59005000E3BFE /* Frameworks */, 159 | 4992D0DD26F59005000E3BFE /* Resources */, 160 | ); 161 | buildRules = ( 162 | ); 163 | dependencies = ( 164 | ); 165 | name = NotificationService; 166 | packageProductDependencies = ( 167 | 4927063227573D690036F80E /* CTNotificationService */, 168 | ); 169 | productName = NotificationService; 170 | productReference = 4992D0DF26F59005000E3BFE /* NotificationService.appex */; 171 | productType = "com.apple.product-type.app-extension"; 172 | }; 173 | /* End PBXNativeTarget section */ 174 | 175 | /* Begin PBXProject section */ 176 | 4992D0BC26F58F8B000E3BFE /* Project object */ = { 177 | isa = PBXProject; 178 | attributes = { 179 | LastSwiftUpdateCheck = 1250; 180 | LastUpgradeCheck = 1250; 181 | ORGANIZATIONNAME = CleverTap; 182 | TargetAttributes = { 183 | 4992D0C326F58F8B000E3BFE = { 184 | CreatedOnToolsVersion = 12.5; 185 | }; 186 | 4992D0DE26F59005000E3BFE = { 187 | CreatedOnToolsVersion = 12.5; 188 | }; 189 | }; 190 | }; 191 | buildConfigurationList = 4992D0BF26F58F8B000E3BFE /* Build configuration list for PBXProject "CTNotificationServiceExampleSPM" */; 192 | compatibilityVersion = "Xcode 10.0"; 193 | developmentRegion = en; 194 | hasScannedForEncodings = 0; 195 | knownRegions = ( 196 | en, 197 | Base, 198 | ); 199 | mainGroup = 4992D0BB26F58F8B000E3BFE; 200 | packageReferences = ( 201 | 4927063127573D160036F80E /* XCRemoteSwiftPackageReference "CTNotificationService" */, 202 | 4978F37B27585A9500233D85 /* XCRemoteSwiftPackageReference "clevertap-ios-sdk" */, 203 | ); 204 | productRefGroup = 4992D0C526F58F8B000E3BFE /* Products */; 205 | projectDirPath = ""; 206 | projectRoot = ""; 207 | targets = ( 208 | 4992D0C326F58F8B000E3BFE /* CTNotificationServiceExampleSPM */, 209 | 4992D0DE26F59005000E3BFE /* NotificationService */, 210 | ); 211 | }; 212 | /* End PBXProject section */ 213 | 214 | /* Begin PBXResourcesBuildPhase section */ 215 | 4992D0C226F58F8B000E3BFE /* Resources */ = { 216 | isa = PBXResourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | 4992D0D426F58F8B000E3BFE /* LaunchScreen.storyboard in Resources */, 220 | 4992D0D126F58F8B000E3BFE /* Assets.xcassets in Resources */, 221 | 4992D0CF26F58F8B000E3BFE /* Main.storyboard in Resources */, 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | 4992D0DD26F59005000E3BFE /* Resources */ = { 226 | isa = PBXResourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXResourcesBuildPhase section */ 233 | 234 | /* Begin PBXSourcesBuildPhase section */ 235 | 4992D0C026F58F8B000E3BFE /* Sources */ = { 236 | isa = PBXSourcesBuildPhase; 237 | buildActionMask = 2147483647; 238 | files = ( 239 | 4992D0CC26F58F8B000E3BFE /* ViewController.swift in Sources */, 240 | 4992D0C826F58F8B000E3BFE /* AppDelegate.swift in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | 4992D0DB26F59005000E3BFE /* Sources */ = { 245 | isa = PBXSourcesBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | 4992D0E226F59005000E3BFE /* NotificationService.swift in Sources */, 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | /* End PBXSourcesBuildPhase section */ 253 | 254 | /* Begin PBXTargetDependency section */ 255 | 4992D0E526F59005000E3BFE /* PBXTargetDependency */ = { 256 | isa = PBXTargetDependency; 257 | target = 4992D0DE26F59005000E3BFE /* NotificationService */; 258 | targetProxy = 4992D0E426F59005000E3BFE /* PBXContainerItemProxy */; 259 | }; 260 | /* End PBXTargetDependency section */ 261 | 262 | /* Begin PBXVariantGroup section */ 263 | 4992D0CD26F58F8B000E3BFE /* Main.storyboard */ = { 264 | isa = PBXVariantGroup; 265 | children = ( 266 | 4992D0CE26F58F8B000E3BFE /* Base */, 267 | ); 268 | name = Main.storyboard; 269 | sourceTree = ""; 270 | }; 271 | 4992D0D226F58F8B000E3BFE /* LaunchScreen.storyboard */ = { 272 | isa = PBXVariantGroup; 273 | children = ( 274 | 4992D0D326F58F8B000E3BFE /* Base */, 275 | ); 276 | name = LaunchScreen.storyboard; 277 | sourceTree = ""; 278 | }; 279 | /* End PBXVariantGroup section */ 280 | 281 | /* Begin XCBuildConfiguration section */ 282 | 4992D0D626F58F8B000E3BFE /* Debug */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | ALWAYS_SEARCH_USER_PATHS = NO; 286 | CLANG_ANALYZER_NONNULL = YES; 287 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 288 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 289 | CLANG_CXX_LIBRARY = "libc++"; 290 | CLANG_ENABLE_MODULES = YES; 291 | CLANG_ENABLE_OBJC_ARC = YES; 292 | CLANG_ENABLE_OBJC_WEAK = YES; 293 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 294 | CLANG_WARN_BOOL_CONVERSION = YES; 295 | CLANG_WARN_COMMA = YES; 296 | CLANG_WARN_CONSTANT_CONVERSION = YES; 297 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 298 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 299 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 300 | CLANG_WARN_EMPTY_BODY = YES; 301 | CLANG_WARN_ENUM_CONVERSION = YES; 302 | CLANG_WARN_INFINITE_RECURSION = YES; 303 | CLANG_WARN_INT_CONVERSION = YES; 304 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 305 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 306 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 307 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 308 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 309 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 310 | CLANG_WARN_STRICT_PROTOTYPES = YES; 311 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 312 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 313 | CLANG_WARN_UNREACHABLE_CODE = YES; 314 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 315 | COPY_PHASE_STRIP = NO; 316 | DEBUG_INFORMATION_FORMAT = dwarf; 317 | ENABLE_STRICT_OBJC_MSGSEND = YES; 318 | ENABLE_TESTABILITY = YES; 319 | GCC_C_LANGUAGE_STANDARD = gnu11; 320 | GCC_DYNAMIC_NO_PIC = NO; 321 | GCC_NO_COMMON_BLOCKS = YES; 322 | GCC_OPTIMIZATION_LEVEL = 0; 323 | GCC_PREPROCESSOR_DEFINITIONS = ( 324 | "DEBUG=1", 325 | "$(inherited)", 326 | ); 327 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 328 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 329 | GCC_WARN_UNDECLARED_SELECTOR = YES; 330 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 331 | GCC_WARN_UNUSED_FUNCTION = YES; 332 | GCC_WARN_UNUSED_VARIABLE = YES; 333 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 334 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 335 | MTL_FAST_MATH = YES; 336 | ONLY_ACTIVE_ARCH = YES; 337 | SDKROOT = iphoneos; 338 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 339 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 340 | }; 341 | name = Debug; 342 | }; 343 | 4992D0D726F58F8B000E3BFE /* Release */ = { 344 | isa = XCBuildConfiguration; 345 | buildSettings = { 346 | ALWAYS_SEARCH_USER_PATHS = NO; 347 | CLANG_ANALYZER_NONNULL = YES; 348 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 349 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 350 | CLANG_CXX_LIBRARY = "libc++"; 351 | CLANG_ENABLE_MODULES = YES; 352 | CLANG_ENABLE_OBJC_ARC = YES; 353 | CLANG_ENABLE_OBJC_WEAK = YES; 354 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 355 | CLANG_WARN_BOOL_CONVERSION = YES; 356 | CLANG_WARN_COMMA = YES; 357 | CLANG_WARN_CONSTANT_CONVERSION = YES; 358 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 359 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 360 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 361 | CLANG_WARN_EMPTY_BODY = YES; 362 | CLANG_WARN_ENUM_CONVERSION = YES; 363 | CLANG_WARN_INFINITE_RECURSION = YES; 364 | CLANG_WARN_INT_CONVERSION = YES; 365 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 366 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 367 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 369 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 370 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 371 | CLANG_WARN_STRICT_PROTOTYPES = YES; 372 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 373 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 374 | CLANG_WARN_UNREACHABLE_CODE = YES; 375 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 376 | COPY_PHASE_STRIP = NO; 377 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 378 | ENABLE_NS_ASSERTIONS = NO; 379 | ENABLE_STRICT_OBJC_MSGSEND = YES; 380 | GCC_C_LANGUAGE_STANDARD = gnu11; 381 | GCC_NO_COMMON_BLOCKS = YES; 382 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 383 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 384 | GCC_WARN_UNDECLARED_SELECTOR = YES; 385 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 386 | GCC_WARN_UNUSED_FUNCTION = YES; 387 | GCC_WARN_UNUSED_VARIABLE = YES; 388 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 389 | MTL_ENABLE_DEBUG_INFO = NO; 390 | MTL_FAST_MATH = YES; 391 | SDKROOT = iphoneos; 392 | SWIFT_COMPILATION_MODE = wholemodule; 393 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 394 | VALIDATE_PRODUCT = YES; 395 | }; 396 | name = Release; 397 | }; 398 | 4992D0D926F58F8B000E3BFE /* Debug */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 402 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 403 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 404 | CODE_SIGN_ENTITLEMENTS = CTNotificationServiceExampleSPM/CTNotificationServiceExampleSPM.entitlements; 405 | CODE_SIGN_STYLE = Automatic; 406 | DEVELOPMENT_TEAM = A5J34NR598; 407 | INFOPLIST_FILE = CTNotificationServiceExampleSPM/Info.plist; 408 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 409 | LD_RUNPATH_SEARCH_PATHS = ( 410 | "$(inherited)", 411 | "@executable_path/Frameworks", 412 | ); 413 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationServiceExample; 414 | PRODUCT_NAME = "$(TARGET_NAME)"; 415 | SWIFT_INSTALL_OBJC_HEADER = YES; 416 | SWIFT_VERSION = 5.0; 417 | TARGETED_DEVICE_FAMILY = "1,2"; 418 | }; 419 | name = Debug; 420 | }; 421 | 4992D0DA26F58F8B000E3BFE /* Release */ = { 422 | isa = XCBuildConfiguration; 423 | buildSettings = { 424 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 425 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 426 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 427 | CODE_SIGN_ENTITLEMENTS = CTNotificationServiceExampleSPM/CTNotificationServiceExampleSPM.entitlements; 428 | CODE_SIGN_STYLE = Automatic; 429 | DEVELOPMENT_TEAM = A5J34NR598; 430 | INFOPLIST_FILE = CTNotificationServiceExampleSPM/Info.plist; 431 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 432 | LD_RUNPATH_SEARCH_PATHS = ( 433 | "$(inherited)", 434 | "@executable_path/Frameworks", 435 | ); 436 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationServiceExample; 437 | PRODUCT_NAME = "$(TARGET_NAME)"; 438 | SWIFT_INSTALL_OBJC_HEADER = YES; 439 | SWIFT_VERSION = 5.0; 440 | TARGETED_DEVICE_FAMILY = "1,2"; 441 | }; 442 | name = Release; 443 | }; 444 | 4992D0E826F59005000E3BFE /* Debug */ = { 445 | isa = XCBuildConfiguration; 446 | buildSettings = { 447 | CODE_SIGN_STYLE = Automatic; 448 | DEVELOPMENT_TEAM = A5J34NR598; 449 | INFOPLIST_FILE = NotificationService/Info.plist; 450 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 451 | LD_RUNPATH_SEARCH_PATHS = ( 452 | "$(inherited)", 453 | "@executable_path/Frameworks", 454 | "@executable_path/../../Frameworks", 455 | ); 456 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationServiceExample.NotificationService; 457 | PRODUCT_NAME = "$(TARGET_NAME)"; 458 | SKIP_INSTALL = YES; 459 | SWIFT_VERSION = 5.0; 460 | TARGETED_DEVICE_FAMILY = "1,2"; 461 | }; 462 | name = Debug; 463 | }; 464 | 4992D0E926F59005000E3BFE /* Release */ = { 465 | isa = XCBuildConfiguration; 466 | buildSettings = { 467 | CODE_SIGN_STYLE = Automatic; 468 | DEVELOPMENT_TEAM = A5J34NR598; 469 | INFOPLIST_FILE = NotificationService/Info.plist; 470 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 471 | LD_RUNPATH_SEARCH_PATHS = ( 472 | "$(inherited)", 473 | "@executable_path/Frameworks", 474 | "@executable_path/../../Frameworks", 475 | ); 476 | PRODUCT_BUNDLE_IDENTIFIER = com.clevertap.CTNotificationServiceExample.NotificationService; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | SKIP_INSTALL = YES; 479 | SWIFT_VERSION = 5.0; 480 | TARGETED_DEVICE_FAMILY = "1,2"; 481 | }; 482 | name = Release; 483 | }; 484 | /* End XCBuildConfiguration section */ 485 | 486 | /* Begin XCConfigurationList section */ 487 | 4992D0BF26F58F8B000E3BFE /* Build configuration list for PBXProject "CTNotificationServiceExampleSPM" */ = { 488 | isa = XCConfigurationList; 489 | buildConfigurations = ( 490 | 4992D0D626F58F8B000E3BFE /* Debug */, 491 | 4992D0D726F58F8B000E3BFE /* Release */, 492 | ); 493 | defaultConfigurationIsVisible = 0; 494 | defaultConfigurationName = Release; 495 | }; 496 | 4992D0D826F58F8B000E3BFE /* Build configuration list for PBXNativeTarget "CTNotificationServiceExampleSPM" */ = { 497 | isa = XCConfigurationList; 498 | buildConfigurations = ( 499 | 4992D0D926F58F8B000E3BFE /* Debug */, 500 | 4992D0DA26F58F8B000E3BFE /* Release */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 4992D0EA26F59005000E3BFE /* Build configuration list for PBXNativeTarget "NotificationService" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 4992D0E826F59005000E3BFE /* Debug */, 509 | 4992D0E926F59005000E3BFE /* Release */, 510 | ); 511 | defaultConfigurationIsVisible = 0; 512 | defaultConfigurationName = Release; 513 | }; 514 | /* End XCConfigurationList section */ 515 | 516 | /* Begin XCRemoteSwiftPackageReference section */ 517 | 4927063127573D160036F80E /* XCRemoteSwiftPackageReference "CTNotificationService" */ = { 518 | isa = XCRemoteSwiftPackageReference; 519 | repositoryURL = "https://github.com/CleverTap/CTNotificationService.git"; 520 | requirement = { 521 | kind = revision; 522 | revision = 4c94f007a21192e500619d7595de749041dc5d08; 523 | }; 524 | }; 525 | 4978F37B27585A9500233D85 /* XCRemoteSwiftPackageReference "clevertap-ios-sdk" */ = { 526 | isa = XCRemoteSwiftPackageReference; 527 | repositoryURL = "https://github.com/CleverTap/clevertap-ios-sdk.git"; 528 | requirement = { 529 | kind = upToNextMajorVersion; 530 | minimumVersion = 3.0.0; 531 | }; 532 | }; 533 | /* End XCRemoteSwiftPackageReference section */ 534 | 535 | /* Begin XCSwiftPackageProductDependency section */ 536 | 4927063227573D690036F80E /* CTNotificationService */ = { 537 | isa = XCSwiftPackageProductDependency; 538 | package = 4927063127573D160036F80E /* XCRemoteSwiftPackageReference "CTNotificationService" */; 539 | productName = CTNotificationService; 540 | }; 541 | 4978F37C27585A9500233D85 /* CleverTapSDK */ = { 542 | isa = XCSwiftPackageProductDependency; 543 | package = 4978F37B27585A9500233D85 /* XCRemoteSwiftPackageReference "clevertap-ios-sdk" */; 544 | productName = CleverTapSDK; 545 | }; 546 | /* End XCSwiftPackageProductDependency section */ 547 | }; 548 | rootObject = 4992D0BC26F58F8B000E3BFE /* Project object */; 549 | } 550 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "CleverTapSDK", 6 | "repositoryURL": "https://github.com/CleverTap/clevertap-ios-sdk.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "189f51732f304a8e5747f301c49f26bc25aeb6b4", 10 | "version": "3.10.0" 11 | } 12 | }, 13 | { 14 | "package": "CTNotificationService", 15 | "repositoryURL": "https://github.com/CleverTap/CTNotificationService.git", 16 | "state": { 17 | "branch": null, 18 | "revision": "a5d6f1ae55abba8d0577a86c8dd7043cce93261c", 19 | "version": null 20 | } 21 | }, 22 | { 23 | "package": "SDWebImage", 24 | "repositoryURL": "https://github.com/SDWebImage/SDWebImage.git", 25 | "state": { 26 | "branch": null, 27 | "revision": "a72df4849408da7e5d3c1b586797b7c601c41d1b", 28 | "version": "5.12.1" 29 | } 30 | } 31 | ] 32 | }, 33 | "version": 1 34 | } 35 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CTNotificationServiceExampleSPM 4 | // 5 | // Created by Aditi Agrawal on 18/09/21. 6 | // 7 | 8 | import UIKit 9 | import CleverTapSDK 10 | import UserNotifications 11 | 12 | @main 13 | class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | CleverTap.autoIntegrate() 20 | registerPush() 21 | return true 22 | } 23 | 24 | private func registerPush() { 25 | // request permissions 26 | if #available(iOS 10.0, *) { 27 | UNUserNotificationCenter.current().delegate = self 28 | UNUserNotificationCenter.current().requestAuthorization(options: [.sound, .alert, .badge]) { 29 | (granted, error) in 30 | if (granted) { 31 | DispatchQueue.main.async { 32 | UIApplication.shared.registerForRemoteNotifications() 33 | } 34 | } 35 | } 36 | } else { 37 | // Fallback on earlier versions 38 | } 39 | } 40 | 41 | func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { 42 | print("did receive remote notification \(response.notification.request.content.userInfo)") 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/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 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "40.png", 5 | "idiom" : "iphone", 6 | "scale" : "2x", 7 | "size" : "20x20" 8 | }, 9 | { 10 | "filename" : "60.png", 11 | "idiom" : "iphone", 12 | "scale" : "3x", 13 | "size" : "20x20" 14 | }, 15 | { 16 | "filename" : "29.png", 17 | "idiom" : "iphone", 18 | "scale" : "1x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "58.png", 23 | "idiom" : "iphone", 24 | "scale" : "2x", 25 | "size" : "29x29" 26 | }, 27 | { 28 | "filename" : "87.png", 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "29x29" 32 | }, 33 | { 34 | "filename" : "80.png", 35 | "idiom" : "iphone", 36 | "scale" : "2x", 37 | "size" : "40x40" 38 | }, 39 | { 40 | "filename" : "120.png", 41 | "idiom" : "iphone", 42 | "scale" : "3x", 43 | "size" : "40x40" 44 | }, 45 | { 46 | "filename" : "57.png", 47 | "idiom" : "iphone", 48 | "scale" : "1x", 49 | "size" : "57x57" 50 | }, 51 | { 52 | "filename" : "114.png", 53 | "idiom" : "iphone", 54 | "scale" : "2x", 55 | "size" : "57x57" 56 | }, 57 | { 58 | "filename" : "120.png", 59 | "idiom" : "iphone", 60 | "scale" : "2x", 61 | "size" : "60x60" 62 | }, 63 | { 64 | "filename" : "180.png", 65 | "idiom" : "iphone", 66 | "scale" : "3x", 67 | "size" : "60x60" 68 | }, 69 | { 70 | "filename" : "20.png", 71 | "idiom" : "ipad", 72 | "scale" : "1x", 73 | "size" : "20x20" 74 | }, 75 | { 76 | "filename" : "40.png", 77 | "idiom" : "ipad", 78 | "scale" : "2x", 79 | "size" : "20x20" 80 | }, 81 | { 82 | "filename" : "29.png", 83 | "idiom" : "ipad", 84 | "scale" : "1x", 85 | "size" : "29x29" 86 | }, 87 | { 88 | "filename" : "58.png", 89 | "idiom" : "ipad", 90 | "scale" : "2x", 91 | "size" : "29x29" 92 | }, 93 | { 94 | "filename" : "40.png", 95 | "idiom" : "ipad", 96 | "scale" : "1x", 97 | "size" : "40x40" 98 | }, 99 | { 100 | "filename" : "80.png", 101 | "idiom" : "ipad", 102 | "scale" : "2x", 103 | "size" : "40x40" 104 | }, 105 | { 106 | "filename" : "50.png", 107 | "idiom" : "ipad", 108 | "scale" : "1x", 109 | "size" : "50x50" 110 | }, 111 | { 112 | "filename" : "100.png", 113 | "idiom" : "ipad", 114 | "scale" : "2x", 115 | "size" : "50x50" 116 | }, 117 | { 118 | "filename" : "72.png", 119 | "idiom" : "ipad", 120 | "scale" : "1x", 121 | "size" : "72x72" 122 | }, 123 | { 124 | "filename" : "144.png", 125 | "idiom" : "ipad", 126 | "scale" : "2x", 127 | "size" : "72x72" 128 | }, 129 | { 130 | "filename" : "76.png", 131 | "idiom" : "ipad", 132 | "scale" : "1x", 133 | "size" : "76x76" 134 | }, 135 | { 136 | "filename" : "152.png", 137 | "idiom" : "ipad", 138 | "scale" : "2x", 139 | "size" : "76x76" 140 | }, 141 | { 142 | "filename" : "167.png", 143 | "idiom" : "ipad", 144 | "scale" : "2x", 145 | "size" : "83.5x83.5" 146 | }, 147 | { 148 | "filename" : "1024.png", 149 | "idiom" : "ios-marketing", 150 | "scale" : "1x", 151 | "size" : "1024x1024" 152 | } 153 | ], 154 | "info" : { 155 | "author" : "xcode", 156 | "version" : 1 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "idiom" : "universal", 15 | "scale" : "1x" 16 | }, 17 | { 18 | "filename" : "Logo_Logotype White BG@2x.png", 19 | "idiom" : "universal", 20 | "scale" : "2x" 21 | }, 22 | { 23 | "appearances" : [ 24 | { 25 | "appearance" : "luminosity", 26 | "value" : "dark" 27 | } 28 | ], 29 | "filename" : "Logo_Logotype Inverse Dark BG@2x.png", 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "universal", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "appearances" : [ 39 | { 40 | "appearance" : "luminosity", 41 | "value" : "dark" 42 | } 43 | ], 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/logo.imageset/Logo_Logotype Inverse Dark BG@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/logo.imageset/Logo_Logotype Inverse Dark BG@2x.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/logo.imageset/Logo_Logotype White BG@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/ExampleSwiftPM/CTNotificationServiceExampleSPM/Assets.xcassets/logo.imageset/Logo_Logotype White BG@2x.png -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/CTNotificationServiceExampleSPM.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | CleverTapAccountID 22 | RKW-R77-KW6Z 23 | CleverTapToken 24 | aa2-032 25 | LSRequiresIPhoneOS 26 | 27 | UIApplicationSupportsIndirectInputEvents 28 | 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ExampleSwiftPM/CTNotificationServiceExampleSPM/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CTNotificationServiceExampleSPM 4 | // 5 | // Created by Aditi Agrawal on 18/09/21. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | override func viewDidLoad() { 13 | super.viewDidLoad() 14 | // Do any additional setup after loading the view. 15 | } 16 | 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /ExampleSwiftPM/NotificationService/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | NotificationService 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionPointIdentifier 26 | com.apple.usernotifications.service 27 | NSExtensionPrincipalClass 28 | $(PRODUCT_MODULE_NAME).NotificationService 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ExampleSwiftPM/NotificationService/NotificationService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationService.swift 3 | // NotificationService 4 | // 5 | // Created by Aditi Agrawal on 18/09/21. 6 | // 7 | 8 | import CTNotificationService 9 | 10 | class NotificationService: CTNotificationServiceExtension { 11 | 12 | var contentHandler: ((UNNotificationContent) -> Void)? 13 | var bestAttemptContent: UNMutableNotificationContent? 14 | 15 | override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { 16 | super.didReceive(request, withContentHandler: contentHandler) 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 CleverTap 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "CTNotificationService", 8 | platforms: [ 9 | .iOS(.v10) 10 | ], 11 | products: [ 12 | .library(name: "CTNotificationService", targets: ["CTNotificationService"]) 13 | ], 14 | targets: [ 15 | .target( 16 | name: "CTNotificationService", 17 | dependencies: [], 18 | path: "CTNotificationService", 19 | exclude: ["CTNotificationService.plist"], 20 | resources: [ 21 | .copy("PrivacyInfo.xcprivacy") 22 | ], 23 | publicHeadersPath: "include", 24 | cSettings: [ 25 | .headerSearchPath("./") 26 | ] 27 | ) 28 | ] 29 | ) 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CTNotificationService 2 | 3 | [![Version](https://img.shields.io/cocoapods/v/CTNotificationService.svg?style=flat)](http://cocoapods.org/pods/CTNotificationService) 4 | [![codebeat badge](https://codebeat.co/badges/45087421-b644-44fc-9a92-f2ccf61e0b16)](https://codebeat.co/projects/github-com-clevertap-ctnotificationservice-master) 5 | [![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg)](https://swift.org/package-manager/) 6 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 7 | [![License](https://img.shields.io/cocoapods/l/CTNotificationService.svg?style=flat)](http://cocoapods.org/pods/CTNotificationService) 8 | [![Platform](https://img.shields.io/cocoapods/p/CTNotificationService.svg?style=flat)](http://cocoapods.org/pods/CTNotificationService) 9 | ![iOS 10.0+](https://img.shields.io/badge/iOS-10.0%2B-blue.svg) 10 | 11 | ## 👋 Introduction 12 | 13 | A simple Notification Service Extension class to add media attachments to iOS 10 rich push notifications. Starting with iOS 10 you can add media attachments (image, gif, video, audio) to iOS push notifications. This library provides a simple drop-in class to accomplish that. 14 | 15 | [Rich push notifications](https://developer.apple.com/videos/play/wwdc2016/708/) are enabled in iOS 10 via a [Notification Service Extension](https://developer.apple.com/reference/usernotifications/unnotificationserviceextension), a separate and distinct binary embedded in your app bundle. 16 | 17 | ## 📋 Requirements 18 | 19 | 1. Compatible with iOS version 10.0 or above 20 | 21 | 2. Configure your app for Push and add a Notification Service Extension target 22 | 23 | - Enable [push notifications](https://developer.apple.com/notifications/) in your main app. 24 | 25 | - Create a Notification Service Extension in your project. To do that in your Xcode project, select File -> New -> Target and choose the Notification Service Extension template. 26 | 27 | ![notification service extension](https://github.com/CleverTap/CTNotificationService/blob/master/images/service_extension.png) 28 | 29 | ## 🎉 Installation 30 | 31 | ### CocoaPods 32 | 33 | Install `CTNotificationService` in your Notification Service Extension via [CocoaPods](http://cocoapods.org) 34 | 35 | Your `Podfile` should look something like this: 36 | 37 | source 'https://github.com/CocoaPods/Specs.git' 38 | platform :ios, '10.0' 39 | 40 | use_frameworks! 41 | 42 | target 'YOUR_NOTIFICATION_SERVICE_TARGET_NAME' do 43 | pod 'CTNotificationService' 44 | end 45 | 46 | Then run `pod install`. 47 | 48 | [See example Podfile here](https://github.com/CleverTap/CTNotificationService/blob/master/Example/Podfile). 49 | 50 | ### Carthage 51 | 52 | CTNotificationService supports [Carthage](https://github.com/Carthage/Carthage) to package your dependencies as a framework. 53 | 54 | To integrate CTNotificationService into your Xcode project using Carthage, specify the following in your `Cartfile`: 55 | 56 | ``` 57 | github "CleverTap/CTNotificationService" 58 | ``` 59 | 60 | Run `carthage update` to build the framework and drag the built `CTNotificationService.framework` into your Xcode project. 61 | 62 | ### Swift Package Manager 63 | 64 | Swift Package Manager is an Xcode tool that installs project dependencies. To use it to install CTNotificationService SDK, follow these steps: 65 | 66 | - In Xcode, navigate to **File -> Swift Package Manager -> Add Package Dependency.** 67 | - Enter **https://github.com/CleverTap/CTNotificationService.git** when choosing package repo and Click **Next.** 68 | - On the next screen, Select an SDK version (by default, Xcode selects the latest stable version). Click **Next.** 69 | - Click **Finish** and ensure that the **CTNotificationService** has been added to the appropriate target. 70 | 71 | ## 🚀 Integration 72 | 73 | ### Configure your Notification Service Extension to use the CTNotificationServiceExtension class 74 | 75 | By default CTNotificatonServiceExtension will look for the push payload key `ct_mediaUrl` with a value representing the url to your media file and the key `ct_mediaType` with a value of the type of media (image, video, audio or gif). 76 | 77 | If you are happy with the default key names, you can simply insert `CTNotificationServiceExtension` in place of your extension class name as the value for the NSExtension -> NSExtensionPrincipalClass entry in your Notfication Service Extension target Info.plist. [See example here](https://github.com/CleverTap/CTNotificationService/blob/master/Example/NotificationService/Info.plist). 78 | 79 | Alternatively, you can leave the NSExtensionPrincipalClass entry unchanged and instead have your NotificationService class extend the CTNotificationServiceExtension class. You can then also override the defaults to your chosen key names if you wish. [See Swift example here](https://github.com/CleverTap/CTNotificationService/blob/master/ExampleSwift/NotificationService/NotificationService.swift) and [Objective-C example here](https://github.com/CleverTap/CTNotificationService/blob/master/Example/NotificationService). In that case, only override `didReceive request: contentHandler:` as shown in the example. 80 | 81 | If you plan on downloading non-SSL urls please be sure to enable App Transport Security Settings -> Allow Arbitrary Loads -> true in your plist. [See plist example here](https://github.com/CleverTap/CTNotificationService/blob/master/Example/NotificationService/Info.plist). 82 | 83 | ### Configure your APNS payload 84 | 85 | Then, when sending notifications via APNS: 86 | - Include the mutable-content flag in your payload aps entry (this key must be present in the aps payload or the system will not call your app extension) 87 | - Add the `ct_mediaUrl` and `ct_mediaType` key-values (or your custom key-values) to the payload, outside of the aps entry. 88 | 89 | ``` 90 | { 91 | "aps": { 92 | "alert": { 93 | "body": "test message", 94 | "title": "test title", 95 | }, 96 | "mutable-content": 1, 97 | }, 98 | "ct_mediaType": "gif", 99 | "ct_mediaUrl": "https://www.wired.com/images_blogs/design/2013/09/davey1_1.gif", 100 | ... 101 | } 102 | ``` 103 | 104 | ## 𝌡 Example Usage 105 | 106 | - See [an example Swift project here](https://github.com/CleverTap/CTNotificationService/blob/master/ExampleSwift). 107 | 108 | - See [an example Objective-C project here](https://github.com/CleverTap/CTNotificationService/blob/master/Example). 109 | 110 | - See [an example SwiftPM project here](https://github.com/CleverTap/CTNotificationService/blob/master/ExampleSwiftPM). 111 | 112 | 113 | ## 🆕 Change Log 114 | 115 | Refer to the [CTNotificationService Change Log here](https://github.com/CleverTap/CTNotificationService/blob/master/CHANGELOG.md). 116 | -------------------------------------------------------------------------------- /images/service_extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverTap/CTNotificationService/9fb05bd25296f62be89d0ed0542a8473a96234e1/images/service_extension.png --------------------------------------------------------------------------------