@ohos-ports/react-native-firebase-dynamic-links 0.0.0-stage → 22.4.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +971 -0
  2. package/LICENSE +32 -0
  3. package/README.md +53 -2
  4. package/RNFBDynamicLinks.podspec +49 -0
  5. package/android/.editorconfig +10 -0
  6. package/android/build.gradle +98 -0
  7. package/android/lint.xml +5 -0
  8. package/android/settings.gradle +1 -0
  9. package/android/src/main/AndroidManifest.xml +8 -0
  10. package/android/src/main/java/io/invertase/firebase/dynamiclinks/ReactNativeFirebaseDynamicLinksModule.java +507 -0
  11. package/android/src/main/java/io/invertase/firebase/dynamiclinks/ReactNativeFirebaseDynamicLinksPackage.java +44 -0
  12. package/app.plugin.js +1 -0
  13. package/ios/RNFBDynamicLinks/RNFBDynamicLinksAppDelegateInterceptor.h +37 -0
  14. package/ios/RNFBDynamicLinks/RNFBDynamicLinksAppDelegateInterceptor.m +132 -0
  15. package/ios/RNFBDynamicLinks/RNFBDynamicLinksModule.h +28 -0
  16. package/ios/RNFBDynamicLinks/RNFBDynamicLinksModule.m +443 -0
  17. package/ios/RNFBDynamicLinks.xcodeproj/project.pbxproj +354 -0
  18. package/ios/RNFBDynamicLinks.xcodeproj/xcshareddata/IDETemplateMacros.plist +24 -0
  19. package/lib/builder.js +93 -0
  20. package/lib/builders/analytics.js +61 -0
  21. package/lib/builders/android.js +52 -0
  22. package/lib/builders/ios.js +76 -0
  23. package/lib/builders/itunes.js +49 -0
  24. package/lib/builders/navigation.js +37 -0
  25. package/lib/builders/otherPlatform.js +20 -0
  26. package/lib/builders/social.js +49 -0
  27. package/lib/index.d.ts +650 -0
  28. package/lib/index.js +119 -0
  29. package/lib/modular/index.d.ts +148 -0
  30. package/lib/modular/index.js +110 -0
  31. package/lib/version.js +2 -0
  32. package/package.json +42 -4
  33. package/plugin/build/index.d.ts +3 -0
  34. package/plugin/build/index.js +17 -0
  35. package/plugin/build/ios/appDelegate.d.ts +5 -0
  36. package/plugin/build/ios/appDelegate.js +86 -0
  37. package/plugin/build/ios/index.d.ts +2 -0
  38. package/plugin/build/ios/index.js +13 -0
  39. package/plugin/src/index.ts +15 -0
  40. package/plugin/src/ios/appDelegate.ts +92 -0
  41. package/plugin/src/ios/index.ts +3 -0
  42. package/plugin/tsconfig.json +9 -0
  43. package/plugin/tsconfig.tsbuildinfo +1 -0
