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

Different module names in Carthage and Cocoapods #411

Closed
mataspetrikas opened this issue Jan 4, 2018 · 11 comments
Closed

Different module names in Carthage and Cocoapods #411

mataspetrikas opened this issue Jan 4, 2018 · 11 comments

Comments

@mataspetrikas
Copy link

mataspetrikas commented Jan 4, 2018

We are building an iOS framework that includes MQTT-Client-Framework as a dependency. We plan to support both CocoaPods and Carthage for our developers. We have started with Pods, all compiles well but when building the Carthage target we have noticed that we can't include MQTTClient module anymore - it's called 'MQTTFramework' there.

Works only with CocoaPods:
import MQTTClient

Works only with Carthage:
import MQTTFramework

The problem is that we can't use the same codebase for both Carthage and Pods targets.

I understand it might be related to the ckrey -> novastone migration?

If the naming unification is planned for later, can anyone suggest a temporary solution how i could fix it in our project?

@jcavar
Copy link
Contributor

jcavar commented Jan 4, 2018

I don't have experience with Carthage but I don't think this is related to migration (unless I made mistake at some point).

I think it might be just question of renaming MQTTFramework.h to MQTTClient.h?

If you know how to fix it I am happy to accept PR.

@jcavar
Copy link
Contributor

jcavar commented Jan 4, 2018

Actually renaming PRODUCT_NAME should do it I think.
But we could potentially get rid of MQTTFramework.h completely and use only MQTTClient.h.

@mataspetrikas
Copy link
Author

I tried to rename the PRODUCT_NAMEbut it didn't help for some reason. I will try to rename the MQTTFramework.htomorrow and if it works, will provide a PR

@jcavar
Copy link
Contributor

jcavar commented Jan 4, 2018

I am trying now and it seems ok. Have you renamed it in all 3 targets?

@mataspetrikas
Copy link
Author

@jcavar hi Josip, you are right - it was enough to rename the product name in XCode.
The PR: #412

Pls let me know if any considerations about merging it into master

p.s. previuosly I tried to change it manually in the source, but probably missed some additonal setting.

@jcavar
Copy link
Contributor

jcavar commented Jan 5, 2018

Merged, thanks for that. Do you need separate release for this?

@mataspetrikas
Copy link
Author

mataspetrikas commented Jan 5, 2018

@jcavar thanks!
it seems that I might have rushed a bit - when compiling the imported framework in my project I get following error:

/Users/.../Carthage/Build/iOS/MQTTClient.framework/Modules/module.modulemap:2:19: Umbrella header 'MQTTClient.h' not found

do you maybe have a clue what might be causing this?

@mataspetrikas
Copy link
Author

probably I had to update the headers in Build Phases as well! - testing that now, will update my PR

@jcavar
Copy link
Contributor

jcavar commented Jan 5, 2018

Yeah I think MQTTClient.h has to be Public header instead of Project in build settings. And also, with this, I don't know if we need MQTTFramework.h anymore?

@mataspetrikas
Copy link
Author

I removed the MQTTFramework.h
I got so far that the MQTTClient is imported, but noticed that now none of the MQTTSessionManager classes are available here :/
is it because the MQTTClient.h is not importing the MQTTSessionManager.h?

@jcavar
Copy link
Contributor

jcavar commented Jan 5, 2018

It could be. MQTTSessionManager ideally should be separate from MQTTClient but I think you can just import it for now along with other classes.

@jcavar jcavar closed this as completed Jan 8, 2018
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