-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
16,763 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@capacitor-firebase/app": minor | ||
--- | ||
|
||
Initial release 🎉 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# node files | ||
dist | ||
node_modules | ||
|
||
# iOS files | ||
Pods | ||
Podfile.lock | ||
Build | ||
xcuserdata | ||
|
||
# macOS files | ||
.DS_Store | ||
|
||
|
||
|
||
# Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore | ||
|
||
# Built application files | ||
*.apk | ||
*.ap_ | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# Generated files | ||
bin | ||
gen | ||
out | ||
|
||
# Gradle files | ||
.gradle | ||
build | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation | ||
|
||
# Android Studio captures folder | ||
captures | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea | ||
|
||
# Keystore files | ||
# Uncomment the following line if you do not want to check your keystore files in. | ||
#*.jks | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
save-exact=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'json' | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) | ||
|
||
Pod::Spec.new do |s| | ||
s.name = 'CapacitorFirebaseApp' | ||
s.version = package['version'] | ||
s.summary = package['description'] | ||
s.license = package['license'] | ||
s.homepage = package['repository']['url'] | ||
s.author = package['author'] | ||
s.source = { :git => package['repository']['url'], :tag => s.version.to_s } | ||
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' | ||
s.ios.deployment_target = '12.0' | ||
s.dependency 'Capacitor' | ||
s.dependency 'FirebaseCore', '8.4.0' | ||
s.swift_version = '5.1' | ||
s.static_framework = true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# @capacitor-firebase/app | ||
|
||
⚡️ Capacitor plugin for Firebase App. | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install @capacitor-firebase/app | ||
npx cap sync | ||
``` | ||
|
||
Add Firebase to your project if you haven't already ([Android](https://firebase.google.com/docs/android/setup) / [iOS](https://firebase.google.com/docs/ios/setup)). | ||
|
||
## Configuration | ||
|
||
No configuration required for this plugin. | ||
|
||
## Demo | ||
|
||
A working example can be found here: [robingenz/capacitor-firebase-plugin-demo](https://github.com/robingenz/capacitor-firebase-plugin-demo) | ||
|
||
## Usage | ||
|
||
```typescript | ||
import { FirebaseApp } from '@capacitor-firebase/app'; | ||
|
||
const getName = async () => { | ||
const result = await FirebaseApp.getName(); | ||
}; | ||
|
||
const getOptions = async () => { | ||
const result = await FirebaseApp.getOptions(); | ||
}; | ||
``` | ||
|
||
## API | ||
|
||
<docgen-index> | ||
|
||
- [`getName()`](#getname) | ||
- [`getOptions()`](#getoptions) | ||
- [Interfaces](#interfaces) | ||
|
||
</docgen-index> | ||
|
||
<docgen-api> | ||
<!--Update the source file JSDoc comments and rerun docgen to update the docs below--> | ||
|
||
### getName() | ||
|
||
```typescript | ||
getName() => Promise<GetNameResult> | ||
``` | ||
|
||
Get the name for this app. | ||
|
||
**Returns:** <code>Promise<<a href="#getnameresult">GetNameResult</a>></code> | ||
|
||
--- | ||
|
||
### getOptions() | ||
|
||
```typescript | ||
getOptions() => Promise<GetOptionsResult> | ||
``` | ||
|
||
Get the configuration options for this app. | ||
|
||
**Returns:** <code>Promise<<a href="#getoptionsresult">GetOptionsResult</a>></code> | ||
|
||
--- | ||
|
||
### Interfaces | ||
|
||
#### GetNameResult | ||
|
||
| Prop | Type | Description | | ||
| ---------- | ------------------- | ---------------------------- | | ||
| **`name`** | <code>string</code> | The unique name of this app. | | ||
|
||
#### GetOptionsResult | ||
|
||
| Prop | Type | Description | | ||
| ------------------- | ------------------- | -------------------------------------------------------------- | | ||
| **`apiKey`** | <code>string</code> | API key used for authenticating requests from your app. | | ||
| **`applicationId`** | <code>string</code> | Google App ID used to uniquely identify an instance of an app. | | ||
| **`databaseUrl`** | <code>string</code> | The database root URL. | | ||
| **`gcmSenderId`** | <code>string</code> | The Project Number. | | ||
| **`projectId`** | <code>string</code> | The Google Cloud project ID. | | ||
| **`storageBucket`** | <code>string</code> | The Google Cloud Storage bucket name. | | ||
|
||
</docgen-api> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
ext { | ||
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1' | ||
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0' | ||
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2' | ||
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0' | ||
firebaseCommonVersion = project.hasProperty('firebaseCommonVersion') ? rootProject.ext.firebaseCommonVersion : '20.0.0' | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:4.2.0' | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30 | ||
defaultConfig { | ||
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21 | ||
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
lintOptions { | ||
abortOnError false | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
jcenter() | ||
} | ||
|
||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation project(':capacitor-android') | ||
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" | ||
implementation "com.google.firebase:firebase-common:$firebaseCommonVersion" | ||
testImplementation "junit:junit:$junitVersion" | ||
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" | ||
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Project-wide Gradle settings. | ||
|
||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
|
||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
|
||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx1536m | ||
|
||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true | ||
|
||
# AndroidX package structure to make it clearer which packages are bundled with the | ||
# Android operating system, and which are packaged with your app's APK | ||
# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
android.useAndroidX=true | ||
# Automatically convert third-party libraries to use AndroidX | ||
android.enableJetifier=true |
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
packages/app/android/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.