package/LICENSE ADDED
@@ -0,0 +1,32 @@
1
+ Apache-2.0 License
2
+ ------------------
3
+
4
+ Copyright (c) 2016-present Invertase Limited <oss@invertase.io> & Contributors
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this library except in compliance with the License.
8
+
9
+ You may obtain a copy of the Apache-2.0 License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+
20
+ Creative Commons Attribution 3.0 License
21
+ ----------------------------------------
22
+
23
+ Copyright (c) 2016-present Invertase Limited <oss@invertase.io> & Contributors
24
+
25
+ Documentation and other instructional materials provided for this project
26
+ (including on a separate documentation repository or it's documentation website) are
27
+ licensed under the Creative Commons Attribution 3.0 License. Code samples/blocks
28
+ contained therein are licensed under the Apache License, Version 2.0 (the "License"), as above.
29
+
30
+ You may obtain a copy of the Creative Commons Attribution 3.0 License at
31
+
32
+ https://creativecommons.org/licenses/by/3.0/
package/README.md CHANGED
@@ -1,3 +1,54 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <a href="https://rnfirebase.io">
3
+ <img width="160px" src="https://i.imgur.com/JIyBtKW.png"><br/>
4
+ </a>
5
+ <h2 align="center">React Native Firebase - Dynamic Links</h2>
6
+ </p>
2
7
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
8
+ <p align="center">
9
+ <a href="https://api.rnfirebase.io/coverage/dynamic-links/detail"><img src="https://api.rnfirebase.io/coverage/dynamic-links/badge?style=flat-square" alt="Coverage"></a>
10
+ <a href="https://www.npmjs.com/package/@react-native-firebase/dynamic-links"><img src="https://img.shields.io/npm/dm/@react-native-firebase/dynamic-links.svg?style=flat-square" alt="NPM downloads"></a>
11
+ <a href="https://www.npmjs.com/package/@react-native-firebase/dynamic-links"><img src="https://img.shields.io/npm/v/@react-native-firebase/dynamic-links.svg?style=flat-square" alt="NPM version"></a>
12
+ <a href="/LICENSE"><img src="https://img.shields.io/npm/l/react-native-firebase.svg?style=flat-square" alt="License"></a>
13
+ <a href="https://lerna.js.org/"><img src="https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg?style=flat-square" alt="Maintained with Lerna"></a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://invertase.link/discord"><img src="https://img.shields.io/discord/295953187817521152.svg?style=flat-square&colorA=7289da&label=Chat%20on%20Discord" alt="Chat on Discord"></a>
18
+ <a href="https://twitter.com/rnfirebase"><img src="https://img.shields.io/twitter/follow/rnfirebase.svg?style=flat-square&colorA=1da1f2&colorB=&label=Follow%20on%20Twitter" alt="Follow on Twitter"></a>
19
+ <a href="https://www.facebook.com/groups/rnfirebase"><img src="https://img.shields.io/badge/Follow%20on%20Facebook-4172B8?logo=facebook&style=flat-square&logoColor=fff" alt="Follow on Facebook"></a>
20
+ </p>
21
+
22
+ ---
23
+
24
+ Dynamic Links are smart URLs that allow you to send existing and potential users to any location within your React Native app. They survive the app install process, so even new users can see the content they're looking for when they open the app for the first time.
25
+
26
+ [> Learn More](https://firebase.google.com/docs/dynamic-links)
27
+
28
+ ## Installation
29
+
30
+ Requires `@react-native-firebase/app` to be installed.
31
+
32
+ ```bash
33
+ yarn add @react-native-firebase/dynamic-links
34
+ ```
35
+
36
+ ## Documentation
37
+
38
+ - [Installation](https://rnfirebase.io/dynamic-links/usage)
39
+ - [Reference](https://rnfirebase.io/reference/dynamic-links)
40
+
41
+ ## License
42
+
43
+ - See [LICENSE](/LICENSE)
44
+
45
+ ---
46
+
47
+ <p>
48
+ <img align="left" width="75px" src="https://static.invertase.io/assets/invertase/invertase-rounded.png">
49
+ <p align="left">
50
+ Built and maintained with 💛 by <a href="https://invertase.io">Invertase</a>.
51
+ </p>
52
+ </p>
53
+
54
+ ---
@@ -0,0 +1,49 @@
1
+ require 'json'
2
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
3
+ appPackage = JSON.parse(File.read(File.join('..', 'app', 'package.json')))
4
+
5
+ coreVersionDetected = appPackage['version']
6
+ coreVersionRequired = package['peerDependencies'][appPackage['name']]
7
+ firebase_sdk_version = appPackage['sdkVersions']['ios']['firebase']
8
+ if coreVersionDetected != coreVersionRequired
9
+ Pod::UI.warn "NPM package '#{package['name']}' depends on '#{appPackage['name']}' v#{coreVersionRequired} but found v#{coreVersionDetected}, this might cause build issues or runtime crashes."
10
+ end
11
+ firebase_ios_target = appPackage['sdkVersions']['ios']['iosTarget']
12
+ firebase_macos_target = appPackage['sdkVersions']['ios']['macosTarget']
13
+
14
+ Pod::Spec.new do |s|
15
+ s.name = "RNFBDynamicLinks"
16
+ s.version = package["version"]
17
+ s.description = package["description"]
18
+ s.summary = <<-DESC
19
+ A well tested feature rich Firebase implementation for React Native, supporting iOS & Android.
20
+ DESC
21
+ s.homepage = "http://invertase.io/oss/react-native-firebase"
22
+ s.license = package['license']
23
+ s.authors = "Invertase Limited"
24
+ s.source = { :git => "https://github.com/invertase/react-native-firebase.git", :tag => "v#{s.version}" }
25
+ s.social_media_url = 'http://twitter.com/invertaseio'
26
+ s.ios.deployment_target = firebase_ios_target
27
+ s.macos.deployment_target = firebase_macos_target
28
+ s.source_files = 'ios/**/*.{h,m}'
29
+
30
+ # React Native dependencies
31
+ s.dependency 'React-Core'
32
+ s.dependency 'RNFBApp'
33
+
34
+ if defined?($FirebaseSDKVersion)
35
+ Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
36
+ firebase_sdk_version = $FirebaseSDKVersion
37
+ end
38
+
39
+ # Firebase dependencies
40
+ s.dependency 'Firebase/DynamicLinks', firebase_sdk_version
41
+ s.dependency 'GoogleUtilities/AppDelegateSwizzler'
42
+
43
+ if defined?($RNFirebaseAsStaticFramework)
44
+ Pod::UI.puts "#{s.name}: Using overridden static_framework value of '#{$RNFirebaseAsStaticFramework}'"
45
+ s.static_framework = $RNFirebaseAsStaticFramework
46
+ else
47
+ s.static_framework = false
48
+ end
49
+ end
@@ -0,0 +1,10 @@
1
+ # editorconfig
2
+ root = true
3
+
4
+ [*]
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ charset = utf-8
9
+ trim_trailing_whitespace = true
10
+ insert_final_newline = true
@@ -0,0 +1,98 @@
1
+ import io.invertase.gradle.common.PackageJson
2
+
3
+ buildscript {
4
+ // The Android Gradle plugin is only required when opening the android folder stand-alone.
5
+ // This avoids unnecessary downloads and potential conflicts when the library is included as a
6
+ // module dependency in an application project.
7
+ if (project == rootProject) {
8
+ repositories {
9
+ google()
10
+ mavenCentral()
11
+ }
12
+
13
+ dependencies {
14
+ classpath("com.android.tools.build:gradle:8.4.0")
15
+ }
16
+ }
17
+ }
18
+
19
+ plugins {
20
+ id "io.invertase.gradle.build" version "1.5"
21
+ }
22
+
23
+ def appProject
24
+ if (findProject(':@react-native-firebase_app')) {
25
+ appProject = project(':@react-native-firebase_app')
26
+ } else if (findProject(':react-native-firebase_app')) {
27
+ appProject = project(':react-native-firebase_app')
28
+ } else {
29
+ throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
30
+ }
31
+ def packageJson = PackageJson.getForProject(project)
32
+ def appPackageJson = PackageJson.getForProject(appProject)
33
+ def firebaseBomVersion = appPackageJson['sdkVersions']['android']['firebase']
34
+ def jsonMinSdk = appPackageJson['sdkVersions']['android']['minSdk']
35
+ def jsonTargetSdk = appPackageJson['sdkVersions']['android']['targetSdk']
36
+ def jsonCompileSdk = appPackageJson['sdkVersions']['android']['compileSdk']
37
+ def coreVersionDetected = appPackageJson['version']
38
+ def coreVersionRequired = packageJson['peerDependencies'][appPackageJson['name']]
39
+ // Only log after build completed so log warning appears at the end
40
+ if (coreVersionDetected != coreVersionRequired) {
41
+ gradle.buildFinished {
42
+ project.logger.warn("ReactNativeFirebase WARNING: NPM package '${packageJson['name']}' depends on '${appPackageJson['name']}' v${coreVersionRequired} but found v${coreVersionDetected}, this might cause build issues or runtime crashes.")
43
+ }
44
+ }
45
+
46
+ project.ext {
47
+ set('react-native', [
48
+ versions: [
49
+ android : [
50
+ minSdk : jsonMinSdk,
51
+ targetSdk : jsonTargetSdk,
52
+ compileSdk: jsonCompileSdk,
53
+ ],
54
+
55
+ firebase: [
56
+ bom: firebaseBomVersion,
57
+ ],
58
+ ],
59
+ ])
60
+ }
61
+
62
+ android {
63
+ def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64
+ if (agpVersion >= 7) {
65
+ namespace = 'io.invertase.firebase.dynamiclinks'
66
+ }
67
+
68
+ defaultConfig {
69
+ multiDexEnabled = true
70
+ }
71
+ lintOptions {
72
+ disable 'GradleCompatible'
73
+ abortOnError = false
74
+ }
75
+
76
+ if (agpVersion < 8) {
77
+ compileOptions {
78
+ sourceCompatibility = JavaVersion.VERSION_11
79
+ targetCompatibility= JavaVersion.VERSION_11
80
+ }
81
+ }
82
+ }
83
+
84
+ repositories {
85
+ google()
86
+ mavenCentral()
87
+ }
88
+
89
+ dependencies {
90
+ api appProject
91
+ implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
92
+ implementation "com.google.firebase:firebase-dynamic-links"
93
+ }
94
+
95
+ ReactNative.shared.applyPackageVersion()
96
+ ReactNative.shared.applyDefaultExcludes()
97
+ ReactNative.module.applyAndroidVersions()
98
+ ReactNative.module.applyReactNativeDependency("api")
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <lint>
3
+ <!-- Disable the given check in this project -->
4
+ <issue id="GradleCompatible" severity="ignore" />
5
+ </lint>
@@ -0,0 +1 @@
1
+ rootProject.name = '@react-native-firebase_dynamic-links'
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="io.invertase.firebase.dynamiclinks">
4
+
5
+ <uses-permission android:name="android.permission.INTERNET" />
6
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
7
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
8
+ </manifest>