From c522e2d466382d6f080743f76906287c87e3d87c Mon Sep 17 00:00:00 2001 From: Ryan Lepinski Date: Thu, 9 May 2024 15:38:04 -0700 Subject: [PATCH] Add service extension --- .../AirshipExample.xcodeproj/project.pbxproj | 217 ++++++++++++++++++ .../Info.plist | 13 ++ .../NotificationService.swift | 4 + example/ios/Podfile | 6 + example/ios/Podfile.lock | 6 +- 5 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 example/ios/AirshipExampleNotificationServiceExtension/Info.plist create mode 100644 example/ios/AirshipExampleNotificationServiceExtension/NotificationService.swift diff --git a/example/ios/AirshipExample.xcodeproj/project.pbxproj b/example/ios/AirshipExample.xcodeproj/project.pbxproj index 78658e81..409f346c 100644 --- a/example/ios/AirshipExample.xcodeproj/project.pbxproj +++ b/example/ios/AirshipExample.xcodeproj/project.pbxproj @@ -12,6 +12,9 @@ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 17AD33A85E6C01F58244C634 /* libPods-AirshipExample-AirshipExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 172EB030F35BD75FC2FBDF81 /* libPods-AirshipExample-AirshipExampleTests.a */; }; + 30F67F752E2CC8EC2DD20B65 /* libPods-AirshipExampleNotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D225AAD537A45E26F8E01F4 /* libPods-AirshipExampleNotificationServiceExtension.a */; }; + 6E1F6ECD2BED7F6400CFC7A7 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E1F6ECC2BED7F6400CFC7A7 /* NotificationService.swift */; }; + 6E1F6ED12BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 6E1F6ECA2BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 6EC755922A4DE34400851ABB /* AirshipExtender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EC755912A4DE34400851ABB /* AirshipExtender.swift */; }; 7F2F1DABF8580D87B80F17E2 /* libPods-AirshipExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 863F8087D5417FA132545EAF /* libPods-AirshipExample.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; @@ -26,8 +29,29 @@ remoteGlobalIDString = 13B07F861A680F5B00A75B9A; remoteInfo = AirshipExample; }; + 6E1F6ECF2BED7F6400CFC7A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6E1F6EC92BED7F6400CFC7A7; + remoteInfo = AirshipExampleNotificationServiceExtension; + }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 6E1F6ED22BED7F6500CFC7A7 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 6E1F6ED12BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 00E356EE1AD99517003FC87E /* AirshipExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AirshipExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -40,13 +64,21 @@ 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = AirshipExample/main.m; sourceTree = ""; }; 172EB030F35BD75FC2FBDF81 /* libPods-AirshipExample-AirshipExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AirshipExample-AirshipExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1D1A50842E429BB601AC023E /* Pods-AirshipExample-AirshipExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirshipExample-AirshipExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-AirshipExample-AirshipExampleTests/Pods-AirshipExample-AirshipExampleTests.debug.xcconfig"; sourceTree = ""; }; + 23000B9078CCB22FACFCE54B /* Pods-AirshipExample-AirshipExampleNotificationServiceExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirshipExample-AirshipExampleNotificationServiceExtension.release.xcconfig"; path = "Target Support Files/Pods-AirshipExample-AirshipExampleNotificationServiceExtension/Pods-AirshipExample-AirshipExampleNotificationServiceExtension.release.xcconfig"; sourceTree = ""; }; + 5E791B9FFE1D3787C6E95D0C /* Pods-AirshipExample-AirshipExampleNotificationServiceExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirshipExample-AirshipExampleNotificationServiceExtension.debug.xcconfig"; path = "Target Support Files/Pods-AirshipExample-AirshipExampleNotificationServiceExtension/Pods-AirshipExample-AirshipExampleNotificationServiceExtension.debug.xcconfig"; sourceTree = ""; }; + 6E1F6ECA2BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = AirshipExampleNotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 6E1F6ECC2BED7F6400CFC7A7 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = ""; }; + 6E1F6ECE2BED7F6400CFC7A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 6E4CFD1B29899AB400D131A8 /* AirshipExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = AirshipExample.entitlements; path = AirshipExample/AirshipExample.entitlements; sourceTree = ""; }; + 6E69FDBD50BFBDB4EF69D730 /* Pods-AirshipExampleNotificationServiceExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirshipExampleNotificationServiceExtension.debug.xcconfig"; path = "Target Support Files/Pods-AirshipExampleNotificationServiceExtension/Pods-AirshipExampleNotificationServiceExtension.debug.xcconfig"; sourceTree = ""; }; 6EC755902A4DE34400851ABB /* AirshipExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AirshipExample-Bridging-Header.h"; sourceTree = ""; }; 6EC755912A4DE34400851ABB /* AirshipExtender.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AirshipExtender.swift; sourceTree = ""; }; + 7D225AAD537A45E26F8E01F4 /* libPods-AirshipExampleNotificationServiceExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AirshipExampleNotificationServiceExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = AirshipExample/LaunchScreen.storyboard; sourceTree = ""; }; 863F8087D5417FA132545EAF /* libPods-AirshipExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AirshipExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 9919EE642B23C58300A46BFE /* Fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Fonts; path = AirshipExample/Fonts; sourceTree = ""; }; CCD1F0677B48DA1FC02C5FB7 /* Pods-AirshipExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirshipExample.debug.xcconfig"; path = "Target Support Files/Pods-AirshipExample/Pods-AirshipExample.debug.xcconfig"; sourceTree = ""; }; + CD89318B3D18B469C530202E /* Pods-AirshipExampleNotificationServiceExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirshipExampleNotificationServiceExtension.release.xcconfig"; path = "Target Support Files/Pods-AirshipExampleNotificationServiceExtension/Pods-AirshipExampleNotificationServiceExtension.release.xcconfig"; sourceTree = ""; }; D8D59A18B359EC0EFD0C7468 /* Pods-AirshipExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirshipExample.release.xcconfig"; path = "Target Support Files/Pods-AirshipExample/Pods-AirshipExample.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; EE4E3AA3E1AB9868A99CB655 /* Pods-AirshipExample-AirshipExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirshipExample-AirshipExampleTests.release.xcconfig"; path = "Target Support Files/Pods-AirshipExample-AirshipExampleTests/Pods-AirshipExample-AirshipExampleTests.release.xcconfig"; sourceTree = ""; }; @@ -69,6 +101,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 6E1F6EC72BED7F6400CFC7A7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 30F67F752E2CC8EC2DD20B65 /* libPods-AirshipExampleNotificationServiceExtension.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -112,10 +152,20 @@ ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 863F8087D5417FA132545EAF /* libPods-AirshipExample.a */, 172EB030F35BD75FC2FBDF81 /* libPods-AirshipExample-AirshipExampleTests.a */, + 7D225AAD537A45E26F8E01F4 /* libPods-AirshipExampleNotificationServiceExtension.a */, ); name = Frameworks; sourceTree = ""; }; + 6E1F6ECB2BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension */ = { + isa = PBXGroup; + children = ( + 6E1F6ECC2BED7F6400CFC7A7 /* NotificationService.swift */, + 6E1F6ECE2BED7F6400CFC7A7 /* Info.plist */, + ); + path = AirshipExampleNotificationServiceExtension; + sourceTree = ""; + }; 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( @@ -129,6 +179,7 @@ 13B07FAE1A68108700A75B9A /* AirshipExample */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* AirshipExampleTests */, + 6E1F6ECB2BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, BBD78D7AC51CEA395F1C20DB /* Pods */, @@ -143,6 +194,7 @@ children = ( 13B07F961A680F5B00A75B9A /* AirshipExample.app */, 00E356EE1AD99517003FC87E /* AirshipExampleTests.xctest */, + 6E1F6ECA2BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension.appex */, ); name = Products; sourceTree = ""; @@ -154,6 +206,10 @@ D8D59A18B359EC0EFD0C7468 /* Pods-AirshipExample.release.xcconfig */, 1D1A50842E429BB601AC023E /* Pods-AirshipExample-AirshipExampleTests.debug.xcconfig */, EE4E3AA3E1AB9868A99CB655 /* Pods-AirshipExample-AirshipExampleTests.release.xcconfig */, + 5E791B9FFE1D3787C6E95D0C /* Pods-AirshipExample-AirshipExampleNotificationServiceExtension.debug.xcconfig */, + 23000B9078CCB22FACFCE54B /* Pods-AirshipExample-AirshipExampleNotificationServiceExtension.release.xcconfig */, + 6E69FDBD50BFBDB4EF69D730 /* Pods-AirshipExampleNotificationServiceExtension.debug.xcconfig */, + CD89318B3D18B469C530202E /* Pods-AirshipExampleNotificationServiceExtension.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -193,22 +249,43 @@ 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 20C0F93B867405BCC4F5937D /* [CP] Embed Pods Frameworks */, DEFFABE24ABD0235D15090E4 /* [CP] Copy Pods Resources */, + 6E1F6ED22BED7F6500CFC7A7 /* Embed Foundation Extensions */, ); buildRules = ( ); dependencies = ( + 6E1F6ED02BED7F6400CFC7A7 /* PBXTargetDependency */, ); name = AirshipExample; productName = AirshipExample; productReference = 13B07F961A680F5B00A75B9A /* AirshipExample.app */; productType = "com.apple.product-type.application"; }; + 6E1F6EC92BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6E1F6ED52BED7F6500CFC7A7 /* Build configuration list for PBXNativeTarget "AirshipExampleNotificationServiceExtension" */; + buildPhases = ( + 2148DBEE3781DE4B59E0AFB2 /* [CP] Check Pods Manifest.lock */, + 6E1F6EC62BED7F6400CFC7A7 /* Sources */, + 6E1F6EC72BED7F6400CFC7A7 /* Frameworks */, + 6E1F6EC82BED7F6400CFC7A7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AirshipExampleNotificationServiceExtension; + productName = AirshipExampleNotificationServiceExtension; + productReference = 6E1F6ECA2BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension.appex */; + productType = "com.apple.product-type.app-extension"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { + LastSwiftUpdateCheck = 1530; LastUpgradeCheck = 1210; TargetAttributes = { 00E356ED1AD99517003FC87E = { @@ -218,6 +295,9 @@ 13B07F861A680F5B00A75B9A = { LastSwiftMigration = 1430; }; + 6E1F6EC92BED7F6400CFC7A7 = { + CreatedOnToolsVersion = 15.3; + }; }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "AirshipExample" */; @@ -235,6 +315,7 @@ targets = ( 13B07F861A680F5B00A75B9A /* AirshipExample */, 00E356ED1AD99517003FC87E /* AirshipExampleTests */, + 6E1F6EC92BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension */, ); }; /* End PBXProject section */ @@ -257,6 +338,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 6E1F6EC82BED7F6400CFC7A7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -315,6 +403,28 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AirshipExample/Pods-AirshipExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + 2148DBEE3781DE4B59E0AFB2 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-AirshipExampleNotificationServiceExtension-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + 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"; + showEnvVarsInLog = 0; + }; 501EFA9BA2B5E6DE4CCF8281 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -409,6 +519,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 6E1F6EC62BED7F6400CFC7A7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6E1F6ECD2BED7F6400CFC7A7 /* NotificationService.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -417,6 +535,11 @@ target = 13B07F861A680F5B00A75B9A /* AirshipExample */; targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; }; + 6E1F6ED02BED7F6400CFC7A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6E1F6EC92BED7F6400CFC7A7 /* AirshipExampleNotificationServiceExtension */; + targetProxy = 6E1F6ECF2BED7F6400CFC7A7 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -477,6 +600,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CCD1F0677B48DA1FC02C5FB7 /* Pods-AirshipExample.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = AirshipExample/AirshipExample.entitlements; @@ -508,6 +632,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D8D59A18B359EC0EFD0C7468 /* Pods-AirshipExample.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = AirshipExample/AirshipExample.entitlements; @@ -533,6 +658,89 @@ }; name = Release; }; + 6E1F6ED32BED7F6500CFC7A7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6E69FDBD50BFBDB4EF69D730 /* Pods-AirshipExampleNotificationServiceExtension.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = PGJV57GD94; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = AirshipExampleNotificationServiceExtension/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = AirshipExampleNotificationServiceExtension; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 17.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.urbanairship.richpush.AirshipExampleNotificationServiceExtension; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 6E1F6ED42BED7F6500CFC7A7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CD89318B3D18B469C530202E /* Pods-AirshipExampleNotificationServiceExtension.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = PGJV57GD94; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = AirshipExampleNotificationServiceExtension/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = AirshipExampleNotificationServiceExtension; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 17.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.urbanairship.richpush.AirshipExampleNotificationServiceExtension; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; 83CBBA201A601CBA00E9B192 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -705,6 +913,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 6E1F6ED52BED7F6500CFC7A7 /* Build configuration list for PBXNativeTarget "AirshipExampleNotificationServiceExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6E1F6ED32BED7F6500CFC7A7 /* Debug */, + 6E1F6ED42BED7F6500CFC7A7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "AirshipExample" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/example/ios/AirshipExampleNotificationServiceExtension/Info.plist b/example/ios/AirshipExampleNotificationServiceExtension/Info.plist new file mode 100644 index 00000000..57421ebf --- /dev/null +++ b/example/ios/AirshipExampleNotificationServiceExtension/Info.plist @@ -0,0 +1,13 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.usernotifications.service + NSExtensionPrincipalClass + $(PRODUCT_MODULE_NAME).NotificationService + + + diff --git a/example/ios/AirshipExampleNotificationServiceExtension/NotificationService.swift b/example/ios/AirshipExampleNotificationServiceExtension/NotificationService.swift new file mode 100644 index 00000000..a6b8d850 --- /dev/null +++ b/example/ios/AirshipExampleNotificationServiceExtension/NotificationService.swift @@ -0,0 +1,4 @@ +import UserNotifications +import AirshipServiceExtension + +class NotificationService: UANotificationServiceExtension {} diff --git a/example/ios/Podfile b/example/ios/Podfile index 802d35ff..422d3bf3 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -55,3 +55,9 @@ target 'AirshipExample' do ) end end + +target 'AirshipExampleNotificationServiceExtension' do + pod 'AirshipServiceExtension' +end + + diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 0ebba90a..64ae6513 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -19,6 +19,7 @@ PODS: - Airship/Core - AirshipFrameworkProxy (6.1.2): - Airship (= 18.1.2) + - AirshipServiceExtension (18.2.0) - boost (1.83.0) - DoubleConversion (1.1.6) - FBLazyVector (0.73.4) @@ -1098,6 +1099,7 @@ PODS: - Yoga (1.14.0) DEPENDENCIES: + - AirshipServiceExtension - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) @@ -1160,6 +1162,7 @@ SPEC REPOS: trunk: - Airship - AirshipFrameworkProxy + - AirshipServiceExtension - fmt - libevent - SocketRocket @@ -1278,6 +1281,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: 6c83fb9f9d04483dcce87175577967e059427cbd AirshipFrameworkProxy: b3ff9dcac51aefb675204cbbf705b172cd29efe8 + AirshipServiceExtension: db0e8b08ddc83f19613a4f37f1925f65859a7111 boost: d3f49c53809116a5d38da093a8aa78bf551aed09 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 FBLazyVector: 84f6edbe225f38aebd9deaf1540a4160b1f087d7 @@ -1336,6 +1340,6 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312 -PODFILE CHECKSUM: 31466f116c7ce40ec6211abc2ef24b9aa7aaebab +PODFILE CHECKSUM: dbd88b0cf2e018eeff600431486ded3ce68933fb COCOAPODS: 1.15.2