Skip to content

IOS Notifications Avatars #99

Draft
mehtab-riaz wants to merge 1 commit intoChoochmeque:mainfrom
mehtab-riaz:fix/ios-avatar
Draft

IOS Notifications Avatars #99
mehtab-riaz wants to merge 1 commit intoChoochmeque:mainfrom
mehtab-riaz:fix/ios-avatar

Conversation

@mehtab-riaz
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings February 9, 2026 07:58
@mehtab-riaz mehtab-riaz marked this pull request as draft February 9, 2026 07:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds iOS “Communication Notifications” support artifacts so push notifications can display sender avatars on iOS 15+ by using a Notification Service Extension + INSendMessageIntent donation, and wires this into the notifications demo.

Changes:

  • Adds a Notification Service Extension template (NotificationService.swift + Info.plist) and documentation for enabling Communication Notifications on iOS.
  • Updates the notifications demo’s iOS project to include/embed the service extension and required capabilities (NSUserActivityTypes, entitlements).
  • Tweaks the demo UI logic to request permission on launch and register for push when granted.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
ios/Extensions/CommunicationNotifications/NotificationService.swift New iOS service extension implementation that donates INSendMessageIntent and loads an avatar image.
ios/Extensions/CommunicationNotifications/Info.plist New extension Info.plist template for com.apple.usernotifications.service.
docs/communication-notifications.md New step-by-step setup guide for Communication Notifications and required payload fields.
README.md Links to the new iOS Communication Notifications guide.
examples/notifications-demo/src/routes/+page.svelte Requests permission on startup and registers for push when granted.
examples/notifications-demo/src-tauri/tauri.conf.json Updates demo identifier and contains a formatting change.
examples/notifications-demo/src-tauri/gen/apple/project.yml Updates bundle ID prefix / bundle identifier used for the generated iOS project.
examples/notifications-demo/src-tauri/gen/apple/notifications-demo_iOS/notifications-demo_iOS.entitlements Adds push + communication notifications entitlements.
examples/notifications-demo/src-tauri/gen/apple/notifications-demo_iOS/Info.plist Adds NSUserActivityTypes entry for INSendMessageIntent.
examples/notifications-demo/src-tauri/gen/apple/notifications-demo.xcodeproj/project.pbxproj Adds and embeds Notification Service Extension target; updates signing/build settings.
examples/notifications-demo/src-tauri/gen/apple/NotificationServiceExtension/NotificationService.swift Demo’s service extension implementation (same as template).
examples/notifications-demo/src-tauri/gen/apple/NotificationServiceExtension/Info.plist Demo’s extension Info.plist.
examples/notifications-demo/src-tauri/Cargo.lock Bumps tauri-plugin-notifications dependency version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1 to 5
name: notifications-demo
options:
bundleIdPrefix: com.tauri.dev
bundleIdPrefix: com.the-tie-bridge.app
deploymentTarget:
iOS: 14.0
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bundleIdPrefix is set to com.the-tie-bridge.app for the demo's generated Xcode project. A hard-coded, real-looking bundle ID prefix will prevent other developers from signing/building unless they own that App ID; consider using a placeholder or documenting that it must be changed locally.

Copilot uses AI. Check for mistakes.
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
GENERATE_INFOPLIST_FILE = YES;
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extension target has GENERATE_INFOPLIST_FILE = YES while also specifying INFOPLIST_FILE = NotificationServiceExtension/Info.plist. This can lead to the built Info.plist not containing the required NSExtension keys (depending on Xcode settings). Prefer using the checked-in Info.plist (disable generation) or move all required keys to build settings and remove the file reference.

Suggested change
GENERATE_INFOPLIST_FILE = YES;
GENERATE_INFOPLIST_FILE = NO;

Copilot uses AI. Check for mistakes.
Comment on lines 360 to 363
CODE_SIGN_ENTITLEMENTS = "notifications-demo_iOS/notifications-demo_iOS.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = L4HDDT92GH;
ENABLE_BITCODE = NO;
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEVELOPMENT_TEAM is hard-coded to a specific Team ID. This makes the example project difficult to build for other contributors/CI (they will get code signing errors). Prefer leaving it unset in committed config or sourcing it from user-local settings.

