├── src
├── android
│ ├── scripts
│ │ └── release.sh
│ ├── @teamhive
│ │ └── capacitor-email
│ │ │ ├── .npmignore
│ │ │ ├── .gradle
│ │ │ └── 4.3
│ │ │ │ ├── fileChanges
│ │ │ │ └── last-build.bin
│ │ │ │ └── fileHashes
│ │ │ │ ├── fileHashes.bin
│ │ │ │ └── fileHashes.lock
│ │ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── styles.xml
│ │ │ │ │ │ ├── colors.xml
│ │ │ │ │ │ └── strings.xml
│ │ │ │ │ └── layout
│ │ │ │ │ │ └── bridge_layout_main.xml
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── java
│ │ │ │ │ └── com
│ │ │ │ │ └── meetmaestro
│ │ │ │ │ └── hive
│ │ │ │ │ └── capacitor
│ │ │ │ │ └── email
│ │ │ │ │ └── EmailPlugin.java
│ │ │ ├── test
│ │ │ │ └── java
│ │ │ │ │ └── com
│ │ │ │ │ └── getcapacitor
│ │ │ │ │ └── ExampleUnitTest.java
│ │ │ └── androidTest
│ │ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── getcapacitor
│ │ │ │ └── android
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── proguard-rules.pro
│ │ │ └── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── settings.gradle
│ ├── .npmignore
│ ├── gradle.properties
│ ├── gradlew.bat
│ └── gradlew
├── src
│ ├── index.ts
│ ├── plugin.ts
│ ├── definitions.ts
│ └── web.ts
├── ios
│ └── Plugin
│ │ ├── Plugin.xcworkspace
│ │ ├── xcuserdata
│ │ │ └── max.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── contents.xcworkspacedata
│ │ ├── Plugin.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ ├── xcuserdata
│ │ │ └── max.xcuserdatad
│ │ │ │ └── xcschemes
│ │ │ │ └── xcschememanagement.plist
│ │ └── project.pbxproj
│ │ ├── Plugin
│ │ ├── Plugin.h
│ │ ├── Plugin.m
│ │ ├── Info.plist
│ │ └── Plugin.swift
│ │ ├── Podfile
│ │ └── PluginTests
│ │ ├── Info.plist
│ │ └── PluginTests.swift
├── rollup.config.js
├── tsconfig.json
├── TeamhiveCapacitorEmail.podspec
└── package.json
├── demo
├── src
│ ├── app
│ │ ├── home
│ │ │ ├── home.page.scss
│ │ │ ├── home.page.html
│ │ │ ├── home.module.ts
│ │ │ ├── home.page.spec.ts
│ │ │ └── home.page.ts
│ │ ├── app.component.html
│ │ ├── app-routing.module.ts
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ │ └── app.component.spec.ts
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── assets
│ │ └── icon
│ │ │ └── favicon.png
│ ├── tsconfig.app.json
│ ├── tsconfig.spec.json
│ ├── main.ts
│ ├── global.scss
│ ├── test.ts
│ ├── index.html
│ ├── karma.conf.js
│ ├── theme
│ │ └── variables.scss
│ └── polyfills.ts
├── android
│ ├── app
│ │ ├── .npmignore
│ │ ├── .settings
│ │ │ └── org.eclipse.buildship.core.prefs
│ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ └── icon.png
│ │ │ │ │ ├── mipmap-ldpi
│ │ │ │ │ │ └── icon.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ └── icon.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ └── icon.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ └── icon.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ └── icon.png
│ │ │ │ │ ├── drawable-land-hdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-land-ldpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-land-mdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-land-xhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-port-hdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-port-ldpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-port-mdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-port-xhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-land-xxhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-land-xxxhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-port-xxhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── drawable-port-xxxhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ ├── xml
│ │ │ │ │ │ ├── config.xml
│ │ │ │ │ │ └── file_paths.xml
│ │ │ │ │ ├── drawable
│ │ │ │ │ │ ├── launch_splash.xml
│ │ │ │ │ │ └── ic_launcher_background.xml
│ │ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── layout
│ │ │ │ │ │ └── activity_main.xml
│ │ │ │ │ └── drawable-v24
│ │ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── java
│ │ │ │ │ └── com
│ │ │ │ │ │ └── meetmaestro
│ │ │ │ │ │ └── hive
│ │ │ │ │ │ └── capacitor
│ │ │ │ │ │ └── emaildemo
│ │ │ │ │ │ └── MainActivity.java
│ │ │ │ └── AndroidManifest.xml
│ │ │ ├── test
│ │ │ │ └── java
│ │ │ │ │ └── com
│ │ │ │ │ └── getcapacitor
│ │ │ │ │ └── myapp
│ │ │ │ │ └── ExampleUnitTest.java
│ │ │ └── androidTest
│ │ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── getcapacitor
│ │ │ │ └── myapp
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ ├── capacitor.build.gradle
│ │ ├── .classpath
│ │ ├── .project
│ │ ├── proguard-rules.pro
│ │ └── build.gradle
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── capacitor.settings.gradle
│ ├── settings.gradle
│ ├── .project
│ ├── build.gradle
│ ├── gradle.properties
│ ├── .gitignore
│ ├── gradlew.bat
│ └── gradlew
├── ionic.config.json
├── .gradle
│ └── buildOutputCleanup
│ │ ├── cache.properties
│ │ └── buildOutputCleanup.lock
├── ios
│ ├── App
│ │ ├── App
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ ├── AppIcon-512@2x.png
│ │ │ │ │ ├── AppIcon-20x20@1x.png
│ │ │ │ │ ├── AppIcon-20x20@2x.png
│ │ │ │ │ ├── AppIcon-20x20@3x.png
│ │ │ │ │ ├── AppIcon-29x29@1x.png
│ │ │ │ │ ├── AppIcon-29x29@2x.png
│ │ │ │ │ ├── AppIcon-29x29@3x.png
│ │ │ │ │ ├── AppIcon-40x40@1x.png
│ │ │ │ │ ├── AppIcon-40x40@2x.png
│ │ │ │ │ ├── AppIcon-40x40@3x.png
│ │ │ │ │ ├── AppIcon-60x60@2x.png
│ │ │ │ │ ├── AppIcon-60x60@3x.png
│ │ │ │ │ ├── AppIcon-76x76@1x.png
│ │ │ │ │ ├── AppIcon-76x76@2x.png
│ │ │ │ │ ├── AppIcon-20x20@2x-1.png
│ │ │ │ │ ├── AppIcon-29x29@2x-1.png
│ │ │ │ │ ├── AppIcon-40x40@2x-1.png
│ │ │ │ │ ├── AppIcon-83.5x83.5@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Splash.imageset
│ │ │ │ │ ├── splash-2732x2732.png
│ │ │ │ │ ├── splash-2732x2732-1.png
│ │ │ │ │ ├── splash-2732x2732-2.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── capacitor.config.json
│ │ │ ├── config.xml
│ │ │ ├── Base.lproj
│ │ │ │ ├── Main.storyboard
│ │ │ │ └── LaunchScreen.storyboard
│ │ │ ├── Info.plist
│ │ │ └── AppDelegate.swift
│ │ ├── App.xcodeproj
│ │ │ ├── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ │ └── project.pbxproj
│ │ ├── App.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── Podfile
│ │ └── Podfile.lock
│ └── .gitignore
├── capacitor.config.json
├── e2e
│ ├── tsconfig.e2e.json
│ ├── src
│ │ ├── app.po.ts
│ │ └── app.e2e-spec.ts
│ └── protractor.conf.js
├── tsconfig.json
├── .gitignore
├── package.json
├── tslint.json
└── angular.json
├── .gitignore
├── LICENSE
└── README.md
/src/android/scripts/release.sh:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/demo/src/app/home/home.page.scss:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/demo/android/app/.npmignore:
--------------------------------------------------------------------------------
1 | /build/*
2 | !/build/.npmkeep
3 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/.npmignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/.gradle/4.3/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/demo/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo",
3 | "integrations": {},
4 | "type": "angular"
5 | }
--------------------------------------------------------------------------------
/demo/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Wed Sep 19 15:45:21 AST 2018
2 | gradle.version=4.4
3 |
--------------------------------------------------------------------------------
/demo/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/demo/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './definitions';
2 | export * from './plugin';
3 | export * from './web';
4 |
--------------------------------------------------------------------------------
/demo/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/demo/android/app/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=..
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo/src/assets/icon/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/src/assets/icon/favicon.png
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/src/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/demo/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/mipmap-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/mipmap-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Just a simple string
3 |
4 |
--------------------------------------------------------------------------------
/src/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':capacitor-android'
2 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
3 |
--------------------------------------------------------------------------------
/demo/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-land-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-land-hdpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-land-ldpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-land-ldpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-land-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-land-mdpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-land-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-land-xhdpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-port-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-port-hdpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-port-ldpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-port-ldpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-port-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-port-mdpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-port-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-port-xhdpi/splash.png
--------------------------------------------------------------------------------
/demo/capacitor.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "appId": "com.meetmaestro.hive.capacitor.emaildemo",
3 | "appName": "EmailDemo",
4 | "bundledWebRuntime": false,
5 | "webDir": "www"
6 | }
7 |
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-land-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-land-xxhdpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-land-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-land-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-port-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-port-xxhdpi/splash.png
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-port-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/android/app/src/main/res/drawable-port-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/src/android/.npmignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/demo/ios/App/App/capacitor.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "appId": "com.meetmaestro.hive.capacitor.emaildemo",
3 | "appName": "EmailDemo",
4 | "bundledWebRuntime": false,
5 | "webDir": "www"
6 | }
7 |
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png
--------------------------------------------------------------------------------
/demo/ios/App/App/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/.gradle/4.3/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/src/android/@teamhive/capacitor-email/.gradle/4.3/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/xml/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/.gradle/4.3/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/src/android/@teamhive/capacitor-email/.gradle/4.3/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/demo/ios/.gitignore:
--------------------------------------------------------------------------------
1 | # NPM renames .gitignore to .npmignore
2 | # In order to prevent that, we remove the initial "."
3 | # And the CLI then renames it
4 |
5 | App/build
6 | App/Pods
7 | App/public
8 | xcuserdata
9 |
10 |
--------------------------------------------------------------------------------
/demo/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "baseUrl": "./",
6 | "module": "commonjs",
7 | "target": "es5"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/demo/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Plugin.xcworkspace/xcuserdata/max.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamMaestro/capacitor-email/HEAD/src/ios/Plugin/Plugin.xcworkspace/xcuserdata/max.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable/launch_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | src/ios/Plugin/Pods/
5 | demo/android/app/src/main/assets
6 | .idea
7 | .vscode
8 | demo/android/app/build
9 | src/android/@teamhive/capacitor-email/build
10 | demo/.gradle/4.4/
11 | package-lock.json
--------------------------------------------------------------------------------
/demo/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "baseUrl": "./",
6 | "module": "es2015"
7 | },
8 | "exclude": [
9 | "test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/demo/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.deepCss('app-root ion-content')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/demo/android/capacitor.settings.gradle:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2 |
3 | include ':teamhive-capacitor-email'
4 | project(':teamhive-capacitor-email').projectDir = new File('../node_modules/@teamhive/capacitor-email/android/@teamhive/capacitor-email')
5 |
--------------------------------------------------------------------------------
/demo/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Jan 30 13:14:22 CST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
7 |
--------------------------------------------------------------------------------
/src/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Dec 01 12:41:00 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
7 |
--------------------------------------------------------------------------------
/demo/android/app/capacitor.build.gradle:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2 |
3 | dependencies {
4 | implementation project(':teamhive-capacitor-email')
5 |
6 | }
7 |
8 |
9 | if (hasProperty('postBuildExtras')) {
10 | postBuildExtras()
11 | }
12 |
--------------------------------------------------------------------------------
/demo/ios/App/App.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Plugin.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/demo/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/rollup.config.js:
--------------------------------------------------------------------------------
1 | import nodeResolve from 'rollup-plugin-node-resolve';
2 |
3 | export default {
4 | input: 'dist/esm/index.js',
5 | output: {
6 | file: 'dist/plugin.js',
7 | format: 'iife',
8 | name: 'capacitorPlugin',
9 | sourcemap: true
10 | },
11 | plugins: [
12 | nodeResolve()
13 | ]
14 | };
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 |
3 | describe('new App', () => {
4 | let page: AppPage;
5 |
6 | beforeEach(() => {
7 | page = new AppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toContain('The world is your oyster.');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/demo/android/app/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/demo/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | include ':capacitor-android'
3 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor/')
4 | include ':capacitor-android-plugins'
5 | project(':capacitor-android-plugins').projectDir = new File('../node_modules/@capacitor/cli/assets/capacitor-android-plugins/')
6 |
7 | apply from: 'capacitor.settings.gradle'
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "sourceMap": true,
6 | "declaration": false,
7 | "moduleResolution": "node",
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "target": "es5",
11 | "lib": [
12 | "es2017",
13 | "dom"
14 | ]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Plugin/Plugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | //! Project version number for Plugin.
4 | FOUNDATION_EXPORT double PluginVersionNumber;
5 |
6 | //! Project version string for Plugin.
7 | FOUNDATION_EXPORT const unsigned char PluginVersionString[];
8 |
9 | // In this header, you should import all the public headers of your framework using statements like #import
10 |
11 |
--------------------------------------------------------------------------------
/demo/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "baseUrl": "./",
6 | "module": "commonjs",
7 | "types": [
8 | "jasmine",
9 | "node"
10 | ]
11 | },
12 | "files": [
13 | "test.ts"
14 | ],
15 | "include": [
16 | "polyfills.ts",
17 | "**/*.spec.ts",
18 | "**/*.d.ts"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | platform :ios, '10.0'
3 |
4 | target 'Plugin' do
5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
6 | use_frameworks!
7 |
8 | # Pods for IonicRunner
9 | pod 'Capacitor'
10 | end
11 |
12 | target 'PluginTests' do
13 | use_frameworks!
14 |
15 | pod 'Capacitor'
16 | end
--------------------------------------------------------------------------------
/demo/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/demo/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { Routes, RouterModule } from '@angular/router';
3 |
4 | const routes: Routes = [
5 | { path: '', redirectTo: 'home', pathMatch: 'full' },
6 | { path: 'home', loadChildren: './home/home.module#HomePageModule' },
7 | ];
8 |
9 | @NgModule({
10 | imports: [RouterModule.forRoot(routes)],
11 | exports: [RouterModule]
12 | })
13 | export class AppRoutingModule { }
14 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Plugin.xcodeproj/xcuserdata/max.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Plugin.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | EmailDemo
4 | EmailDemo
5 | com.meetmaestro.hive.capacitor.emaildemo
6 | com.meetmaestro.hive.capacitor.emaildemo.fileprovider
7 | com.meetmaestro.hive.capacitor.emaildemo
8 |
9 |
--------------------------------------------------------------------------------
/demo/ios/App/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '10.0'
2 | use_frameworks!
3 |
4 | target 'App' do
5 | # Add your Pods here
6 |
7 | # Automatic Capacitor Pod dependencies, do not delete
8 | pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
9 | pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
10 | pod 'TeamhiveCapacitorEmail', :path => '/Users/triniwiz/Documents/projects/plugins/capacitor/capacitor-email/demo/node_modules/@teamhive/capacitor-email'
11 | # Do not delete
12 | end
13 |
--------------------------------------------------------------------------------
/demo/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/demo/src/global.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/theming/
2 | @import "~@ionic/angular/css/core.css";
3 | @import "~@ionic/angular/css/normalize.css";
4 | @import "~@ionic/angular/css/structure.css";
5 | @import "~@ionic/angular/css/typography.css";
6 |
7 | @import "~@ionic/angular/css/padding.css";
8 | @import "~@ionic/angular/css/float-elements.css";
9 | @import "~@ionic/angular/css/text-alignment.css";
10 | @import "~@ionic/angular/css/text-transformation.css";
11 | @import "~@ionic/angular/css/flex-utils.css";
12 |
13 |
--------------------------------------------------------------------------------
/demo/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor.myapp;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/demo/src/app/home/home.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Ionic Blank
5 |
6 |
7 |
8 |
9 |
10 | Open Email
11 | Open Gmail
12 | Open Outlook
13 | Open Yahoo
14 | Open Draft
15 |
16 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "declaration": true,
5 | "experimentalDecorators": true,
6 | "lib": [
7 | "dom",
8 | "es2015"
9 | ],
10 | "module": "es2015",
11 | "moduleResolution": "node",
12 | "noImplicitAny": true,
13 | "noUnusedLocals": true,
14 | "noUnusedParameters": false,
15 | "outDir": "dist/esm",
16 | "sourceMap": true,
17 | "target": "es2015"
18 | },
19 | "files": [
20 | "src/index.ts"
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/src/test/java/com/getcapacitor/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/src/TeamhiveCapacitorEmail.podspec:
--------------------------------------------------------------------------------
1 |
2 | Pod::Spec.new do |s|
3 | s.name = 'TeamhiveCapacitorEmail'
4 | s.version = '1.0.0'
5 | s.summary = 'Email composer'
6 | s.license = 'GPL'
7 | s.homepage = 'https://github.com/TeamHive/capacitor-email'
8 | s.author = 'TeamHive'
9 | s.source = { :git => 'https://github.com/TeamHive/capacitor-email', :tag => s.version.to_s }
10 | s.source_files = 'ios/Plugin/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
11 | s.ios.deployment_target = '11.0'
12 | s.dependency 'Capacitor'
13 | end
14 |
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "splash-2732x2732-2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "splash-2732x2732-1.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "splash-2732x2732.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/demo/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | *.log
7 | *.tmp
8 | *.tmp.*
9 | log.txt
10 | *.sublime-project
11 | *.sublime-workspace
12 | .vscode/
13 | npm-debug.log*
14 |
15 | .idea/
16 | .ionic/
17 | .sourcemaps/
18 | .sass-cache/
19 | .tmp/
20 | .versions/
21 | coverage/
22 | www/
23 | node_modules/
24 | tmp/
25 | temp/
26 | platforms/
27 | plugins/
28 | plugins/android.json
29 | plugins/ios.json
30 | $RECYCLE.BIN/
31 |
32 | .DS_Store
33 | Thumbs.db
34 | UserInterfaceState.xcuserstate
35 |
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/demo/src/app/home/home.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { IonicModule } from '@ionic/angular';
4 | import { FormsModule } from '@angular/forms';
5 | import { RouterModule } from '@angular/router';
6 |
7 | import { HomePage } from './home.page';
8 |
9 | @NgModule({
10 | imports: [
11 | CommonModule,
12 | FormsModule,
13 | IonicModule,
14 | RouterModule.forChild([
15 | {
16 | path: '',
17 | component: HomePage
18 | }
19 | ])
20 | ],
21 | declarations: [HomePage]
22 | })
23 | export class HomePageModule {}
24 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Plugin/Plugin.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | CAP_PLUGIN(EmailPlugin, "EmailPlugin",
5 | CAP_PLUGIN_METHOD(isAvailable, CAPPluginReturnPromise);
6 | CAP_PLUGIN_METHOD(open, CAPPluginReturnPromise);
7 | CAP_PLUGIN_METHOD(openDraft, CAPPluginReturnPromise);
8 | CAP_PLUGIN_METHOD(requestPermission, CAPPluginReturnPromise);
9 | CAP_PLUGIN_METHOD(hasPermission, CAPPluginReturnPromise);
10 | CAP_PLUGIN_METHOD(getDefaults, CAPPluginReturnPromise);
11 | CAP_PLUGIN_METHOD(getAliases, CAPPluginReturnPromise);
12 | )
13 |
--------------------------------------------------------------------------------
/demo/android/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/src/main/res/layout/bridge_layout_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/demo/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.1.4'
11 | classpath 'com.google.gms:google-services:4.0.1'
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/demo/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/demo/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | import { Platform } from '@ionic/angular';
4 | import { SplashScreen } from '@ionic-native/splash-screen/ngx';
5 | import { StatusBar } from '@ionic-native/status-bar/ngx';
6 |
7 | @Component({
8 | selector: 'app-root',
9 | templateUrl: 'app.component.html'
10 | })
11 | export class AppComponent {
12 | constructor(
13 | private platform: Platform,
14 | private splashScreen: SplashScreen,
15 | private statusBar: StatusBar
16 | ) {
17 | this.initializeApp();
18 | }
19 |
20 | initializeApp() {
21 | this.platform.ready().then(() => {
22 | this.statusBar.styleDefault();
23 | this.splashScreen.hide();
24 | });
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/demo/android/app/src/main/java/com/meetmaestro/hive/capacitor/emaildemo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.meetmaestro.hive.capacitor.emaildemo;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.getcapacitor.BridgeActivity;
6 | import com.getcapacitor.Plugin;
7 | import com.meetmaestro.hive.capacitor.email.EmailPlugin;
8 |
9 | import java.util.ArrayList;
10 |
11 | public class MainActivity extends BridgeActivity {
12 | @Override
13 | public void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 |
16 | // Initializes the Bridge
17 | this.init(savedInstanceState, new ArrayList>() {{
18 | // Additional plugins you've installed go here
19 | add(EmailPlugin.class);
20 | }});
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/demo/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ionic App
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/demo/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/src/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/demo/src/app/home/home.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3 |
4 | import { HomePage } from './home.page';
5 |
6 | describe('HomePage', () => {
7 | let component: HomePage;
8 | let fixture: ComponentFixture;
9 |
10 | beforeEach(async(() => {
11 | TestBed.configureTestingModule({
12 | declarations: [ HomePage ],
13 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
14 | })
15 | .compileComponents();
16 | }));
17 |
18 | beforeEach(() => {
19 | fixture = TestBed.createComponent(HomePage);
20 | component = fixture.componentInstance;
21 | fixture.detectChanges();
22 | });
23 |
24 | it('should create', () => {
25 | expect(component).toBeTruthy();
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/src/ios/Plugin/PluginTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/demo/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * In development mode, to ignore zone related error stack frames such as
11 | * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
12 | * import the following file, but please comment it out in production mode
13 | * because it will have performance impact when throw error
14 | */
15 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
16 |
--------------------------------------------------------------------------------
/demo/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/demo/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: 'e2e/tsconfig.e2e.json'
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/demo/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { RouterModule, RouteReuseStrategy, Routes } from '@angular/router';
4 |
5 | import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
6 | import { SplashScreen } from '@ionic-native/splash-screen/ngx';
7 | import { StatusBar } from '@ionic-native/status-bar/ngx';
8 |
9 | import { AppComponent } from './app.component';
10 | import { AppRoutingModule } from './app-routing.module';
11 |
12 | @NgModule({
13 | declarations: [AppComponent],
14 | entryComponents: [],
15 | imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
16 | providers: [
17 | StatusBar,
18 | SplashScreen,
19 | { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
20 | ],
21 | bootstrap: [AppComponent]
22 | })
23 | export class AppModule {}
24 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Plugin/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/demo/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor.myapp;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.getcapacitor.app", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/src/plugin.ts:
--------------------------------------------------------------------------------
1 | import { IEmail, EmailOptions, AvailableOptions, AvailableResults } from './definitions';
2 | import { Plugins } from '@capacitor/core';
3 |
4 | const { EmailPlugin } = Plugins;
5 |
6 | export class Email implements IEmail {
7 |
8 | isAvailable(options?: AvailableOptions): Promise {
9 | return EmailPlugin.isAvailable(options);
10 | }
11 | open(options?: EmailOptions):Promise {
12 | return EmailPlugin.open(options);
13 | }
14 | openDraft(): Promise {
15 | return EmailPlugin.openDraft();
16 | }
17 | requestPermission(): Promise {
18 | return EmailPlugin.requestPermission();
19 | }
20 | hasPermission(): Promise {
21 | return EmailPlugin.hasPermission();
22 | }
23 | getDefaults(): Promise {
24 | return EmailPlugin.getDefaults();
25 | }
26 | getAliases(): Promise {
27 | return EmailPlugin.getAliases();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
17 |
18 |
19 |
22 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor.android;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.getcapacitor.android", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/demo/src/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular-devkit/build-angular/plugins/karma')
14 | ],
15 | client: {
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | coverageIstanbulReporter: {
19 | dir: require('path').join(__dirname, 'coverage'),
20 | reports: ['html', 'lcovonly'],
21 | fixWebpackSourcePaths: true
22 | },
23 | reporters: ['progress', 'kjhtml'],
24 | port: 9876,
25 | colors: true,
26 | logLevel: config.LOG_INFO,
27 | autoWatch: true,
28 | browsers: ['Chrome'],
29 | singleRun: false
30 | });
31 | };
32 |
--------------------------------------------------------------------------------
/demo/ios/App/App/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 TeamHive
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/src/src/definitions.ts:
--------------------------------------------------------------------------------
1 | declare global {
2 | interface PluginRegistry {
3 | EmailPlugin?: IEmail;
4 | }
5 | }
6 |
7 | export interface IEmail {
8 | isAvailable(options?: AvailableOptions): Promise;
9 | open(options?: EmailOptions): Promise;
10 | openDraft(): Promise;
11 | requestPermission(): Promise;
12 | hasPermission(): Promise;
13 | getDefaults(): Promise;
14 | getAliases(): Promise;
15 | }
16 |
17 | export interface AvailableOptions {
18 | alias?: string;
19 | }
20 |
21 | export interface AvailableResults {
22 | hasApp?: boolean;
23 | hasAccount: boolean;
24 | }
25 |
26 | export interface EmailOptions {
27 | to?: Array; // email addresses for TO field
28 | cc?: Array; // email addresses for CC field
29 | bcc?: Array; // email addresses for BCC field
30 | attachments?: Array; // file paths or base64 data streams
31 | subject?: String; // subject of the email
32 | body?: String; // email body (for HTML, set isHtml to true)
33 | isHtml?: Boolean; // indicates if the body is HTML or plain text
34 | type?: String; // content type of the email (Android only)
35 | app?: string;
36 | }
37 |
--------------------------------------------------------------------------------
/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@teamhive/capacitor-email",
3 | "version": "2.1.2",
4 | "description": "Email composer",
5 | "main": "dist/esm/index.js",
6 | "types": "dist/esm/index.d.ts",
7 | "scripts": {
8 | "build": "npm run clean && tsc",
9 | "clean": "rm -rf ./dist",
10 | "watch": "tsc --watch",
11 | "prepublishOnly": "npm run build"
12 | },
13 | "author": "TeamHive",
14 | "license": "GPL",
15 | "dependencies": {
16 | "@capacitor/core": "latest"
17 | },
18 | "devDependencies": {
19 | "typescript": "^2.6.2",
20 | "@capacitor/ios": "latest",
21 | "@capacitor/android": "latest"
22 | },
23 | "files": [
24 | "dist/",
25 | "ios/",
26 | "android/",
27 | "TeamhiveCapacitorEmail.podspec"
28 | ],
29 | "keywords": [
30 | "capacitor",
31 | "plugin",
32 | "native"
33 | ],
34 | "capacitor": {
35 | "ios": {
36 | "src": "ios"
37 | },
38 | "android": {
39 | "src": "android"
40 | }
41 | },
42 | "repository": {
43 | "type": "git",
44 | "url": "https://github.com/TeamHive/capacitor-email"
45 | },
46 | "bugs": {
47 | "url": "https://github.com/TeamHive/capacitor-email/issues"
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/ios/Plugin/PluginTests/PluginTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import Capacitor
3 | @testable import Plugin
4 |
5 | class PluginTests: XCTestCase {
6 |
7 | override func setUp() {
8 | super.setUp()
9 | // Put setup code here. This method is called before the invocation of each test method in the class.
10 | }
11 |
12 | override func tearDown() {
13 | // Put teardown code here. This method is called after the invocation of each test method in the class.
14 | super.tearDown()
15 | }
16 |
17 | func testEcho() {
18 | // This is an example of a functional test case for a plugin.
19 | // Use XCTAssert and related functions to verify your tests produce the correct results.
20 |
21 | let value = "Hello, World!"
22 | let plugin = MyPlugin()
23 |
24 | let call = CAPPluginCall(callbackId: "test", options: [
25 | "value": value
26 | ], success: { (result, call) in
27 | let resultValue = result!.data["value"] as? String
28 | XCTAssertEqual(value, resultValue)
29 | }, error: { (err) in
30 | XCTFail("Error shouldn't have been called")
31 | })
32 |
33 | plugin.echo(call!)
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/demo/ios/App/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Capacitor (1.0.0-beta.7):
3 | - CapacitorCordova (= 1.0.0-beta.7)
4 | - GCDWebServer (~> 3.0)
5 | - CapacitorCordova (1.0.0-beta.7)
6 | - GCDWebServer (3.4.2):
7 | - GCDWebServer/Core (= 3.4.2)
8 | - GCDWebServer/Core (3.4.2)
9 | - TeamhiveCapacitorEmail (0.0.1):
10 | - Capacitor
11 |
12 | DEPENDENCIES:
13 | - "Capacitor (from `../../node_modules/@capacitor/ios`)"
14 | - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)"
15 | - "TeamhiveCapacitorEmail (from `/Users/triniwiz/Documents/projects/plugins/capacitor/capacitor-email/demo/node_modules/@teamhive/capacitor-email`)"
16 |
17 | SPEC REPOS:
18 | https://github.com/cocoapods/specs.git:
19 | - GCDWebServer
20 |
21 | EXTERNAL SOURCES:
22 | Capacitor:
23 | :path: "../../node_modules/@capacitor/ios"
24 | CapacitorCordova:
25 | :path: "../../node_modules/@capacitor/ios"
26 | TeamhiveCapacitorEmail:
27 | :path: "/Users/triniwiz/Documents/projects/plugins/capacitor/capacitor-email/demo/node_modules/@teamhive/capacitor-email"
28 |
29 | SPEC CHECKSUMS:
30 | Capacitor: 9ac2a5280a36cac49f834d692a6cd92ebb40bf20
31 | CapacitorCordova: 7e499cf9d764cdc8958858065d3feacd53793ae5
32 | GCDWebServer: 8d67ee9f634b4bb91eb4b8aee440318a5fc6debd
33 | TeamhiveCapacitorEmail: 6e9c9bb2922e0e314da44eb0f47a46a14b7f5970
34 |
35 | PODFILE CHECKSUM: eb963fef9ff1db5092e45b8c777eaa6122b2dd48
36 |
37 | COCOAPODS: 1.5.3
38 |
--------------------------------------------------------------------------------
/demo/android/.gitignore:
--------------------------------------------------------------------------------
1 | # NPM renames .gitignore to .npmignore
2 | # In order to prevent that, we remove the initial "."
3 | # And the CLI then renames it
4 |
5 | # Using Android gitignore template: https://github.com/github/gitignore/blob/master/Android.gitignore
6 |
7 | # Built application files
8 | *.apk
9 | *.ap_
10 |
11 | # Files for the ART/Dalvik VM
12 | *.dex
13 |
14 | # Java class files
15 | *.class
16 |
17 | # Generated files
18 | bin/
19 | gen/
20 | out/
21 |
22 | # Gradle files
23 | .gradle/
24 | build/
25 |
26 | # Local configuration file (sdk path, etc)
27 | local.properties
28 |
29 | # Proguard folder generated by Eclipse
30 | proguard/
31 |
32 | # Log Files
33 | *.log
34 |
35 | # Android Studio Navigation editor temp files
36 | .navigation/
37 |
38 | # Android Studio captures folder
39 | captures/
40 |
41 | # IntelliJ
42 | *.iml
43 | .idea/workspace.xml
44 | .idea/tasks.xml
45 | .idea/gradle.xml
46 | .idea/dictionaries
47 | .idea/libraries
48 |
49 | # Keystore files
50 | # Uncomment the following line if you do not want to check your keystore files in.
51 | #*.jks
52 |
53 | # External native build folder generated in Android Studio 2.2 and later
54 | .externalNativeBuild
55 |
56 | # Google Services (e.g. APIs or Firebase)
57 | google-services.json
58 |
59 | # Freeline
60 | freeline.py
61 | freeline/
62 | freeline_project_description.json
63 |
64 | # fastlane
65 | fastlane/report.xml
66 | fastlane/Preview.html
67 | fastlane/screenshots
68 | fastlane/test_output
69 | fastlane/readme.md
70 |
71 | # Copied web assets
72 | app/src/main/assets/public
73 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | jcenter()
4 | google()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:3.1.1'
8 | }
9 | }
10 |
11 | apply plugin: 'com.android.library'
12 |
13 | android {
14 | compileSdkVersion 28
15 | defaultConfig {
16 | minSdkVersion 21
17 | targetSdkVersion 27
18 | versionCode 1
19 | versionName "1.0"
20 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
21 | }
22 | buildTypes {
23 | release {
24 | minifyEnabled false
25 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
26 | }
27 | }
28 | lintOptions {
29 | abortOnError false
30 | }
31 | compileOptions {
32 | sourceCompatibility JavaVersion.VERSION_1_8
33 | targetCompatibility JavaVersion.VERSION_1_8
34 | }
35 | }
36 |
37 | repositories {
38 | google()
39 | jcenter()
40 | mavenCentral()
41 | }
42 |
43 |
44 | dependencies {
45 | implementation fileTree(dir: 'libs', include: ['*.jar'])
46 | implementation project(':capacitor-android')
47 | implementation 'com.android.support:appcompat-v7:28.0.0'
48 | implementation 'com.android.support:support-compat:28.0.0'
49 | implementation 'com.google.android.gms:play-services-base:9.4.0'
50 | testImplementation 'junit:junit:4.12'
51 | androidTestImplementation 'com.android.support.test:runner:1.0.1'
52 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/demo/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { TestBed, async } from '@angular/core/testing';
3 |
4 | import { Platform } from '@ionic/angular';
5 | import { SplashScreen } from '@ionic-native/splash-screen/ngx';
6 | import { StatusBar } from '@ionic-native/status-bar/ngx';
7 |
8 | import { AppComponent } from './app.component';
9 |
10 | describe('AppComponent', () => {
11 |
12 | let statusBarSpy, splashScreenSpy, platformReadySpy, platformSpy;
13 |
14 | beforeEach(async(() => {
15 | statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault']);
16 | splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide']);
17 | platformReadySpy = Promise.resolve();
18 | platformSpy = jasmine.createSpyObj('Platform', { ready: platformReadySpy });
19 |
20 | TestBed.configureTestingModule({
21 | declarations: [AppComponent],
22 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
23 | providers: [
24 | { provide: StatusBar, useValue: statusBarSpy },
25 | { provide: SplashScreen, useValue: splashScreenSpy },
26 | { provide: Platform, useValue: platformSpy },
27 | ],
28 | }).compileComponents();
29 | }));
30 |
31 | it('should create the app', () => {
32 | const fixture = TestBed.createComponent(AppComponent);
33 | const app = fixture.debugElement.componentInstance;
34 | expect(app).toBeTruthy();
35 | });
36 |
37 | it('should initialize the app', async () => {
38 | TestBed.createComponent(AppComponent);
39 | expect(platformSpy.ready).toHaveBeenCalled();
40 | await platformReadySpy;
41 | expect(statusBarSpy.styleDefault).toHaveBeenCalled();
42 | expect(splashScreenSpy.hide).toHaveBeenCalled();
43 | });
44 |
45 | // TODO: add more tests!
46 |
47 | });
48 |
--------------------------------------------------------------------------------
/demo/ios/App/App/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/demo/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 27
5 | defaultConfig {
6 | applicationId "com.meetmaestro.hive.capacitor.emaildemo"
7 | minSdkVersion 21
8 | targetSdkVersion 27
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | repositories {
22 | maven {
23 | url "https://dl.bintray.com/ionic-team/capacitor"
24 | }
25 | flatDir{
26 | dirs '../../node_modules/@capacitor/cli/assets/capacitor-android-plugins/src/main/libs', 'libs'
27 | }
28 | }
29 |
30 | dependencies {
31 | implementation fileTree(include: ['*.jar'], dir: 'libs')
32 | implementation 'com.android.support:appcompat-v7:27.1.1'
33 | implementation 'com.android.support.constraint:constraint-layout:1.0.2'
34 | implementation project(':capacitor-android')
35 | testImplementation 'junit:junit:4.12'
36 | androidTestImplementation 'com.android.support.test:runner:1.0.1'
37 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
38 | implementation project(':capacitor-android-plugins')
39 | implementation 'com.google.firebase:firebase-messaging:17.1.0'
40 | implementation 'com.android.support:support-v4:27.1.1'
41 | }
42 |
43 | apply from: 'capacitor.build.gradle'
44 |
45 | try {
46 | def servicesJSON = file('google-services.json')
47 | if (servicesJSON.text) {
48 | apply plugin: 'com.google.gms.google-services'
49 | }
50 | } catch(Exception e) {
51 | logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
52 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Capacitor Email
2 |
3 |
4 | ## Usage
5 |
6 |
7 | ```ts
8 | import { Email } from '@teamhive/capacitor-email';
9 |
10 | const email = new Email();
11 |
12 | const hasPermission = await email.hasPermission();
13 |
14 | if(!hasPermission){
15 | await email.requestPermission();
16 | }
17 |
18 | const available = await email.isAvailable({
19 | alias: 'gmail' // gmail, outlook, yahoo *optional*,
20 | });
21 |
22 | // available.hasAccount *If email is setup*
23 | // available.hasApp *If device has alias supplied*
24 |
25 |
26 | if(available.hasAccount){
27 | email.open({
28 | to:['me@myemail.com'],
29 | cc: ['bro@hisemail.com'],
30 | bcc: ['sis@heremail.com'],
31 | subject: 'Party',
32 | body: 'Hi bring drinks...',
33 | isHtml: false,
34 | attachments: [SomeFilePath]
35 | })
36 | }
37 | ```
38 |
39 |
40 | ## Api
41 |
42 | | Method | Default | Type | Description |
43 | | ---------------------------------------- | ------- | ---------------------------- | ----------------------------------------------------- |
44 | | isAvailable(options?: AvailableOptions) | | `Promise` | |
45 | | open(options?: EmailOptions) | | `Promise` | |
46 | | openDraft() | | `Promise` | | |
47 | | requestPermission() | | `Promise` | |
48 | | hasPermission() | | `Promise` | |
49 | | getDefaults() | | `Promise` | |
50 | | getAliases() | | `Promise` | |
51 |
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo",
3 | "version": "0.0.1",
4 | "author": "Ionic Framework",
5 | "homepage": "http://ionicframework.com/",
6 | "scripts": {
7 | "ng": "ng",
8 | "start": "ng serve",
9 | "build": "ng build",
10 | "test": "ng test",
11 | "lint": "ng lint",
12 | "e2e": "ng e2e"
13 | },
14 | "private": true,
15 | "dependencies": {
16 | "@angular/common": "~6.1.1",
17 | "@angular/core": "~6.1.1",
18 | "@angular/forms": "~6.1.1",
19 | "@angular/http": "~6.1.1",
20 | "@angular/platform-browser": "~6.1.1",
21 | "@angular/platform-browser-dynamic": "~6.1.1",
22 | "@angular/router": "~6.1.1",
23 | "@capacitor/android": "^1.0.0-beta.7",
24 | "@capacitor/cli": "^1.0.0-beta.7",
25 | "@capacitor/core": "^1.0.0-beta.7",
26 | "@capacitor/ios": "^1.0.0-beta.7",
27 | "@ionic-native/core": "5.0.0-beta.15",
28 | "@ionic-native/splash-screen": "5.0.0-beta.15",
29 | "@ionic-native/status-bar": "5.0.0-beta.15",
30 | "@ionic/angular": "4.0.0-beta.7",
31 | "@teamhive/capacitor-email": "^0.0.1",
32 | "core-js": "^2.5.3",
33 | "rxjs": "6.2.2",
34 | "zone.js": "^0.8.26"
35 | },
36 | "devDependencies": {
37 | "@angular/cli": "~6.1.1",
38 | "@angular/compiler": "~6.1.1",
39 | "@angular/compiler-cli": "~6.1.1",
40 | "@angular/language-service": "~6.1.1",
41 | "@angular-devkit/architect": "~0.7.2",
42 | "@angular-devkit/build-angular": "~0.7.2",
43 | "@angular-devkit/core": "~0.7.2",
44 | "@angular-devkit/schematics": "~0.7.2",
45 | "@ionic/ng-toolkit": "^1.0.0",
46 | "@ionic/schematics-angular": "^1.0.0",
47 | "@types/jasmine": "~2.8.6",
48 | "@types/jasminewd2": "~2.0.3",
49 | "@types/node": "~10.9.2",
50 | "codelyzer": "~4.4.2",
51 | "jasmine-core": "~2.99.1",
52 | "jasmine-spec-reporter": "~4.2.1",
53 | "karma": "~3.0.0",
54 | "karma-chrome-launcher": "~2.2.0",
55 | "karma-coverage-istanbul-reporter": "~2.0.0",
56 | "karma-jasmine": "~1.1.1",
57 | "karma-jasmine-html-reporter": "^0.2.2",
58 | "protractor": "~5.4.0",
59 | "ts-node": "~7.0.0",
60 | "tslint": "~5.11.0",
61 | "typescript": "~2.9.2"
62 | },
63 | "description": "An Ionic project"
64 | }
65 |
--------------------------------------------------------------------------------
/src/src/web.ts:
--------------------------------------------------------------------------------
1 | import { mergeWebPlugin, Plugins, WebPlugin } from '@capacitor/core';
2 | import { AvailableOptions, AvailableResults, EmailOptions, IEmail } from './definitions';
3 |
4 | const mailto = 'mailto:';
5 | const defaults = {
6 | app: mailto,
7 | subject: '',
8 | body: '',
9 | to: [] as any[],
10 | cc: [] as any[],
11 | bcc: [] as any[],
12 | attachments: [] as any[],
13 | isHtml: true,
14 | chooserHeader: 'Open with'
15 | };
16 |
17 | export class EmailPluginWeb extends WebPlugin implements IEmail {
18 | isAvailable(options?: AvailableOptions): Promise {
19 | return Promise.resolve({
20 | hasAccount: false,
21 | hasApp: false
22 | });
23 | }
24 |
25 | open(options?: EmailOptions | null): Promise {
26 | let url = 'mailto:';
27 | if (!options) {
28 | window.open(url);
29 | return Promise.resolve({});
30 | }
31 | const keys = Object.keys(options);
32 | for (let key of keys) {
33 | let value;
34 | if (key === 'to') {
35 | url = url + `${((options as any)[key] as string[]).join(';')}?`;
36 | } else if (key === 'cc' || key === 'bcc') {
37 | value = ((options as any)[key] as string[]).join(';');
38 | url = url + `${key}=${value}&`;
39 | } else {
40 | value = (options as any)[key];
41 | url = url + `${key}=${value}&`;
42 | }
43 | }
44 | window.open(url);
45 | return Promise.resolve({});
46 | }
47 |
48 | openDraft(): Promise {
49 | return this.open();
50 | }
51 |
52 | requestPermission(): Promise {
53 | return Promise.resolve({});
54 | }
55 |
56 | hasPermission(): Promise {
57 | return Promise.resolve();
58 | }
59 |
60 | getDefaults(): Promise {
61 | return Promise.resolve(defaults);
62 | }
63 |
64 | getAliases(): Promise {
65 | return Promise.resolve({});
66 | }
67 |
68 | constructor() {
69 | super({
70 | name: 'EmailPlugin',
71 | platforms: ['web']
72 | });
73 | }
74 | }
75 |
76 | const EmailWeb = new EmailPluginWeb();
77 |
78 | export { EmailWeb };
79 | mergeWebPlugin(Plugins, EmailWeb);
80 |
--------------------------------------------------------------------------------
/demo/src/app/home/home.page.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { Email } from '@teamhive/capacitor-email';
3 | import { AlertController } from '@ionic/angular';
4 |
5 | @Component({
6 | selector: 'app-home',
7 | templateUrl: 'home.page.html',
8 | styleUrls: ['home.page.scss']
9 | })
10 | export class HomePage implements OnInit {
11 | email: Email;
12 |
13 | constructor(private alertController: AlertController) {
14 | }
15 |
16 | ngOnInit(): void {
17 | this.email = new Email();
18 | }
19 |
20 | async openEmail(app?: string) {
21 | try {
22 | await this.email.hasPermission();
23 | } catch (e) {
24 | await this.email.requestPermission();
25 | }
26 |
27 | try {
28 | await this.email.hasPermission();
29 | const hasAccount = await this.email.isAvailable({
30 | alias : app
31 | });
32 | if (hasAccount.hasAccount) {
33 | this.email.open({
34 | to: ['fortune.osei@gmail.com', 'fortune.osei@hotmail.com'],
35 | cc: ['fortune.osei@yahoo.com'],
36 | bcc: ['osei.fortune@outlook.com'],
37 | subject: 'Test',
38 | body: 'Help',
39 | app: app
40 | });
41 | } else {
42 | const alert = await this.alertController.create({
43 | header: 'Email is not setup',
44 | buttons: [
45 | 'OK'
46 | ]
47 | });
48 |
49 | await alert.present();
50 | }
51 | } catch (e) {
52 | const alert = await this.alertController.create({
53 | header: 'Accounts permission required',
54 | buttons: [
55 | 'OK'
56 | ]
57 | });
58 |
59 | await alert.present();
60 | }
61 | }
62 |
63 | open() {
64 | this.openEmail();
65 | }
66 |
67 | openGmail() {
68 | this.openEmail('gmail');
69 | }
70 |
71 | openYahoo() {
72 | this.openEmail('yahoo');
73 | }
74 |
75 | openOutlook() {
76 | this.openEmail('outlook');
77 | }
78 |
79 | openDraft() {
80 | this.email.openDraft();
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/demo/src/theme/variables.scss:
--------------------------------------------------------------------------------
1 | // Ionic Variables and Theming. For more info, please see:
2 | // http://ionicframework.com/docs/theming/
3 |
4 | /** Ionic CSS Variables **/
5 | :root {
6 | /** primary **/
7 | --ion-color-primary: #488aff;
8 | --ion-color-primary-rgb: 72,138,255;
9 | --ion-color-primary-contrast: #fff;
10 | --ion-color-primary-contrast-rgb: 255,255,255;
11 | --ion-color-primary-shade: #3f79e0;
12 | --ion-color-primary-tint: #5a96ff;
13 |
14 | /** secondary **/
15 | --ion-color-secondary: #32db64;
16 | --ion-color-secondary-rgb: 50,219,100;
17 | --ion-color-secondary-contrast: #fff;
18 | --ion-color-secondary-contrast-rgb: 255,255,255;
19 | --ion-color-secondary-shade: #2cc158;
20 | --ion-color-secondary-tint: #47df74;
21 |
22 | /** tertiary **/
23 | --ion-color-tertiary: #f4a942;
24 | --ion-color-tertiary-rgb: 244,169,66;
25 | --ion-color-tertiary-contrast: #fff;
26 | --ion-color-tertiary-contrast-rgb: 255,255,255;
27 | --ion-color-tertiary-shade: #d7953a;
28 | --ion-color-tertiary-tint: #f5b255;
29 |
30 | /** success **/
31 | --ion-color-success: #10dc60;
32 | --ion-color-success-rgb: 16,220,96;
33 | --ion-color-success-contrast: #fff;
34 | --ion-color-success-contrast-rgb: 255,255,255;
35 | --ion-color-success-shade: #0ec254;
36 | --ion-color-success-tint: #28e070;
37 |
38 | /** warning **/
39 | --ion-color-warning: #ffce00;
40 | --ion-color-warning-rgb: 255,206,0;
41 | --ion-color-warning-contrast: #000;
42 | --ion-color-warning-contrast-rgb: 0,0,0;
43 | --ion-color-warning-shade: #e0b500;
44 | --ion-color-warning-tint: #ffd31a;
45 |
46 | /** danger **/
47 | --ion-color-danger: #f53d3d;
48 | --ion-color-danger-rgb: 245,61,61;
49 | --ion-color-danger-contrast: #fff;
50 | --ion-color-danger-contrast-rgb: 255,255,255;
51 | --ion-color-danger-shade: #d83636;
52 | --ion-color-danger-tint: #f65050;
53 |
54 | /** light **/
55 | --ion-color-light: #f4f4f4;
56 | --ion-color-light-rgb: 244,244,244;
57 | --ion-color-light-contrast: #000;
58 | --ion-color-light-contrast-rgb: 0,0,0;
59 | --ion-color-light-shade: #d7d7d7;
60 | --ion-color-light-tint: #f5f5f5;
61 |
62 | /** medium **/
63 | --ion-color-medium: #989aa2;
64 | --ion-color-medium-rgb: 152,154,162;
65 | --ion-color-medium-contrast: #000;
66 | --ion-color-medium-contrast-rgb: 0,0,0;
67 | --ion-color-medium-shade: #86888f;
68 | --ion-color-medium-tint: #a2a4ab;
69 |
70 | /** dark **/
71 | --ion-color-dark: #222;
72 | --ion-color-dark-rgb: 34,34,34;
73 | --ion-color-dark-contrast: #fff;
74 | --ion-color-dark-contrast-rgb: 255,255,255;
75 | --ion-color-dark-shade: #1e1e1e;
76 | --ion-color-dark-tint: #383838;
77 | }
--------------------------------------------------------------------------------
/demo/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
38 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/demo/ios/App/App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | EmailDemo
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleURLTypes
22 |
23 |
24 | CFBundleURLName
25 | com.getcapacitor.capacitor
26 | CFBundleURLSchemes
27 |
28 | capacitor
29 |
30 |
31 |
32 | CFBundleVersion
33 | 1
34 | LSRequiresIPhoneOS
35 |
36 | NSAppTransportSecurity
37 |
38 | NSAllowsArbitraryLoads
39 |
40 |
41 | NSCameraUsageDescription
42 | To Take Photos and Video
43 | NSLocationAlwaysUsageDescription
44 | Always allow Geolocation?
45 | NSLocationWhenInUseUsageDescription
46 | Allow Geolocation?
47 | NSMicrophoneUsageDescription
48 | To Record Audio With Video
49 | NSPhotoLibraryAddUsageDescription
50 | Store camera photos to camera
51 | NSPhotoLibraryUsageDescription
52 | To Pick Photos from Library
53 | UILaunchStoryboardName
54 | LaunchScreen
55 | UIMainStoryboardFile
56 | Main
57 | UIRequiredDeviceCapabilities
58 |
59 | armv7
60 |
61 | UISupportedInterfaceOrientations
62 |
63 | UIInterfaceOrientationPortrait
64 | UIInterfaceOrientationLandscapeLeft
65 | UIInterfaceOrientationLandscapeRight
66 |
67 | UISupportedInterfaceOrientations~ipad
68 |
69 | UIInterfaceOrientationPortrait
70 | UIInterfaceOrientationPortraitUpsideDown
71 | UIInterfaceOrientationLandscapeLeft
72 | UIInterfaceOrientationLandscapeRight
73 |
74 | UIViewControllerBasedStatusBarAppearance
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/src/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/demo/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/demo/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22 | // import 'core-js/es6/symbol';
23 | // import 'core-js/es6/object';
24 | // import 'core-js/es6/function';
25 | // import 'core-js/es6/parse-int';
26 | // import 'core-js/es6/parse-float';
27 | // import 'core-js/es6/number';
28 | // import 'core-js/es6/math';
29 | // import 'core-js/es6/string';
30 | // import 'core-js/es6/date';
31 | // import 'core-js/es6/array';
32 | // import 'core-js/es6/regexp';
33 | // import 'core-js/es6/map';
34 | // import 'core-js/es6/weak-map';
35 | // import 'core-js/es6/set';
36 |
37 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */
38 | // import 'classlist.js'; // Run `npm install --save classlist.js`.
39 |
40 | /** IE10 and IE11 requires the following for the Reflect API. */
41 | // import 'core-js/es6/reflect';
42 |
43 |
44 | /** Evergreen browsers require these. **/
45 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46 | import 'core-js/es7/reflect';
47 |
48 |
49 | /**
50 | * Required to support Web Animations `@angular/platform-browser/animations`.
51 | * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
52 | **/
53 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
54 |
55 |
56 |
57 | /***************************************************************************************************
58 | * Zone JS is required by Angular itself.
59 | */
60 | import 'zone.js/dist/zone'; // Included with Angular CLI.
61 |
62 |
63 |
64 | /***************************************************************************************************
65 | * APPLICATION IMPORTS
66 | */
67 |
68 | /**
69 | * Date, currency, decimal and percent pipes.
70 | * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
71 | */
72 | // import 'intl'; // Run `npm install --save intl`.
73 | /**
74 | * Need to import at least one locale-data with intl.
75 | */
76 | // import 'intl/locale-data/jsonp/en';
77 |
--------------------------------------------------------------------------------
/demo/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "AppIcon-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "AppIcon-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "AppIcon-29x29@2x-1.png",
19 | "scale" : "2x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "AppIcon-29x29@3x.png",
25 | "scale" : "3x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "AppIcon-40x40@2x.png",
31 | "scale" : "2x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "AppIcon-40x40@3x.png",
37 | "scale" : "3x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "AppIcon-60x60@2x.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "AppIcon-60x60@3x.png",
49 | "scale" : "3x"
50 | },
51 | {
52 | "size" : "20x20",
53 | "idiom" : "ipad",
54 | "filename" : "AppIcon-20x20@1x.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "AppIcon-20x20@2x-1.png",
61 | "scale" : "2x"
62 | },
63 | {
64 | "size" : "29x29",
65 | "idiom" : "ipad",
66 | "filename" : "AppIcon-29x29@1x.png",
67 | "scale" : "1x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "AppIcon-29x29@2x.png",
73 | "scale" : "2x"
74 | },
75 | {
76 | "size" : "40x40",
77 | "idiom" : "ipad",
78 | "filename" : "AppIcon-40x40@1x.png",
79 | "scale" : "1x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "AppIcon-40x40@2x-1.png",
85 | "scale" : "2x"
86 | },
87 | {
88 | "size" : "76x76",
89 | "idiom" : "ipad",
90 | "filename" : "AppIcon-76x76@1x.png",
91 | "scale" : "1x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "AppIcon-76x76@2x.png",
97 | "scale" : "2x"
98 | },
99 | {
100 | "size" : "83.5x83.5",
101 | "idiom" : "ipad",
102 | "filename" : "AppIcon-83.5x83.5@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "1024x1024",
107 | "idiom" : "ios-marketing",
108 | "filename" : "AppIcon-512@2x.png",
109 | "scale" : "1x"
110 | }
111 | ],
112 | "info" : {
113 | "version" : 1,
114 | "author" : "xcode"
115 | }
116 | }
--------------------------------------------------------------------------------
/demo/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": [
3 | "node_modules/codelyzer"
4 | ],
5 | "rules": {
6 | "arrow-return-shorthand": true,
7 | "callable-types": true,
8 | "class-name": true,
9 | "comment-format": [
10 | true,
11 | "check-space"
12 | ],
13 | "curly": true,
14 | "deprecation": {
15 | "severity": "warn"
16 | },
17 | "eofline": true,
18 | "forin": true,
19 | "import-spacing": true,
20 | "indent": [
21 | true,
22 | "spaces"
23 | ],
24 | "interface-over-type-literal": true,
25 | "label-position": true,
26 | "max-line-length": [
27 | true,
28 | 140
29 | ],
30 | "member-access": false,
31 | "member-ordering": [
32 | true,
33 | {
34 | "order": [
35 | "static-field",
36 | "instance-field",
37 | "static-method",
38 | "instance-method"
39 | ]
40 | }
41 | ],
42 | "no-arg": true,
43 | "no-bitwise": true,
44 | "no-console": [
45 | true,
46 | "debug",
47 | "info",
48 | "time",
49 | "timeEnd",
50 | "trace"
51 | ],
52 | "no-construct": true,
53 | "no-debugger": true,
54 | "no-duplicate-super": true,
55 | "no-empty": false,
56 | "no-empty-interface": true,
57 | "no-eval": true,
58 | "no-inferrable-types": [
59 | true,
60 | "ignore-params"
61 | ],
62 | "no-misused-new": true,
63 | "no-non-null-assertion": true,
64 | "no-shadowed-variable": true,
65 | "no-string-literal": false,
66 | "no-string-throw": true,
67 | "no-switch-case-fall-through": true,
68 | "no-trailing-whitespace": true,
69 | "no-unnecessary-initializer": true,
70 | "no-unused-expression": true,
71 | "no-use-before-declare": true,
72 | "no-var-keyword": true,
73 | "object-literal-sort-keys": false,
74 | "one-line": [
75 | true,
76 | "check-open-brace",
77 | "check-catch",
78 | "check-else",
79 | "check-whitespace"
80 | ],
81 | "prefer-const": true,
82 | "quotemark": [
83 | true,
84 | "single"
85 | ],
86 | "radix": true,
87 | "semicolon": [
88 | true,
89 | "always"
90 | ],
91 | "triple-equals": [
92 | true,
93 | "allow-null-check"
94 | ],
95 | "typedef-whitespace": [
96 | true,
97 | {
98 | "call-signature": "nospace",
99 | "index-signature": "nospace",
100 | "parameter": "nospace",
101 | "property-declaration": "nospace",
102 | "variable-declaration": "nospace"
103 | }
104 | ],
105 | "unified-signatures": true,
106 | "variable-name": false,
107 | "whitespace": [
108 | true,
109 | "check-branch",
110 | "check-decl",
111 | "check-operator",
112 | "check-separator",
113 | "check-type"
114 | ],
115 | "directive-selector": [
116 | true,
117 | "attribute",
118 | "app",
119 | "camelCase"
120 | ],
121 | "component-selector": [
122 | true,
123 | "element",
124 | "app",
125 | "page",
126 | "kebab-case"
127 | ],
128 | "no-output-on-prefix": true,
129 | "use-input-property-decorator": true,
130 | "use-output-property-decorator": true,
131 | "use-host-property-decorator": true,
132 | "no-input-rename": true,
133 | "no-output-rename": true,
134 | "use-life-cycle-interface": true,
135 | "use-pipe-transform-interface": true,
136 | "directive-class-suffix": true
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/demo/ios/App/App/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Capacitor
3 |
4 | @UIApplicationMain
5 | class AppDelegate: UIResponder, UIApplicationDelegate {
6 |
7 | var window: UIWindow?
8 |
9 |
10 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
11 | // Override point for customization after application launch.
12 | return true
13 | }
14 |
15 | func applicationWillResignActive(_ application: UIApplication) {
16 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
17 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
18 | }
19 |
20 | func applicationDidEnterBackground(_ application: UIApplication) {
21 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
22 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
23 | }
24 |
25 | func applicationWillEnterForeground(_ application: UIApplication) {
26 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
27 | }
28 |
29 | func applicationDidBecomeActive(_ application: UIApplication) {
30 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
31 | }
32 |
33 | func applicationWillTerminate(_ application: UIApplication) {
34 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
35 | }
36 |
37 | func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
38 | // Called when the app was launched with a url. Feel free to add additional processing here,
39 | // but if you want the App API to support tracking app url opens, make sure to keep this call
40 | return CAPBridge.handleOpenUrl(url, options)
41 | }
42 |
43 | func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
44 | // Called when the app was launched with an activity, including Universal Links.
45 | // Feel free to add additional processing here, but if you want the App API to support
46 | // tracking app url opens, make sure to keep this call
47 | return CAPBridge.handleContinueActivity(userActivity, restorationHandler)
48 | }
49 |
50 | override func touchesBegan(_ touches: Set, with event: UIEvent?) {
51 | super.touchesBegan(touches, with: event)
52 |
53 | let statusBarRect = UIApplication.shared.statusBarFrame
54 | guard let touchPoint = event?.allTouches?.first?.location(in: self.window) else { return }
55 |
56 | if statusBarRect.contains(touchPoint) {
57 | NotificationCenter.default.post(CAPBridge.statusBarTappedNotification)
58 | }
59 | }
60 |
61 | func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
62 | NotificationCenter.default.post(name: Notification.Name(CAPNotifications.DidRegisterForRemoteNotificationsWithDeviceToken.name()), object: deviceToken)
63 | }
64 |
65 | func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
66 | NotificationCenter.default.post(name: Notification.Name(CAPNotifications.DidFailToRegisterForRemoteNotificationsWithError.name()), object: error)
67 | }
68 |
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/demo/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/src/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/demo/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
3 | "version": 1,
4 | "defaultProject": "app",
5 | "projects": {
6 | "app": {
7 | "root": "",
8 | "sourceRoot": "src",
9 | "projectType": "application",
10 | "prefix": "app",
11 | "schematics": {},
12 | "architect": {
13 | "build": {
14 | "builder": "@angular-devkit/build-angular:browser",
15 | "options": {
16 | "progress": false,
17 | "outputPath": "www",
18 | "index": "src/index.html",
19 | "main": "src/main.ts",
20 | "polyfills": "src/polyfills.ts",
21 | "tsConfig": "src/tsconfig.app.json",
22 | "assets": [
23 | {
24 | "glob": "**/*",
25 | "input": "src/assets",
26 | "output": "assets"
27 | },
28 | {
29 | "glob": "**/*.svg",
30 | "input": "node_modules/@ionic/angular/dist/ionic/svg",
31 | "output": "./svg"
32 | }
33 | ],
34 | "styles": [
35 | {
36 | "input": "src/theme/variables.scss"
37 | },
38 | {
39 | "input": "src/global.scss"
40 | }
41 | ],
42 | "scripts": []
43 | },
44 | "configurations": {
45 | "production": {
46 | "fileReplacements": [
47 | {
48 | "replace": "src/environments/environment.ts",
49 | "with": "src/environments/environment.prod.ts"
50 | }
51 | ],
52 | "optimization": true,
53 | "outputHashing": "all",
54 | "sourceMap": false,
55 | "extractCss": true,
56 | "namedChunks": false,
57 | "aot": true,
58 | "extractLicenses": true,
59 | "vendorChunk": false,
60 | "buildOptimizer": true
61 | }
62 | }
63 | },
64 | "serve": {
65 | "builder": "@angular-devkit/build-angular:dev-server",
66 | "options": {
67 | "browserTarget": "app:build"
68 | },
69 | "configurations": {
70 | "production": {
71 | "browserTarget": "app:build:production"
72 | }
73 | }
74 | },
75 | "extract-i18n": {
76 | "builder": "@angular-devkit/build-angular:extract-i18n",
77 | "options": {
78 | "browserTarget": "app:build"
79 | }
80 | },
81 | "test": {
82 | "builder": "@angular-devkit/build-angular:karma",
83 | "options": {
84 | "main": "src/test.ts",
85 | "polyfills": "src/polyfills.ts",
86 | "tsConfig": "src/tsconfig.spec.json",
87 | "karmaConfig": "src/karma.conf.js",
88 | "styles": [
89 | "styles.css"
90 | ],
91 | "scripts": [],
92 | "assets": [
93 | {
94 | "glob": "favicon.ico",
95 | "input": "src/",
96 | "output": "/"
97 | },
98 | {
99 | "glob": "**/*",
100 | "input": "src/assets",
101 | "output": "/assets"
102 | }
103 | ]
104 | }
105 | },
106 | "lint": {
107 | "builder": "@angular-devkit/build-angular:tslint",
108 | "options": {
109 | "tsConfig": [
110 | "src/tsconfig.app.json",
111 | "src/tsconfig.spec.json"
112 | ],
113 | "exclude": [
114 | "**/node_modules/**"
115 | ]
116 | }
117 | },
118 | "ionic-cordova-build": {
119 | "builder": "@ionic/ng-toolkit:cordova-build",
120 | "options": {
121 | "browserTarget": "app:build"
122 | },
123 | "configurations": {
124 | "production": {
125 | "browserTarget": "app:build:production"
126 | }
127 | }
128 | },
129 | "ionic-cordova-serve": {
130 | "builder": "@ionic/ng-toolkit:cordova-serve",
131 | "options": {
132 | "cordovaBuildTarget": "app:ionic-cordova-build",
133 | "devServerTarget": "app:serve"
134 | },
135 | "configurations": {
136 | "production": {
137 | "cordovaBuildTarget": "app:ionic-cordova-build:production",
138 | "devServerTarget": "app:serve:production"
139 | }
140 | }
141 | }
142 | }
143 | },
144 | "app-e2e": {
145 | "root": "e2e/",
146 | "projectType": "application",
147 | "architect": {
148 | "e2e": {
149 | "builder": "@angular-devkit/build-angular:protractor",
150 | "options": {
151 | "protractorConfig": "e2e/protractor.conf.js",
152 | "devServerTarget": "app:serve"
153 | }
154 | },
155 | "lint": {
156 | "builder": "@angular-devkit/build-angular:tslint",
157 | "options": {
158 | "tsConfig": "e2e/tsconfig.e2e.json",
159 | "exclude": [
160 | "**/node_modules/**"
161 | ]
162 | }
163 | }
164 | }
165 | }
166 | },
167 | "cli": {
168 | "defaultCollection": "@ionic/schematics-angular"
169 | },
170 | "schematics": {
171 | "@ionic/schematics-angular:component": {
172 | "styleext": "scss"
173 | },
174 | "@ionic/schematics-angular:page": {
175 | "styleext": "scss"
176 | }
177 | }
178 | }
179 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Plugin/Plugin.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import Capacitor
3 | import MessageUI
4 | import MobileCoreServices
5 | @objc(EmailPlugin)
6 | public class EmailPlugin: CAPPlugin , MFMailComposeViewControllerDelegate, UINavigationControllerDelegate{
7 | private var defaults:[String:Any] = [:]
8 | private var aliases:[String:String] = [:]
9 | public override func load() {
10 | let emptyArray:[String] = []
11 | aliases["gmail"] = "googlegmail:///co"
12 | aliases["outlook"] = "ms-outlook://compose"
13 | aliases["yahoo"] = "ymail://mail/compose"
14 | defaults["to"] = emptyArray
15 | defaults["cc"] = emptyArray
16 | defaults["bcc"] = emptyArray
17 | defaults["attachments"] = emptyArray
18 | defaults["subject"] = ""
19 | defaults["isHtml"] = true
20 | defaults["type"] = "message/rfc822"
21 | defaults["chooserHeader"] = "Open with"
22 | }
23 |
24 | @objc func isAvailable(_ call: CAPPluginCall) {
25 | var obj: [String:Any] = [:]
26 | let alias = call.getString("alias") ?? "mailto://"
27 | if(!alias.contains("mailto") ){
28 | let app = aliases[alias]
29 | obj["hasApp"] = UIApplication.shared.canOpenURL(URL(string: app!)!)
30 | }
31 | obj["hasAccount"] = MFMailComposeViewController.canSendMail()
32 | call.success(obj)
33 | }
34 |
35 | public func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {
36 | controller.dismiss(animated: true, completion: nil)
37 | }
38 |
39 | @objc func open(_ call: CAPPluginCall) {
40 | let emptyArray:[String] = []
41 | let to = call.getArray("to", String.self) ?? emptyArray
42 | let cc = call.getArray("cc", String.self) ?? emptyArray
43 | let bcc = call.getArray("bcc", String.self) ?? emptyArray
44 | let attachments = call.getArray("attachments", String.self) ?? emptyArray
45 | var subject = call.getString("subject") ?? ""
46 | var body = call.getString("body") ?? ""
47 | let isHtml = call.getBool("isHtml") ?? true
48 | _ = call.getString("type")
49 | let app = aliases[call.getString("app") ?? ""] ?? "mailto://"
50 | let chooserHeader = call.getString("chooserHeader") ?? "Open with"
51 | if(!app.contains("mailto") ){
52 | var toString = ""
53 | var ccString = ""
54 | var bccString = ""
55 | if(subject != ""){
56 | subject = "subject=" + subject + "&"
57 | }
58 |
59 | if(body != ""){
60 | body = "body=" + body + "&"
61 | }
62 | if(to.count > 0 ){
63 | for email in to{
64 | toString.append(email + ";")
65 | }
66 | toString.append("&")
67 | toString = "to=" + toString
68 | }
69 |
70 | if(cc.count > 0){
71 | for emailCC in cc {
72 | ccString.append(emailCC + ";")
73 | }
74 | ccString.append("&")
75 | ccString = "cc=" + ccString
76 | }
77 |
78 | if(bcc.count > 0){
79 | for emailBCC in bcc {
80 | bccString.append(emailBCC + ";")
81 | }
82 | bccString.append("&")
83 | bccString = "bcc=" + bccString
84 | }
85 |
86 | let url = URL(string: app + "?" + toString + ccString + bccString + body + subject)
87 |
88 | DispatchQueue.main.async {
89 | UIApplication.shared.open(url!, options: [:], completionHandler: nil)
90 | }
91 |
92 | }else{
93 | DispatchQueue.main.async {
94 | let mail = MFMailComposeViewController()
95 | mail.title = chooserHeader
96 | mail.mailComposeDelegate = self;
97 | mail.setSubject(subject)
98 | mail.setToRecipients(to)
99 | mail.setCcRecipients(cc)
100 | mail.setBccRecipients(bcc)
101 | mail.setMessageBody(body, isHTML: isHtml)
102 | for attachment in attachments {
103 | var path: String?
104 | if(attachment.starts(with: "_capacitor_")){
105 | path = attachment.replacingOccurrences(of: "_capacitor_", with: "file://")
106 | }else if(attachment.starts(with: "/")){
107 | path = "file://" + attachment
108 | }
109 | let file = NSURL(string: path!)
110 | let ext = file?.pathExtension
111 | let uti = UTTypeCreatePreferredIdentifierForTag(
112 | kUTTagClassFilenameExtension,
113 | ext! as CFString,
114 | nil
115 | )
116 | let mime = uti?.takeRetainedValue() as! String
117 | let data = NSData(contentsOf: (file?.absoluteURL!)!)
118 | mail.addAttachmentData(data as! Data, mimeType: mime, fileName: (file?.lastPathComponent)!)
119 | }
120 |
121 | self.bridge.viewController.present(mail, animated: true, completion: nil)
122 |
123 | }
124 |
125 | }
126 | call.resolve()
127 | }
128 |
129 | @objc func openDraft(_ call: CAPPluginCall) {
130 | self.open(call)
131 | }
132 |
133 |
134 | @objc func requestPermission(_ call: CAPPluginCall) {
135 | call.success()
136 | }
137 |
138 |
139 | @objc func hasPermission(_ call: CAPPluginCall) {
140 | call.success()
141 | }
142 |
143 | @objc func getDefaults(_ call: CAPPluginCall) {
144 | call.success(defaults)
145 | }
146 |
147 | @objc func getAliases(_ call: CAPPluginCall) {
148 | call.success(aliases)
149 | }
150 | }
151 |
--------------------------------------------------------------------------------
/demo/android/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/src/android/@teamhive/capacitor-email/src/main/java/com/meetmaestro/hive/capacitor/email/EmailPlugin.java:
--------------------------------------------------------------------------------
1 | package com.meetmaestro.hive.capacitor.email;
2 |
3 | import android.Manifest;
4 | import android.accounts.Account;
5 | import android.accounts.AccountManager;
6 | import android.annotation.TargetApi;
7 | import android.content.Intent;
8 | import android.content.pm.ApplicationInfo;
9 | import android.content.pm.PackageManager;
10 | import android.net.Uri;
11 | import android.os.Build;
12 | import android.support.v4.app.ActivityCompat;
13 | import android.support.v7.app.AppCompatActivity;
14 | import android.text.Html;
15 | import android.util.Log;
16 | import android.util.Patterns;
17 |
18 | import com.getcapacitor.*;
19 | import com.google.android.gms.common.AccountPicker;
20 |
21 | import org.json.JSONException;
22 |
23 | import java.util.ArrayList;
24 | import java.util.List;
25 | import java.util.regex.Pattern;
26 |
27 | @NativePlugin(
28 | requestCodes = {EmailPlugin.REQUEST_CODE}
29 | )
30 | public class EmailPlugin extends Plugin {
31 | private JSObject aliases = new JSObject();
32 | private JSObject defaults = new JSObject();
33 | static final int REQUEST_CODE = 1869;
34 |
35 | @Override
36 | public void load() {
37 | super.load();
38 | aliases.put("gmail", "com.google.android.gm");
39 | aliases.put("outlook", "com.microsoft.office.outlook");
40 | aliases.put("yahoo", "com.yahoo.mobile.client.android.mail");
41 | JSArray emptyArray = new JSArray();
42 | defaults.put("to", emptyArray);
43 | defaults.put("cc", emptyArray);
44 | defaults.put("bcc", emptyArray);
45 | defaults.put("attachments", emptyArray);
46 | defaults.put("subject", "");
47 | defaults.put("isHtml", true);
48 | defaults.put("type", "message/rfc822");
49 | defaults.put("chooserHeader", "Open with");
50 | }
51 |
52 | private String[] getArray(JSArray array) {
53 |
54 | int size = array.length();
55 | String[] newList = new String[size];
56 | try {
57 | List emails = array.toList();
58 | int count = 0;
59 | for (String email : emails) {
60 | newList[count] = email;
61 | count++;
62 | }
63 | return newList;
64 | } catch (JSONException e) {
65 | return newList;
66 | }
67 | }
68 |
69 | @SuppressWarnings("deprecation")
70 | @PluginMethod()
71 | public void open(PluginCall call) {
72 | JSArray emptyArray = new JSArray();
73 | JSArray to = call.getArray("to", emptyArray);
74 | JSArray cc = call.getArray("cc", emptyArray);
75 | JSArray bcc = call.getArray("bcc", emptyArray);
76 | JSArray attachments = call.getArray("attachments", emptyArray);
77 | String subject = call.getString("subject", "");
78 | String body = call.getString("body", "");
79 | boolean isHtml = call.getBoolean("isHtml", true);
80 | String type = call.getString("type", defaults.getString("type"));
81 | String app = call.getString("app", "mailto://");
82 | String chooserHeader = call.getString("Open with", "Open with");
83 | Intent intent = new Intent(Intent.ACTION_SEND);
84 | intent.setType(type);
85 | ArrayList uris = new ArrayList();
86 | if (aliases.has(app)) {
87 | PackageManager pm = getActivity().getPackageManager();
88 | try {
89 | ApplicationInfo info = pm.getApplicationInfo(aliases.getString(app), 0);
90 | if (info.enabled) {
91 | intent.setPackage(info.packageName);
92 | }
93 | } catch (PackageManager.NameNotFoundException ignored) {
94 |
95 | }
96 | }
97 |
98 | try {
99 | List list = attachments.toList();
100 | for (String attachment : list) {
101 | if (attachment.startsWith("_capacitor_")) {
102 | attachment = attachment.replace("_capacitor_", "file://");
103 | }
104 | Uri uri = Uri.parse(attachment);
105 | if (uri != null && uri != Uri.EMPTY) uris.add(uri);
106 | }
107 | } catch (JSONException ignored) {
108 |
109 | }
110 |
111 | if (uris.size() > 1) {
112 | intent.setAction(Intent.ACTION_SEND_MULTIPLE);
113 | intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
114 | intent.putExtra(Intent.EXTRA_STREAM, uris);
115 | } else if (uris.size() == 1) {
116 | intent.putExtra(Intent.EXTRA_STREAM, uris.get(0));
117 | }
118 |
119 | intent.putExtra(Intent.EXTRA_EMAIL, getArray(to));
120 | intent.putExtra(Intent.EXTRA_SUBJECT, subject);
121 | intent.putExtra(Intent.EXTRA_BCC, getArray(bcc));
122 | intent.putExtra(Intent.EXTRA_CC, getArray(cc));
123 |
124 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
125 | intent.putExtra(Intent.EXTRA_TEXT, isHtml ? Html.fromHtml(body, Html.FROM_HTML_MODE_LEGACY).toString() : body);
126 | } else {
127 | intent.putExtra(Intent.EXTRA_TEXT, isHtml ? Html.fromHtml(body).toString() : body);
128 | }
129 |
130 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
131 |
132 | getActivity().startActivity(Intent.createChooser(intent, chooserHeader));
133 | call.success();
134 |
135 | }
136 |
137 | @Override
138 | protected void handleRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
139 | super.handleRequestPermissionsResult(requestCode, permissions, grantResults);
140 | PluginCall call = getSavedCall();
141 | if (requestCode == REQUEST_CODE) {
142 | for (int result : grantResults) {
143 | if (result == PackageManager.PERMISSION_DENIED) {
144 | call.reject("");
145 | }
146 | }
147 | call.resolve();
148 | } else {
149 | call.resolve();
150 | }
151 |
152 | }
153 |
154 | @PluginMethod()
155 | public void isAvailable(PluginCall call) {
156 | String app = call.getString("alias", "");
157 | boolean has = checkPermission();
158 | JSObject object = new JSObject();
159 | PackageManager pm = getActivity().getPackageManager();
160 | if (aliases.has(app)) {
161 | app = aliases.getString(app);
162 | }
163 | object.put("hasAccount", false);
164 |
165 | if (has) {
166 | AccountManager am;
167 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
168 | am = AccountManager.get(getContext());
169 | } else {
170 | am = AccountManager.get(getContext());
171 | }
172 |
173 | Pattern emailPattern = Patterns.EMAIL_ADDRESS;
174 | for (Account account : am.getAccounts()) {
175 | if (emailPattern.matcher(account.name).matches()) {
176 | object.put("hasAccount", true);
177 | }
178 | }
179 |
180 | }
181 |
182 | try {
183 | ApplicationInfo info = pm.getApplicationInfo(app, 0);
184 | object.put("hasApp", true);
185 | } catch (PackageManager.NameNotFoundException e) {
186 | object.put("hasApp", false);
187 | } finally {
188 | call.success(object);
189 | }
190 |
191 | }
192 |
193 | @PluginMethod()
194 | public void openDraft(PluginCall call) {
195 | open(call);
196 | }
197 |
198 | private void requestAccountPermission() {
199 | ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.GET_ACCOUNTS}, REQUEST_CODE);
200 | }
201 |
202 | @PluginMethod()
203 | public void requestPermission(PluginCall call) {
204 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
205 | Intent intent = AccountPicker.newChooseAccountIntent(null, null,
206 | null, false, null, null, null, null);
207 | startActivityForResult(call, intent, REQUEST_CODE);
208 | } else {
209 | requestAccountPermission();
210 | }
211 | }
212 |
213 | private boolean checkPermission() {
214 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
215 | AccountManager am = AccountManager.get(getContext());
216 | return am.getAccounts().length > 0;
217 | }
218 | return (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.GET_ACCOUNTS) == PackageManager.PERMISSION_GRANTED);
219 | }
220 |
221 | @PluginMethod()
222 | public void hasPermission(PluginCall call) {
223 | if (checkPermission()) {
224 | call.resolve();
225 | }
226 | call.reject("");
227 | }
228 |
229 | @PluginMethod()
230 | public void getDefaults(PluginCall call) {
231 | JSObject object = new JSObject();
232 | object.put("value", defaults);
233 | call.resolve(object);
234 | }
235 |
236 | @PluginMethod()
237 | public void getAliases(PluginCall call) {
238 | call.success(aliases);
239 | }
240 |
241 | }
242 |
--------------------------------------------------------------------------------
/demo/ios/App/App.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 48;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; };
11 | 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; };
12 | 504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; };
13 | 504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
14 | 504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
15 | 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
16 | 50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
17 | A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXFileReference section */
21 | 2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = ""; };
22 | 50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = ""; };
23 | 504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
24 | 504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
25 | 504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
26 | 504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
27 | 504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
28 | 504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
29 | 50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = SOURCE_ROOT; };
30 | AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
31 | AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = ""; };
32 | FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = ""; };
33 | /* End PBXFileReference section */
34 |
35 | /* Begin PBXFrameworksBuildPhase section */
36 | 504EC3011FED79650016851F /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */,
41 | );
42 | runOnlyForDeploymentPostprocessing = 0;
43 | };
44 | /* End PBXFrameworksBuildPhase section */
45 |
46 | /* Begin PBXGroup section */
47 | 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = {
48 | isa = PBXGroup;
49 | children = (
50 | AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */,
51 | );
52 | name = Frameworks;
53 | sourceTree = "";
54 | };
55 | 504EC2FB1FED79650016851F = {
56 | isa = PBXGroup;
57 | children = (
58 | 504EC3061FED79650016851F /* App */,
59 | 504EC3051FED79650016851F /* Products */,
60 | 7F8756D8B27F46E3366F6CEA /* Pods */,
61 | 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */,
62 | );
63 | sourceTree = "";
64 | };
65 | 504EC3051FED79650016851F /* Products */ = {
66 | isa = PBXGroup;
67 | children = (
68 | 504EC3041FED79650016851F /* App.app */,
69 | );
70 | name = Products;
71 | sourceTree = "";
72 | };
73 | 504EC3061FED79650016851F /* App */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 50379B222058CBB4000EE86E /* capacitor.config.json */,
77 | 504EC3071FED79650016851F /* AppDelegate.swift */,
78 | 504EC30B1FED79650016851F /* Main.storyboard */,
79 | 504EC30E1FED79650016851F /* Assets.xcassets */,
80 | 504EC3101FED79650016851F /* LaunchScreen.storyboard */,
81 | 504EC3131FED79650016851F /* Info.plist */,
82 | 2FAD9762203C412B000D30F8 /* config.xml */,
83 | 50B271D01FEDC1A000F3C39B /* public */,
84 | );
85 | path = App;
86 | sourceTree = "";
87 | };
88 | 7F8756D8B27F46E3366F6CEA /* Pods */ = {
89 | isa = PBXGroup;
90 | children = (
91 | FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */,
92 | AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */,
93 | );
94 | name = Pods;
95 | sourceTree = "";
96 | };
97 | /* End PBXGroup section */
98 |
99 | /* Begin PBXNativeTarget section */
100 | 504EC3031FED79650016851F /* App */ = {
101 | isa = PBXNativeTarget;
102 | buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */;
103 | buildPhases = (
104 | 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */,
105 | 504EC3001FED79650016851F /* Sources */,
106 | 504EC3011FED79650016851F /* Frameworks */,
107 | 504EC3021FED79650016851F /* Resources */,
108 | 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */,
109 | );
110 | buildRules = (
111 | );
112 | dependencies = (
113 | );
114 | name = App;
115 | productName = App;
116 | productReference = 504EC3041FED79650016851F /* App.app */;
117 | productType = "com.apple.product-type.application";
118 | };
119 | /* End PBXNativeTarget section */
120 |
121 | /* Begin PBXProject section */
122 | 504EC2FC1FED79650016851F /* Project object */ = {
123 | isa = PBXProject;
124 | attributes = {
125 | LastSwiftUpdateCheck = 0920;
126 | LastUpgradeCheck = 0920;
127 | TargetAttributes = {
128 | 504EC3031FED79650016851F = {
129 | CreatedOnToolsVersion = 9.2;
130 | ProvisioningStyle = Automatic;
131 | };
132 | };
133 | };
134 | buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */;
135 | compatibilityVersion = "Xcode 8.0";
136 | developmentRegion = en;
137 | hasScannedForEncodings = 0;
138 | knownRegions = (
139 | en,
140 | Base,
141 | );
142 | mainGroup = 504EC2FB1FED79650016851F;
143 | productRefGroup = 504EC3051FED79650016851F /* Products */;
144 | projectDirPath = "";
145 | projectRoot = "";
146 | targets = (
147 | 504EC3031FED79650016851F /* App */,
148 | );
149 | };
150 | /* End PBXProject section */
151 |
152 | /* Begin PBXResourcesBuildPhase section */
153 | 504EC3021FED79650016851F /* Resources */ = {
154 | isa = PBXResourcesBuildPhase;
155 | buildActionMask = 2147483647;
156 | files = (
157 | 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */,
158 | 50B271D11FEDC1A000F3C39B /* public in Resources */,
159 | 504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
160 | 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
161 | 504EC30D1FED79650016851F /* Main.storyboard in Resources */,
162 | 2FAD9763203C412B000D30F8 /* config.xml in Resources */,
163 | );
164 | runOnlyForDeploymentPostprocessing = 0;
165 | };
166 | /* End PBXResourcesBuildPhase section */
167 |
168 | /* Begin PBXShellScriptBuildPhase section */
169 | 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = {
170 | isa = PBXShellScriptBuildPhase;
171 | buildActionMask = 2147483647;
172 | files = (
173 | );
174 | inputPaths = (
175 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
176 | "${PODS_ROOT}/Manifest.lock",
177 | );
178 | name = "[CP] Check Pods Manifest.lock";
179 | outputPaths = (
180 | "$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt",
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
185 | showEnvVarsInLog = 0;
186 | };
187 | 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = {
188 | isa = PBXShellScriptBuildPhase;
189 | buildActionMask = 2147483647;
190 | files = (
191 | );
192 | inputPaths = (
193 | "${SRCROOT}/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh",
194 | "${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework",
195 | "${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework",
196 | "${BUILT_PRODUCTS_DIR}/GCDWebServer/GCDWebServer.framework",
197 | "${BUILT_PRODUCTS_DIR}/TeamhiveCapacitorEmail/TeamhiveCapacitorEmail.framework",
198 | );
199 | name = "[CP] Embed Pods Frameworks";
200 | outputPaths = (
201 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Capacitor.framework",
202 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cordova.framework",
203 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GCDWebServer.framework",
204 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TeamhiveCapacitorEmail.framework",
205 | );
206 | runOnlyForDeploymentPostprocessing = 0;
207 | shellPath = /bin/sh;
208 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n";
209 | showEnvVarsInLog = 0;
210 | };
211 | /* End PBXShellScriptBuildPhase section */
212 |
213 | /* Begin PBXSourcesBuildPhase section */
214 | 504EC3001FED79650016851F /* Sources */ = {
215 | isa = PBXSourcesBuildPhase;
216 | buildActionMask = 2147483647;
217 | files = (
218 | 504EC3081FED79650016851F /* AppDelegate.swift in Sources */,
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | };
222 | /* End PBXSourcesBuildPhase section */
223 |
224 | /* Begin PBXVariantGroup section */
225 | 504EC30B1FED79650016851F /* Main.storyboard */ = {
226 | isa = PBXVariantGroup;
227 | children = (
228 | 504EC30C1FED79650016851F /* Base */,
229 | );
230 | name = Main.storyboard;
231 | sourceTree = "";
232 | };
233 | 504EC3101FED79650016851F /* LaunchScreen.storyboard */ = {
234 | isa = PBXVariantGroup;
235 | children = (
236 | 504EC3111FED79650016851F /* Base */,
237 | );
238 | name = LaunchScreen.storyboard;
239 | sourceTree = "";
240 | };
241 | /* End PBXVariantGroup section */
242 |
243 | /* Begin XCBuildConfiguration section */
244 | 504EC3141FED79650016851F /* Debug */ = {
245 | isa = XCBuildConfiguration;
246 | buildSettings = {
247 | ALWAYS_SEARCH_USER_PATHS = NO;
248 | CLANG_ANALYZER_NONNULL = YES;
249 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
250 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
251 | CLANG_CXX_LIBRARY = "libc++";
252 | CLANG_ENABLE_MODULES = YES;
253 | CLANG_ENABLE_OBJC_ARC = YES;
254 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
255 | CLANG_WARN_BOOL_CONVERSION = YES;
256 | CLANG_WARN_COMMA = YES;
257 | CLANG_WARN_CONSTANT_CONVERSION = YES;
258 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
259 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
260 | CLANG_WARN_EMPTY_BODY = YES;
261 | CLANG_WARN_ENUM_CONVERSION = YES;
262 | CLANG_WARN_INFINITE_RECURSION = YES;
263 | CLANG_WARN_INT_CONVERSION = YES;
264 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
265 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
266 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
267 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
268 | CLANG_WARN_STRICT_PROTOTYPES = YES;
269 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
270 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
271 | CLANG_WARN_UNREACHABLE_CODE = YES;
272 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
273 | CODE_SIGN_IDENTITY = "iPhone Developer";
274 | COPY_PHASE_STRIP = NO;
275 | DEBUG_INFORMATION_FORMAT = dwarf;
276 | ENABLE_STRICT_OBJC_MSGSEND = YES;
277 | ENABLE_TESTABILITY = YES;
278 | GCC_C_LANGUAGE_STANDARD = gnu11;
279 | GCC_DYNAMIC_NO_PIC = NO;
280 | GCC_NO_COMMON_BLOCKS = YES;
281 | GCC_OPTIMIZATION_LEVEL = 0;
282 | GCC_PREPROCESSOR_DEFINITIONS = (
283 | "DEBUG=1",
284 | "$(inherited)",
285 | );
286 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
287 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
288 | GCC_WARN_UNDECLARED_SELECTOR = YES;
289 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
290 | GCC_WARN_UNUSED_FUNCTION = YES;
291 | GCC_WARN_UNUSED_VARIABLE = YES;
292 | IPHONEOS_DEPLOYMENT_TARGET = 11.2;
293 | MTL_ENABLE_DEBUG_INFO = YES;
294 | ONLY_ACTIVE_ARCH = YES;
295 | SDKROOT = iphoneos;
296 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
297 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
298 | };
299 | name = Debug;
300 | };
301 | 504EC3151FED79650016851F /* Release */ = {
302 | isa = XCBuildConfiguration;
303 | buildSettings = {
304 | ALWAYS_SEARCH_USER_PATHS = NO;
305 | CLANG_ANALYZER_NONNULL = YES;
306 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
308 | CLANG_CXX_LIBRARY = "libc++";
309 | CLANG_ENABLE_MODULES = YES;
310 | CLANG_ENABLE_OBJC_ARC = YES;
311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
312 | CLANG_WARN_BOOL_CONVERSION = YES;
313 | CLANG_WARN_COMMA = YES;
314 | CLANG_WARN_CONSTANT_CONVERSION = YES;
315 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
316 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
317 | CLANG_WARN_EMPTY_BODY = YES;
318 | CLANG_WARN_ENUM_CONVERSION = YES;
319 | CLANG_WARN_INFINITE_RECURSION = YES;
320 | CLANG_WARN_INT_CONVERSION = YES;
321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
322 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
323 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
324 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
325 | CLANG_WARN_STRICT_PROTOTYPES = YES;
326 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
327 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
328 | CLANG_WARN_UNREACHABLE_CODE = YES;
329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
330 | CODE_SIGN_IDENTITY = "iPhone Developer";
331 | COPY_PHASE_STRIP = NO;
332 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
333 | ENABLE_NS_ASSERTIONS = NO;
334 | ENABLE_STRICT_OBJC_MSGSEND = YES;
335 | GCC_C_LANGUAGE_STANDARD = gnu11;
336 | GCC_NO_COMMON_BLOCKS = YES;
337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
339 | GCC_WARN_UNDECLARED_SELECTOR = YES;
340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341 | GCC_WARN_UNUSED_FUNCTION = YES;
342 | GCC_WARN_UNUSED_VARIABLE = YES;
343 | IPHONEOS_DEPLOYMENT_TARGET = 11.2;
344 | MTL_ENABLE_DEBUG_INFO = NO;
345 | SDKROOT = iphoneos;
346 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
347 | VALIDATE_PRODUCT = YES;
348 | };
349 | name = Release;
350 | };
351 | 504EC3171FED79650016851F /* Debug */ = {
352 | isa = XCBuildConfiguration;
353 | baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */;
354 | buildSettings = {
355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
356 | CODE_SIGN_STYLE = Automatic;
357 | DEVELOPMENT_TEAM = TG7LSJHB64;
358 | INFOPLIST_FILE = App/Info.plist;
359 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
360 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
361 | OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
362 | PRODUCT_BUNDLE_IDENTIFIER = com.meetmaestro.hive.capacitor.emaildemo;
363 | PRODUCT_NAME = "$(TARGET_NAME)";
364 | SWIFT_VERSION = 4.0;
365 | TARGETED_DEVICE_FAMILY = "1,2";
366 | };
367 | name = Debug;
368 | };
369 | 504EC3181FED79650016851F /* Release */ = {
370 | isa = XCBuildConfiguration;
371 | baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */;
372 | buildSettings = {
373 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
374 | CODE_SIGN_STYLE = Automatic;
375 | DEVELOPMENT_TEAM = TG7LSJHB64;
376 | INFOPLIST_FILE = App/Info.plist;
377 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
378 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
379 | PRODUCT_BUNDLE_IDENTIFIER = com.meetmaestro.hive.capacitor.emaildemo;
380 | PRODUCT_NAME = "$(TARGET_NAME)";
381 | SWIFT_VERSION = 4.0;
382 | TARGETED_DEVICE_FAMILY = "1,2";
383 | };
384 | name = Release;
385 | };
386 | /* End XCBuildConfiguration section */
387 |
388 | /* Begin XCConfigurationList section */
389 | 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = {
390 | isa = XCConfigurationList;
391 | buildConfigurations = (
392 | 504EC3141FED79650016851F /* Debug */,
393 | 504EC3151FED79650016851F /* Release */,
394 | );
395 | defaultConfigurationIsVisible = 0;
396 | defaultConfigurationName = Release;
397 | };
398 | 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = {
399 | isa = XCConfigurationList;
400 | buildConfigurations = (
401 | 504EC3171FED79650016851F /* Debug */,
402 | 504EC3181FED79650016851F /* Release */,
403 | );
404 | defaultConfigurationIsVisible = 0;
405 | defaultConfigurationName = Release;
406 | };
407 | /* End XCConfigurationList section */
408 | };
409 | rootObject = 504EC2FC1FED79650016851F /* Project object */;
410 | }
411 |
--------------------------------------------------------------------------------
/src/ios/Plugin/Plugin.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 48;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */; };
11 | 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */; };
12 | 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; };
13 | 50ADFF97201F53D600D50D53 /* PluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* PluginTests.swift */; };
14 | 50ADFF99201F53D600D50D53 /* Plugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* Plugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
15 | 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; };
16 | 50ADFFA82020EE4F00D50D53 /* Plugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* Plugin.m */; };
17 | 50E1A94820377CB70090CE1A /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* Plugin.swift */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = 50ADFF7F201F53D600D50D53 /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = 50ADFF87201F53D600D50D53;
26 | remoteInfo = Plugin;
27 | };
28 | /* End PBXContainerItemProxy section */
29 |
30 | /* Begin PBXFileReference section */
31 | 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; };
32 | 50ADFF88201F53D600D50D53 /* Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; };
33 | 50ADFF8B201F53D600D50D53 /* Plugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Plugin.h; sourceTree = ""; };
34 | 50ADFF8C201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
35 | 50ADFF91201F53D600D50D53 /* PluginTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PluginTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
36 | 50ADFF96201F53D600D50D53 /* PluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginTests.swift; sourceTree = ""; };
37 | 50ADFF98201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
38 | 50ADFFA52020D75100D50D53 /* Capacitor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Capacitor.framework; sourceTree = BUILT_PRODUCTS_DIR; };
39 | 50ADFFA72020EE4F00D50D53 /* Plugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Plugin.m; sourceTree = ""; };
40 | 50E1A94720377CB70090CE1A /* Plugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Plugin.swift; sourceTree = ""; };
41 | 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig"; sourceTree = ""; };
42 | 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.release.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig"; sourceTree = ""; };
43 | 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.debug.xcconfig"; sourceTree = ""; };
44 | F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.release.xcconfig"; sourceTree = ""; };
45 | F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PluginTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
46 | /* End PBXFileReference section */
47 |
48 | /* Begin PBXFrameworksBuildPhase section */
49 | 50ADFF84201F53D600D50D53 /* Frameworks */ = {
50 | isa = PBXFrameworksBuildPhase;
51 | buildActionMask = 2147483647;
52 | files = (
53 | 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */,
54 | 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */,
55 | );
56 | runOnlyForDeploymentPostprocessing = 0;
57 | };
58 | 50ADFF8E201F53D600D50D53 /* Frameworks */ = {
59 | isa = PBXFrameworksBuildPhase;
60 | buildActionMask = 2147483647;
61 | files = (
62 | 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */,
63 | 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */,
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | /* End PBXFrameworksBuildPhase section */
68 |
69 | /* Begin PBXGroup section */
70 | 50ADFF7E201F53D600D50D53 = {
71 | isa = PBXGroup;
72 | children = (
73 | 50ADFF8A201F53D600D50D53 /* Plugin */,
74 | 50ADFF95201F53D600D50D53 /* PluginTests */,
75 | 50ADFF89201F53D600D50D53 /* Products */,
76 | 8C8E7744173064A9F6D438E3 /* Pods */,
77 | A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */,
78 | );
79 | sourceTree = "";
80 | };
81 | 50ADFF89201F53D600D50D53 /* Products */ = {
82 | isa = PBXGroup;
83 | children = (
84 | 50ADFF88201F53D600D50D53 /* Plugin.framework */,
85 | 50ADFF91201F53D600D50D53 /* PluginTests.xctest */,
86 | );
87 | name = Products;
88 | sourceTree = "";
89 | };
90 | 50ADFF8A201F53D600D50D53 /* Plugin */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 50E1A94720377CB70090CE1A /* Plugin.swift */,
94 | 50ADFF8B201F53D600D50D53 /* Plugin.h */,
95 | 50ADFFA72020EE4F00D50D53 /* Plugin.m */,
96 | 50ADFF8C201F53D600D50D53 /* Info.plist */,
97 | );
98 | path = Plugin;
99 | sourceTree = "";
100 | };
101 | 50ADFF95201F53D600D50D53 /* PluginTests */ = {
102 | isa = PBXGroup;
103 | children = (
104 | 50ADFF96201F53D600D50D53 /* PluginTests.swift */,
105 | 50ADFF98201F53D600D50D53 /* Info.plist */,
106 | );
107 | path = PluginTests;
108 | sourceTree = "";
109 | };
110 | 8C8E7744173064A9F6D438E3 /* Pods */ = {
111 | isa = PBXGroup;
112 | children = (
113 | 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */,
114 | 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */,
115 | 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */,
116 | F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */,
117 | );
118 | name = Pods;
119 | sourceTree = "";
120 | };
121 | A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 50ADFFA52020D75100D50D53 /* Capacitor.framework */,
125 | 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */,
126 | F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */,
127 | );
128 | name = Frameworks;
129 | sourceTree = "";
130 | };
131 | /* End PBXGroup section */
132 |
133 | /* Begin PBXHeadersBuildPhase section */
134 | 50ADFF85201F53D600D50D53 /* Headers */ = {
135 | isa = PBXHeadersBuildPhase;
136 | buildActionMask = 2147483647;
137 | files = (
138 | 50ADFF99201F53D600D50D53 /* Plugin.h in Headers */,
139 | );
140 | runOnlyForDeploymentPostprocessing = 0;
141 | };
142 | /* End PBXHeadersBuildPhase section */
143 |
144 | /* Begin PBXNativeTarget section */
145 | 50ADFF87201F53D600D50D53 /* Plugin */ = {
146 | isa = PBXNativeTarget;
147 | buildConfigurationList = 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */;
148 | buildPhases = (
149 | AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */,
150 | 50ADFF83201F53D600D50D53 /* Sources */,
151 | 50ADFF84201F53D600D50D53 /* Frameworks */,
152 | 50ADFF85201F53D600D50D53 /* Headers */,
153 | 50ADFF86201F53D600D50D53 /* Resources */,
154 | AE646EB3107D841B880D174A /* [CP] Copy Pods Resources */,
155 | );
156 | buildRules = (
157 | );
158 | dependencies = (
159 | );
160 | name = Plugin;
161 | productName = Plugin;
162 | productReference = 50ADFF88201F53D600D50D53 /* Plugin.framework */;
163 | productType = "com.apple.product-type.framework";
164 | };
165 | 50ADFF90201F53D600D50D53 /* PluginTests */ = {
166 | isa = PBXNativeTarget;
167 | buildConfigurationList = 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */;
168 | buildPhases = (
169 | 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */,
170 | 50ADFF8D201F53D600D50D53 /* Sources */,
171 | 50ADFF8E201F53D600D50D53 /* Frameworks */,
172 | 50ADFF8F201F53D600D50D53 /* Resources */,
173 | CCA81D3B7E26D0D727D24C84 /* [CP] Embed Pods Frameworks */,
174 | 32BFB60F8ADE8D433EDE204C /* [CP] Copy Pods Resources */,
175 | );
176 | buildRules = (
177 | );
178 | dependencies = (
179 | 50ADFF94201F53D600D50D53 /* PBXTargetDependency */,
180 | );
181 | name = PluginTests;
182 | productName = PluginTests;
183 | productReference = 50ADFF91201F53D600D50D53 /* PluginTests.xctest */;
184 | productType = "com.apple.product-type.bundle.unit-test";
185 | };
186 | /* End PBXNativeTarget section */
187 |
188 | /* Begin PBXProject section */
189 | 50ADFF7F201F53D600D50D53 /* Project object */ = {
190 | isa = PBXProject;
191 | attributes = {
192 | LastSwiftUpdateCheck = 0920;
193 | LastUpgradeCheck = 0920;
194 | ORGANIZATIONNAME = "Max Lynch";
195 | TargetAttributes = {
196 | 50ADFF87201F53D600D50D53 = {
197 | CreatedOnToolsVersion = 9.2;
198 | LastSwiftMigration = 0920;
199 | ProvisioningStyle = Automatic;
200 | };
201 | 50ADFF90201F53D600D50D53 = {
202 | CreatedOnToolsVersion = 9.2;
203 | ProvisioningStyle = Automatic;
204 | };
205 | };
206 | };
207 | buildConfigurationList = 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */;
208 | compatibilityVersion = "Xcode 8.0";
209 | developmentRegion = en;
210 | hasScannedForEncodings = 0;
211 | knownRegions = (
212 | en,
213 | );
214 | mainGroup = 50ADFF7E201F53D600D50D53;
215 | productRefGroup = 50ADFF89201F53D600D50D53 /* Products */;
216 | projectDirPath = "";
217 | projectRoot = "";
218 | targets = (
219 | 50ADFF87201F53D600D50D53 /* Plugin */,
220 | 50ADFF90201F53D600D50D53 /* PluginTests */,
221 | );
222 | };
223 | /* End PBXProject section */
224 |
225 | /* Begin PBXResourcesBuildPhase section */
226 | 50ADFF86201F53D600D50D53 /* Resources */ = {
227 | isa = PBXResourcesBuildPhase;
228 | buildActionMask = 2147483647;
229 | files = (
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | };
233 | 50ADFF8F201F53D600D50D53 /* Resources */ = {
234 | isa = PBXResourcesBuildPhase;
235 | buildActionMask = 2147483647;
236 | files = (
237 | );
238 | runOnlyForDeploymentPostprocessing = 0;
239 | };
240 | /* End PBXResourcesBuildPhase section */
241 |
242 | /* Begin PBXShellScriptBuildPhase section */
243 | 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */ = {
244 | isa = PBXShellScriptBuildPhase;
245 | buildActionMask = 2147483647;
246 | files = (
247 | );
248 | inputPaths = (
249 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
250 | "${PODS_ROOT}/Manifest.lock",
251 | );
252 | name = "[CP] Check Pods Manifest.lock";
253 | outputPaths = (
254 | "$(DERIVED_FILE_DIR)/Pods-PluginTests-checkManifestLockResult.txt",
255 | );
256 | runOnlyForDeploymentPostprocessing = 0;
257 | shellPath = /bin/sh;
258 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
259 | showEnvVarsInLog = 0;
260 | };
261 | 32BFB60F8ADE8D433EDE204C /* [CP] Copy Pods Resources */ = {
262 | isa = PBXShellScriptBuildPhase;
263 | buildActionMask = 2147483647;
264 | files = (
265 | );
266 | inputPaths = (
267 | );
268 | name = "[CP] Copy Pods Resources";
269 | outputPaths = (
270 | );
271 | runOnlyForDeploymentPostprocessing = 0;
272 | shellPath = /bin/sh;
273 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-resources.sh\"\n";
274 | showEnvVarsInLog = 0;
275 | };
276 | AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */ = {
277 | isa = PBXShellScriptBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | );
281 | inputPaths = (
282 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
283 | "${PODS_ROOT}/Manifest.lock",
284 | );
285 | name = "[CP] Check Pods Manifest.lock";
286 | outputPaths = (
287 | "$(DERIVED_FILE_DIR)/Pods-Plugin-checkManifestLockResult.txt",
288 | );
289 | runOnlyForDeploymentPostprocessing = 0;
290 | shellPath = /bin/sh;
291 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
292 | showEnvVarsInLog = 0;
293 | };
294 | AE646EB3107D841B880D174A /* [CP] Copy Pods Resources */ = {
295 | isa = PBXShellScriptBuildPhase;
296 | buildActionMask = 2147483647;
297 | files = (
298 | );
299 | inputPaths = (
300 | );
301 | name = "[CP] Copy Pods Resources";
302 | outputPaths = (
303 | );
304 | runOnlyForDeploymentPostprocessing = 0;
305 | shellPath = /bin/sh;
306 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-resources.sh\"\n";
307 | showEnvVarsInLog = 0;
308 | };
309 | CCA81D3B7E26D0D727D24C84 /* [CP] Embed Pods Frameworks */ = {
310 | isa = PBXShellScriptBuildPhase;
311 | buildActionMask = 2147483647;
312 | files = (
313 | );
314 | inputPaths = (
315 | "${SRCROOT}/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh",
316 | "${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework",
317 | "${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework",
318 | "${BUILT_PRODUCTS_DIR}/GCDWebServer/GCDWebServer.framework",
319 | );
320 | name = "[CP] Embed Pods Frameworks";
321 | outputPaths = (
322 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Capacitor.framework",
323 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cordova.framework",
324 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GCDWebServer.framework",
325 | );
326 | runOnlyForDeploymentPostprocessing = 0;
327 | shellPath = /bin/sh;
328 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh\"\n";
329 | showEnvVarsInLog = 0;
330 | };
331 | /* End PBXShellScriptBuildPhase section */
332 |
333 | /* Begin PBXSourcesBuildPhase section */
334 | 50ADFF83201F53D600D50D53 /* Sources */ = {
335 | isa = PBXSourcesBuildPhase;
336 | buildActionMask = 2147483647;
337 | files = (
338 | 50E1A94820377CB70090CE1A /* Plugin.swift in Sources */,
339 | 50ADFFA82020EE4F00D50D53 /* Plugin.m in Sources */,
340 | );
341 | runOnlyForDeploymentPostprocessing = 0;
342 | };
343 | 50ADFF8D201F53D600D50D53 /* Sources */ = {
344 | isa = PBXSourcesBuildPhase;
345 | buildActionMask = 2147483647;
346 | files = (
347 | 50ADFF97201F53D600D50D53 /* PluginTests.swift in Sources */,
348 | );
349 | runOnlyForDeploymentPostprocessing = 0;
350 | };
351 | /* End PBXSourcesBuildPhase section */
352 |
353 | /* Begin PBXTargetDependency section */
354 | 50ADFF94201F53D600D50D53 /* PBXTargetDependency */ = {
355 | isa = PBXTargetDependency;
356 | target = 50ADFF87201F53D600D50D53 /* Plugin */;
357 | targetProxy = 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */;
358 | };
359 | /* End PBXTargetDependency section */
360 |
361 | /* Begin XCBuildConfiguration section */
362 | 50ADFF9A201F53D600D50D53 /* Debug */ = {
363 | isa = XCBuildConfiguration;
364 | buildSettings = {
365 | ALWAYS_SEARCH_USER_PATHS = NO;
366 | CLANG_ANALYZER_NONNULL = YES;
367 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
368 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
369 | CLANG_CXX_LIBRARY = "libc++";
370 | CLANG_ENABLE_MODULES = YES;
371 | CLANG_ENABLE_OBJC_ARC = YES;
372 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
373 | CLANG_WARN_BOOL_CONVERSION = YES;
374 | CLANG_WARN_COMMA = YES;
375 | CLANG_WARN_CONSTANT_CONVERSION = YES;
376 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
377 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
378 | CLANG_WARN_EMPTY_BODY = YES;
379 | CLANG_WARN_ENUM_CONVERSION = YES;
380 | CLANG_WARN_INFINITE_RECURSION = YES;
381 | CLANG_WARN_INT_CONVERSION = YES;
382 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
383 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
384 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
385 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
386 | CLANG_WARN_STRICT_PROTOTYPES = YES;
387 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
388 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
389 | CLANG_WARN_UNREACHABLE_CODE = YES;
390 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
391 | CODE_SIGN_IDENTITY = "iPhone Developer";
392 | COPY_PHASE_STRIP = NO;
393 | CURRENT_PROJECT_VERSION = 1;
394 | DEBUG_INFORMATION_FORMAT = dwarf;
395 | ENABLE_STRICT_OBJC_MSGSEND = YES;
396 | ENABLE_TESTABILITY = YES;
397 | GCC_C_LANGUAGE_STANDARD = gnu11;
398 | GCC_DYNAMIC_NO_PIC = NO;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_OPTIMIZATION_LEVEL = 0;
401 | GCC_PREPROCESSOR_DEFINITIONS = (
402 | "DEBUG=1",
403 | "$(inherited)",
404 | );
405 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
406 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
407 | GCC_WARN_UNDECLARED_SELECTOR = YES;
408 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
409 | GCC_WARN_UNUSED_FUNCTION = YES;
410 | GCC_WARN_UNUSED_VARIABLE = YES;
411 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
412 | MTL_ENABLE_DEBUG_INFO = YES;
413 | ONLY_ACTIVE_ARCH = YES;
414 | SDKROOT = iphoneos;
415 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
416 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
417 | VERSIONING_SYSTEM = "apple-generic";
418 | VERSION_INFO_PREFIX = "";
419 | };
420 | name = Debug;
421 | };
422 | 50ADFF9B201F53D600D50D53 /* Release */ = {
423 | isa = XCBuildConfiguration;
424 | buildSettings = {
425 | ALWAYS_SEARCH_USER_PATHS = NO;
426 | CLANG_ANALYZER_NONNULL = YES;
427 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
428 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
429 | CLANG_CXX_LIBRARY = "libc++";
430 | CLANG_ENABLE_MODULES = YES;
431 | CLANG_ENABLE_OBJC_ARC = YES;
432 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
433 | CLANG_WARN_BOOL_CONVERSION = YES;
434 | CLANG_WARN_COMMA = YES;
435 | CLANG_WARN_CONSTANT_CONVERSION = YES;
436 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
437 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
438 | CLANG_WARN_EMPTY_BODY = YES;
439 | CLANG_WARN_ENUM_CONVERSION = YES;
440 | CLANG_WARN_INFINITE_RECURSION = YES;
441 | CLANG_WARN_INT_CONVERSION = YES;
442 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
443 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
444 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
445 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
446 | CLANG_WARN_STRICT_PROTOTYPES = YES;
447 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
448 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
449 | CLANG_WARN_UNREACHABLE_CODE = YES;
450 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
451 | CODE_SIGN_IDENTITY = "iPhone Developer";
452 | COPY_PHASE_STRIP = NO;
453 | CURRENT_PROJECT_VERSION = 1;
454 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
455 | ENABLE_NS_ASSERTIONS = NO;
456 | ENABLE_STRICT_OBJC_MSGSEND = YES;
457 | GCC_C_LANGUAGE_STANDARD = gnu11;
458 | GCC_NO_COMMON_BLOCKS = YES;
459 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
460 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
461 | GCC_WARN_UNDECLARED_SELECTOR = YES;
462 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
463 | GCC_WARN_UNUSED_FUNCTION = YES;
464 | GCC_WARN_UNUSED_VARIABLE = YES;
465 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
466 | MTL_ENABLE_DEBUG_INFO = NO;
467 | SDKROOT = iphoneos;
468 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
469 | VALIDATE_PRODUCT = YES;
470 | VERSIONING_SYSTEM = "apple-generic";
471 | VERSION_INFO_PREFIX = "";
472 | };
473 | name = Release;
474 | };
475 | 50ADFF9D201F53D600D50D53 /* Debug */ = {
476 | isa = XCBuildConfiguration;
477 | baseConfigurationReference = 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */;
478 | buildSettings = {
479 | CLANG_ENABLE_MODULES = YES;
480 | CODE_SIGN_IDENTITY = "";
481 | CODE_SIGN_STYLE = Automatic;
482 | DEFINES_MODULE = YES;
483 | DYLIB_COMPATIBILITY_VERSION = 1;
484 | DYLIB_CURRENT_VERSION = 1;
485 | DYLIB_INSTALL_NAME_BASE = "@rpath";
486 | INFOPLIST_FILE = Plugin/Info.plist;
487 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
488 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
489 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)";
490 | ONLY_ACTIVE_ARCH = YES;
491 | PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;
492 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
493 | SKIP_INSTALL = YES;
494 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
495 | SWIFT_VERSION = 4.0;
496 | TARGETED_DEVICE_FAMILY = "1,2";
497 | };
498 | name = Debug;
499 | };
500 | 50ADFF9E201F53D600D50D53 /* Release */ = {
501 | isa = XCBuildConfiguration;
502 | baseConfigurationReference = 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */;
503 | buildSettings = {
504 | CLANG_ENABLE_MODULES = YES;
505 | CODE_SIGN_IDENTITY = "";
506 | CODE_SIGN_STYLE = Automatic;
507 | DEFINES_MODULE = YES;
508 | DYLIB_COMPATIBILITY_VERSION = 1;
509 | DYLIB_CURRENT_VERSION = 1;
510 | DYLIB_INSTALL_NAME_BASE = "@rpath";
511 | INFOPLIST_FILE = Plugin/Info.plist;
512 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
513 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
515 | ONLY_ACTIVE_ARCH = NO;
516 | PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;
517 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
518 | SKIP_INSTALL = YES;
519 | SWIFT_VERSION = 4.0;
520 | TARGETED_DEVICE_FAMILY = "1,2";
521 | };
522 | name = Release;
523 | };
524 | 50ADFFA0201F53D600D50D53 /* Debug */ = {
525 | isa = XCBuildConfiguration;
526 | baseConfigurationReference = 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */;
527 | buildSettings = {
528 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
529 | CODE_SIGN_STYLE = Automatic;
530 | INFOPLIST_FILE = PluginTests/Info.plist;
531 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
532 | PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests;
533 | PRODUCT_NAME = "$(TARGET_NAME)";
534 | SWIFT_VERSION = 4.0;
535 | TARGETED_DEVICE_FAMILY = "1,2";
536 | };
537 | name = Debug;
538 | };
539 | 50ADFFA1201F53D600D50D53 /* Release */ = {
540 | isa = XCBuildConfiguration;
541 | baseConfigurationReference = F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */;
542 | buildSettings = {
543 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
544 | CODE_SIGN_STYLE = Automatic;
545 | INFOPLIST_FILE = PluginTests/Info.plist;
546 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
547 | PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests;
548 | PRODUCT_NAME = "$(TARGET_NAME)";
549 | SWIFT_VERSION = 4.0;
550 | TARGETED_DEVICE_FAMILY = "1,2";
551 | };
552 | name = Release;
553 | };
554 | /* End XCBuildConfiguration section */
555 |
556 | /* Begin XCConfigurationList section */
557 | 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */ = {
558 | isa = XCConfigurationList;
559 | buildConfigurations = (
560 | 50ADFF9A201F53D600D50D53 /* Debug */,
561 | 50ADFF9B201F53D600D50D53 /* Release */,
562 | );
563 | defaultConfigurationIsVisible = 0;
564 | defaultConfigurationName = Release;
565 | };
566 | 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */ = {
567 | isa = XCConfigurationList;
568 | buildConfigurations = (
569 | 50ADFF9D201F53D600D50D53 /* Debug */,
570 | 50ADFF9E201F53D600D50D53 /* Release */,
571 | );
572 | defaultConfigurationIsVisible = 0;
573 | defaultConfigurationName = Release;
574 | };
575 | 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */ = {
576 | isa = XCConfigurationList;
577 | buildConfigurations = (
578 | 50ADFFA0201F53D600D50D53 /* Debug */,
579 | 50ADFFA1201F53D600D50D53 /* Release */,
580 | );
581 | defaultConfigurationIsVisible = 0;
582 | defaultConfigurationName = Release;
583 | };
584 | /* End XCConfigurationList section */
585 | };
586 | rootObject = 50ADFF7F201F53D600D50D53 /* Project object */;
587 | }
588 |
--------------------------------------------------------------------------------