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

It is not possible to use both ADUtils and ADUtils/Security in a project. #38

Open
laviallb opened this issue May 10, 2023 · 3 comments

Comments

@laviallb
Copy link
Contributor

The main and security podspecs share the same module name; therefore, it is not possible to use both of them inside a project.

the module_name option should be used to differentiate them inside the podspec.

@alexandre-pod
Copy link
Member

It seems to work fine with the current podspec, I am able to use layout util methods and the SecureArchiver in the same project.

I did this in my Podfile:

pod 'ADUtils/Security', '~> 11.0'
pod 'ADUtils', '~> 11.0'

@laviallb
Copy link
Contributor Author

Indeed it works if you install the same set of subspecs, on each framework using the pod. But When having different sets, it does not.

@alexandre-pod
Copy link
Member

Adding module_name to the subspec makes the podspec invalid with the following error:

[!] The `ADUtils` pod failed to validate due to 1 error:
    - ERROR | attributes: Can't set `module_name` attribute for subspecs (in `ADUtils/Security`).

Did you manage to make it work by using module_name ?

Having looked at this issue, it seemd to be well known CocoaPods/CocoaPods#8206, but it does not have a clear solution...

Here some of them I can see working:

  • Split ADUtils pod in 2 pods (ADUtils / ADUtilsSecurity), but I am not sure we want that.
  • Use Swift Package Manager to split the 2 library features

I tried using SPM with the branch feature/expose_security_in_package_swift, but this cause a warning when building the extension:

ld: warning: linking against a dylib which is not safe for use in application extensions: /Users/<user>/Library/Developer/Xcode/DerivedData/test_project-fwgvmmvejfnaycbczvzuwayhorvc/Build/Products/Debug-iphonesimulator/PackageFrameworks/ADUtilsSecurity.framework/ADUtilsSecurity

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