-
Notifications
You must be signed in to change notification settings - Fork 295
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
Using Adjust as dependency for my framework, but getting error my framework get consumed #582
Comments
Hi @IamSaurav, I am not entirely sure I understand your setup. Can you exaplain it a bit more in detail and what kind of error are you getting? |
Sure @uerceg I have a project (ABC) which is shared as framework. ABC internally use Adjust though pod. I want to create ABC.xcframework and share with other who will be using it. Earlier this was a .framework but now when I create XCFramework and when someone use it in their project, it throws error. The error are ->
When you create XCFramework you need to enable BUILD_LIBRARY_FOR_DISTRIBUTIOn="YES, which I did. Primary reason is Name of the Class is same as name of the Framework. (Both are Adjust) |
Hello @IamSaurav, First of all, could you look at the following thread - is this the same issue you have? Second,
Looking forward to get the detailed information to help you with this issue. Thank you, |
@genadyb Thanks for replying. I did look at the thread but it's hacky way to solve as it find and replace string in compiler generated file .swiftinterface. This may break at any time. I have attached the sample project, please have a look. How have you integrated the Adjust framework into your (ABC) framework via cocoapod - as static library or as a dynamic one.
What type is your framework (ABC), your are building the xcframework based on? Dynamic or static?
What Xcode version are you using?
In case you build your products using any custom script, please share it if possible.
|
Team, Any update on this issue? |
Hi, @IamSaurav . Thank you, |
Hi, @IamSaurav . We looked into this issue and would like to clarify some things:
If this configuration is correct, you will have to distribute your In addition to all mentioned above, it's not clear whether you want to expose Adjust public interface/classes to ABC framework consumers (it was done implicitly in your ABC framework project). So, assuming the configuration and a way of usage in the example projects you've sent is correct, and you are distributing both frameworks, there is indeed an issue you clearly described: And it does related to Adjust So, the fastest way to resolve you problem, as I already mentioned in previous comment, is to remove a redundant In your example case, from:
to:
Currently, we cannot support it automatically using our podspec - we will have to either alter Adjust SDK project (might have a backward compatibility implication for current Adjust SDK users) or publish a new podspec and it might take a while. If you are not supposed to expose any public Adjust symbols, you might consider to integrate Adjust SDK as a static library framework. Please let us know whether it's a possible option for your use case, then we can look into this solution. Thank you, |
@genadyb |
Hi @IamSaurav, I definitely think that we're on the same page when it comes to what the best solution is. 👍 Unfortunately, we are not able to this in short notice. As you might have noticed, major releases haven't been something we were up to lately (it's been more than 7 years since v4 was released). However, we are currently working on pretty big SDK update (feature and structure wise) which we aim to release as v5 later in 2022 and this is the moment when we can also pack this breaking change (among others which v5 will bring) into that release. In the meantime, we are unfortunately unable to introduce any breaking changes to existing users. Thing which might be done (not a huge fan of it since it's not really tidy, but it might work) is to maybe consider pushing new pod to Cocoapods repository where we would fork official SDK version and add the changes so that SDK can work in setup described in this issue. And then the day when v5 is released, we would retire that pod and ask people who are using it to switch to official pod. What are your thoughts on this idea? |
@uerceg |
Hi @IamSaurav We will try a different approach (we'll be testing it this week). Separate pod remains an option, but easier solution might be to make changes which will make our SDK to play nicely with your use case as part of a separate public iOS SDK repo branch and then you can add Adjust via Cocoapods from that branch. Some changes specific to this might be needed to be done on your end (currently appears that we might need rename Adjust class into something else, potentially AdjustSdk and only change you'd need to do would be to replace Will keep you posted on the topic. |
Hello, @IamSaurav.
Please let us know if it works for you. |
Thanks @genadyb for helping on this. However we can't define branch in podspec dependency, because Adjust is a dependency of our framework. So when we will release our framework we need to add Adjust as dependency in podspec. eg. May I know when can we expect a release the fix? |
@genadyb Any ETA for the Xcframework support? |
Because there's a package.swift you can try this brew install mint
mint install unsignedapps/swift-create-xcframework
swift create-xcframework --list-products
swift create-xcframework Target1 Target2 Target3... UPDATE - |
XCFramework support has been added in our latest release version 4.32.1. In case you have any other questions/concerns about this one, feel free to comment/reopen it. Cheers! |
do we have any news on that? I've been trying the same so far with a custom framework instead of Adjust and looks like it's a limitation to the system itself. |
I stumbled across this bug while trying to fix a similar issue in my own library. Seems to be a name resolution limitation of the Swift compiler at this point. |
Hello, @dagronf . Thank you. |
Failed to build module 'ABC.xcframework' for implementation due to the errors above. The textual interface may be broken by project issues or a compiler bug
The text was updated successfully, but these errors were encountered: