├── .gitignore ├── README.md ├── package.json ├── plugin.xml ├── progress.gif ├── src └── ios │ ├── KVNProgressView.xib │ ├── Progress.h │ ├── Progress.m │ └── vendor │ ├── headers │ ├── KVNProgress.h │ ├── KVNProgressConfiguration.h │ ├── UIColor+KVNContrast.h │ ├── UIImage+KVNEmpty.h │ └── UIImage+KVNImageEffects.h │ └── libKVNProgress.a └── www └── progress.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac crap 2 | .DS_Store 3 | 4 | scripts/* 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Progress Plugin for Apache Cordova [![npm version](https://badge.fury.io/js/cordova-plugin-progress.svg)](http://badge.fury.io/js/cordova-plugin-progress) 2 | 3 | **Cordova / PhoneGap Plugin for Progress HUD Notifications via [KVNProgress](https://github.com/kevin-hirsch/KVNProgress).** 4 | 5 | ## Demo 6 | 7 | Cordova Progress 8 | 9 | ## Install 10 | 11 | #### Latest published version on npm (with Cordova CLI >= 5.0.0) 12 | 13 | ``` 14 | cordova plugin add cordova-plugin-progress 15 | ``` 16 | 17 | #### Latest version from GitHub 18 | 19 | ``` 20 | cordova plugin add https://github.com/leecrossley/cordova-plugin-progress.git 21 | ``` 22 | 23 | You **do not** need to reference any JavaScript, the Cordova plugin architecture will add a `progress` object to your root automatically when you build. 24 | 25 | ## Usage 26 | 27 | ### show 28 | 29 | Show the basic indeterminate progress loader. 30 | 31 | ```js 32 | // with success and error handlers 33 | progress.show(successHandler, errorHandler); 34 | 35 | // without callback functions 36 | progress.show(); 37 | ``` 38 | 39 | Show the basic indeterminate progress loader, with text. When text is supplied, the loader width is larger. 40 | 41 | ```js 42 | // with success and error handlers 43 | progress.show(successHandler, errorHandler, {"text": "Loading..."}); 44 | 45 | // with success and error handlers (shorthand) 46 | progress.show(successHandler, errorHandler, "Loading..."); 47 | 48 | // without callback functions 49 | progress.show({"text": "Loading..."}); 50 | 51 | // without callback functions (shorthand) 52 | progress.show("Loading..."); 53 | ``` 54 | 55 | ### update 56 | 57 | Update the loader text on the fly (animated). If the loader was initiated without text, the width will remain smaller than if it was initiated with text. 58 | 59 | ```js 60 | // with success and error handlers 61 | progress.update(successHandler, errorHandler, {"text": "Still loading..."}); 62 | 63 | // with success and error handlers (shorthand) 64 | progress.update(successHandler, errorHandler, "Still loading..."); 65 | 66 | // without callback functions 67 | progress.update({"text": "Still loading..."}); 68 | 69 | // without callback functions (shorthand) 70 | progress.update("Still loading..."); 71 | ``` 72 | 73 | You can also use the update function to remove any previous text (an empty string is treated the same as omitting the string). 74 | 75 | ```js 76 | // with success and error handlers 77 | progress.update(successHandler, errorHandler); 78 | 79 | // without callback functions 80 | progress.update(); 81 | ``` 82 | 83 | ### hide 84 | 85 | Hide the loader. Note that the `successHandler` is called after the loader has completely disappeared. 86 | 87 | ```js 88 | // with success and error handlers 89 | progress.hide(successHandler, errorHandler); 90 | 91 | // without callback functions 92 | progress.hide(); 93 | ``` 94 | 95 | ## Full basic example 96 | 97 | ```js 98 | // after the cordova device ready event has fired 99 | progress.show("Loading..."); 100 | 101 | setTimeout(function () { 102 | progress.update("Still loading..."); 103 | }, 1500); 104 | 105 | setTimeout(function () { 106 | progress.hide(); 107 | }, 3000); 108 | ``` 109 | 110 | ## Platforms 111 | 112 | iOS (7+) only. 113 | 114 | ## License 115 | 116 | [MIT License](http://ilee.mit-license.org) 117 | 118 | [KVNProgress](https://github.com/kevin-hirsch/KVNProgress#license) 119 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-plugin-progress", 3 | "version": "0.3.0", 4 | "author": "Lee Crossley (http://ilee.co.uk/)", 5 | "description": "Cordova / PhoneGap Plugin for Progress HUD Notifications via KVNProgress", 6 | "cordova": { 7 | "id": "cordova-plugin-progress", 8 | "platforms": [ 9 | "ios" 10 | ] 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/leecrossley/cordova-plugin-progress.git" 15 | }, 16 | "keywords": [ 17 | "cordova", 18 | "progress", 19 | "hud", 20 | "notification", 21 | "message", 22 | "toast", 23 | "status", 24 | "overlay", 25 | "loader", 26 | "ecosystem:cordova", 27 | "cordova-ios" 28 | ], 29 | "engines": [ 30 | { 31 | "name": "cordova", 32 | "version": ">=3.0.0" 33 | }, 34 | { 35 | "name": "apple-ios", 36 | "version": ">=8.2.0" 37 | } 38 | ], 39 | "license": "MIT", 40 | "bugs": { 41 | "url": "https://github.com/leecrossley/cordova-plugin-progress/issues" 42 | }, 43 | "homepage": "https://github.com/leecrossley/cordova-plugin-progress#readme" 44 | } 45 | -------------------------------------------------------------------------------- /plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Progress 4 | Lee Crossley (http://ilee.co.uk/) 5 | Cordova / PhoneGap Plugin for Progress HUD Notifications via KVNProgress 6 | cordova, progress, hud, notification, message, toast, status, overlay, loader 7 | MIT 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leecrossley/cordova-plugin-progress/62b5b87cc4b184d2a7d59eb85b5df79ae91cfcc1/progress.gif -------------------------------------------------------------------------------- /src/ios/KVNProgressView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/ios/Progress.h: -------------------------------------------------------------------------------- 1 | // 2 | // Progress.h 3 | // Copyright (c) 2015 Lee Crossley - http://ilee.co.uk 4 | // 5 | 6 | #import "Foundation/Foundation.h" 7 | #import "Cordova/CDV.h" 8 | 9 | @interface Progress : CDVPlugin 10 | 11 | - (void) show:(CDVInvokedUrlCommand*)command; 12 | - (void) update:(CDVInvokedUrlCommand*)command; 13 | - (void) hide:(CDVInvokedUrlCommand*)command; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /src/ios/Progress.m: -------------------------------------------------------------------------------- 1 | // 2 | // Progress.m 3 | // Copyright (c) 2015 Lee Crossley - http://ilee.co.uk 4 | // 5 | 6 | #import "Cordova/CDV.h" 7 | #import "Cordova/CDVViewController.h" 8 | #import "Progress.h" 9 | #import "KVNProgress.h" 10 | 11 | @implementation Progress 12 | 13 | - (void) show:(CDVInvokedUrlCommand*)command; 14 | { 15 | NSMutableDictionary *args = [command.arguments objectAtIndex:0]; 16 | 17 | [KVNProgress showWithStatus:[args objectForKey:@"text"]]; 18 | 19 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] callbackId:command.callbackId]; 20 | } 21 | 22 | - (void) update:(CDVInvokedUrlCommand*)command; 23 | { 24 | NSMutableDictionary *args = [command.arguments objectAtIndex:0]; 25 | 26 | [KVNProgress updateStatus:[args objectForKey:@"text"]]; 27 | 28 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] callbackId:command.callbackId]; 29 | } 30 | 31 | - (void) hide:(CDVInvokedUrlCommand*)command; 32 | { 33 | [KVNProgress dismissWithCompletion:^{ 34 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] callbackId:command.callbackId]; 35 | }]; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /src/ios/vendor/headers/KVNProgress.h: -------------------------------------------------------------------------------- 1 | // 2 | // KVNProgress.h 3 | // KVNProgress 4 | // 5 | // Created by Kevin Hirsch on 24/05/14. 6 | // Copyright (c) 2014 Pinch. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "KVNProgressConfiguration.h" 12 | 13 | typedef void (^KVNCompletionBlock)(void); 14 | 15 | @interface KVNProgress : UIView 16 | 17 | #pragma mark - Configuration 18 | 19 | /** 20 | Configuration of the KVNProgress UI. 21 | By default, equals to [KVNProgressConfiguration defaultConfiguration]. 22 | */ 23 | + (KVNProgressConfiguration *)configuration; 24 | 25 | /** 26 | Changes the configuration of the KVNProgress views. 27 | @param newConfiguration The new configuration for KVNProgress. 28 | */ 29 | + (void)setConfiguration:(KVNProgressConfiguration *)newConfiguration; 30 | 31 | #pragma mark - Loading 32 | 33 | /** Shows an indeterminate progress view without status. */ 34 | + (void)show; 35 | 36 | /** 37 | Shows an indeterminate progress view with the status. 38 | @param status The status to show. 39 | */ 40 | + (void)showWithStatus:(NSString *)status; 41 | 42 | /** 43 | Shows an indeterminate progress view added to superview with status. 44 | @param status The status to show. 45 | @param onView The superview on which to add the progress view. Pass nil to add to main window. 46 | */ 47 | + (void)showWithStatus:(NSString *)status 48 | onView:(UIView *)superview; 49 | 50 | #pragma mark - Progress 51 | 52 | /** 53 | Shows a progress view with a specified progress and no status. 54 | @param progress The progress to display between 0 and 1. 55 | */ 56 | + (void)showProgress:(CGFloat)progress; 57 | 58 | /** 59 | Shows a progress view with a specified progress and status. 60 | @param status The status to show. 61 | */ 62 | + (void)showProgress:(CGFloat)progress 63 | status:(NSString*)status; 64 | 65 | /** 66 | Shows a progress view added to superview with a specified progress and status. 67 | @param status The status to show. 68 | @param onView The superview on which to add the progress view. Pass nil to add to main window. 69 | */ 70 | + (void)showProgress:(CGFloat)progress 71 | status:(NSString*)status 72 | onView:(UIView *)superview; 73 | 74 | #pragma mark - Success 75 | 76 | /** Shows a success view without status. */ 77 | + (void)showSuccess; 78 | 79 | /** 80 | Shows a success view without status. 81 | @param completion The completion handler called after the view is completely dismissed. 82 | */ 83 | + (void)showSuccessWithCompletion:(KVNCompletionBlock)completion; 84 | 85 | /** 86 | Shows a success view with status. 87 | @param status The status to show. 88 | */ 89 | + (void)showSuccessWithStatus:(NSString *)status; 90 | 91 | /** 92 | Shows a success view with status. 93 | @param status The status to show. 94 | @param completion The completion handler called after the view is completely dismissed. 95 | */ 96 | + (void)showSuccessWithStatus:(NSString *)status 97 | completion:(KVNCompletionBlock)completion; 98 | 99 | /** 100 | Shows a success view added to superview with status. 101 | @param status The status to show. 102 | @param onView The superview on which to add the progress view. Pass nil to add to main window. 103 | */ 104 | + (void)showSuccessWithStatus:(NSString *)status 105 | onView:(UIView *)superview; 106 | 107 | /** 108 | Shows a success view added to superview with status. 109 | @param status The status to show. 110 | @param onView The superview on which to add the progress view. Pass nil to add to main window. 111 | @param completion The completion handler called after the view is completely dismissed. 112 | */ 113 | + (void)showSuccessWithStatus:(NSString *)status 114 | onView:(UIView *)superview 115 | completion:(KVNCompletionBlock)completion; 116 | 117 | #pragma mark - Error 118 | 119 | /** Shows an error view without status. */ 120 | + (void)showError; 121 | 122 | /** 123 | Shows an error view without status. 124 | @param completion The completion handler called after the view is completely dismissed. 125 | */ 126 | + (void)showErrorWithCompletion:(KVNCompletionBlock)completion; 127 | 128 | /** 129 | Shows an error view with status. 130 | @param status The status to show. 131 | */ 132 | + (void)showErrorWithStatus:(NSString *)status; 133 | 134 | /** 135 | Shows an error view with status. 136 | @param status The status to show. 137 | @param completion The completion handler called after the view is completely dismissed. 138 | */ 139 | + (void)showErrorWithStatus:(NSString *)status 140 | completion:(KVNCompletionBlock)completion; 141 | 142 | /** 143 | Shows an error view added to superview with status. 144 | @param status The status to show. 145 | @param onView The superview on which to add the progress view. Pass nil to add to main window. 146 | */ 147 | + (void)showErrorWithStatus:(NSString *)status 148 | onView:(UIView *)superview; 149 | 150 | /** 151 | Shows an error view added to superview with status. 152 | @param status The status to show. 153 | @param onView The superview on which to add the progress view. Pass nil to add to main window. 154 | @param completion The completion handler called after the view is completely dismissed. 155 | */ 156 | + (void)showErrorWithStatus:(NSString *)status 157 | onView:(UIView *)superview 158 | completion:(KVNCompletionBlock)completion; 159 | 160 | #pragma mark - Dimiss 161 | 162 | /** 163 | Dismiss progress view with a fade animation. Does nothing if the progress view is not on screen. 164 |

