Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1959] Ti.include can not use absolute paths in iOS

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionDuplicate
Resolution Date2011-04-15T03:06:32.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
Reportereddiemonge
AssigneeReggie Seagraves
Created2011-04-15T03:06:31.000+0000
Updated2017-03-09T21:31:28.000+0000

Description

There doesn't seem to be anyway to do an absolute path using Ti.include in iOS. I've tried the following with various modifications of each with no success:

Ti.include('/windows/menu.js');
Ti.include('app://windows/menu.js');
Ti.include(Ti.fileSystem.resourcesDirectory+'/windows/menu.js');

[ERROR] error loading path: file://localhost/Users/eddie/Library/Application%20Support/iPhone%20Simulator/4.1/Applications/CE687F4B-F7E7-4543-8217-898478D9B6B0/Manatee.app//Users/eddie/Dropbox/Mobile%20Apps/Manatee/Resources/windows/menu.js, Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260.)" UserInfo=0x7e34260 {NSFilePath=/Users/eddie/Library/Application Support/iPhone Simulator/4.1/Applications/CE687F4B-F7E7-4543-8217-898478D9B6B0/Manatee.app//Users/eddie/Dropbox/Mobile Apps/Manatee/Resources/windows/menu.js

Comments

  1. Jacques Crocker 2011-04-15

    +1

    There really needs to be some way to include a file via an absolute paths in Titanium. This limitation is forcing me to put every single window in the root directory, which is non-ideal in many cases.

  2. John Welch 2011-04-15

    Also here: https://appcelerator.lighthouseapp.com/projects/32238/tickets/2585-include-paths-for-iphone-and-android-are-not-based-on-the-same-starting-point"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/2585-...

    I'm also waiting on this...

  3. Stephen Tramer 2011-04-15

    Dupe of #2585, as per above.

  4. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source