Also rename internal "utis" functions
This commit is contained in:
parent
a4439df194
commit
ec4f721270
57
.travis.yml
57
.travis.yml
@ -1,57 +0,0 @@
|
|||||||
# Copyright (c) 2013-2016 by appPlant GmbH. All rights reserved.
|
|
||||||
#
|
|
||||||
# @APPPLANT_LICENSE_HEADER_START@
|
|
||||||
#
|
|
||||||
# This file contains Original Code and/or Modifications of Original Code
|
|
||||||
# as defined in and that are subject to the Apache License
|
|
||||||
# Version 2.0 (the 'License'). You may not use this file except in
|
|
||||||
# compliance with the License. Please obtain a copy of the License at
|
|
||||||
# http://opensource.org/licenses/Apache-2.0/ and read it before using this
|
|
||||||
# file.
|
|
||||||
#
|
|
||||||
# The Original Code and all software distributed under the License are
|
|
||||||
# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
||||||
# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
||||||
# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
||||||
# Please see the License for the specific language governing rights and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
# @APPPLANT_LICENSE_HEADER_END@
|
|
||||||
|
|
||||||
language: objective-c
|
|
||||||
osx_image: xcode8.2
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
- /^feature\//
|
|
||||||
- /^bug\//
|
|
||||||
|
|
||||||
node_js:
|
|
||||||
- 6
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email: false
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- xcrun simctl delete 79C525D3-2383-4201-AC3A-81810F9F4E03
|
|
||||||
|
|
||||||
install:
|
|
||||||
- npm install
|
|
||||||
- npm install -g cordova
|
|
||||||
- brew install gradle
|
|
||||||
- brew install android-sdk
|
|
||||||
- ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk -a -u -t "tools,platform-tools,build-tools-25.0.2,android-25"
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- cordova create myApp org.apache.cordova.myApp myApp
|
|
||||||
- cd myApp
|
|
||||||
- cordova platform add ios@latest android@latest
|
|
||||||
- cordova plugin add cordova-plugin-printer --searchpath ../
|
|
||||||
- cordova platform ls
|
|
||||||
- cordova plugin ls
|
|
||||||
|
|
||||||
script:
|
|
||||||
- cordova build ios
|
|
||||||
- cordova build android
|
|
@ -90,7 +90,7 @@ class PrintManager {
|
|||||||
* List of all printable document types (utis).
|
* List of all printable document types (utis).
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
static JSONArray getPrintableUTIs()
|
static JSONArray getPrintableTypes()
|
||||||
{
|
{
|
||||||
JSONArray utis = new JSONArray();
|
JSONArray utis = new JSONArray();
|
||||||
|
|
||||||
|
@ -65,9 +65,9 @@ public class Printer extends CordovaPlugin {
|
|||||||
{
|
{
|
||||||
check(args.optString(0), callback);
|
check(args.optString(0), callback);
|
||||||
}
|
}
|
||||||
else if (action.equalsIgnoreCase("utis"))
|
else if (action.equalsIgnoreCase("types"))
|
||||||
{
|
{
|
||||||
utis(callback);
|
types(callback);
|
||||||
}
|
}
|
||||||
else if (action.equalsIgnoreCase("print"))
|
else if (action.equalsIgnoreCase("print"))
|
||||||
{
|
{
|
||||||
@ -101,10 +101,10 @@ public class Printer extends CordovaPlugin {
|
|||||||
*
|
*
|
||||||
* @param callback The plugin function to invoke with the result.
|
* @param callback The plugin function to invoke with the result.
|
||||||
*/
|
*/
|
||||||
private void utis (CallbackContext callback)
|
private void types (CallbackContext callback)
|
||||||
{
|
{
|
||||||
cordova.getThreadPool().execute(() -> {
|
cordova.getThreadPool().execute(() -> {
|
||||||
JSONArray utis = PrintManager.getPrintableUTIs();
|
JSONArray utis = PrintManager.getPrintableTypes();
|
||||||
|
|
||||||
PluginResult res = new PluginResult(
|
PluginResult res = new PluginResult(
|
||||||
Status.OK, utis);
|
Status.OK, utis);
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
- (void) check:(CDVInvokedUrlCommand *)command;
|
- (void) check:(CDVInvokedUrlCommand *)command;
|
||||||
|
|
||||||
- (void) utis:(CDVInvokedUrlCommand *)command;
|
- (void) types:(CDVInvokedUrlCommand *)command;
|
||||||
|
|
||||||
- (void) pick:(CDVInvokedUrlCommand *)command;
|
- (void) pick:(CDVInvokedUrlCommand *)command;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
/*
|
/*
|
||||||
* List all printable document types (utis).
|
* List all printable document types (utis).
|
||||||
*/
|
*/
|
||||||
- (void) utis:(CDVInvokedUrlCommand *)command
|
- (void) types:(CDVInvokedUrlCommand *)command
|
||||||
{
|
{
|
||||||
[self.commandDelegate runInBackground:^{
|
[self.commandDelegate runInBackground:^{
|
||||||
NSSet *utis = UIPrintInteractionController.printableUTIs;
|
NSSet *utis = UIPrintInteractionController.printableUTIs;
|
||||||
|
@ -60,7 +60,7 @@ exports.check = function (success, fail, args) {
|
|||||||
*
|
*
|
||||||
* @return [ Void ]
|
* @return [ Void ]
|
||||||
*/
|
*/
|
||||||
exports.utis = function (success, fail, args) {
|
exports.types = function (success, fail, args) {
|
||||||
success([]);
|
success([]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ exports.canPrintItem = function (uri, callback, scope) {
|
|||||||
exports.getPrintableTypes = function (callback, scope) {
|
exports.getPrintableTypes = function (callback, scope) {
|
||||||
var fn = this._createCallbackFn(callback, scope);
|
var fn = this._createCallbackFn(callback, scope);
|
||||||
|
|
||||||
exec(fn, null, 'Printer', 'utis', []);
|
exec(fn, null, 'Printer', 'types', []);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user