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

[expo-notifications] Device push token fetching module #6577

Merged
merged 16 commits into from Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/build.gradle
Expand Up @@ -236,6 +236,7 @@ dependencies {
'expo-module-template',
'expo-bluetooth',
'expo-in-app-purchases',
'expo-notifications',
'expo-payments-stripe',
'expo-updates'
]
Expand Down
1 change: 1 addition & 0 deletions android/expoview/build.gradle
Expand Up @@ -170,6 +170,7 @@ dependencies {
exclude : [
'expo-module-template',
'expo-bluetooth',
'expo-notifications',
'expo-in-app-purchases',
'expo-updates',
]
Expand Down
1 change: 1 addition & 0 deletions android/settings.gradle
Expand Up @@ -33,6 +33,7 @@ includeUnimodulesProjects(
// FLAG_BEGIN_REMOVE__UPDATE_EXPOKIT - used during `et android-build-packages`
// section below previous line comment flag contains modules that need to be built for `expokit-npm-package`
'expo-bluetooth',
'expo-notifications',
'expo-in-app-purchases',
'expo-updates',
// FLAG_END_REMOVE__UPDATE_EXPOKIT
Expand Down
Expand Up @@ -39,6 +39,7 @@ public List<Package> getPackageList() {
new expo.modules.mailcomposer.MailComposerPackage(),
new expo.modules.medialibrary.MediaLibraryPackage(),
new expo.modules.network.NetworkPackage(),
new expo.modules.notifications.NotificationsPackage(),
new expo.modules.permissions.PermissionsPackage(),
new expo.modules.print.PrintPackage(),
new expo.modules.random.RandomPackage(),
Expand Down
4 changes: 4 additions & 0 deletions apps/bare-expo/app.json
Expand Up @@ -15,6 +15,10 @@
"include": ["test-suite", "bare-expo"]
}
}
},
"notification": {
"serviceWorkerPath": "/expo-service-worker.js",
"vapidPublicKey": "BNHvR05XkY5LH9GdN0GreLx2wZnK9IwNJGVmo3jujIkFni4of26E3U3fnt9nUrZfM7h0omdIHKM0eshkzTSFOWQ"
}
}
}
12 changes: 10 additions & 2 deletions apps/bare-expo/e2e/TestSuite-test.web.js
@@ -1,4 +1,4 @@
/* global page */
/* global page, browser */
import { setDefaultOptions } from 'expect-puppeteer';

import config from '../jest-puppeteer.config';
Expand All @@ -19,9 +19,12 @@ const TESTS = [
'Blur',
'LinearGradient',
'KeepAwake',
// Overridding permissions doesn't work in headless mode
// see https://github.com/puppeteer/puppeteer/issues/3279
!config.launch.headless && 'expo-notifications',
// 'Haptics',
// 'SecureStore',
];
].filter(t => t);

// This is how long we allocate for the actual tests to be run after the test screen has mounted.
const MIN_TIME = 50000;
Expand All @@ -31,6 +34,11 @@ setDefaultOptions({
timeout: MIN_TIME * 1.5,
});

beforeAll(async () => {
const context = browser.defaultBrowserContext();
await context.overridePermissions(config.url, ['notifications']);
});

function matchID(id, ...props) {
return expect(page).toMatchElement(`div[data-testid="${id}"]`, ...props);
}
Expand Down
4 changes: 4 additions & 0 deletions apps/bare-expo/ios/BareExpo.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions apps/bare-expo/ios/BareExpo/Bare Expo.entitlements
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
7 changes: 7 additions & 0 deletions apps/bare-expo/ios/Podfile.lock
Expand Up @@ -102,6 +102,8 @@ PODS:
- UMPermissionsInterface
- EXNetwork (2.0.0):
- UMCore
- EXNotifications (1.0.0):
- UMCore
- EXPermissions (8.0.0):
- UMCore
- UMPermissionsInterface
Expand Down Expand Up @@ -426,6 +428,7 @@ DEPENDENCIES:
- EXMailComposer (from `../../../packages/expo-mail-composer/ios`)
- EXMediaLibrary (from `../../../packages/expo-media-library/ios`)
- EXNetwork (from `../../../packages/expo-network/ios`)
- EXNotifications (from `../../../packages/expo-notifications/ios`)
- EXPermissions (from `../../../packages/expo-permissions/ios`)
- EXPrint (from `../../../packages/expo-print/ios`)
- EXRandom (from `../../../packages/expo-random/ios`)
Expand Down Expand Up @@ -593,6 +596,9 @@ EXTERNAL SOURCES:
EXNetwork:
:path: !ruby/object:Pathname
path: "../../../packages/expo-network/ios"
EXNotifications:
:path: !ruby/object:Pathname
path: "../../../packages/expo-notifications/ios"
EXPermissions:
:path: !ruby/object:Pathname
path: "../../../packages/expo-permissions/ios"
Expand Down Expand Up @@ -756,6 +762,7 @@ SPEC CHECKSUMS:
EXMailComposer: b9be58adaabb860fc8b722204ce27b33c7da5aad
EXMediaLibrary: 9281707de8f95cc391d242b614f493ab781030fa
EXNetwork: a52f713ced4b05a2634eb88a1f1f8678fcb8b69c
EXNotifications: d654494e84df90927cca410ebac178c61553647b
EXPermissions: 9bc08859a675d291e89be9a0870155c27c16ac35
EXPrint: b20aef0e774d96e0ea6688b97d9e0c1d268b95ae
EXRandom: 3a6f6dce1997a40a7fc3bb00d18eabc380c51c2e
Expand Down
21 changes: 17 additions & 4 deletions apps/bare-expo/ios/Pods/.project_cache/installation_cache.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions apps/bare-expo/ios/Pods/.project_cache/metadata_cache.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.