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

Support swift package manager #729

Merged
merged 15 commits into from
Jul 2, 2020
Merged

Support swift package manager #729

merged 15 commits into from
Jul 2, 2020

Conversation

imjoehaines
Copy link
Contributor

@imjoehaines imjoehaines commented Jun 29, 2020

Goal

This PR adds support for Swift Package Manager

This involved moving the header files to a new include directory to match the expected convention for C projects in SPM. This isn't absolutely necessary, for example we could use symlinks instead, but this felt like the cleanest solution

Resolves #407

Changeset

Most of the changes are moving header files into include/Bugsnag. The podspec and Xcode project file have been updated with these new paths too

I've removed some unnecessary imports in BugsnagConfiguration.m. This was part of an effort to split up the package into sup-dependencies which was ultimately abandoned, but I figured this was a useful cleanup anyway. Similarly, BugsnagPlugin was missing an import which causes issues if it's built before the header it relies on is included, so I added that too

Tests

I've tested this in our Swift example app and new Swift projects

Carthage and Cocoapods are tested on CI and I've manually tested them in the example projects & static build. I've also tested that our manual install instructions still work

Package.swift Outdated Show resolved Hide resolved
Package.swift Outdated Show resolved Hide resolved
@tomlongridge tomlongridge self-requested a review June 30, 2020 15:48
.travis.yml Outdated Show resolved Hide resolved
@tomlongridge
Copy link
Contributor

The doc target on the Makefile uses the public_header_files entry to generate docs for each entry. I don't think this will now work with the wildcard - can you check and find an alternative? (It's definitely better with the wildcard, so we should fix the step not the podspec file.)

@imjoehaines
Copy link
Contributor Author

make doc works fine with the wildcard as it uses Dir.glob 🙂 Someone must have seen this coming!

Copy link
Contributor

@tomlongridge tomlongridge left a comment

Choose a reason for hiding this comment

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

LGTM

3A837DD324AA4A0E00A54700 /* XCRemoteSwiftPackageReference "bugsnag-cocoa" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/bugsnag/bugsnag-cocoa.git";
requirement = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change this to "Version Up to next major 6.1.0 < 7" or similar before merging - so that it's correct after release.

@tomlongridge tomlongridge merged commit eae307b into master Jul 2, 2020
@tomlongridge tomlongridge deleted the swift-package-manager branch July 2, 2020 12:43
@tomlongridge tomlongridge restored the swift-package-manager branch July 2, 2020 13:06
@fractalwrench fractalwrench deleted the swift-package-manager branch August 17, 2020 10:11
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.

Add support for Swift Package Manager
3 participants