├── CloudMessageTest.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── youngsickim.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── youngsickim.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── CloudMessageTest.xcworkspace ├── contents.xcworkspacedata ├── xcshareddata │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── youngsickim.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── CloudMessageTest ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x-1.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x-1.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x-1.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ ├── Icon-App-83.5x83.5@2x.png │ │ └── bellIcon2.png │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── CloudMessageTestDebug.entitlements ├── CloudMessageTestRelease.entitlements ├── ContentView.swift ├── Info.plist ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json └── SceneDelegate.swift ├── Podfile ├── Podfile.lock └── README.md /CloudMessageTest.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6201F16023BD333200378D5E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6201F15F23BD333200378D5E /* AppDelegate.swift */; }; 11 | 6201F16223BD333200378D5E /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6201F16123BD333200378D5E /* SceneDelegate.swift */; }; 12 | 6201F16423BD333200378D5E /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6201F16323BD333200378D5E /* ContentView.swift */; }; 13 | 6201F16623BD333500378D5E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6201F16523BD333500378D5E /* Assets.xcassets */; }; 14 | 6201F16923BD333500378D5E /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6201F16823BD333500378D5E /* Preview Assets.xcassets */; }; 15 | 6201F16C23BD333500378D5E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6201F16A23BD333500378D5E /* LaunchScreen.storyboard */; }; 16 | BA8B96BA02C1885F4892DF78 /* Pods_CloudMessageTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B1C751A37EBF52C0FFF3F12 /* Pods_CloudMessageTest.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 4B1C751A37EBF52C0FFF3F12 /* Pods_CloudMessageTest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CloudMessageTest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 6201F15C23BD333200378D5E /* CloudMessageTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CloudMessageTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 6201F15F23BD333200378D5E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23 | 6201F16123BD333200378D5E /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 24 | 6201F16323BD333200378D5E /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 25 | 6201F16523BD333500378D5E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 26 | 6201F16823BD333500378D5E /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 27 | 6201F16B23BD333500378D5E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 28 | 6201F16D23BD333500378D5E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | 6201F17323BD361900378D5E /* CloudMessageTestDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CloudMessageTestDebug.entitlements; sourceTree = ""; }; 30 | 62E5393923BD6F7100388E92 /* CloudMessageTestRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CloudMessageTestRelease.entitlements; sourceTree = ""; }; 31 | A5D84238382BC6FDBB906873 /* Pods-CloudMessageTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CloudMessageTest.release.xcconfig"; path = "Target Support Files/Pods-CloudMessageTest/Pods-CloudMessageTest.release.xcconfig"; sourceTree = ""; }; 32 | ED3A2D181590A5991CB78BC6 /* Pods-CloudMessageTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CloudMessageTest.debug.xcconfig"; path = "Target Support Files/Pods-CloudMessageTest/Pods-CloudMessageTest.debug.xcconfig"; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | 6201F15923BD333200378D5E /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | BA8B96BA02C1885F4892DF78 /* Pods_CloudMessageTest.framework in Frameworks */, 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXFrameworksBuildPhase section */ 45 | 46 | /* Begin PBXGroup section */ 47 | 40A240C47FA662C766077025 /* Pods */ = { 48 | isa = PBXGroup; 49 | children = ( 50 | ED3A2D181590A5991CB78BC6 /* Pods-CloudMessageTest.debug.xcconfig */, 51 | A5D84238382BC6FDBB906873 /* Pods-CloudMessageTest.release.xcconfig */, 52 | ); 53 | path = Pods; 54 | sourceTree = ""; 55 | }; 56 | 6201F15323BD333200378D5E = { 57 | isa = PBXGroup; 58 | children = ( 59 | 6201F15E23BD333200378D5E /* CloudMessageTest */, 60 | 6201F15D23BD333200378D5E /* Products */, 61 | 40A240C47FA662C766077025 /* Pods */, 62 | BCA4D39B3A0559B3E376ED88 /* Frameworks */, 63 | ); 64 | sourceTree = ""; 65 | }; 66 | 6201F15D23BD333200378D5E /* Products */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 6201F15C23BD333200378D5E /* CloudMessageTest.app */, 70 | ); 71 | name = Products; 72 | sourceTree = ""; 73 | }; 74 | 6201F15E23BD333200378D5E /* CloudMessageTest */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 62E5393923BD6F7100388E92 /* CloudMessageTestRelease.entitlements */, 78 | 6201F17323BD361900378D5E /* CloudMessageTestDebug.entitlements */, 79 | 6201F15F23BD333200378D5E /* AppDelegate.swift */, 80 | 6201F16123BD333200378D5E /* SceneDelegate.swift */, 81 | 6201F16323BD333200378D5E /* ContentView.swift */, 82 | 6201F16523BD333500378D5E /* Assets.xcassets */, 83 | 6201F16A23BD333500378D5E /* LaunchScreen.storyboard */, 84 | 6201F16D23BD333500378D5E /* Info.plist */, 85 | 6201F16723BD333500378D5E /* Preview Content */, 86 | ); 87 | path = CloudMessageTest; 88 | sourceTree = ""; 89 | }; 90 | 6201F16723BD333500378D5E /* Preview Content */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 6201F16823BD333500378D5E /* Preview Assets.xcassets */, 94 | ); 95 | path = "Preview Content"; 96 | sourceTree = ""; 97 | }; 98 | BCA4D39B3A0559B3E376ED88 /* Frameworks */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 4B1C751A37EBF52C0FFF3F12 /* Pods_CloudMessageTest.framework */, 102 | ); 103 | name = Frameworks; 104 | sourceTree = ""; 105 | }; 106 | /* End PBXGroup section */ 107 | 108 | /* Begin PBXNativeTarget section */ 109 | 6201F15B23BD333200378D5E /* CloudMessageTest */ = { 110 | isa = PBXNativeTarget; 111 | buildConfigurationList = 6201F17023BD333500378D5E /* Build configuration list for PBXNativeTarget "CloudMessageTest" */; 112 | buildPhases = ( 113 | D41E2C5CF50A111BD0E90D7F /* [CP] Check Pods Manifest.lock */, 114 | 6201F15823BD333200378D5E /* Sources */, 115 | 6201F15923BD333200378D5E /* Frameworks */, 116 | 6201F15A23BD333200378D5E /* Resources */, 117 | 32844735FC1799BEECC5AEDA /* [CP] Embed Pods Frameworks */, 118 | ); 119 | buildRules = ( 120 | ); 121 | dependencies = ( 122 | ); 123 | name = CloudMessageTest; 124 | productName = CloudMessageTest; 125 | productReference = 6201F15C23BD333200378D5E /* CloudMessageTest.app */; 126 | productType = "com.apple.product-type.application"; 127 | }; 128 | /* End PBXNativeTarget section */ 129 | 130 | /* Begin PBXProject section */ 131 | 6201F15423BD333200378D5E /* Project object */ = { 132 | isa = PBXProject; 133 | attributes = { 134 | LastSwiftUpdateCheck = 1130; 135 | LastUpgradeCheck = 1130; 136 | ORGANIZATIONNAME = "YOUNGSIC KIM"; 137 | TargetAttributes = { 138 | 6201F15B23BD333200378D5E = { 139 | CreatedOnToolsVersion = 11.3; 140 | }; 141 | }; 142 | }; 143 | buildConfigurationList = 6201F15723BD333200378D5E /* Build configuration list for PBXProject "CloudMessageTest" */; 144 | compatibilityVersion = "Xcode 9.3"; 145 | developmentRegion = en; 146 | hasScannedForEncodings = 0; 147 | knownRegions = ( 148 | en, 149 | Base, 150 | ); 151 | mainGroup = 6201F15323BD333200378D5E; 152 | productRefGroup = 6201F15D23BD333200378D5E /* Products */; 153 | projectDirPath = ""; 154 | projectRoot = ""; 155 | targets = ( 156 | 6201F15B23BD333200378D5E /* CloudMessageTest */, 157 | ); 158 | }; 159 | /* End PBXProject section */ 160 | 161 | /* Begin PBXResourcesBuildPhase section */ 162 | 6201F15A23BD333200378D5E /* Resources */ = { 163 | isa = PBXResourcesBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | 6201F16C23BD333500378D5E /* LaunchScreen.storyboard in Resources */, 167 | 6201F16923BD333500378D5E /* Preview Assets.xcassets in Resources */, 168 | 6201F16623BD333500378D5E /* Assets.xcassets in Resources */, 169 | ); 170 | runOnlyForDeploymentPostprocessing = 0; 171 | }; 172 | /* End PBXResourcesBuildPhase section */ 173 | 174 | /* Begin PBXShellScriptBuildPhase section */ 175 | 32844735FC1799BEECC5AEDA /* [CP] Embed Pods Frameworks */ = { 176 | isa = PBXShellScriptBuildPhase; 177 | buildActionMask = 2147483647; 178 | files = ( 179 | ); 180 | inputFileListPaths = ( 181 | "${PODS_ROOT}/Target Support Files/Pods-CloudMessageTest/Pods-CloudMessageTest-frameworks-${CONFIGURATION}-input-files.xcfilelist", 182 | ); 183 | name = "[CP] Embed Pods Frameworks"; 184 | outputFileListPaths = ( 185 | "${PODS_ROOT}/Target Support Files/Pods-CloudMessageTest/Pods-CloudMessageTest-frameworks-${CONFIGURATION}-output-files.xcfilelist", 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | shellPath = /bin/sh; 189 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CloudMessageTest/Pods-CloudMessageTest-frameworks.sh\"\n"; 190 | showEnvVarsInLog = 0; 191 | }; 192 | D41E2C5CF50A111BD0E90D7F /* [CP] Check Pods Manifest.lock */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputFileListPaths = ( 198 | ); 199 | inputPaths = ( 200 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 201 | "${PODS_ROOT}/Manifest.lock", 202 | ); 203 | name = "[CP] Check Pods Manifest.lock"; 204 | outputFileListPaths = ( 205 | ); 206 | outputPaths = ( 207 | "$(DERIVED_FILE_DIR)/Pods-CloudMessageTest-checkManifestLockResult.txt", 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | shellPath = /bin/sh; 211 | 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"; 212 | showEnvVarsInLog = 0; 213 | }; 214 | /* End PBXShellScriptBuildPhase section */ 215 | 216 | /* Begin PBXSourcesBuildPhase section */ 217 | 6201F15823BD333200378D5E /* Sources */ = { 218 | isa = PBXSourcesBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | 6201F16023BD333200378D5E /* AppDelegate.swift in Sources */, 222 | 6201F16223BD333200378D5E /* SceneDelegate.swift in Sources */, 223 | 6201F16423BD333200378D5E /* ContentView.swift in Sources */, 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | }; 227 | /* End PBXSourcesBuildPhase section */ 228 | 229 | /* Begin PBXVariantGroup section */ 230 | 6201F16A23BD333500378D5E /* LaunchScreen.storyboard */ = { 231 | isa = PBXVariantGroup; 232 | children = ( 233 | 6201F16B23BD333500378D5E /* Base */, 234 | ); 235 | name = LaunchScreen.storyboard; 236 | sourceTree = ""; 237 | }; 238 | /* End PBXVariantGroup section */ 239 | 240 | /* Begin XCBuildConfiguration section */ 241 | 6201F16E23BD333500378D5E /* Debug */ = { 242 | isa = XCBuildConfiguration; 243 | buildSettings = { 244 | ALWAYS_SEARCH_USER_PATHS = NO; 245 | CLANG_ANALYZER_NONNULL = YES; 246 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_ENABLE_OBJC_WEAK = YES; 252 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 253 | CLANG_WARN_BOOL_CONVERSION = YES; 254 | CLANG_WARN_COMMA = YES; 255 | CLANG_WARN_CONSTANT_CONVERSION = YES; 256 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 258 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 259 | CLANG_WARN_EMPTY_BODY = YES; 260 | CLANG_WARN_ENUM_CONVERSION = YES; 261 | CLANG_WARN_INFINITE_RECURSION = YES; 262 | CLANG_WARN_INT_CONVERSION = YES; 263 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 264 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 265 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 266 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 267 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 268 | CLANG_WARN_STRICT_PROTOTYPES = YES; 269 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 270 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 271 | CLANG_WARN_UNREACHABLE_CODE = YES; 272 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 273 | COPY_PHASE_STRIP = NO; 274 | DEBUG_INFORMATION_FORMAT = dwarf; 275 | ENABLE_STRICT_OBJC_MSGSEND = YES; 276 | ENABLE_TESTABILITY = YES; 277 | GCC_C_LANGUAGE_STANDARD = gnu11; 278 | GCC_DYNAMIC_NO_PIC = NO; 279 | GCC_NO_COMMON_BLOCKS = YES; 280 | GCC_OPTIMIZATION_LEVEL = 0; 281 | GCC_PREPROCESSOR_DEFINITIONS = ( 282 | "DEBUG=1", 283 | "$(inherited)", 284 | ); 285 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 286 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 287 | GCC_WARN_UNDECLARED_SELECTOR = YES; 288 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 289 | GCC_WARN_UNUSED_FUNCTION = YES; 290 | GCC_WARN_UNUSED_VARIABLE = YES; 291 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 292 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 293 | MTL_FAST_MATH = YES; 294 | ONLY_ACTIVE_ARCH = YES; 295 | SDKROOT = iphoneos; 296 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 297 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 298 | }; 299 | name = Debug; 300 | }; 301 | 6201F16F23BD333500378D5E /* Release */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ALWAYS_SEARCH_USER_PATHS = NO; 305 | CLANG_ANALYZER_NONNULL = YES; 306 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_ENABLE_OBJC_WEAK = YES; 312 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 313 | CLANG_WARN_BOOL_CONVERSION = YES; 314 | CLANG_WARN_COMMA = YES; 315 | CLANG_WARN_CONSTANT_CONVERSION = YES; 316 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 317 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 318 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 319 | CLANG_WARN_EMPTY_BODY = YES; 320 | CLANG_WARN_ENUM_CONVERSION = YES; 321 | CLANG_WARN_INFINITE_RECURSION = YES; 322 | CLANG_WARN_INT_CONVERSION = YES; 323 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 325 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 326 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 327 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 328 | CLANG_WARN_STRICT_PROTOTYPES = YES; 329 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 330 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 331 | CLANG_WARN_UNREACHABLE_CODE = YES; 332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 333 | COPY_PHASE_STRIP = NO; 334 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 335 | ENABLE_NS_ASSERTIONS = NO; 336 | ENABLE_STRICT_OBJC_MSGSEND = YES; 337 | GCC_C_LANGUAGE_STANDARD = gnu11; 338 | GCC_NO_COMMON_BLOCKS = YES; 339 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 340 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 341 | GCC_WARN_UNDECLARED_SELECTOR = YES; 342 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 343 | GCC_WARN_UNUSED_FUNCTION = YES; 344 | GCC_WARN_UNUSED_VARIABLE = YES; 345 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 346 | MTL_ENABLE_DEBUG_INFO = NO; 347 | MTL_FAST_MATH = YES; 348 | SDKROOT = iphoneos; 349 | SWIFT_COMPILATION_MODE = wholemodule; 350 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 351 | VALIDATE_PRODUCT = YES; 352 | }; 353 | name = Release; 354 | }; 355 | 6201F17123BD333500378D5E /* Debug */ = { 356 | isa = XCBuildConfiguration; 357 | baseConfigurationReference = ED3A2D181590A5991CB78BC6 /* Pods-CloudMessageTest.debug.xcconfig */; 358 | buildSettings = { 359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 360 | CODE_SIGN_ENTITLEMENTS = CloudMessageTest/CloudMessageTestDebug.entitlements; 361 | CODE_SIGN_IDENTITY = "iPhone Developer"; 362 | CODE_SIGN_STYLE = Manual; 363 | DEVELOPMENT_ASSET_PATHS = "\"CloudMessageTest/Preview Content\""; 364 | DEVELOPMENT_TEAM = 33BKRBW8SH; 365 | ENABLE_PREVIEWS = YES; 366 | INFOPLIST_FILE = CloudMessageTest/Info.plist; 367 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 368 | LD_RUNPATH_SEARCH_PATHS = ( 369 | "$(inherited)", 370 | "@executable_path/Frameworks", 371 | ); 372 | PRODUCT_BUNDLE_IDENTIFIER = com.loydkim.sample.cloudmessagetest; 373 | PRODUCT_NAME = "$(TARGET_NAME)"; 374 | PROVISIONING_PROFILE_SPECIFIER = CloudMessageTestDevelopment; 375 | SWIFT_VERSION = 5.0; 376 | TARGETED_DEVICE_FAMILY = "1,2"; 377 | }; 378 | name = Debug; 379 | }; 380 | 6201F17223BD333500378D5E /* Release */ = { 381 | isa = XCBuildConfiguration; 382 | baseConfigurationReference = A5D84238382BC6FDBB906873 /* Pods-CloudMessageTest.release.xcconfig */; 383 | buildSettings = { 384 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 385 | CODE_SIGN_ENTITLEMENTS = CloudMessageTest/CloudMessageTestRelease.entitlements; 386 | CODE_SIGN_IDENTITY = "iPhone Developer"; 387 | CODE_SIGN_STYLE = Manual; 388 | DEVELOPMENT_ASSET_PATHS = "\"CloudMessageTest/Preview Content\""; 389 | DEVELOPMENT_TEAM = 33BKRBW8SH; 390 | ENABLE_PREVIEWS = YES; 391 | INFOPLIST_FILE = CloudMessageTest/Info.plist; 392 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 393 | LD_RUNPATH_SEARCH_PATHS = ( 394 | "$(inherited)", 395 | "@executable_path/Frameworks", 396 | ); 397 | PRODUCT_BUNDLE_IDENTIFIER = com.loydkim.sample.cloudmessagetest; 398 | PRODUCT_NAME = "$(TARGET_NAME)"; 399 | PROVISIONING_PROFILE_SPECIFIER = CloudMessageTestDevelopment; 400 | SWIFT_VERSION = 5.0; 401 | TARGETED_DEVICE_FAMILY = "1,2"; 402 | }; 403 | name = Release; 404 | }; 405 | /* End XCBuildConfiguration section */ 406 | 407 | /* Begin XCConfigurationList section */ 408 | 6201F15723BD333200378D5E /* Build configuration list for PBXProject "CloudMessageTest" */ = { 409 | isa = XCConfigurationList; 410 | buildConfigurations = ( 411 | 6201F16E23BD333500378D5E /* Debug */, 412 | 6201F16F23BD333500378D5E /* Release */, 413 | ); 414 | defaultConfigurationIsVisible = 0; 415 | defaultConfigurationName = Release; 416 | }; 417 | 6201F17023BD333500378D5E /* Build configuration list for PBXNativeTarget "CloudMessageTest" */ = { 418 | isa = XCConfigurationList; 419 | buildConfigurations = ( 420 | 6201F17123BD333500378D5E /* Debug */, 421 | 6201F17223BD333500378D5E /* Release */, 422 | ); 423 | defaultConfigurationIsVisible = 0; 424 | defaultConfigurationName = Release; 425 | }; 426 | /* End XCConfigurationList section */ 427 | }; 428 | rootObject = 6201F15423BD333200378D5E /* Project object */; 429 | } 430 | -------------------------------------------------------------------------------- /CloudMessageTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CloudMessageTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CloudMessageTest.xcodeproj/project.xcworkspace/xcuserdata/youngsickim.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest.xcodeproj/project.xcworkspace/xcuserdata/youngsickim.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CloudMessageTest.xcodeproj/xcuserdata/youngsickim.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CloudMessageTest.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 15 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /CloudMessageTest.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CloudMessageTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CloudMessageTest.xcworkspace/xcuserdata/youngsickim.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest.xcworkspace/xcuserdata/youngsickim.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CloudMessageTest/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CloudMessageTest 4 | // 5 | // Created by YOUNGSIC KIM on 2020-01-01. 6 | // Copyright © 2020 YOUNGSIC KIM. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import UserNotifications 11 | import Firebase 12 | 13 | @UIApplicationMain 14 | class AppDelegate: UIResponder, UIApplicationDelegate { 15 | 16 | let gcmMessageIDKey = "gcm.message_id" 17 | 18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 19 | // Override point for customization after application launch. 20 | // Use Firebase library to configure APIs 21 | FirebaseApp.configure() 22 | 23 | // [START set_messaging_delegate] 24 | Messaging.messaging().delegate = self 25 | // [END set_messaging_delegate] 26 | // Register for remote notifications. This shows a permission dialog on first run, to 27 | // show the dialog at a more appropriate time move this registration accordingly. 28 | // [START register_for_notifications] 29 | if #available(iOS 10.0, *) { 30 | // For iOS 10 display notification (sent via APNS) 31 | UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate 32 | 33 | let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] 34 | UNUserNotificationCenter.current().requestAuthorization( 35 | options: authOptions, 36 | completionHandler: {_, _ in }) 37 | } else { 38 | let settings: UIUserNotificationSettings = 39 | UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil) 40 | application.registerUserNotificationSettings(settings) 41 | } 42 | 43 | application.registerForRemoteNotifications() 44 | 45 | return true 46 | } 47 | 48 | 49 | // [START receive_message] 50 | func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) { 51 | // If you are receiving a notification message while your app is in the background, 52 | // this callback will not be fired till the user taps on the notification launching the application. 53 | // TODO: Handle data of notification 54 | // With swizzling disabled you must let Messaging know about the message, for Analytics 55 | // Messaging.messaging().appDidReceiveMessage(userInfo) 56 | // Print message ID. 57 | if let messageID = userInfo[gcmMessageIDKey] { 58 | print("Message ID: \(messageID)") 59 | } 60 | 61 | // Print full message. 62 | print(userInfo) 63 | } 64 | 65 | func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], 66 | fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { 67 | // If you are receiving a notification message while your app is in the background, 68 | // this callback will not be fired till the user taps on the notification launching the application. 69 | // TODO: Handle data of notification 70 | // With swizzling disabled you must let Messaging know about the message, for Analytics 71 | // Messaging.messaging().appDidReceiveMessage(userInfo) 72 | // Print message ID. 73 | if let messageID = userInfo[gcmMessageIDKey] { 74 | print("Message ID: \(messageID)") 75 | } 76 | 77 | // Print full message. 78 | print(userInfo) 79 | 80 | completionHandler(UIBackgroundFetchResult.newData) 81 | } 82 | // [END receive_message] 83 | func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { 84 | print("Unable to register for remote notifications: \(error.localizedDescription)") 85 | } 86 | 87 | // This function is added here only for debugging purposes, and can be removed if swizzling is enabled. 88 | // If swizzling is disabled then this function must be implemented so that the APNs token can be paired to 89 | // the FCM registration token. 90 | func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { 91 | print("APNs token retrieved: \(deviceToken)") 92 | 93 | // With swizzling disabled you must set the APNs token here. 94 | Messaging.messaging().apnsToken = deviceToken 95 | } 96 | 97 | // MARK: UISceneSession Lifecycle 98 | 99 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 100 | // Called when a new scene session is being created. 101 | // Use this method to select a configuration to create the new scene with. 102 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 103 | } 104 | 105 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 106 | // Called when the user discards a scene session. 107 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 108 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 109 | } 110 | 111 | 112 | } 113 | 114 | extension AppDelegate : MessagingDelegate { 115 | // [START refresh_token] 116 | func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) { 117 | print("Firebase registration token: \(fcmToken)") 118 | 119 | let dataDict:[String: String] = ["token": fcmToken] 120 | NotificationCenter.default.post(name: Notification.Name("FCMToken"), object: nil, userInfo: dataDict) 121 | // TODO: If necessary send token to application server. 122 | // Note: This callback is fired at each app startup and whenever a new token is generated. 123 | } 124 | // [END refresh_token] 125 | // [START ios_10_data_message] 126 | // Receive data messages on iOS 10+ directly from FCM (bypassing APNs) when the app is in the foreground. 127 | // To enable direct data messages, you can set Messaging.messaging().shouldEstablishDirectChannel to true. 128 | func messaging(_ messaging: Messaging, didReceive remoteMessage: MessagingRemoteMessage) { 129 | print("Received data message: \(remoteMessage.appData)") 130 | } 131 | // [END ios_10_data_message] 132 | } 133 | -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-40x40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-60x60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "20x20", 53 | "idiom" : "ipad", 54 | "filename" : "Icon-App-20x20@1x.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@2x-1.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-29x29@1x.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@2x-1.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-40x40@1x.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@2x-1.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-76x76@1x.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@2x.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-83.5x83.5@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "1024x1024", 107 | "idiom" : "ios-marketing", 108 | "filename" : "bellIcon2.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/AppIcon.appiconset/bellIcon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loydkim/FireBase_CloudMessage_SwiftUI_Example-Notification-APNs-/1ebfce21f2f1ca121cd1ddaff217f91dbf8548bd/CloudMessageTest/Assets.xcassets/AppIcon.appiconset/bellIcon2.png -------------------------------------------------------------------------------- /CloudMessageTest/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CloudMessageTest/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 | -------------------------------------------------------------------------------- /CloudMessageTest/CloudMessageTestDebug.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /CloudMessageTest/CloudMessageTestRelease.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /CloudMessageTest/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // CloudMessageTest 4 | // 5 | // Created by YOUNGSIC KIM on 2020-01-01. 6 | // Copyright © 2020 YOUNGSIC KIM. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import Firebase 11 | 12 | // Please change it your physical phone device FCM Token 13 | // To get it, touch the handleLogTokenTouch button and see log 14 | let ReceiverFCMToken = "Physical_Phone_Receiver_FCMToken_String" 15 | 16 | // Please change it your Firebase Legacy server key 17 | // Firebase -> Project settings -> Cloud messaging -> Legacy server key 18 | let legacyServerKey = "Your_Firebase_Legacy_Server_Key_String" 19 | 20 | struct ContentView: View { 21 | @State private var fcmTokenMessage = "fcmTokenMessage" 22 | @State private var instanceIDTokenMessage = "instanceIDTokenMessage" 23 | 24 | @State private var notificationTitle: String = "" 25 | @State private var notificationContent: String = "" 26 | var body: some View { 27 | VStack { 28 | Text(fcmTokenMessage).padding(20) 29 | Text(instanceIDTokenMessage).padding(20) 30 | Button(action: {self.handleLogTokenTouch()}) { 31 | Text("Get user FCM Token String").font(.title) 32 | }.padding(20) 33 | TextField("Add Notification Title", text: $notificationTitle).textFieldStyle(RoundedBorderTextFieldStyle()).padding(20) 34 | TextField("Add Notification Content", text: $notificationContent).textFieldStyle(RoundedBorderTextFieldStyle()).padding(20) 35 | Button(action: {self.sendMessageTouser(to: ReceiverFCMToken, title: self.notificationTitle, body: self.notificationContent) 36 | self.notificationTitle = "" 37 | self.notificationContent = "" 38 | }) { 39 | Text("Send message to User").font(.title) 40 | }.padding(20) 41 | } 42 | } 43 | 44 | func sendMessageTouser(to token: String, title: String, body: String) { 45 | print("sendMessageTouser()") 46 | let urlString = "https://fcm.googleapis.com/fcm/send" 47 | let url = NSURL(string: urlString)! 48 | let paramString: [String : Any] = ["to" : token, 49 | "notification" : ["title" : title, "body" : body], 50 | "data" : ["user" : "test_id"] 51 | ] 52 | let request = NSMutableURLRequest(url: url as URL) 53 | request.httpMethod = "POST" 54 | request.httpBody = try? JSONSerialization.data(withJSONObject:paramString, options: [.prettyPrinted]) 55 | request.setValue("application/json", forHTTPHeaderField: "Content-Type") 56 | request.setValue("key=\(legacyServerKey)", forHTTPHeaderField: "Authorization") 57 | let task = URLSession.shared.dataTask(with: request as URLRequest) { (data, response, error) in 58 | do { 59 | if let jsonData = data { 60 | if let jsonDataDict = try JSONSerialization.jsonObject(with: jsonData, options: JSONSerialization.ReadingOptions.allowFragments) as? [String: AnyObject] { 61 | NSLog("Received data:\n\(jsonDataDict))") 62 | } 63 | } 64 | } catch let err as NSError { 65 | print(err.debugDescription) 66 | } 67 | } 68 | task.resume() 69 | } 70 | 71 | func handleLogTokenTouch() { 72 | // [START log_fcm_reg_token] 73 | let token = Messaging.messaging().fcmToken 74 | print("FCM token: \(token ?? "")") 75 | // [END log_fcm_reg_token] 76 | self.fcmTokenMessage = "Logged FCM token: \(token ?? "")" 77 | 78 | // [START log_iid_reg_token] 79 | InstanceID.instanceID().instanceID { (result, error) in 80 | if let error = error { 81 | print("Error fetching remote instance ID: \(error)") 82 | } else if let result = result { 83 | print("Remote instance ID token: \(result.token)") 84 | self.instanceIDTokenMessage = "Remote InstanceID token: \(result.token)" 85 | } 86 | } 87 | // [END log_iid_reg_token] 88 | } 89 | } 90 | 91 | struct ContentView_Previews: PreviewProvider { 92 | static var previews: some View { 93 | ContentView() 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /CloudMessageTest/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 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | 37 | 38 | 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /CloudMessageTest/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CloudMessageTest/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // CloudMessageTest 4 | // 5 | // Created by YOUNGSIC KIM on 2020-01-01. 6 | // Copyright © 2020 YOUNGSIC KIM. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 21 | 22 | // Create the SwiftUI view that provides the window contents. 23 | let contentView = ContentView() 24 | 25 | // Use a UIHostingController as window root view controller. 26 | if let windowScene = scene as? UIWindowScene { 27 | let window = UIWindow(windowScene: windowScene) 28 | window.rootViewController = UIHostingController(rootView: contentView) 29 | self.window = window 30 | window.makeKeyAndVisible() 31 | } 32 | } 33 | 34 | func sceneDidDisconnect(_ scene: UIScene) { 35 | // Called as the scene is being released by the system. 36 | // This occurs shortly after the scene enters the background, or when its session is discarded. 37 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 38 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 39 | } 40 | 41 | func sceneDidBecomeActive(_ scene: UIScene) { 42 | // Called when the scene has moved from an inactive state to an active state. 43 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 44 | } 45 | 46 | func sceneWillResignActive(_ scene: UIScene) { 47 | // Called when the scene will move from an active state to an inactive state. 48 | // This may occur due to temporary interruptions (ex. an incoming phone call). 49 | } 50 | 51 | func sceneWillEnterForeground(_ scene: UIScene) { 52 | // Called as the scene transitions from the background to the foreground. 53 | // Use this method to undo the changes made on entering the background. 54 | } 55 | 56 | func sceneDidEnterBackground(_ scene: UIScene) { 57 | // Called as the scene transitions from the foreground to the background. 58 | // Use this method to save data, release shared resources, and store enough scene-specific state information 59 | // to restore the scene back to its current state. 60 | } 61 | 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'CloudMessageTest' do 5 | # Comment the next line if you don't want to use dynamic frameworks 6 | use_frameworks! 7 | # Add the Firebase pod for Google Analytics 8 | pod 'Firebase/Analytics' 9 | 10 | # Add the pod for Firebase Cloud Messaging 11 | pod 'Firebase/Messaging' 12 | # Pods for CloudMessageTest 13 | 14 | end 15 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Firebase/Analytics (6.14.0): 3 | - Firebase/Core 4 | - Firebase/Core (6.14.0): 5 | - Firebase/CoreOnly 6 | - FirebaseAnalytics (= 6.1.7) 7 | - Firebase/CoreOnly (6.14.0): 8 | - FirebaseCore (= 6.5.0) 9 | - Firebase/Messaging (6.14.0): 10 | - Firebase/CoreOnly 11 | - FirebaseMessaging (~> 4.1.10) 12 | - FirebaseAnalytics (6.1.7): 13 | - FirebaseCore (~> 6.5) 14 | - FirebaseInstanceID (~> 4.2) 15 | - GoogleAppMeasurement (= 6.1.7) 16 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 17 | - GoogleUtilities/MethodSwizzler (~> 6.0) 18 | - GoogleUtilities/Network (~> 6.0) 19 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 20 | - nanopb (= 0.3.9011) 21 | - FirebaseAnalyticsInterop (1.4.0) 22 | - FirebaseCore (6.5.0): 23 | - FirebaseCoreDiagnostics (~> 1.0) 24 | - FirebaseCoreDiagnosticsInterop (~> 1.0) 25 | - GoogleUtilities/Environment (~> 6.4) 26 | - GoogleUtilities/Logger (~> 6.4) 27 | - FirebaseCoreDiagnostics (1.1.2): 28 | - FirebaseCoreDiagnosticsInterop (~> 1.0) 29 | - GoogleDataTransportCCTSupport (~> 1.0) 30 | - GoogleUtilities/Environment (~> 6.2) 31 | - GoogleUtilities/Logger (~> 6.2) 32 | - nanopb (~> 0.3.901) 33 | - FirebaseCoreDiagnosticsInterop (1.1.0) 34 | - FirebaseInstanceID (4.2.8): 35 | - FirebaseCore (~> 6.5) 36 | - GoogleUtilities/Environment (~> 6.4) 37 | - GoogleUtilities/UserDefaults (~> 6.4) 38 | - FirebaseMessaging (4.1.10): 39 | - FirebaseAnalyticsInterop (~> 1.3) 40 | - FirebaseCore (~> 6.2) 41 | - FirebaseInstanceID (~> 4.1) 42 | - GoogleUtilities/AppDelegateSwizzler (~> 6.2) 43 | - GoogleUtilities/Environment (~> 6.2) 44 | - GoogleUtilities/Reachability (~> 6.2) 45 | - GoogleUtilities/UserDefaults (~> 6.2) 46 | - Protobuf (>= 3.9.2, ~> 3.9) 47 | - GoogleAppMeasurement (6.1.7): 48 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 49 | - GoogleUtilities/MethodSwizzler (~> 6.0) 50 | - GoogleUtilities/Network (~> 6.0) 51 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 52 | - nanopb (= 0.3.9011) 53 | - GoogleDataTransport (3.2.0) 54 | - GoogleDataTransportCCTSupport (1.2.3): 55 | - GoogleDataTransport (~> 3.2) 56 | - nanopb (~> 0.3.901) 57 | - GoogleUtilities/AppDelegateSwizzler (6.4.0): 58 | - GoogleUtilities/Environment 59 | - GoogleUtilities/Logger 60 | - GoogleUtilities/Network 61 | - GoogleUtilities/Environment (6.4.0) 62 | - GoogleUtilities/Logger (6.4.0): 63 | - GoogleUtilities/Environment 64 | - GoogleUtilities/MethodSwizzler (6.4.0): 65 | - GoogleUtilities/Logger 66 | - GoogleUtilities/Network (6.4.0): 67 | - GoogleUtilities/Logger 68 | - "GoogleUtilities/NSData+zlib" 69 | - GoogleUtilities/Reachability 70 | - "GoogleUtilities/NSData+zlib (6.4.0)" 71 | - GoogleUtilities/Reachability (6.4.0): 72 | - GoogleUtilities/Logger 73 | - GoogleUtilities/UserDefaults (6.4.0): 74 | - GoogleUtilities/Logger 75 | - nanopb (0.3.9011): 76 | - nanopb/decode (= 0.3.9011) 77 | - nanopb/encode (= 0.3.9011) 78 | - nanopb/decode (0.3.9011) 79 | - nanopb/encode (0.3.9011) 80 | - Protobuf (3.11.2) 81 | 82 | DEPENDENCIES: 83 | - Firebase/Analytics 84 | - Firebase/Messaging 85 | 86 | SPEC REPOS: 87 | trunk: 88 | - Firebase 89 | - FirebaseAnalytics 90 | - FirebaseAnalyticsInterop 91 | - FirebaseCore 92 | - FirebaseCoreDiagnostics 93 | - FirebaseCoreDiagnosticsInterop 94 | - FirebaseInstanceID 95 | - FirebaseMessaging 96 | - GoogleAppMeasurement 97 | - GoogleDataTransport 98 | - GoogleDataTransportCCTSupport 99 | - GoogleUtilities 100 | - nanopb 101 | - Protobuf 102 | 103 | SPEC CHECKSUMS: 104 | Firebase: 0219bb4782eb1406f1b9b0628a2e625484ce910d 105 | FirebaseAnalytics: f68b9f3f1241385129ae0a83b63627fc420c05e5 106 | FirebaseAnalyticsInterop: d48b6ab67bcf016a05e55b71fc39c61c0cb6b7f3 107 | FirebaseCore: 632e05cc5e1199d9147122c16d92305eb04c34bd 108 | FirebaseCoreDiagnostics: 511f4f3ed7d440bb69127e8b97c2bc8befae639e 109 | FirebaseCoreDiagnosticsInterop: e9b1b023157e3a2fc6418b5cb601e79b9af7b3a0 110 | FirebaseInstanceID: ce993a3c3670a8f5d47ce371ac5d143c560608c5 111 | FirebaseMessaging: 089b7a4991425783384acc8bcefcd78c0af913bd 112 | GoogleAppMeasurement: db118eb61a97dd8c4f7014e368d3c335cbbcf80a 113 | GoogleDataTransport: 8e9b210c97d55fbff306cc5468ff91b9cb32dcf5 114 | GoogleDataTransportCCTSupport: 202d7cdf9c4a7d81a2bb7f7e7e1ba6faa421b1f2 115 | GoogleUtilities: 29bd0d8f850efbd28cff6d99e8b7da1f8d236bcf 116 | nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd 117 | Protobuf: dd1aaea7140debfe4dd0683fb8ef208e527ae153 118 | 119 | PODFILE CHECKSUM: 7427197a32dba2080ec121b4da754407858f83b0 120 | 121 | COCOAPODS: 1.8.4 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FireBase_CloudMessage_SwiftUI_Test 2 | 3 | Please watch the youtube video to set up it 4 | 5 | ** Please click the Image ** 6 | 7 | [![Youtube](https://img.youtube.com/vi/ouy_hegQ_6k/0.jpg)](https://www.youtube.com/watch?v=ouy_hegQ_6k) 8 | 9 | Most of the apps using notification. The firebase offer cloud messaging for users. Here is a cloud messaging example using APNs ( apple push notification ) 10 | 11 | * Reference links: 12 | 13 | 1. Youtube link: https://youtu.be/ouy_hegQ_6k 14 | 15 | 2. Firebase cloud messaging document site: https://firebase.google.com/docs/cloud-messaging 16 | 3. Apple Developer Member Center: https://developer.apple.com/account/ 17 | 4. Send a messaging reference link: https://firebase.google.com/docs/cloud-messaging/ios/device-group 18 | 19 | * Develop environment. 20 | 21 | - Xcode Version: 11.3 22 | - Language: Swift 5 23 | - OS Version: MacOS Catalina 10.15.2 24 | 25 | #SwiftUI, #iOS, #Notification 26 | --------------------------------------------------------------------------------