Remark: You may want to use dismissWithCompletion: if KVNMinimumDisplayTime is greater than zero. 165 | @see dismissWithCompletion: 166 | */ 167 | + (void)dismiss; 168 | 169 | /** 170 | Dismiss progress view with a fade animation and call a completion handler when the dismiss process is finished. Does nothing if the progress view is not on screen. 171 |

Remark: This method can be usefull if the KVNMinimumDisplayTime constant is greater than zero to ensure the view is correctly dismissed. 172 | @param completion The completion handler called after the view is completely dismissed. 173 | */ 174 | + (void)dismissWithCompletion:(KVNCompletionBlock)completion; 175 | 176 | #pragma mark - Update 177 | 178 | /** 179 | Changes the loading status while HUD is displayed. 180 | Nothing happens when progress view is not displayed. 181 | @param status The status to show 182 | */ 183 | + (void)updateStatus:(NSString*)status; 184 | 185 | /** 186 | Update the progress loader while HUD is displayed 187 | Nothing happens when progress view is not displayed. 188 | @param progress The progress value between 0 and 1 189 | @param animated Wether or not the change has to be animated 190 | */ 191 | + (void)updateProgress:(CGFloat)progress 192 | animated:(BOOL)animated; 193 | 194 | #pragma mark - Information 195 | 196 | /** 197 | Tell if the progress view is on screen. 198 | @return YES if the progress view is on screen, otherwise NO. 199 | */ 200 | + (BOOL)isVisible; 201 | 202 | @end 203 | -------------------------------------------------------------------------------- /src/ios/vendor/headers/KVNProgressConfiguration.h: -------------------------------------------------------------------------------- 1 | // 2 | // KVNProgressConfiguration.h 3 | // KVNProgress 4 | // 5 | // Created by Kevin Hirsch on 20/12/14. 6 | // Copyright (c) 2014 Pinch. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class KVNProgress; 13 | 14 | typedef void (^KVNTapBlock)(KVNProgress *); 15 | 16 | typedef NS_ENUM(NSUInteger, KVNProgressBackgroundType) { 17 | /** Don't allow user interactions and show a blurred background. Default value. */ 18 | KVNProgressBackgroundTypeBlurred, 19 | /** Don't allow user interactions and show a solid color background. */ 20 | KVNProgressBackgroundTypeSolid, 21 | }; 22 | 23 | /** Configuration of UI for a KVNProgress instance. */ 24 | @interface KVNProgressConfiguration : NSObject 25 | 26 | #pragma mark - Background 27 | 28 | /** Color of the background view. Is not used when backgroundType is KVNProgressBackgroundTypeBlurred. */ 29 | @property (nonatomic) UIColor *backgroundFillColor; 30 | /** Tint color of the background view. Used to tint blurred background only when backgroundType is KVNProgressBackgroundTypeBlurred. */ 31 | @property (nonatomic) UIColor *backgroundTintColor; 32 | /** Tells which background type the HUD will use. */ 33 | @property (nonatomic) KVNProgressBackgroundType backgroundType; 34 | /** Tells wether the HUD is full screen or not. */ 35 | @property (nonatomic, getter = isFullScreen) BOOL fullScreen; 36 | /** 37 | * Tells wether the stop squared button will be shown in the middle of a progress circle or not. 38 | * @remark If no tapBlock is configured, showStop will have no effect. 39 | * tapBlock is executed when the stop button is pressed. 40 | * @see tapBlock 41 | */ 42 | @property (nonatomic, getter = doesShowStop) BOOL showStop; 43 | 44 | #pragma mark - Circle 45 | 46 | /** Color of the circle stroke. */ 47 | @property (nonatomic) UIColor *circleStrokeForegroundColor; 48 | /** Background color of the circle stroke. Used only when view is showing with a progress circle. */ 49 | @property (nonatomic) UIColor *circleStrokeBackgroundColor; 50 | /** background color of the circle. */ 51 | @property (nonatomic) UIColor *circleFillBackgroundColor; 52 | /** Size of the circle. */ 53 | @property (nonatomic) CGFloat circleSize; 54 | /** Relative height of the stop squared button. Between 0 and 1. For example: 0.3 will display a square that has 30% de size of the circle. */ 55 | @property (nonatomic) CGFloat stopRelativeHeight; 56 | /** Width of the circle stroke line. */ 57 | @property (nonatomic) CGFloat lineWidth; 58 | 59 | #pragma mark - Status 60 | 61 | /** Color of the status label. */ 62 | @property (nonatomic) UIColor *statusColor; 63 | /** Font of the status label. */ 64 | @property (nonatomic) UIFont *statusFont; 65 | 66 | #pragma mark - Success/Error 67 | 68 | /** color of the circle and checkmark when showing success. */ 69 | @property (nonatomic) UIColor *successColor; 70 | /** color of the circle and checkmark when showing error. */ 71 | @property (nonatomic) UIColor *errorColor; 72 | /** color of the square when showing stop button. */ 73 | @property (nonatomic) UIColor *stopColor; 74 | 75 | #pragma mark - Display times 76 | 77 | /** The minimum time (in seconds) the hud will be displayed. No matter if dismiss is called. */ 78 | @property (nonatomic) NSTimeInterval minimumDisplayTime; 79 | /** The minimum time (in seconds) the success will be displayed. */ 80 | @property (nonatomic) NSTimeInterval minimumSuccessDisplayTime; 81 | /** The minimum time (in seconds) the error will be displayed. */ 82 | @property (nonatomic) NSTimeInterval minimumErrorDisplayTime; 83 | 84 | #pragma mark - Interaction 85 | 86 | /** 87 | * The block called when the HUD is tapped. 88 | * Use nil for no tap interaction with the HUD. 89 | * Works only when allowUserInteraction is set to NO. 90 | */ 91 | @property (nonatomic, copy) KVNTapBlock tapBlock; 92 | /** 93 | * Enable user interaction with views behind the HUD. Does not work in fullscreen mode. 94 | * Is not compatible with the tapBlock property. 95 | * @see tapBlock 96 | */ 97 | @property (nonatomic, getter = doesAllowUserInteraction) BOOL allowUserInteraction; 98 | 99 | #pragma mark - Helper 100 | 101 | /** Create an instance of KVNProgressConfiguration with default configuration. */ 102 | + (instancetype)defaultConfiguration; 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /src/ios/vendor/headers/UIColor+KVNContrast.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+KVNContrast.h 3 | // KVNProgress 4 | // 5 | // Created by Kevin Hirsch on 13/03/15. 6 | // Copyright (c) 2015 Pinch. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (KVNContrast) 12 | 13 | - (UIStatusBarStyle)statusBarStyleConstrastStyle; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /src/ios/vendor/headers/UIImage+KVNEmpty.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Empty.h 3 | // KVNProgress 4 | // 5 | // Created by Kevin Hirsch on 25/05/14. 6 | // Copyright (c) 2014 Kevin Hirsch. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface UIImage (KVNEmpty) 12 | 13 | + (UIImage *)emptyImage; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /src/ios/vendor/headers/UIImage+KVNImageEffects.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: UIImage+ImageEffects.h 3 | Abstract: This is a category of UIImage that adds methods to apply blur and tint effects to an image. This is the code you’ll want to look out to find out how to use vImage to efficiently calculate a blur. 4 | Version: 1.0 5 | 6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 7 | Inc. ("Apple") in consideration of your agreement to the following 8 | terms, and your use, installation, modification or redistribution of 9 | this Apple software constitutes acceptance of these terms. If you do 10 | not agree with these terms, please do not use, install, modify or 11 | redistribute this Apple software. 12 | 13 | In consideration of your agreement to abide by the following terms, and 14 | subject to these terms, Apple grants you a personal, non-exclusive 15 | license, under Apple's copyrights in this original Apple software (the 16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 17 | Software, with or without modifications, in source and/or binary forms; 18 | provided that if you redistribute the Apple Software in its entirety and 19 | without modifications, you must retain this notice and the following 20 | text and disclaimers in all such redistributions of the Apple Software. 21 | Neither the name, trademarks, service marks or logos of Apple Inc. may 22 | be used to endorse or promote products derived from the Apple Software 23 | without specific prior written permission from Apple. Except as 24 | expressly stated in this notice, no other rights or licenses, express or 25 | implied, are granted by Apple herein, including but not limited to any 26 | patent rights that may be infringed by your derivative works or by other 27 | works in which the Apple Software may be incorporated. 28 | 29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 34 | 35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 42 | POSSIBILITY OF SUCH DAMAGE. 43 | 44 | Copyright (C) 2013 Apple Inc. All Rights Reserved. 45 | 46 | 47 | Copyright © 2013 Apple Inc. All rights reserved. 48 | WWDC 2013 License 49 | 50 | NOTE: This Apple Software was supplied by Apple as part of a WWDC 2013 51 | Session. Please refer to the applicable WWDC 2013 Session for further 52 | information. 53 | 54 | IMPORTANT: This Apple software is supplied to you by Apple Inc. 55 | ("Apple") in consideration of your agreement to the following terms, and 56 | your use, installation, modification or redistribution of this Apple 57 | software constitutes acceptance of these terms. If you do not agree with 58 | these terms, please do not use, install, modify or redistribute this 59 | Apple software. 60 | 61 | In consideration of your agreement to abide by the following terms, and 62 | subject to these terms, Apple grants you a non-exclusive license, under 63 | Apple's copyrights in this original Apple software (the "Apple 64 | Software"), to use, reproduce, modify and redistribute the Apple 65 | Software, with or without modifications, in source and/or binary forms; 66 | provided that if you redistribute the Apple Software in its entirety and 67 | without modifications, you must retain this notice and the following 68 | text and disclaimers in all such redistributions of the Apple Software. 69 | Neither the name, trademarks, service marks or logos of Apple Inc. may 70 | be used to endorse or promote products derived from the Apple Software 71 | without specific prior written permission from Apple. Except as 72 | expressly stated in this notice, no other rights or licenses, express or 73 | implied, are granted by Apple herein, including but not limited to any 74 | patent rights that may be infringed by your derivative works or by other 75 | works in which the Apple Software may be incorporated. 76 | 77 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES 78 | NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE 79 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR 80 | A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 81 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 82 | 83 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 84 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 85 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 86 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 87 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 88 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 89 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 90 | POSSIBILITY OF SUCH DAMAGE. 91 | 92 | EA1002 93 | 5/3/2013 94 | */ 95 | 96 | @import UIKit; 97 | 98 | @interface UIImage (KVNImageEffects) 99 | 100 | - (UIImage *)applyLightEffect; 101 | - (UIImage *)applyExtraLightEffect; 102 | - (UIImage *)applyDarkEffect; 103 | - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor; 104 | 105 | - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage; 106 | 107 | @end 108 | -------------------------------------------------------------------------------- /src/ios/vendor/libKVNProgress.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leecrossley/cordova-plugin-progress/62b5b87cc4b184d2a7d59eb85b5df79ae91cfcc1/src/ios/vendor/libKVNProgress.a -------------------------------------------------------------------------------- /www/progress.js: -------------------------------------------------------------------------------- 1 | 2 | var exec = require("cordova/exec"); 3 | 4 | var Progress = function () { 5 | this.name = "Progress"; 6 | }; 7 | 8 | Progress.prototype.show = function (onSuccess, onError, options) { 9 | if (arguments.length === 1 && typeof (arguments[0]) !== "function") { 10 | options = arguments[0]; 11 | arguments[0] = null; 12 | } 13 | if (typeof (options) === "string") { 14 | options = {"text": options}; 15 | } 16 | if (typeof (options) === "undefined") { 17 | options = {"text": ""}; 18 | } 19 | exec(onSuccess, onError, "Progress", "show", [options]); 20 | }; 21 | 22 | Progress.prototype.update = function (onSuccess, onError, options) { 23 | if (arguments.length === 1 && typeof (arguments[0]) !== "function") { 24 | options = arguments[0]; 25 | arguments[0] = null; 26 | } 27 | if (typeof (options) === "string") { 28 | options = {"text": options}; 29 | } 30 | if (typeof (options) === "undefined") { 31 | options = {"text": ""}; 32 | } 33 | exec(onSuccess, onError, "Progress", "update", [options]); 34 | }; 35 | 36 | Progress.prototype.hide = function (onSuccess, onError) { 37 | exec(onSuccess, onError, "Progress", "hide"); 38 | }; 39 | 40 | module.exports = new Progress(); 41 | --------------------------------------------------------------------------------