diff --git a/__mocks__/@ua/react-native-airship.ts b/__mocks__/@ua/react-native-airship.ts index 14909b58b31c..a60053df475e 100644 --- a/__mocks__/@ua/react-native-airship.ts +++ b/__mocks__/@ua/react-native-airship.ts @@ -1,19 +1,40 @@ import type {AirshipContact, AirshipPush, AirshipPushAndroid, AirshipPushIOS, AirshipRoot} from '@ua/react-native-airship'; -import {EventType as AirshipEventType, iOS as AirshipIOS} from '@ua/react-native-airship'; -const EventType: Partial = { - NotificationResponse: AirshipEventType.NotificationResponse, - PushReceived: AirshipEventType.PushReceived, -}; +// eslint-disable-next-line no-restricted-syntax +enum EventType { + NotificationResponse = 'com.airship.notification_response', + PushReceived = 'com.airship.push_received', +} -const iOS: Partial = { - ForegroundPresentationOption: { - Sound: AirshipIOS.ForegroundPresentationOption.Sound, - Badge: AirshipIOS.ForegroundPresentationOption.Badge, - Banner: AirshipIOS.ForegroundPresentationOption.Banner, - List: AirshipIOS.ForegroundPresentationOption.List, - }, -}; +// eslint-disable-next-line @typescript-eslint/no-namespace +namespace iOS { + /** + * Enum of foreground notification options. + */ + // eslint-disable-next-line no-restricted-syntax, rulesdir/no-inline-named-export + export enum ForegroundPresentationOption { + /** + * Play the sound associated with the notification. + */ + Sound = 'sound', + /** + * Apply the notification's badge value to the app’s icon. + */ + Badge = 'badge', + + /** + * Show the notification in Notification Center. On iOS 13 an older, + * this will also show the notification as a banner. + */ + List = 'list', + + /** + * Present the notification as a banner. On iOS 13 an older, + * this will also show the notification in the Notification Center. + */ + Banner = 'banner', + } +} const pushIOS = jest.fn().mockImplementation(() => ({ setBadgeNumber: jest.fn(), diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 72f87b66f80f..de1d6addb24d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,24 +1,24 @@ PODS: - - Airship (18.7.2): - - Airship/Automation (= 18.7.2) - - Airship/Basement (= 18.7.2) - - Airship/Core (= 18.7.2) - - Airship/FeatureFlags (= 18.7.2) - - Airship/MessageCenter (= 18.7.2) - - Airship/PreferenceCenter (= 18.7.2) - - Airship/Automation (18.7.2): + - Airship (19.2.0): + - Airship/Automation (= 19.2.0) + - Airship/Basement (= 19.2.0) + - Airship/Core (= 19.2.0) + - Airship/FeatureFlags (= 19.2.0) + - Airship/MessageCenter (= 19.2.0) + - Airship/PreferenceCenter (= 19.2.0) + - Airship/Automation (19.2.0): - Airship/Core - - Airship/Basement (18.7.2) - - Airship/Core (18.7.2): + - Airship/Basement (19.2.0) + - Airship/Core (19.2.0): - Airship/Basement - - Airship/FeatureFlags (18.7.2): + - Airship/FeatureFlags (19.2.0): - Airship/Core - - Airship/MessageCenter (18.7.2): + - Airship/MessageCenter (19.2.0): - Airship/Core - - Airship/PreferenceCenter (18.7.2): + - Airship/PreferenceCenter (19.2.0): - Airship/Core - - AirshipFrameworkProxy (7.1.2): - - Airship (= 18.7.2) + - AirshipFrameworkProxy (14.1.0): + - Airship (= 19.2.0) - AirshipServiceExtension (18.7.2) - AppAuth (1.7.5): - AppAuth/Core (= 1.7.5) @@ -1606,8 +1606,8 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - react-native-airship (19.2.1): - - AirshipFrameworkProxy (= 7.1.2) + - react-native-airship (21.4.1): + - AirshipFrameworkProxy (= 14.1.0) - DoubleConversion - glog - hermes-engine @@ -3376,8 +3376,8 @@ CHECKOUT OPTIONS: :http: https://ios-releases.fullstory.com/fullstory-1.52.0-xcframework.tar.gz SPEC CHECKSUMS: - Airship: bb32ff2c5a811352da074480357d9f02dbb8f327 - AirshipFrameworkProxy: dbd862dc6fb21b13e8b196458d626123e2a43a50 + Airship: 4f4dc8dc616703787bdf73869437ccd0a52c6db7 + AirshipFrameworkProxy: 6b6bee0ef983258931a67f701f1171e9ded2d8c5 AirshipServiceExtension: 9c73369f426396d9fb9ff222d86d842fac76ba46 AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa AppLogs: 3bc4e9b141dbf265b9464409caaa40416a9ee0e0 @@ -3464,7 +3464,7 @@ SPEC CHECKSUMS: React-Mapbuffer: 212171f037e3b22e6c2df839aa826806da480b85 React-microtasksnativemodule: 72564d5469003687d39bfc4efad281df8efc0684 react-native-advanced-input-mask: 7783a35343e2f0ec4b726d526bda4665e8fc11c9 - react-native-airship: 8debc21d80534128d87269cb309164e2941b068a + react-native-airship: 2ff893d451520832e447fcce7f3f5ed9d3645f6a react-native-app-logs: 70fb83d2fe260d3911e5bb222496ef1f7a2bfef9 react-native-blob-util: d65692a2acce17b7a836805114828142a3634033 react-native-cameraroll: 78710a5d35b0c6f41899a193e714564d8fd648b0 diff --git a/package-lock.json b/package-lock.json index f8e77c1c6e8f..a98c693468f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "@shopify/flash-list": "1.7.1", "@types/pako": "^2.0.3", "@types/webrtc": "^0.0.46", - "@ua/react-native-airship": "19.2.1", + "@ua/react-native-airship": "~21.4.1", "awesome-phonenumber": "^5.4.0", "babel-polyfill": "^6.26.0", "canvas-size": "^1.2.6", @@ -14916,9 +14916,10 @@ } }, "node_modules/@ua/react-native-airship": { - "version": "19.2.1", - "resolved": "https://registry.npmjs.org/@ua/react-native-airship/-/react-native-airship-19.2.1.tgz", - "integrity": "sha512-DnSTR31OIUWypbUmdtbz7VyXAp+2c7737EKmfG5o2LVDkBNnJ8hO5/2G4eEGmkBLn5tv2zP8vP6nUmq8Pt2wCA==", + "version": "21.4.1", + "resolved": "https://registry.npmjs.org/@ua/react-native-airship/-/react-native-airship-21.4.1.tgz", + "integrity": "sha512-bzZqFwUVpH4fZHyShOfwCu+HjyOXP49TR0eHtoLzNDzBDd1NJqek5S7FtU+MF1a5z8vZ+O0llaEY9j1qgloZWQ==", + "license": "Apache-2.0", "engines": { "node": ">= 16.0.0" }, diff --git a/package.json b/package.json index 069a038ce1f5..b7c3743afa7f 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "@shopify/flash-list": "1.7.1", "@types/pako": "^2.0.3", "@types/webrtc": "^0.0.46", - "@ua/react-native-airship": "19.2.1", + "@ua/react-native-airship": "~21.4.1", "awesome-phonenumber": "^5.4.0", "babel-polyfill": "^6.26.0", "canvas-size": "^1.2.6", @@ -403,4 +403,4 @@ "node": "20.18.1", "npm": "10.8.2" } -} +} \ No newline at end of file