Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iOS Communication Notifications #32765

Merged
merged 51 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
523578f
add notification service extension
arosiclair Dec 8, 2023
4335e95
move embed extensions build phase to fix build
arosiclair Dec 8, 2023
53272e9
use airship's UANotificationServiceExtension
arosiclair Dec 11, 2023
9f0e214
use iOS 13 minimum target
arosiclair Dec 11, 2023
794eb84
re-add default implementations
arosiclair Dec 11, 2023
5ff5826
check for payload properties
arosiclair Dec 12, 2023
6b192da
Merge branch 'arosiclair-clear-read-notifications' into arosiclair-io…
arosiclair Dec 12, 2023
83c0b93
use os_log instead of print
arosiclair Dec 13, 2023
315cf25
Add ExpError for throwing runtime errors with messages
arosiclair Dec 14, 2023
75bdc80
parse notification data
arosiclair Dec 14, 2023
daf5876
Merge branch 'arosiclair-clear-read-notifications' into arosiclair-io…
arosiclair Dec 14, 2023
91d7c7d
parse accountID
arosiclair Dec 14, 2023
73a49b6
parse the user's name
arosiclair Dec 14, 2023
b7c5cdb
add communication notification entitlement
arosiclair Dec 14, 2023
4707aba
add INSendMessageIntent
arosiclair Dec 14, 2023
de5d126
move NSUserActivityTypes to the main bundle
arosiclair Dec 15, 2023
fbc2eb1
create message intents and configure communication notifications
arosiclair Dec 15, 2023
c0d636e
parse message text
arosiclair Dec 15, 2023
e61d242
use updated INSendMessageIntent
arosiclair Dec 15, 2023
82245cf
fetch and use avatar
arosiclair Dec 15, 2023
2e22250
error handling
arosiclair Dec 15, 2023
718222e
parse and use roomName
arosiclair Dec 15, 2023
bad32ec
use formatted title
arosiclair Dec 17, 2023
b57be15
remove unused NotificationData properties
arosiclair Dec 17, 2023
8942cd0
remove unused var
arosiclair Dec 17, 2023
640eaa0
rename to just NotificationServiceExtension
arosiclair Dec 17, 2023
67d8610
fix pod install warnings for overriden settings
arosiclair Dec 17, 2023
2fe775f
configure the group/room name
arosiclair Dec 17, 2023
b8e343a
Merge branch 'main' of github.com:Expensify/App into arosiclair-ios-c…
arosiclair Dec 17, 2023
e5b8b3f
update bundle IDs for adhoc and prod
arosiclair Dec 17, 2023
055e64c
use manual signing to match the main app target
arosiclair Dec 17, 2023
fd11e2d
podfile lock update
arosiclair Dec 17, 2023
506ac9e
use iphone distribution like the main target
arosiclair Dec 19, 2023
99c4c50
Merge branch 'main' of github.com:Expensify/App into arosiclair-ios-c…
arosiclair Dec 19, 2023
a7ca53f
podfile update
arosiclair Dec 19, 2023
f734310
comment pointing to docs for comms notifications
arosiclair Dec 19, 2023
9115cc8
Update provisioning profiles in xcode project
AndrewGable Dec 19, 2023
44d09e5
Update with new profiles for Notification Service
AndrewGable Dec 19, 2023
ae48bdc
comment updates
arosiclair Dec 19, 2023
13beb5f
Tweaking configs for test and AdHoc
AndrewGable Dec 19, 2023
c39c67e
Tweak provisioning profile config
AndrewGable Dec 19, 2023
7707911
remove xcargs override
arosiclair Dec 19, 2023
2b451b2
use new profile names
arosiclair Dec 19, 2023
73a37f1
set provisioning profiles for AppStore build
arosiclair Dec 19, 2023
d09f9d7
fix grep check
arosiclair Dec 19, 2023
5b9810d
Merge branch 'main' of github.com:Expensify/App into arosiclair-ios-c…
arosiclair Dec 20, 2023
9788965
rename mock steps and assertions
arosiclair Dec 20, 2023
5b0ec5b
Merge branch 'main' into arosiclair-ios-comms-notifications
roryabraham Dec 24, 2023
8725cd2
Clean build after merge
roryabraham Dec 24, 2023
672d6ff
Fix workflow_tests
roryabraham Dec 25, 2023
a39f711
fix dev bundle IDs for NSE
arosiclair Dec 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/verifyPodfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ declare EXIT_CODE=0

