Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Set “Defines Module” build setting to Yes for “Finch”#42

Open
capnslipp wants to merge 3 commits intozoul:masterfrom
capnslipp:pr/capnslipp-defines-module
Open

Set “Defines Module” build setting to Yes for “Finch”#42
capnslipp wants to merge 3 commits intozoul:masterfrom
capnslipp:pr/capnslipp-defines-module

Conversation

@capnslipp
Copy link
Contributor

  • Set the DEFINES_MODULE build setting for the “Finch” (static lib) target to YES for better interop with Swift— all of Finch's classes will be accessible under the Finch.… “namespace”, or via files with import Finch.

* Set the `DEFINES_MODULE` build setting for the “Finch” (static lib) target to `YES` for better interop with Swift— all of Finch's classes will be accessible under the `Finch.…` “namespace”, or via files with `import Finch`.
* Added to “Finch” target `MODULE_NAME` build setting with fixed value `Finch` _(rather than using `$TARGET_NAME` as I've seen done elsewhere— it's less likely that Finch will change its name than it is likely that an additional target could be added)_.
* Added to “Finch” target `MODULE_VERSION` build setting with value `1.0.0`.
* Updated `Rakefile`'s `replace_version_number()` method to also open the `.pbxproj` file (`Finch.xcodeproj/project.pbxproj`) and replace instances of `MODULE_VERSION = «current-version»;` with `MODULE_VERSION = «new-version»;`.
* New `pbxproj_path()` method works like `podspec_path()` but for the `project.pbxproj` within the 1st-found `*.xcodeproj`.
* Also, changed `gsub` pattern for podspec replacement to use a regex non-capturing group _(`(?: )` instead of `( )`)_ so that back references are more logical _(i.e. `\\1` & `\\2` instead of `\\1` & `\\3`)_ and parallel the `gsub` for pbxproj replacement.
@capnslipp
Copy link
Contributor Author

I noticed that things aren't building/importing as expected, so I'm not quite done with this PR.  Please hold off on merging for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant