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

RN v0.61 upgrade followup. #4152

Merged
merged 6 commits into from
Jul 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public List<Package> getPackageList() {
new expo.modules.application.ApplicationPackage(),
new expo.modules.constants.ConstantsPackage(),
new expo.modules.filesystem.FileSystemPackage(),
new expo.modules.imageloader.ImageLoaderPackage(),
new expo.modules.permissions.PermissionsPackage(),
new expo.modules.screenorientation.ScreenOrientationPackage()
);
Expand Down
6 changes: 0 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ project(":react-native-device-info").beforeEvaluate {
ext.googlePlayServicesVersion = "16.1.0"
}

project(":unimodules-react-native-adapter").afterEvaluate {
it.dependencies {
implementation 'com.facebook.react:react-native:+'
}
}

subprojects {
afterEvaluate {
if (project.hasProperty("android")) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// We have not transcribed the types corresponding to Windows and
// macOS support, e.g., from
// react-native-community/react-native-webview@ffee0d436 and
// react-native-community/react-native-webview@1e572318e.

/*
* Types copied (completely or incompletely) from `react-native`; we
* can't import them. See
Expand Down Expand Up @@ -59,6 +64,7 @@ declare module 'react-native-webview' {
} from 'react-native-webview/@@react-native';

declare export type MixedContentMode = 'never' | 'always' | 'compatibility';
declare export type FileDownload = { downloadUrl: string };
declare export type DecelerationRateConstant = 'normal' | 'fast';
declare export type OverScrollModeType = 'always' | 'content' | 'never';

Expand Down Expand Up @@ -154,6 +160,7 @@ declare module 'react-native-webview' {

declare export type WebViewEvent = SyntheticEvent<WebViewNativeEvent>;
declare export type WebViewNavigationEvent = SyntheticEvent<WebViewNavigation>;
declare export type FileDownloadEvent = NativeSyntheticEvent<FileDownload>;
declare export type WebViewMessageEvent = SyntheticEvent<WebViewMessage>;
declare export type WebViewErrorEvent = SyntheticEvent<WebViewError>;
declare export type WebViewHttpErrorEvent = SyntheticEvent<WebViewHttpError>;
Expand Down Expand Up @@ -337,6 +344,38 @@ declare module 'react-native-webview' {
* @platform ios
*/
onContentProcessDidTerminate?: WebViewTerminatedEvent => mixed,

/**
* If `true` (default), loads the `injectedJavaScript` only into the main frame.
* If `false`, loads it into all frames (e.g. iframes).
* @platform ios
*/
injectedJavaScriptForMainFrameOnly?: boolean,

/**
* If `true` (default), loads the `injectedJavaScriptBeforeContentLoaded` only into the main frame.
* If `false`, loads it into all frames (e.g. iframes).
* @platform ios
*/
injectedJavaScriptBeforeContentLoadedForMainFrameOnly?: boolean,

/**
* Function that is invoked when the client needs to download a file.
*
* iOS 13+ only: If the webview navigates to a URL that results in an HTTP
* response with a Content-Disposition header 'attachment...', then
* this will be called.
*
* iOS 8+: If the MIME type indicates that the content is not renderable by the
* webview, that will also cause this to be called. On iOS versions before 13,
* this is the only condition that will cause this function to be called.
*
* The application will need to provide its own code to actually download
* the file.
*
* If not provided, the default is to let the webview try to render the file.
*/
onFileDownload?: (event: FileDownloadEvent) => void,
|};

declare export type IOSWebViewProps = {| ...IOSOnlyWebViewProps, ...WebViewSharedProps |};
Expand Down
140 changes: 65 additions & 75 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ PODS:
- UMCore
- EXApplication (2.1.1):
- UMCore
- EXAppLoaderProvider (7.0.0)
- EXConstants (7.0.1):
- EXConstants (9.0.0):
- UMConstantsInterface
- UMCore
- EXFileSystem (7.0.0):
- EXFileSystem (8.1.0):
- UMCore
- UMFileSystemInterface
- EXPermissions (7.0.0):
- EXImageLoader (1.0.1):
- React-Core
- UMCore
- UMImageLoaderInterface
- EXPermissions (8.1.0):
- UMCore
- UMPermissionsInterface
- EXScreenOrientation (1.0.0):
Expand Down Expand Up @@ -224,7 +227,7 @@ PODS:
- react-native-simple-toast (1.0.0):
- React
- Toast (~> 4.0.0)
- react-native-webview (8.0.4):
- react-native-webview (10.0.0):
- React
- React-RCTActionSheet (0.61.5):
- React-Core/RCTActionSheetHeaders (= 0.61.5)
Expand Down Expand Up @@ -283,30 +286,32 @@ PODS:
- Sentry/Core (= 4.4.3)
- Sentry/Core (4.4.3)
- Toast (4.0.0)
- UMBarCodeScannerInterface (4.0.0)
- UMCameraInterface (4.0.0)
- UMConstantsInterface (4.0.0)
- UMCore (4.0.0)
- UMFaceDetectorInterface (4.0.0)
- UMFileSystemInterface (4.0.0)
- UMFontInterface (4.0.0)
- UMImageLoaderInterface (4.0.0)
- UMPermissionsInterface (4.0.0)
- UMReactNativeAdapter (4.0.0):
- React
- UMAppLoader (1.0.2)
- UMBarCodeScannerInterface (5.1.0)
- UMCameraInterface (5.1.0)
- UMConstantsInterface (5.1.0)
- UMCore (5.1.2)
- UMFaceDetectorInterface (5.1.0)
- UMFileSystemInterface (5.1.0)
- UMFontInterface (5.1.0)
- UMImageLoaderInterface (5.1.0)
- UMPermissionsInterface (5.1.0):
- UMCore
- UMReactNativeAdapter (5.2.0):
- React-Core
- UMCore
- UMFontInterface
- UMSensorsInterface (4.0.0)
- UMTaskManagerInterface (4.0.0)
- UMSensorsInterface (5.1.0)
- UMTaskManagerInterface (5.1.0)
- Yoga (1.14.0)

DEPENDENCIES:
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- EXAppleAuthentication (from `../node_modules/expo-apple-authentication/ios`)
- EXApplication (from `../node_modules/expo-application/ios`)
- EXAppLoaderProvider (from `../node_modules/expo-app-loader-provider/ios`)
- EXConstants (from `../node_modules/expo-constants/ios`)
- EXFileSystem (from `../node_modules/expo-file-system/ios`)
- EXImageLoader (from `../node_modules/expo-image-loader/ios`)
- EXPermissions (from `../node_modules/expo-permissions/ios`)
- EXScreenOrientation (from `../node_modules/expo-screen-orientation/ios`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
Expand Down Expand Up @@ -351,6 +356,7 @@ DEPENDENCIES:
- "RNSentry (from `../node_modules/@sentry/react-native`)"
- RNSound (from `../node_modules/react-native-sound`)
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
- UMAppLoader (from `../node_modules/unimodules-app-loader/ios`)
- UMBarCodeScannerInterface (from `../node_modules/unimodules-barcode-scanner-interface/ios`)
- UMCameraInterface (from `../node_modules/unimodules-camera-interface/ios`)
- UMConstantsInterface (from `../node_modules/unimodules-constants-interface/ios`)
Expand All @@ -375,26 +381,19 @@ EXTERNAL SOURCES:
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EXAppleAuthentication:
:path: !ruby/object:Pathname
path: "../node_modules/expo-apple-authentication/ios"
:path: "../node_modules/expo-apple-authentication/ios"
EXApplication:
:path: !ruby/object:Pathname
path: "../node_modules/expo-application/ios"
EXAppLoaderProvider:
:path: !ruby/object:Pathname
path: "../node_modules/expo-app-loader-provider/ios"
:path: "../node_modules/expo-application/ios"
EXConstants:
:path: !ruby/object:Pathname
path: "../node_modules/expo-constants/ios"
:path: "../node_modules/expo-constants/ios"
EXFileSystem:
:path: !ruby/object:Pathname
path: "../node_modules/expo-file-system/ios"
:path: "../node_modules/expo-file-system/ios"
EXImageLoader:
:path: "../node_modules/expo-image-loader/ios"
EXPermissions:
:path: !ruby/object:Pathname
path: "../node_modules/expo-permissions/ios"
:path: "../node_modules/expo-permissions/ios"
EXScreenOrientation:
:path: !ruby/object:Pathname
path: "../node_modules/expo-screen-orientation/ios"
:path: "../node_modules/expo-screen-orientation/ios"
FBLazyVector:
:path: "../node_modules/react-native/Libraries/FBLazyVector"
FBReactNativeSpec:
Expand Down Expand Up @@ -473,42 +472,32 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-sound"
RNVectorIcons:
:path: "../node_modules/react-native-vector-icons"
UMAppLoader:
:path: "../node_modules/unimodules-app-loader/ios"
UMBarCodeScannerInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-barcode-scanner-interface/ios"
:path: "../node_modules/unimodules-barcode-scanner-interface/ios"
UMCameraInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-camera-interface/ios"
:path: "../node_modules/unimodules-camera-interface/ios"
UMConstantsInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-constants-interface/ios"
:path: "../node_modules/unimodules-constants-interface/ios"
UMCore:
:path: !ruby/object:Pathname
path: "../node_modules/@unimodules/core/ios"
:path: "../node_modules/@unimodules/core/ios"
UMFaceDetectorInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-face-detector-interface/ios"
:path: "../node_modules/unimodules-face-detector-interface/ios"
UMFileSystemInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-file-system-interface/ios"
:path: "../node_modules/unimodules-file-system-interface/ios"
UMFontInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-font-interface/ios"
:path: "../node_modules/unimodules-font-interface/ios"
UMImageLoaderInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-image-loader-interface/ios"
:path: "../node_modules/unimodules-image-loader-interface/ios"
UMPermissionsInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-permissions-interface/ios"
:path: "../node_modules/unimodules-permissions-interface/ios"
UMReactNativeAdapter:
:path: !ruby/object:Pathname
path: "../node_modules/@unimodules/react-native-adapter/ios"
:path: "../node_modules/@unimodules/react-native-adapter/ios"
UMSensorsInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-sensors-interface/ios"
:path: "../node_modules/unimodules-sensors-interface/ios"
UMTaskManagerInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-task-manager-interface/ios"
:path: "../node_modules/unimodules-task-manager-interface/ios"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

Expand All @@ -517,10 +506,10 @@ SPEC CHECKSUMS:
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
EXAppleAuthentication: 046c76335343eaa97f6ed8d35a9cf493a2c4d351
EXApplication: 7cf81de6fafccff42f5d1caa5c24a159db6b9437
EXAppLoaderProvider: 5d348813a9cf09b03bbe5b8b55437bc1bfbddbd1
EXConstants: 857aa7b1c84e2878f8402d712061860bca16a697
EXFileSystem: 7e53a2c30a2eb6987ba6d5158ab908f947523228
EXPermissions: df10ad83df2f6b647aec304619354f8ab48d5f63
EXConstants: 5304709b1bea70a4828f48ba4c7fc3ec3b2d9b17
EXFileSystem: cf4232ba7c62dc49b78c2d36005f97b6fddf0b01
EXImageLoader: 5ad6896fa1ef2ee814b551873cbf7a7baccc694a
EXPermissions: 24b97f734ce9172d245a5be38ad9ccfcb6135964
EXScreenOrientation: 44d3cd3a99a86b9cb681e742697bc2c057d7fbd2
FBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f
FBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75
Expand All @@ -543,7 +532,7 @@ SPEC CHECKSUMS:
react-native-safari-view: 955d7160d159241b8e9395d12d10ea0ef863dcdd
react-native-safe-area: 5fce5242419932bc05656f31bc5f0716e30be0f6
react-native-simple-toast: 6c376bd79b1e255a4bee90a72ead6447f96ea10d
react-native-webview: 3f5aa91c3cb083ea4762e006b9653291a96a777a
react-native-webview: 83d00afd3f3ebfbee7f02d149ce1bfa8494d55f3
React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
React-RCTBlob: d89293cc0236d9cb0933d85e430b0bbe81ad1d72
Expand All @@ -563,18 +552,19 @@ SPEC CHECKSUMS:
RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
Sentry: 14bdd673870e8cf64932b149fad5bbbf39a9b390
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
UMBarCodeScannerInterface: d5a6fdc98ed6241225b0a8432a7f4e2b397668bc
UMCameraInterface: 68870a3197fee85bd5afca5609ba4a5b7257d19d
UMConstantsInterface: d25b8e8887ca7aaf568c06caf08f4d40734ee4ef
UMCore: 402cee150324974974f5c32b5404d8af65e4cff5
UMFaceDetectorInterface: 7b4f1a92f0c726b58b086296048efe193b570678
UMFileSystemInterface: aadb9a67aa6470d7ebc06cf04dc54fee6781ac48
UMFontInterface: 2d3c128285086bbed3d2a650f1d698323ef3b25a
UMImageLoaderInterface: 2829a7571a12d2e754c73c55ffe7e327d8402c7d
UMPermissionsInterface: b6a6e96db0f4011a25aaca14e6022529dd3d6e4e
UMReactNativeAdapter: 93c2f520a1cdb6ef3058a7b6a95275a804e0923b
UMSensorsInterface: cf59dd7602764a2419e00167429be3e4be39c61d
UMTaskManagerInterface: 1e70fe58b872355f0ecb44fb81bb1a16484047f0
UMAppLoader: ee77a072f9e15128f777ccd6d2d00f52ab4387e6
UMBarCodeScannerInterface: 9dc692b87e5f20fe277fa57aa47f45d418c3cc6c
UMCameraInterface: 625878bbf2ba188a8548675e1d1d2e438a653e6d
UMConstantsInterface: 64060cf86587bcd90b1dbd804cceb6d377a308c1
UMCore: eb200e882eadafcd31ead290770835fd648c0945
UMFaceDetectorInterface: d6677d6ddc9ab95a0ca857aa7f8ba76656cc770f
UMFileSystemInterface: c70ea7147198b9807080f3597f26236be49b0165
UMFontInterface: d9d3b27af698c5389ae9e20b99ef56a083f491fb
UMImageLoaderInterface: 14dd2c46c67167491effc9e91250e9510f12709e
UMPermissionsInterface: 5e83a9167c177e4a0f0a3539345983cc749efb3e
UMReactNativeAdapter: 126da3486c1a1f11945b649d557d6c2ebb9407b2
UMSensorsInterface: 48941f70175e2975af1a9386c6d6cb16d8126805
UMTaskManagerInterface: cb890c79c63885504ddc0efd7a7d01481760aca2
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b

PODFILE CHECKSUM: a17f480863448723f1b256597206709dfa50870c
Expand Down
16 changes: 1 addition & 15 deletions ios/ZulipMobile/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,14 @@
</dict>
</dict>
</dict>
<key>NSCalendarsUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your calendar</string>
<key>NSCameraUsageDescription</key>
<string>Take a photo and upload it to a Zulip realm</string>
<key>NSContactsUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your contacts</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to use your location</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to use your location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to use your location</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your microphone</string>
<key>NSMotionUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your device's accelerometer</string>
<string></string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Download photos from Zulip realm</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Upload photos to a Zulip realm</string>
<key>NSRemindersUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your reminders</string>
<key>UIAppFonts</key>
<array>
<string>Entypo.ttf</string>
Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// These will be used as regexp fragments.
const transformModulesWhitelist = [
'expo-apple-authentication',
'expo-application',
'react-native',
// @rnc/async-storage itself is precompiled, but its mock-helper is not
'@react-native-community/async-storage',
Expand All @@ -24,7 +25,7 @@ const transformModulesWhitelist = [
const transformIgnorePattern = `node_modules/(?!${transformModulesWhitelist.join('|')})`;

module.exports = {
preset: 'react-native',
preset: 'jest-expo',

// Finding and transforming source code.

Expand Down
Loading