-
-
Notifications
You must be signed in to change notification settings - Fork 197
Support xcconfig file from plugin - close #883 #910
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
Conversation
f1dd79e
to
dbcb5b0
Compare
@@ -575,6 +604,10 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ | |||
let modulemap = `module ${libraryName} { explicit module ${libraryName} { ${headers.join(" ")} } }`; | |||
this.$fs.writeFile(path.join(headersFolderPath, "module.modulemap"), modulemap).wait(); | |||
} | |||
|
|||
private buildXcconfigContent(xcconfigFilePath: string, xcconfigFileContent: string): string { | |||
return `${os.EOL}// Begin xcconfig - ${xcconfigFilePath} ${os.EOL} ${xcconfigFileContent} ${os.EOL} // End xcconfig ${os.EOL}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change this to #include
directive instead of copy-paste.
d8a2234
to
3844b50
Compare
3844b50
to
86fd968
Compare
✅ |
ping @Fatme I think that this PR is ready to be merged. |
let pluginXcconfigFilePath = path.join(pluginPlatformsFolderPath, "build.xcconfig"); | ||
if(this.$fs.exists(pluginXcconfigFilePath).wait()) { | ||
let contentToWrite = this.buildXcconfigContent(pluginXcconfigFilePath); | ||
this.$fs.appendFile(this.projectXcconfigFilePath, contentToWrite).wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we import the file instead append?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We append an #include "pluginFileXcconfig"
, is that what you mean?
👍 |
Support xcconfig file from plugin - close #883
Set the xcconfig to the project template, so that building from the Xcode project is the same as from the CLI: NativeScript/ios-jsc#302
If the added plugin has a
build.xcconfig
file inplatforms/ios
, an include directive gets appended to thebuild.xcconfig
in the project template.Example (incomplete) Facebook plugin:
FBSDKCoreKit is a static framework and has a dependency to CoreGraphics. So we add it In the build.xcconfig:
OTHER_LDFLAGS = $(inherited) -framework CoreGraphics
.Ping @fealebenpae