-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from wcwynn/updates-for-1.9
Added example iOS program.
- Loading branch information
Showing
86 changed files
with
14,473 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.DS_Store | ||
example/www/phonegap/* | ||
example/ios/exampleWizAssets.xcodeproj/xcuserdata/* | ||
example/ios/exampleWizAssets.xcodeproj/project.xcworkspace/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
*/ | ||
|
||
#import "CDVAvailability.h" | ||
|
||
#import "CDVPlugin.h" | ||
#import "CDVViewController.h" | ||
#import "CDVCommandDelegate.h" | ||
#import "CDVURLProtocol.h" | ||
#import "CDVInvokedUrlCommand.h" | ||
|
||
#import "CDVAccelerometer.h" | ||
#import "CDVBattery.h" | ||
#import "CDVCamera.h" | ||
#import "CDVCapture.h" | ||
#import "CDVConnection.h" | ||
#import "CDVContact.h" | ||
#import "CDVContacts.h" | ||
#import "CDVCordovaView.h" | ||
#import "CDVDebug.h" | ||
#import "CDVDebugConsole.h" | ||
#import "CDVFile.h" | ||
#import "CDVFileTransfer.h" | ||
#import "CDVLocation.h" | ||
#import "CDVMotion.h" | ||
#import "CDVNotification.h" | ||
#import "CDVPluginResult.h" | ||
#import "CDVReachability.h" | ||
#import "CDVSound.h" | ||
#import "CDVSplashScreen.h" | ||
#import "CDVWhitelist.h" | ||
#import "CDVLocalStorage.h" | ||
|
||
#import "NSData+Base64.h" | ||
#import "NSDictionary+Extensions.h" | ||
#import "NSMutableArray+QueueAdditions.h" | ||
#import "UIDevice+Extensions.h" | ||
|
||
#import "JSONKit.h" | ||
|
43 changes: 43 additions & 0 deletions
43
example/ios/Frameworks/Cordova.framework/Headers/CDVAccelerometer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
*/ | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "CDVPlugin.h" | ||
|
||
|
||
|
||
@interface CDVAccelerometer : CDVPlugin<UIAccelerometerDelegate> | ||
{ | ||
double x; | ||
double y; | ||
double z; | ||
NSTimeInterval timestamp; | ||
} | ||
|
||
@property (readonly, assign) BOOL isRunning; | ||
@property (nonatomic, retain) NSString* callbackId; | ||
|
||
- (CDVAccelerometer*) init; | ||
|
||
- (void)start:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; | ||
- (void)stop:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; | ||
|
||
@end | ||
|
||
|
56 changes: 56 additions & 0 deletions
56
example/ios/Frameworks/Cordova.framework/Headers/CDVAvailability.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
*/ | ||
|
||
#define __CORDOVA_0_9_6 00906 | ||
#define __CORDOVA_1_0_0 10000 | ||
#define __CORDOVA_1_1_0 10100 | ||
#define __CORDOVA_1_2_0 10200 | ||
#define __CORDOVA_1_3_0 10300 | ||
#define __CORDOVA_1_4_0 10400 | ||
#define __CORDOVA_1_4_1 10401 | ||
#define __CORDOVA_1_5_0 10500 | ||
#define __CORDOVA_1_6_0 10600 | ||
#define __CORDOVA_1_6_1 10601 | ||
#define __CORDOVA_1_7_0 10700 | ||
#define __CORDOVA_1_8_0 10800 | ||
#define __CORDOVA_1_8_1 10801 | ||
#define __CORDOVA_1_9_0 10900 | ||
#define __CORDOVA_NA 99999 /* not available */ | ||
|
||
|
||
/* | ||
#if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_1_7_0 | ||
// do something when its at least 1.7.0 | ||
#else | ||
// do something else (non 1.7.0) | ||
#endif | ||
*/ | ||
#ifndef CORDOVA_VERSION_MIN_REQUIRED | ||
#define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_1_9_0 | ||
#endif | ||
|
||
/* | ||
Returns YES if it is at least version specified as NSString(X) | ||
Usage: | ||
if (IsAtLeastiOSVersion(@"5.1")) { | ||
// do something for iOS 5.1 or greater | ||
} | ||
*/ | ||
#define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending) | ||
|
41 changes: 41 additions & 0 deletions
41
example/ios/Frameworks/Cordova.framework/Headers/CDVBattery.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "CDVPlugin.h" | ||
|
||
|
||
@interface CDVBattery : CDVPlugin { | ||
UIDeviceBatteryState state; | ||
float level; | ||
bool isPlugged; | ||
NSString* callbackId; | ||
} | ||
|
||
@property (nonatomic) UIDeviceBatteryState state; | ||
@property (nonatomic) float level; | ||
@property (nonatomic) bool isPlugged; | ||
@property (retain) NSString* callbackId; | ||
|
||
- (void) updateBatteryStatus:(NSNotification*)notification; | ||
- (NSDictionary*) getBatteryStatus; | ||
- (void) start:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; | ||
- (void) stop:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; | ||
- (void)dealloc; | ||
@end |
101 changes: 101 additions & 0 deletions
101
example/ios/Frameworks/Cordova.framework/Headers/CDVCamera.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "CDVPlugin.h" | ||
|
||
enum CDVDestinationType { | ||
DestinationTypeDataUrl = 0, | ||
DestinationTypeFileUri | ||
}; | ||
typedef NSUInteger CDVDestinationType; | ||
|
||
enum CDVEncodingType { | ||
EncodingTypeJPEG = 0, | ||
EncodingTypePNG | ||
}; | ||
typedef NSUInteger CDVEncodingType; | ||
|
||
enum CDVMediaType { | ||
MediaTypePicture = 0, | ||
MediaTypeVideo, | ||
MediaTypeAll | ||
}; | ||
typedef NSUInteger CDVMediaType; | ||
|
||
@interface CDVCameraPicker : UIImagePickerController | ||
{ | ||
} | ||
|
||
|
||
@property (assign) NSInteger quality; | ||
@property (copy) NSString* callbackId; | ||
@property (copy) NSString* postUrl; | ||
@property (nonatomic) enum CDVDestinationType returnType; | ||
@property (nonatomic) enum CDVEncodingType encodingType; | ||
@property (retain) UIPopoverController* popoverController; | ||
@property (assign) CGSize targetSize; | ||
@property (assign) bool correctOrientation; | ||
@property (assign) bool saveToPhotoAlbum; | ||
@property (assign) bool cropToSize; | ||
@property (retain) UIWebView* webView; | ||
@property (assign) BOOL popoverSupported; | ||
|
||
- (void) dealloc; | ||
|
||
@end | ||
|
||
// ======================================================================= // | ||
|
||
@interface CDVCamera : CDVPlugin<UIImagePickerControllerDelegate, | ||
UINavigationControllerDelegate, | ||
UIPopoverControllerDelegate> | ||
{ | ||
} | ||
|
||
@property (retain) CDVCameraPicker* pickerController; | ||
|
||
/* | ||
* getPicture | ||
* | ||
* arguments: | ||
* 1: this is the javascript function that will be called with the results, the first parameter passed to the | ||
* javascript function is the picture as a Base64 encoded string | ||
* 2: this is the javascript function to be called if there was an error | ||
* options: | ||
* quality: integer between 1 and 100 | ||
*/ | ||
- (void) takePicture:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; | ||
- (void) postImage:(UIImage*)anImage withFilename:(NSString*)filename toUrl:(NSURL*)url; | ||
- (void) cleanup:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; | ||
|
||
- (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info; | ||
- (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingImage:(UIImage*)image editingInfo:(NSDictionary*)editingInfo; | ||
- (void)imagePickerControllerDidCancel:(UIImagePickerController*)picker; | ||
- (UIImage*)imageByScalingAndCroppingForSize:(UIImage*)anImage toSize:(CGSize)targetSize; | ||
- (UIImage*)imageByScalingNotCroppingForSize:(UIImage*)anImage toSize:(CGSize)frameSize; | ||
- (UIImage*)imageCorrectedForCaptureOrientation:(UIImage*)anImage; | ||
|
||
- (void) closePicker:(CDVCameraPicker*)picker __attribute__((deprecated)); | ||
- (void) dealloc; | ||
|
||
@end | ||
|
||
|
||
|
Oops, something went wrong.