Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: alexgomezalanis/react-native-share
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: thanx/react-native-share
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
Loading
Showing with 23,538 additions and 19,897 deletions.
  1. +126 −0 .circleci/config.yml
  2. +1 −0 .eslintignore
  3. +5 −28 .eslintrc
  4. +4 −2 .flowconfig
  5. +6 −0 .github/{ISSUE_TEMPLATE.md → ISSUE_TEMPLATE/bug_report.md}
  6. +14 −0 .github/ISSUE_TEMPLATE/feature_request.md
  7. +8 −0 .github/ISSUE_TEMPLATE/question.md
  8. +8 −0 .github/PULL_REQUEST_TEMPLATE.md
  9. +45 −0 .github/stale.yml
  10. +25 −8 .gitignore
  11. +8 −7 .npmignore
  12. +110 −29 CHANGELOG.md
  13. +1 −0 CODEOWNERS
  14. +31 −483 README.md
  15. +6 −6 RNShare.podspec
  16. +10 −0 android/.npmignore
  17. +26 −30 android/build.gradle
  18. BIN android/gradle/wrapper/gradle-wrapper.jar
  19. +1 −2 android/gradle/wrapper/gradle-wrapper.properties
  20. +60 −32 android/gradlew
  21. +100 −90 android/gradlew.bat
  22. +0 −121 android/react-native-share.iml
  23. +13 −1 android/src/main/AndroidManifest.xml
  24. +7 −0 android/src/main/java/cl/json/RNShareFileProvider.java
  25. +82 −33 android/src/main/java/cl/json/RNShareModule.java
  26. +202 −0 android/src/main/java/cl/json/RNSharePathUtil.java
  27. +36 −35 android/src/main/java/cl/json/ShareFile.java
  28. +27 −29 android/src/main/java/cl/json/ShareFiles.java
  29. +1 −1 android/src/main/java/cl/json/social/InstagramShare.java
  30. +46 −0 android/src/main/java/cl/json/social/InstagramStoriesShare.java
  31. +45 −0 android/src/main/java/cl/json/social/LinkedinShare.java
  32. +45 −0 android/src/main/java/cl/json/social/MessengerShare.java
  33. +17 −8 android/src/main/java/cl/json/social/SMSShare.java
  34. +253 −16 android/src/main/java/cl/json/social/ShareIntent.java
  35. +49 −15 android/src/main/java/cl/json/social/SingleShareIntent.java
  36. +49 −0 android/src/main/java/cl/json/social/SnapChatShare.java
  37. +91 −0 android/src/main/java/cl/json/social/TargetChosenReceiver.java
  38. +6 −0 android/src/main/res/xml/share_download_paths.xml
  39. +0 −33 changelog.js
  40. +0 −38 circle.yml
  41. +2 −1 components/Button.js
  42. +1 −0 components/Overlay.js
  43. +1 −0 components/Sheet.js
  44. +0 −1 docs/index.html
  45. +0 −3 example/.babelrc
  46. +0 −6 example/.buckconfig
  47. +4 −0 example/.eslintrc.js
  48. +0 −54 example/.flowconfig
  49. +0 −1 example/.gitattributes
  50. +4 −1 example/.gitignore
  51. +6 −0 example/.prettierrc.js
  52. +0 −1 example/.watchmanconfig
  53. +249 −32 example/App.js
  54. +4 −14 example/android/app/{BUCK → _BUCK}
  55. +94 −17 example/android/app/build.gradle
  56. +19 −0 example/android/app/build_defs.bzl
  57. BIN example/android/app/debug.keystore
  58. +0 −60 example/android/app/proguard-rules.pro
  59. +8 −0 example/android/app/src/debug/AndroidManifest.xml
  60. +72 −0 example/android/app/src/debug/java/com/example/ReactNativeFlipper.java
  61. +4 −15 example/android/app/src/main/AndroidManifest.xml
  62. +8 −8 example/android/app/src/main/java/com/example/MainActivity.java
  63. +54 −27 example/android/app/src/main/java/com/example/MainApplication.java
  64. BIN example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  65. BIN example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  66. BIN example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  67. BIN example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  68. BIN example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  69. BIN example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  70. BIN example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  71. BIN example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  72. BIN example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  73. BIN example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  74. +1 −1 example/android/app/src/main/res/values/strings.xml
  75. +1 −0 example/android/app/src/main/res/values/styles.xml
  76. +0 −4 example/android/app/src/main/res/xml/file_paths.xml
  77. +30 −3 example/android/build.gradle
  78. +9 −1 example/android/gradle.properties
  79. BIN example/android/gradle/wrapper/gradle-wrapper.jar
  80. +1 −1 example/android/gradle/wrapper/gradle-wrapper.properties
  81. +61 −37 example/android/gradlew
  82. +100 −90 example/android/gradlew.bat
  83. +0 −8 example/android/keystores/BUCK
  84. +0 −4 example/android/keystores/debug.keystore.properties
  85. +4 −3 example/android/settings.gradle
  86. +2 −2 example/app.json
  87. +8 −0 example/images/imagesBase64.js
  88. +2 −0 example/images/pdfBase64.js
  89. +7 −2 example/index.js
  90. +85 −0 example/ios/Podfile
  91. +469 −0 example/ios/Podfile.lock
  92. +14 −15 example/ios/example-tvOS/Info.plist
  93. +249 −937 example/ios/example.xcodeproj/project.pbxproj
  94. +14 −55 example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme
  95. +14 −57 example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme
  96. +13 −0 example/ios/example.xcworkspace/contents.xcworkspacedata
  97. +8 −0 example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  98. +2 −8 example/ios/example/AppDelegate.h
  99. +36 −13 example/ios/example/AppDelegate.m
  100. +1 −1 example/ios/example/Base.lproj/LaunchScreen.xib
  101. +30 −15 example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json
  102. +25 −19 example/ios/example/Info.plist
  103. +0 −7 example/ios/example/main.m
  104. +1 −1 example/ios/exampleTests/Info.plist
  105. +7 −10 example/ios/exampleTests/exampleTests.m
  106. +0 −8,789 example/package-lock.json
  107. +0 −24 example/package.json
  108. +0 −4 example/src/imageBase64.js
  109. +0 −5,362 example/yarn.lock
  110. +163 −84 index.js
  111. +6 −0 ios/.npmignore
  112. +1 −1 ios/EmailShare.h
  113. +8 −5 ios/EmailShare.m
  114. +54 −0 ios/FacebookStories.h
  115. +163 −0 ios/FacebookStories.m
  116. +2 −1 ios/GenericShare.h
  117. +9 −6 ios/GenericShare.m
  118. +1 −1 ios/GooglePlusShare.h
  119. +4 −1 ios/InstagramShare.h
  120. +79 −4 ios/InstagramShare.m
  121. +53 −0 ios/InstagramStories.h
  122. +184 −0 ios/InstagramStories.m
  123. +1 −1 ios/RNShare.h
  124. +115 −7 ios/RNShare.m
  125. +25 −2 ios/RNShare.xcodeproj/project.pbxproj
  126. +12 −0 ios/RNShareActivityItemSource.h
  127. +290 −0 ios/RNShareActivityItemSource.m
  128. +2 −2 ios/WhatsAppShare.h
  129. +3 −2 ios/WhatsAppShare.m
  130. +81 −30 package.json
  131. +5 −0 prettier.config.js
  132. +15 −0 react-native.config.js
  133. +20 −0 website/.gitignore
  134. +41 −0 website/docs/contributing.mdx
  135. +161 −0 website/docs/installing.mdx
  136. +17 −0 website/docs/language-support.mdx
  137. +38 −0 website/docs/migrate-v3-to-v4.mdx
  138. +198 −0 website/docs/share-open.mdx
  139. +32 −0 website/docs/share-package-installed.mdx
  140. +64 −0 website/docs/share-remote-file.mdx
  141. +184 −0 website/docs/share-single.mdx
  142. +12 −0 website/docs/testing.mdx
  143. +10 −0 website/docs/troubleshooting-ios.mdx
  144. +22 −0 website/docs/ui-components.mdx
  145. +116 −0 website/docusaurus.config.js
  146. +30 −0 website/package.json
  147. +16 −0 website/sidebars.js
  148. +25 −0 website/src/css/custom.css
  149. +92 −0 website/src/pages/index.js
  150. +37 −0 website/src/pages/styles.module.css
  151. +39 −0 website/static/css/code-block-buttons.css
  152. +1 −0 website/static/img/app_data.svg
  153. BIN {assets → website/static/img/assets-docs}/android-250x.png
  154. BIN {assets → website/static/img/assets-docs}/android-component-250x.gif
  155. BIN {assets → website/static/img/assets-docs}/android-component.gif
  156. BIN {assets → website/static/img/assets-docs}/android.png
  157. BIN {assets → website/static/img/assets-docs}/ios-250x.png
  158. BIN {assets → website/static/img/assets-docs}/ios-component-250x.gif
  159. BIN {assets → website/static/img/assets-docs}/ios-component.gif
  160. BIN website/static/img/assets-docs/ios-readme-example.gif
  161. BIN {assets → website/static/img/assets-docs}/ios.png
  162. BIN {assets → website/static/img/assets-docs}/windows-250x.png
  163. BIN {assets → website/static/img/assets-docs}/windows.png
  164. +1 −0 website/static/img/attached_file.svg
  165. BIN website/static/img/community.png
  166. +1 −0 website/static/img/react.svg
  167. +47 −0 website/static/js/code-block-buttons.js
  168. +10,335 −0 website/yarn.lock
  169. +7,435 −2,989 yarn.lock
