Skip to content

Add library with relative path to .xcodeproj file #694

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

Merged
merged 1 commit into from
Jul 28, 2015

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Jul 27, 2015

Fixes #679

@Fatme Fatme added this to the 1.2.2 milestone Jul 27, 2015
@Fatme Fatme added the bug label Jul 27, 2015
@ns-bot
Copy link

ns-bot commented Jul 27, 2015


let project = this.createPbxProj();

project.addFramework(path.join(targetPath, frameworkName + ".framework"), { customFramework: true, embed: true });
let frameworkPath = path.relative("platforms/ios", path.join(targetPath, frameworkName + ".framework"));
Copy link
Contributor

Choose a reason for hiding this comment

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

platforms/ios - will this work on Windows?
Maybe:

let frameworkPath = path.relative(path.join("platforms", "ios"), path.join(targetPath, frameworkName + ".framework"));

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, don't you need full paths on both places:

let frameworkPath = path.relative(path.join(this.$projectData.projectDir, "platforms", "ios"), path.join(fullTargetPath, frameworkName + ".framework"));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"platforms/ios - will this work on Windows?" - This service is executed only on OSX.
"Also, don't you need full paths on both places:" - No, I don't need the fullPath, a just need the relative path to native project.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, it works - but path.join will return a string with backslashes.

@rosen-vladimirov
Copy link
Contributor

👍

Fatme pushed a commit that referenced this pull request Jul 28, 2015
…tive-path

Add library with relative path to .xcodeproj file
@Fatme Fatme merged commit c480c6b into release Jul 28, 2015
@Fatme Fatme deleted the fatme/add-library-with-relative-path branch July 28, 2015 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants