You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Paris Stamatopoulos (JIRA)" <ji...@apache.org> on 2012/09/15 09:29:08 UTC

[jira] [Created] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Paris Stamatopoulos created CB-1475:
---------------------------------------

             Summary: Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
                 Key: CB-1475
                 URL: https://issues.apache.org/jira/browse/CB-1475
             Project: Apache Cordova
          Issue Type: Improvement
          Components: iOS
    Affects Versions: 2.0.0
            Reporter: Paris Stamatopoulos
            Assignee: Shazron Abdullah
            Priority: Minor


Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 

Take this snippet for instance:

NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
    
cdvViewController.wwwFolderName = folderPath;




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505850#comment-13505850 ] 

Michal Mocny commented on CB-1475:
----------------------------------

I havent pushed the patch yet, but I've got url start page working locally (trivial patch, just testing some stuff).
It wasn't really two birds with one stone, so I'll look into relative paths later.

Finally, I suggested on the ML that we change the startPage parameter of CDVViewController to defaultStartPage, since startPage is actually set in AppDelegate, and the startPage value provided in viewcontroller is just a fallback.  Alternatively, just improve documentation so its not easy to make the mistake of changing the wrong one.
                
> Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
> ------------------------------------------------------------------------
>
>                 Key: CB-1475
>                 URL: https://issues.apache.org/jira/browse/CB-1475
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 2.0.0
>            Reporter: Paris Stamatopoulos
>            Assignee: Shazron Abdullah
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 
> Take this snippet for instance:
> NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
> NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
>     
> cdvViewController.wwwFolderName = folderPath;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-1475:
---------------------------------

    Fix Version/s:     (was: 2.2.0)
                   2.3.0

Too late to add a new feature for 2.2.0, punting to 2.3.0
                
> Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
> ------------------------------------------------------------------------
>
>                 Key: CB-1475
>                 URL: https://issues.apache.org/jira/browse/CB-1475
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 2.0.0
>            Reporter: Paris Stamatopoulos
>            Assignee: Shazron Abdullah
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 
> Take this snippet for instance:
> NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
> NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
>     
> cdvViewController.wwwFolderName = folderPath;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-1475:
---------------------------------

    Fix Version/s: 2.2.0
    
> Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
> ------------------------------------------------------------------------
>
>                 Key: CB-1475
>                 URL: https://issues.apache.org/jira/browse/CB-1475
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 2.0.0
>            Reporter: Paris Stamatopoulos
>            Assignee: Shazron Abdullah
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 
> Take this snippet for instance:
> NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
> NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
>     
> cdvViewController.wwwFolderName = folderPath;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506726#comment-13506726 ] 

Michal Mocny commented on CB-1475:
----------------------------------

pushed patch for using url as startpage on ios.  wwwFolderName or startPage must start with "http://", otherwise we fallback to old method.
                
> Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
> ------------------------------------------------------------------------
>
>                 Key: CB-1475
>                 URL: https://issues.apache.org/jira/browse/CB-1475
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 2.0.0
>            Reporter: Paris Stamatopoulos
>            Assignee: Michal Mocny
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 
> Take this snippet for instance:
> NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
> NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
>     
> cdvViewController.wwwFolderName = folderPath;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457421#comment-13457421 ] 

Shazron Abdullah commented on CB-1475:
--------------------------------------

I can see how this might be useful for testing in the iOS Simulator, but not on device where everything is sandboxed though (you can load from the Library/temp/Documents folder of your app of course).

I think a better approach is to add another property to CDVViewController, say "wwwFolderPath" which when set, acts as the base folder.
                
> Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
> ------------------------------------------------------------------------
>
>                 Key: CB-1475
>                 URL: https://issues.apache.org/jira/browse/CB-1475
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 2.0.0
>            Reporter: Paris Stamatopoulos
>            Assignee: Shazron Abdullah
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 
> Take this snippet for instance:
> NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
> NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
>     
> cdvViewController.wwwFolderName = folderPath;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508007#comment-13508007 ] 

Michal Mocny commented on CB-1475:
----------------------------------

Good point on https, patch: https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;a=commit;h=9229bac7b4efdb8105955fcec1c2925d2f357794
                
> Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
> ------------------------------------------------------------------------
>
>                 Key: CB-1475
>                 URL: https://issues.apache.org/jira/browse/CB-1475
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 2.0.0
>            Reporter: Paris Stamatopoulos
>            Assignee: Michal Mocny
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 
> Take this snippet for instance:
> NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
> NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
>     
> cdvViewController.wwwFolderName = folderPath;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michal Mocny reassigned CB-1475:
--------------------------------

    Assignee: Michal Mocny  (was: Shazron Abdullah)
    
> Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
> ------------------------------------------------------------------------
>
>                 Key: CB-1475
>                 URL: https://issues.apache.org/jira/browse/CB-1475
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 2.0.0
>            Reporter: Paris Stamatopoulos
>            Assignee: Michal Mocny
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 
> Take this snippet for instance:
> NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
> NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
>     
> cdvViewController.wwwFolderName = folderPath;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Posted by "Kevin Hawkins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483893#comment-13483893 ] 

Kevin Hawkins commented on CB-1475:
-----------------------------------

I would second the desire to be able to specify an absolute path for the startPage, from a different angle: mimicking Android Cordova's behavior, I would like iOS to be able to specify an absolute web (HTTP(S)) path for the start page as well.

We could kill two birds with one stone in this issue, if we added an additional (BOOL) property specifying whether startPage represented an absolute path or not.
                
> Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
> ------------------------------------------------------------------------
>
>                 Key: CB-1475
>                 URL: https://issues.apache.org/jira/browse/CB-1475
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 2.0.0
>            Reporter: Paris Stamatopoulos
>            Assignee: Shazron Abdullah
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 
> Take this snippet for instance:
> NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
> NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
>     
> cdvViewController.wwwFolderName = folderPath;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1475) Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507809#comment-13507809 ] 

Shazron Abdullah commented on CB-1475:
--------------------------------------

Commit for above: https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;a=commit;h=a952761d
(I suppose we should support https as well)
                
> Allow Cleaver to use as a wwwFolderName an absolute path (eg. ~/Library)
> ------------------------------------------------------------------------
>
>                 Key: CB-1475
>                 URL: https://issues.apache.org/jira/browse/CB-1475
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 2.0.0
>            Reporter: Paris Stamatopoulos
>            Assignee: Michal Mocny
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Currently - (NSString*) pathForResource:(NSString*)resourcepath returns the path based on the current [NSBundle]. However one might be interested in loading the application from an absolute path (e.g. user's ~/Library). 
> Take this snippet for instance:
> NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) lastObject];
> NSString *folderPath   = [libraryPath stringByAppendingPathComponent:@"www"];
>     
> cdvViewController.wwwFolderName = folderPath;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira