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

Allow absolute app path #98

Closed
chirag04 opened this issue Mar 10, 2017 · 9 comments
Closed

Allow absolute app path #98

chirag04 opened this issue Mar 10, 2017 · 9 comments

Comments

@chirag04
Copy link

Right now the detox config in package.json expect the app path to be relative to the current project dir. This is not always true especially in CI environments. Locally, xcode default to /Library/.... which can be overridden but it would be nice to support absolute paths.

"ios-simulator.debug": {
    "app": "~/Users/chirag/Library/Developer/Xcode/DerivedData/comlink-gnjeyymjpticnpbxoszwvizawxui/Build/Products/Debug-iphonesimulator/comlink.app",
    "device": "iPhone 6s"
},
@rotemmiz
Copy link
Member

Hi @chirag04,

Although not technically hard to implement this feature, I am not in favor of adding absolute paths in configuration (of any kind) for the following reasons:

  1. Absolute paths will not work across machines (by definition). If your CI machine has a different user than your development machine, you would have to fiddle with the configuration between these machines.
  2. CI machines should build their artifacts in a specific work dir, not in a global directory. Imagine what happens when you run two concurrent builds on the same machine, will one build delete the artifacts of the other ?
  3. There's an easy way of telling xcodebuild to change the derivedData path, by adding --derivedDataPath relative/path/here.
  4. If you use react-native, that's exactly what react-native run-ios does, and that's a very good practice.

@chirag04
Copy link
Author

@rotemmiz

CI machines should build their artifacts in a specific work dir, not in a global directory. Imagine what happens when you run two concurrent builds on the same machine, will one build delete the artifacts of the other.

CI builds run in containers so they don't override each others artifacts. what i'm saying is that the artifact directory may not always be inside the project work directory. eg:

build 1: artifact directory: /etc/asdeasda-some-container-id/artifacts/app.ipa while the project is at /etc/asdeasda-some-container-id/source/xcodeproject-here

build 2: will essentially have the same path just that he container-id changes above.

Anyway, i think the bigger point here is that it's not always necessary that ipa path will be inside the project directory. it would be nice to support that.

@LeoNatan
Copy link
Contributor

LeoNatan commented Jun 6, 2017

@rotemmiz I think this has been resolved. Right?

@rotemmiz
Copy link
Member

rotemmiz commented Jun 6, 2017

No, we don't support absolute paths. I'm still not convinced it's needed, but PRs for a non breaking support are welcome

@LeoNatan
Copy link
Contributor

LeoNatan commented Jun 6, 2017

What happens if I provide an absolute path in binaryPath?

@seantimm
Copy link

seantimm commented Nov 9, 2017

My CI environment on Bitrise is dumping my archive in an absolute path outside of my project folder. I'll work around it by adding a copy step for now.

@chirag04
Copy link
Author

chirag04 commented Nov 9, 2017

bitrise is exactly the reason why i opened this issue.

@rotemmiz
Copy link
Member

rotemmiz commented Nov 9, 2017

Hey guys,

If this is something you want to take forward a PR would be appreciated. We are unable to put time into this currently.

silyevsk added a commit that referenced this issue Nov 13, 2017
@silyevsk silyevsk self-assigned this Nov 13, 2017
@silyevsk
Copy link
Contributor

Done

@LeoNatan LeoNatan changed the title allow absolute app path Allow absolute app path Nov 15, 2017
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants