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

Swift Package Manager Support for iOS #62

Closed
ReneLindhorst opened this issue Nov 18, 2019 · 6 comments
Closed

Swift Package Manager Support for iOS #62

ReneLindhorst opened this issue Nov 18, 2019 · 6 comments

Comments

@ReneLindhorst
Copy link
Contributor

Is far as I can see it is currently not possible to integrate the LifetimeTracker using the Swift Package Manager into an iOS application. The Package.swift tries to only include the iOS specific UI using the #if os(iOS) ... #else ... #endif but as the manifest is compiled for the host platform (see here), this doesn't work as expected.

As the CocoaPods integration currently doesn't support macOS and there is no macOS "dashboard" #18, I would suggest to remove the #if os(iOS) condition and make the SwiftPM integration at least work for iOS.

@krzysztofzablocki
Copy link
Owner

hey, any chance you could make a pr with that change? happy to merge it

@ReneLindhorst
Copy link
Contributor Author

@krzysztofzablocki Definitely. I just wanted to wait for your reactions ;-)

@krzysztofzablocki
Copy link
Owner

@ReneLindhorst if you can, the best way would be to tweak podspec so that only iOS target imports files under iOS folder, then MacOS still works just without dashboard (you can still log leaks on mac os)

@ReneLindhorst
Copy link
Contributor Author

@krzysztofzablocki Currently the podspec is only configured for iOS and not at all for macOS:
https://github.com/krzysztofzablocki/LifetimeTracker/blob/master/LifetimeTracker.podspec#L12
It would be possible to tweak the podspec to support both but I don't think that this is currently possible with the Package.swift DSL (maybe with 2 different library definitions, but I'm not sure).

@krzysztofzablocki
Copy link
Owner

I think you can leave the swiftpm to only support iOS but just tweak podspec to support both iOS and Mac ?

@ReneLindhorst
Copy link
Contributor Author

That's "fixed". Thanks @krzysztofzablocki

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

No branches or pull requests

2 participants