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 attachment picker to Expensify Chat #463

Merged
merged 20 commits into from
Sep 21, 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
3 changes: 3 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:requestLegacyExternalStorage="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
Expand Down
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ PODS:
- react-native-config/App (= 1.3.3)
- react-native-config/App (1.3.3):
- React
- react-native-image-picker (2.3.3):
- React
- react-native-netinfo (5.9.6):
- React
- react-native-safe-area-context (3.1.4):
Expand Down Expand Up @@ -350,6 +352,7 @@ DEPENDENCIES:
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- react-native-config (from `../node_modules/react-native-config`)
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-webview (from `../node_modules/react-native-webview`)
Expand Down Expand Up @@ -414,6 +417,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsinspector"
react-native-config:
:path: "../node_modules/react-native-config"
react-native-image-picker:
:path: "../node_modules/react-native-image-picker"
react-native-netinfo:
:path: "../node_modules/@react-native-community/netinfo"
react-native-safe-area-context:
Expand Down Expand Up @@ -473,6 +478,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 8ca588cc921e70590820ce72b8789b02c67cce38
React-jsinspector: b14e62ebe7a66e9231e9581279909f2fc3db6606
react-native-config: 9a061347e0136fdb32d43a34d60999297d672361
react-native-image-picker: a6c3d644751a388b0fc8b56822ff7cbd398a3008
react-native-netinfo: d2c312fa4b151214e1d5c8456ddb5f28ff24a576
react-native-safe-area-context: 0ed9288ed4409beabb0817b54efc047286fc84da
react-native-webview: 797f50d16bb271c4270bc742040a64c79ec7147c
Expand Down
60 changes: 30 additions & 30 deletions ios/ReactNativeChat.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

24 changes: 15 additions & 9 deletions ios/ReactNativeChat/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@
<key>CFBundleVersion</key>
<string>60</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false />
<false/>
<key>LSRequiresIPhoneOS</key>
<true />
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true />
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true />
<true/>
<key>NSIncludesSubdomains</key>
<true />
<true/>
</dict>
<key>www.expensify.com.dev</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true />
<true/>
<key>NSIncludesSubdomains</key>
<true />
<true/>
</dict>
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string />
<string></string>
<key>UIAppFonts</key>
<array>
<string>GTAmericaExp-Bold.otf</string>
Expand All @@ -70,7 +70,13 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>NSPhotoLibraryUsageDescription</key>
<string>Your photos are used to create chat attachments.</string>
<key>NSCameraUsageDescription</key>
<string>Your camera is used to create chat attachments.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Your camera roll is used to store chat attachments.</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false />
<false/>
</dict>
</plist>
203 changes: 203 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"android-build": "fastlane android build",
"test": "jest",
"lint": "eslint .",
"postinstall": "patch-package",
"postversion": "react-native-version",
"print-version": "echo $npm_package_version"
},
Expand All @@ -38,13 +39,15 @@
"lodash.orderby": "^4.6.0",
"moment": "^2.27.0",
"moment-timezone": "^0.5.31",
"patch-package": "^6.2.2",
"prop-types": "^15.7.2",
"pusher-js": "^7.0.0",
"react": "^16.13.1",
"react-beforeunload": "^2.2.2",
"react-dom": "^16.13.1",
"react-native": "0.63.2",
"react-native-config": "^1.3.3",
"react-native-image-picker": "^2.3.3",
"react-native-keyboard-spacer": "^0.4.1",
"react-native-render-html": "^4.2.3",
"react-native-safe-area-context": "^3.1.4",
Expand Down
13 changes: 13 additions & 0 deletions patches/react-native+0.63.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/react-native/Libraries/Image/RCTImageLoader.mm b/node_modules/react-native/Libraries/Image/RCTImageLoader.mm
index 3571647..ffb64b1 100644
--- a/node_modules/react-native/Libraries/Image/RCTImageLoader.mm
+++ b/node_modules/react-native/Libraries/Image/RCTImageLoader.mm
@@ -1040,7 +1040,7 @@ - (BOOL)canHandleRequest:(NSURLRequest *)request

- (id)sendRequest:(NSURLRequest *)request withDelegate:(id<RCTURLRequestDelegate>)delegate
{
- __block RCTImageLoaderCancellationBlock requestToken;
+ __block RCTImageLoaderCancellationBlock requestToken = ^{};
requestToken = [self loadImageWithURLRequest:request callback:^(NSError *error, UIImage *image) {
if (error) {
[delegate URLRequest:requestToken didCompleteWithError:error];
Loading