# Check Provisioning Style. If automatic signing is enabled, iOS builds will fail, so ensure we always have the proper profile specified
info "Verifying that automatic signing is not enabled"
if grep -q 'PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore' ios/NewExpensify.xcodeproj/project.pbxproj; then
if grep -q 'PROVISIONING_PROFILE_SPECIFIER = "(NewApp) AppStore"' ios/NewExpensify.xcodeproj/project.pbxproj; then
success "Automatic signing not enabled"
else
error "Error: Automatic provisioning style is not allowed!"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ The GitHub workflows require a large list of secrets to deploy, notify and test
1. `LARGE_SECRET_PASSPHRASE` - decrypts secrets stored in various encrypted files stored in GitHub repository. To create updated versions of these encrypted files, refer to steps 1-4 of [this encrypted secrets help page](https://docs.github.com/en/actions/reference/encrypted-secrets#limits-for-secrets) using the `LARGE_SECRET_PASSPHRASE`.
1. `android/app/my-upload-key.keystore.gpg`
1. `android/app/android-fastlane-json-key.json.gpg`
1. `ios/expensify_chat_adhoc.mobileprovision.gpg`
1. `ios/chat_expensify_appstore.mobileprovision.gpg`
1. `ios/NewApp_AdHoc.mobileprovision`
1. `ios/NewApp_AdHoc_Notification_Service.mobileprovision`
1. `ios/NewApp_AppStore.mobileprovision.gpg`
1. `ios/NewApp_AppStore_Notification_Service.mobileprovision.gpg`
1. `ios/Certificates.p12.gpg`
1. `SLACK_WEBHOOK` - Sends Slack notifications via Slack WebHook https://expensify.slack.com/services/B01AX48D7MM
1. `OS_BOTIFY_TOKEN` - Personal access token for @OSBotify user in GitHub
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,13 @@ jobs:
max_attempts: 5
command: cd ios && bundle exec pod install

- name: Decrypt profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output chat_expensify_appstore.mobileprovision chat_expensify_appstore.mobileprovision.gpg
- name: Decrypt AppStore profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output NewApp_AppStore.mobileprovision NewApp_AppStore.mobileprovision.gpg
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Decrypt AppStore Notification Service profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output NewApp_AppStore_Notification_Service.mobileprovision NewApp_AppStore_Notification_Service.mobileprovision.gpg
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,13 @@ jobs:
max_attempts: 5
command: cd ios && bundle exec pod install

- name: Decrypt profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output expensify_chat_adhoc.mobileprovision expensify_chat_adhoc.mobileprovision.gpg
- name: Decrypt AdHoc profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output NewApp_AdHoc.mobileprovision NewApp_AdHoc.mobileprovision.gpg
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

- name: Decrypt AdHoc Notification Service profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output NewApp_AdHoc_Notification_Service.mobileprovision NewApp_AdHoc_Notification_Service.mobileprovision.gpg
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

Expand Down
20 changes: 16 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,23 @@ platform :ios do
)

install_provisioning_profile(
path: "./ios/expensify_chat_adhoc.mobileprovision"
path: "./ios/NewApp_AdHoc.mobileprovision"
)

install_provisioning_profile(
path: "./ios/NewApp_AdHoc_Notification_Service.mobileprovision"
)

build_app(
workspace: "./ios/NewExpensify.xcworkspace",
skip_profile_detection: true,
scheme: "New Expensify AdHoc",
xcargs: { :PROVISIONING_PROFILE_SPECIFIER => "expensify_chat_adhoc", },
export_method: "ad-hoc",
export_options: {
method: "ad-hoc",
provisioningProfiles: {
"com.expensify.chat.adhoc" => "expensify_chat_adhoc",
"com.expensify.chat.adhoc" => "(NewApp) AdHoc",
"com.expensify.chat.adhoc.NotificationServiceExtension" => "(NewApp) AdHoc: Notification Service",
},
manageAppVersionAndBuildNumber: false
}
Expand Down Expand Up @@ -215,14 +219,22 @@ platform :ios do
)

install_provisioning_profile(
path: "./ios/chat_expensify_appstore.mobileprovision"
path: "./ios/NewApp_AppStore.mobileprovision"
)

install_provisioning_profile(
path: "./ios/NewApp_AppStore_Notification_Service.mobileprovision"
)

build_app(
workspace: "./ios/NewExpensify.xcworkspace",
scheme: "New Expensify",
output_name: "New Expensify.ipa",
export_options: {
provisioningProfiles: {
"com.chat.expensify.chat" => "(NewApp) AppStore",
"com.chat.expensify.chat.NotificationServiceExtension" => "(NewApp) AppStore: Notification Service",
},
manageAppVersionAndBuildNumber: false
}
)
Expand Down
Binary file added ios/NewApp_AdHoc.mobileprovision.gpg
Binary file not shown.
Binary file not shown.
Binary file added ios/NewApp_AppStore.mobileprovision.gpg
Binary file not shown.
Binary file not shown.
Loading
Loading