madeinfrance / react-native-share-pdf Goto Github PK
View Code? Open in Web Editor NEWShare base64 PDF file - NPM library
License: MIT License
Share base64 PDF file - NPM library
License: MIT License
The Name of the package has to be updated from react-native-base64-share-pdf
to react-native-share-pdf`
Was wondering if there was a typed version for the typescript users.
Describe the bug
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve project :react-native-share-pdf.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-share-pdf:
- None of the consumable configurations have attributes.
To Reproduce
Neither - the demo project does not run.
Steps to reproduce the behavior:
yarn add react-native-share-pdf
)dependencies
in app/build.gradle
:
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-share-pdf')
}
settings.gradle
rootProject.name = 'SharePDFTester'
include ':app'
include ':react-native-share-pdf'
project(':react-native-share-pdf').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share-pdf/android')
in MainApplication.java
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ShareFilePackage()
);
}
Describe the bug
I just installed this package and get this error:
Uri outputFileUri = FileProvider.getUriForFile(reactContext, reactContext.getPackageName() + ".provider", file);
^
symbol: variable FileProvider
location: class ShareFile
Info
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-share-pdf": "^0.0.6",
Describe the bug
The version in the NPM repository is behind this version. I've had to manually copy some of the latest commits into my yarn-installed version to get it to compile
To Reproduce
yarn add react-native-share-pdf
Observe that the installed version doesn't have this commit for example b6df0d9
Expected behavior
NPM installs the latest version
First of all, android folder does not have build.gradle file, that makes the application stuck in nowhere that it does not run at all.
I consider this kind of modules to be virus in react-native community
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch [email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-share-pdf/android/src/main/java/com/maximegerbe/reactnative/sharefile/ShareFile.java b/node_modules/react-native-share-pdf/android/src/main/java/com/maximegerbe/reactnative/sharefile/ShareFile.java
index 8667de9..520fc6e 100644
--- a/node_modules/react-native-share-pdf/android/src/main/java/com/maximegerbe/reactnative/sharefile/ShareFile.java
+++ b/node_modules/react-native-share-pdf/android/src/main/java/com/maximegerbe/reactnative/sharefile/ShareFile.java
@@ -8,7 +8,7 @@ package com.maximegerbe.reactnative.sharefile;
import android.content.Intent;
import android.net.Uri;
-import android.support.v4.content.FileProvider;
+import androidx.core.content.FileProvider;
import android.util.Base64;
import android.app.Activity;
This issue body was partially generated by patch-package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.