126 changes: 126 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
version: 2.1

orbs:
react-native: react-native-community/react-native@4.4.2

commands:
checkout-attach-workspace:
description: "Checkout and attach workspace"
steps:
- checkout
- attach_workspace:
at: ~/app

jobs:
install-dependencies:
executor: react-native/linux_js
working_directory: ~/app
steps:
- checkout
- react-native/yarn_install
- persist_to_workspace:
root: ~/app
paths:
- node_modules

lint:
executor: react-native/linux_js
working_directory: ~/app
steps:
- checkout-attach-workspace
- run:
name: Lint
command: yarn lint

validate-flow:
executor: react-native/linux_js
working_directory: ~/app
steps:
- checkout-attach-workspace
- run:
name: Flow
command: yarn validate:flow

ios_build:
macos:
xcode: 11.5.0
working_directory: ~/app
steps:
- checkout
- react-native/setup_macos_executor
- run: yarn install --frozen-lockfile --non-interactive
- react-native/pod_install:
pod_install_directory: ./example/ios
- react-native/ios_build:
project_path: ./example/ios/Example.xcworkspace
project_type: workspace
scheme: example
device: iPhone 11

publish-version:
executor: react-native/linux_js
working_directory: ~/app
steps:
- checkout-attach-workspace
- run:
name: Publish New Version
command: yarn ci:publish

