You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2015/03/13 16:26:26 UTC
cordova-plugin-file git commit: CB-8659: ios: 4.0.x Compatibility:
Remove use of initWebView method
Repository: cordova-plugin-file
Updated Branches:
refs/heads/master 29804228a -> aff7334cd
CB-8659: ios: 4.0.x Compatibility: Remove use of initWebView method
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/aff7334c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/aff7334c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/aff7334c
Branch: refs/heads/master
Commit: aff7334cdcfb0b2b8bd19c8eef9b0a0a54da167c
Parents: 2980422
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Mar 13 11:00:44 2015 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Mar 13 11:00:44 2015 -0400
----------------------------------------------------------------------
src/ios/CDVFile.m | 45 ++++++++++++++++++---------------------------
1 file changed, 18 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/aff7334c/src/ios/CDVFile.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVFile.m b/src/ios/CDVFile.m
index d06174a..75194e6 100644
--- a/src/ios/CDVFile.m
+++ b/src/ios/CDVFile.m
@@ -285,6 +285,24 @@ NSString* const kCDVFilesystemURLPrefix = @"cdvfile";
- (void)pluginInitialize
{
+ filePlugin = self;
+ [NSURLProtocol registerClass:[CDVFilesystemURLProtocol class]];
+
+ fileSystems_ = [[NSMutableArray alloc] initWithCapacity:3];
+
+ // Get the Library directory path
+ NSArray* paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
+ self.appLibraryPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"files"];
+
+ // Get the Temporary directory path
+ self.appTempPath = [NSTemporaryDirectory()stringByStandardizingPath]; // remove trailing slash from NSTemporaryDirectory()
+
+ // Get the Documents directory path
+ paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ self.rootDocsPath = [paths objectAtIndex:0];
+ self.appDocsPath = [self.rootDocsPath stringByAppendingPathComponent:@"files"];
+
+
NSString *location = nil;
if([self.viewController isKindOfClass:[CDVViewController class]]) {
CDVViewController *vc = (CDVViewController *)self.viewController;
@@ -335,33 +353,6 @@ NSString* const kCDVFilesystemURLPrefix = @"cdvfile";
}
-
-- (id)initWithWebView:(UIWebView*)theWebView
-{
- self = (CDVFile*)[super initWithWebView:theWebView];
- if (self) {
- filePlugin = self;
- [NSURLProtocol registerClass:[CDVFilesystemURLProtocol class]];
-
- fileSystems_ = [[NSMutableArray alloc] initWithCapacity:3];
-
- // Get the Library directory path
- NSArray* paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
- self.appLibraryPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"files"];
-
- // Get the Temporary directory path
- self.appTempPath = [NSTemporaryDirectory()stringByStandardizingPath]; // remove trailing slash from NSTemporaryDirectory()
-
- // Get the Documents directory path
- paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- self.rootDocsPath = [paths objectAtIndex:0];
- self.appDocsPath = [self.rootDocsPath stringByAppendingPathComponent:@"files"];
-
- }
-
- return self;
-}
-
- (CDVFilesystemURL *)fileSystemURLforArg:(NSString *)urlArg
{
CDVFilesystemURL* ret = nil;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org