Copilot uses AI. Check for mistakes.
Comment on lines +537 to +540
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = L4HDDT92GH;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extension target also hard-codes DEVELOPMENT_TEAM to a specific Team ID, which will break signing for anyone else building the demo. Prefer leaving this unset in repo-committed project files (or make it configurable).

Copilot uses AI. Check for mistakes.
Comment on lines 3 to 6
"productName": "notifications-demo",
"version": "0.1.0",
"identifier": "com.tauri.dev",
"identifier": "com.the-tie-bridge.app",
"build": {
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The demo app identifier was changed to com.the-tie-bridge.app. A hard-coded, real-looking bundle identifier will prevent other developers from signing/building the example unless they own that App ID. Consider using a clearly placeholder identifier (or documenting that users must change it).

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +3
import UserNotifications
import Intents

Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NotificationService uses URL, URLSession, and Data, but the file does not import Foundation (and may also require Dispatch for DispatchSemaphore). This will fail to compile in targets that don't re-export these symbols; add the appropriate imports explicitly.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,98 @@
import UserNotifications
import Intents
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NotificationService uses URL, URLSession, and Data, but the file does not import Foundation (and may also require Dispatch for DispatchSemaphore). Add the appropriate imports explicitly to avoid build failures.

Suggested change
import Intents
import Intents
import Foundation
import Dispatch

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +8
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aps-environment is set to development in the entitlements file. This will fail signing for distribution/TestFlight builds (which require production). Consider using separate entitlements per configuration or setting this up via Xcode signing so debug uses development and release uses production.

Copilot uses AI. Check for mistakes.
Comment on lines 11 to 15
app:
base:
PRODUCT_NAME: notifications-demo
PRODUCT_BUNDLE_IDENTIFIER: com.tauri.dev
PRODUCT_BUNDLE_IDENTIFIER: com.the-tie-bridge.app
targetTemplates:
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRODUCT_BUNDLE_IDENTIFIER is set to com.the-tie-bridge.app for the demo app. For a repo-shipped example, consider using a placeholder identifier (or making it configurable) so contributors can build without owning that App ID.

Copilot uses AI. Check for mistakes.
A98D55AEB23591E6E9FC9AA8 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2952782657A3C85626BB111 /* Security.framework */; };
ADB9C9906C96E51419A6BF5C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9F871F3497F27E63C315CD27 /* LaunchScreen.storyboard */; };
B3E42E9CC0FA1CC67193FF88 /* libapp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 53360DEB65E4CEAF5FE9BE5E /* libapp.a */; };
C4CC44A32F34E0B000D3EBC4 /* NotificationServiceExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = C4CC449C2F34E0B000D3EBC4 /* NotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The embedded .appex build file only has RemoveHeadersOnCopy in its copy attributes. For app extensions, the embed phase typically needs CodeSignOnCopy as well; without it the extension may not be properly signed when copied into the app bundle, causing install/runtime failures.

Suggested change
C4CC44A32F34E0B000D3EBC4 /* NotificationServiceExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = C4CC449C2F34E0B000D3EBC4 /* NotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
C4CC44A32F34E0B000D3EBC4 /* NotificationServiceExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = C4CC449C2F34E0B000D3EBC4 /* NotificationServiceExtension.appex */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };

Copilot uses AI. Check for mistakes.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.90%. Comparing base (3dc4626) to head (28a0172).

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #99   +/-   ##
=========================================
  Coverage     57.90%   57.90%           
  Complexity       65       65           
=========================================
  Files            29       29           
  Lines          5096     5096           
  Branches        232      232           
=========================================
  Hits           2951     2951           
  Misses         2111     2111           
  Partials         34       34           
Flag Coverage Δ
android 28.17% <ø> (ø)
ios 78.60% <ø> (ø)
javascript 100.00% <ø> (ø)
macos 64.67% <ø> (ø)
rust 47.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants