Skip to content

Split Podspec into subspecs #641

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

Merged
merged 3 commits into from
Oct 21, 2023
Merged

Split Podspec into subspecs #641

merged 3 commits into from
Oct 21, 2023

Conversation

benjohnde
Copy link
Contributor

@ryantrem following your remark in #637 this is a first draft of a potential Pod with subspecs.

One could either use:

pod 'zxing-cpp/Core'

or

pod 'zxing-cpp'

which is basically an alias due to the declared dependency for

pod 'zxing-cpp/Wrapper'

@benjohnde
Copy link
Contributor Author

@axxel before this Pod gets published we could also rename the file to ZXingCpp.podspec which is probably more sound with the Swift / iOS naming but in the end more a personal preference.

Do you want the Pod to be published as zxing-cpp or ZXingCpp on CocoaPods? Both is possible, your call! :)

@axxel
Copy link
Collaborator

axxel commented Oct 20, 2023

which is basically an alias due to the declared dependency for

Interesting, I don't see any dependency of the root entity on the Wrapper. Is pod zxing-cpp simply pulling all subspecs?

Do you want the Pod to be published as zxing-cpp or ZXingCpp on CocoaPods?

In my comment I argued that there would be some consistency if we used the term zxing-cpp (see the PyPi situation). I also thought that from an iOS developers perspective who might use SPM (via the github url) and/or CocoaPods (via the pod command), it makes sense that both access paths use the same term (zxing-cpp). On the other hand, if the CocoaPods namespace obviously settled for PascalCase and the s.module_name is ZXingCpp then maybe that internal consistency trumps the other?

Lets vote? (@benjohnde @ryantrem @alexmanzer @parallaxe):
👍 = zxing-cpp
👎 = ZXingCpp

@benjohnde
Copy link
Contributor Author

@axxel good catch! s.default_subspec = 'Wrapper' was missing, my bad! Now my initial post is valid. That's the way CocoaPods recommends to do it: https://guides.cocoapods.org/syntax/podspec.html#default_subspecs

A Pod should make available the full library by default. Users can fine tune their dependencies, and exclude unneeded subspecs, once their requirements are known.

CocoaPods uses the name of the spec which should be the same as the filename as module name. That's why I added the module name as it is different.

The main obstacle to talk about is how the module should be named on CocoaPods, I don't really have an opinion. A weak statement would be that zxing-cpp is probably the better choice as the name of this project and repo is the same.

@alexmanzer
Copy link
Contributor

Lets vote? (@benjohnde @ryantrem @alexmanzer @parallaxe): 👍 = zxing-cpp 👎 = ZXingCpp

Personally I really like zxing-cpp because it's more consistent to this whole repo/project.
But in the iOS world, there is unfortunately another convention regarding the naming of frameworks/libs, so for iOS I would stick with ZXingCpp, as you can see here:
image

@benjohnde
Copy link
Contributor Author

Hey @alexmanzer, as it is committed as of now, the Pod name would be zxing-cpp but the module is named ZXingCpp.

So you would require the Pod zxing-cpp but import ZXingCpp as module. Not quite sure whether this makes a difference in your decision but just to paint the picture in a complete way.

@axxel
Copy link
Collaborator

axxel commented Oct 20, 2023

With 3 votes for zxing-cpp as the CocoaPods name that seems settled. I understand that this is ready for merging, right?

@benjohnde maybe you can give one final look at the multitude of places where a name shows up and make sure they are not somehow contradicting each other: zxing-cpp.podspec: s.name, s.module_name, Package.swift: Package-, Library-, Taget-name, demo.xcodeproj/*

@benjohnde
Copy link
Contributor Author

Awesome!

@axxel I will look into that after the weekend to the latest and also provide a meaningful README section, which is subject to be reviewed by @alexmanzer :)

Do you want to have this placed in the root README or should I use the wrappers/ios/README?

@benjohnde
Copy link
Contributor Author

@axxel I can point to a subfolder for the Pod readme btw https://guides.cocoapods.org/syntax/podspec.html#readme depends on your flavour!

@axxel
Copy link
Collaborator

axxel commented Oct 20, 2023

Do you want to have this placed in the root README or should I use the wrappers/ios/README?

The latter.

@benjohnde
Copy link
Contributor Author

@axxel done. Next steps are:

  • merge
  • prepare new release (i.e. adjust version number and maybe tag of source in the zxing-cpp.podspec file)
  • create new release
  • Then I will push the Spec to CocoaPods
  • that's it

@axxel axxel merged commit 2234668 into zxing-cpp:master Oct 21, 2023
@zxing-cpp zxing-cpp deleted a comment from gitlost Jan 20, 2025
@zxing-cpp zxing-cpp deleted a comment from gitlost Jan 20, 2025
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.

4 participants