deploy-docs:
executor: react-native/linux_js
working_directory: ~/app
steps:
- checkout-attach-workspace
- run:
name: Deploying new docs-version
command: |
git config --global user.email "${GH_EMAIL}@users.noreply.github.com"
git config --global user.name "${GH_NAME}"
echo "machine github.com login $GH_NAME password $GH_TOKEN" > ~/.netrc
cd website && yarn install && CUSTOM_COMMIT_MESSAGE="[skip ci]" GIT_USER=${GH_NAME} yarn deploy
workflows:
version: 2

build-lint-app:
jobs:
- install-dependencies:
filters:
branches:
ignore:
- master
- react-native/android_build:
checkout: true
project_path: ./example/android
workspace_root: ~/app
filters:
branches:
ignore:
- master
- ios_build:
filters:
branches:
ignore:
- master
- lint:
requires:
- install-dependencies
- validate-flow:
requires:
- install-dependencies

release:
jobs:
- install-dependencies:
filters:
branches:
only:
- master
- publish-version:
requires:
- install-dependencies
- deploy-docs:
filters:
branches:
only:
- master
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
example/
33 changes: 5 additions & 28 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"browser": true,
"node": true,
"jest": true,
"es6": true,
"es6": true
},
"plugins": [
"react",
@@ -22,35 +22,12 @@
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:import/errors"
"plugin:import/errors",
"@react-native-community"

],
"rules": {
"comma-dangle": [2, "always-multiline"],
"quotes": [2, "single", { "allowTemplateLiterals": true }],
"react/prop-types": 0,
"no-case-declarations": 0,
"react/jsx-no-bind": 0,
"react/display-name": 0,
"new-cap": 0,
"react-native/no-unused-styles": 2,
"react-native/split-platform-components": 0,
"react-native/no-inline-styles": 0,
"react-native/no-color-literals": 0,
"no-unexpected-multiline": 0,
"no-class-assign": 1,
"no-console": 2,
"object-curly-spacing": [1, "always"],
"flowtype/define-flow-type": 1,
"flowtype/use-flow-type": 1,
"import/first": 2,
"import/default": 0,
"no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"import/named": 0,
"import/namespace": [2, { "allowComputed": true }],
"no-extra-boolean-cast": 0,
"import/no-duplicates": 2
},
"settings": {
"import/ignore": ["react-native"],
"import/resolver": {
"node": {
"extensions":[
6 changes: 4 additions & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ignore]
.*/node_modules/.*
.*/example/.*

[include]

@@ -8,5 +8,7 @@
[lints]

[options]
server.max_workers=4

[strict]
[untyped]
.*/node_modules/.*
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
name: 🐛 Report a bug
about: Report a reproducible or regression bug.
labels: 'bug'
---

### Steps to reproduce
1.
2.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: ✨ Feature request
about: Suggest an idea.
labels: 'enhancement'
---

## Describe the Feature
<!-- Describe the requested Feature -->

## Possible Implementations
<!-- Describe how to implement the feature -->

## Related Issues
<!-- Link related issues here -->
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: 💬 Question
about: You need help with the library.
labels: 'question'
---

## Ask your Question
<!-- Ask your question -->
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Overview
<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. -->
<!-- Help us understand your motivation by explaining why you decided to make this change -->


# Test Plan
<!-- Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. -->
<!-- Bonus points for screenshots and videos! Increase test coverage whenever possible. -->
45 changes: 45 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Configuration for probot-stale based on: https://github.com/facebook/react-native/blob/master/.github/stale.yml

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 60

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
daysUntilClose: 7

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
- discussion
- good first issue
- "help wanted"

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions. You may also mark this issue as a "discussion" and i
will leave this open.
# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
Closing this issue after a prolonged period of inactivity. Fell free to reopen
this issue, if this still affecting you.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

# Limit to only `issues` or `pulls`
only: issues
33 changes: 25 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -22,12 +22,16 @@ DerivedData
*.xcuserstate
project.xcworkspace

# Android/IJ
# Android/IntelliJ
#
*.iml
build/
.idea
.gradle
local.properties
*.iml
android/gradle/
android/gradlew
android/gradlew.bat

# Visual Studio
*.VC.db
@@ -58,10 +62,23 @@ coverage
# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependencies
/node_modules

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
build/
# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
15 changes: 8 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.babelrc
.flowconfig
example
website
.eslintrc
.gitignore
circle.yml
jsconfig.json
.eslintignore
.flowconfig
commitlint.config.js
assets/*
example/*
CHANGELOG.md
CODEOWNERS
react-native.config.js
prettier.config.js
Loading