Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-16004] iOS: Expose current file path and directory path to commonjs module scope. #5131

Closed
wants to merge 1 commit into from

Conversation

euforic
Copy link
Contributor

@euforic euforic commented Dec 17, 2013

[TIMOB-16004] iOS: Expose current file path and directory path to commonjs module scope.

@srahim
Copy link
Contributor

srahim commented Dec 17, 2013

@euforic could you please submit a PR which includes the changes thats only required and not whitespace changes. it would be easier to find the changes you made, so that something important is not missed in CR

tempString =[tempString stringByReplacingOccurrencesOfString:@""" withString:@"\""];

NSString *directory = [[[sourceURL absoluteString] stringByDeletingLastPathComponent] tringByReplacingOccurrencesOfString:@"file:/" withString:@"file:///"];
NSString *filename = [[[sourceURL absoluteString] lastPathComponent] tringByReplacingOccurrencesOfString:@"file:/" withString:@"file:///"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tringByReplacingOccurrencesOfString: should be stringByReplacingOccurrencesOfString

did you try building this ?

@euforic
Copy link
Contributor Author

euforic commented Dec 17, 2013

@srahim sorry I was working from a live build and then copied my changes to the repo. I fixed both issues with the PR

@euforic
Copy link
Contributor Author

euforic commented Jan 8, 2014

@srahim any updates on this ?

@srahim srahim self-assigned this Feb 27, 2014
@ingo
Copy link
Contributor

ingo commented Feb 27, 2014

@euforic. Can you please fix the whitespace?

@srahim
Copy link
Contributor

srahim commented Feb 27, 2014

@euforic could you remove all the whitespace changes. i think everything else looks good.

@euforic
Copy link
Contributor Author

euforic commented Feb 27, 2014

@srahim Fixed

@euforic
Copy link
Contributor Author

euforic commented Mar 28, 2014

@srahim any updates on this ?

@pec1985
Copy link
Contributor

pec1985 commented Apr 17, 2014

Code reviewed and tested. PR REJECTED!
Reason:
On Android the file a.js located in the root of the Resources, when asked for __dirname it returns this:
.
On iOS it returns this:
file:///Users/penrique/Library/Application%20Support/iPhone%20Simulator/7.1-64/Applications/34C10A38-31A4-4850-8211-336EFD27FB06/Titanium.app

@pec1985
Copy link
Contributor

pec1985 commented Apr 22, 2014

Closing PR, duplicate: #5641

@pec1985 pec1985 closed this Apr 22, 2014
@euforic euforic deleted the TIMOB-16004 branch April 23, 2014 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants