react-native-check-app-install
react-native-check-app-install copied to clipboard
Change compile to Implementation
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-check-app-install/android/build.gradle b/node_modules/react-native-check-app-install/android/build.gradle
index d374b27..e436ea6 100644
--- a/node_modules/react-native-check-app-install/android/build.gradle
+++ b/node_modules/react-native-check-app-install/android/build.gradle
@@ -1,29 +1,22 @@
-def safeExtGet(prop, fallback) {
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
-}
-
buildscript {
repositories {
- google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.3.1'
+ classpath 'com.android.tools.build:gradle:2.1.0'
}
}
apply plugin: 'com.android.library'
android {
- compileSdkVersion safeExtGet('compileSdkVersion', 23)
- //noinspection GradleDependency
- buildToolsVersion safeExtGet('buildToolsVersion', '23.0.1')
+ compileSdkVersion 23
+ buildToolsVersion "23.0.1"
defaultConfig {
- minSdkVersion safeExtGet('minSdkVersion', 16)
- //noinspection OldTargetApi
- targetSdkVersion safeExtGet('targetSdkVersion', 23)
+ minSdkVersion 16
+ targetSdkVersion 23
versionCode 1
versionName "1.0"
}
@@ -33,7 +26,6 @@ android {
}
repositories {
- google()
mavenLocal()
jcenter()
maven {
@@ -43,5 +35,5 @@ repositories {
}
dependencies {
- compile 'com.facebook.react:react-native:+'
+ implementation 'com.facebook.react:react-native:+'
}
\ No newline at end of file
diff --git a/node_modules/react-native-check-app-install/app-installed-checker.js b/node_modules/react-native-check-app-install/app-installed-checker.js
index 4515545..ce95bee 100644
--- a/node_modules/react-native-check-app-install/app-installed-checker.js
+++ b/node_modules/react-native-check-app-install/app-installed-checker.js
@@ -21,9 +21,11 @@ class AppInstalledChecker {
Linking
.canOpenURL(proto + '://' + query || '')
.then((isInstalled) => {
+ console.log('isInstalled', isInstalled);
resolve(isInstalled);
})
.catch((err) => {
+ console.log('erroer', err);
reject(err);
});
});
@@ -37,7 +39,7 @@ class AppInstalledChecker {
}
static isAppInstalledAndroid(key) {
- return this.checkPackageName(key);
+ return this.checkPackageName(APP_LIST[key].pkgName);
}
static isAppInstalledIOS(key) {
diff --git a/node_modules/react-native-check-app-install/app-list.js b/node_modules/react-native-check-app-install/app-list.js
index f2e426c..4400f32 100644
--- a/node_modules/react-native-check-app-install/app-list.js
+++ b/node_modules/react-native-check-app-install/app-list.js
@@ -27,6 +27,5 @@ export const APP_LIST = {
"vlc": {pkgName: "org.videolan.vlc", urlScheme: "vlc", urlParams: ""},
"tumblr": {pkgName: "com.tumblr", urlScheme: "tumblr", urlParams: "x-callback-url/dashboard"}, // fa
"flickr": {pkgName: "com.yahoo.mobile.client.android.flickr", urlScheme: "flickr", urlParams: ""}, // fa
- "linkedin": {pkgName: "com.linkedin.android", urlScheme: "linkedin", urlParams: ""},
- "google": { pkgName: "com.google.android.googlequicksearchbox", urlScheme: "google", urlParams: "" }
+ "linkedin": {pkgName: "com.linkedin.android", urlScheme: "linkedin", urlParams: ""}
};
\ No newline at end of file
This issue body was partially generated by patch-package.