Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Add .m so that CocoaPods will generate CardIO modulemap #210

Merged
merged 1 commit into from
Jul 25, 2016
Merged

Add .m so that CocoaPods will generate CardIO modulemap #210

merged 1 commit into from
Jul 25, 2016

Conversation

keith
Copy link
Contributor

@keith keith commented Jul 21, 2016

This fixes the issues discussed in #115 and #126 since changing the project structure was nixed as a solution. This allows users to import CardIO from Swift without using a bridging header.

@@ -0,0 +1 @@
// This file exists so that CocoaPods will generate a modulemap for CardIO
Copy link
Member

Choose a reason for hiding this comment

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

Please add links to the issues it fixes.

@josharian
Copy link
Member

LGTM with that tweak, but leaving to others to approve and merge.

@keith
Copy link
Contributor Author

keith commented Jul 21, 2016

Updated!

@keith
Copy link
Contributor Author

keith commented Jul 21, 2016

Another option here if we don't want to opt all users into this behavior is that we can add a subspec that includes this file, but leave the default as it is today.

@keith
Copy link
Contributor Author

keith commented Jul 21, 2016

Let me know if you would prefer that and I can make that change.

@josharian
Copy link
Member

if we don't want to opt all users into this behavior

Are there any downsides to opting everyone in?

@keith
Copy link
Contributor Author

keith commented Jul 21, 2016

Nevermind, this will only affect users who have use_frameworks! so we should be ok here.

@jcayzac
Copy link

jcayzac commented Jul 22, 2016

A cleaner option would be to provide a module map and not rely on cocoapods' automatic one (which didn't properly enable auto-linking with the various system frameworks your framework requires, last time I checked). See the module_map option of the podspec.

@keith
Copy link
Contributor Author

keith commented Jul 22, 2016

Just tried that configuration. It seems like CocoaPods doesn't pick up the modulemap file in this case. It might be because of having multiple .a files.

@bluk bluk merged commit 11d9e71 into card-io:master Jul 25, 2016
@bluk
Copy link
Contributor

bluk commented Jul 25, 2016

LGTM, thanks for your contribution!

@keith keith deleted the ks/cocoapods branch July 25, 2016 16:10
@keith
Copy link
Contributor Author

keith commented Jul 25, 2016

Thank you!

@keith
Copy link
Contributor Author

keith commented Mar 31, 2018

This PR ended up getting reverted because linking failed in some cases. Here's a new version that seems to work correctly with Objective-C and Swift https://github.com/card-io/card.io-iOS-SDK/pull/284/files

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.

4 participants