-
Notifications
You must be signed in to change notification settings - Fork 333
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
Analytics 4.1.3 Error In CocoaPods Update #989
Comments
+1 this update appears to have broken our ability to update the segment pod, with no clear workaround (also similar to #968 (comment)) |
I'm seeing this also with an internal Cocoapod. (I'm the commentor that @jellis-fox mentions above). #968 seems to be the change that caused this. |
+1 to this. I am also having this issue. Same environment. Setting |
It happens if you also have any Segment integration pods integrated in addition to Segment SDK. Reason: if an app links multiple dynamic libraries that include the same static library, the app will get undefined behavior, since there will be multiple copies of the same static library. Meaning that Segment will be statically linked to your to app and also be statically linked to dynamic Segment Integration pod (also linked to your app), thus duplication of symbols. Workaround: link Segment integration pods manually by just copying source files into your project instead of using Cocoapods. Not ideal, of course, but hopefully Segment integration pods authors will update their repos to fix this problem. |
@sergiymomot I tried including Segment directly into my dynamic framework by copying all the objective-c files from the Segment source code into my framework target. However, I couldn't build the framework because I kept running into an error about "include of non-modular header inside framework module" when I tried to use Segment in my Swift files within the same framework. Looked at https://stackoverflow.com/a/37072619/15261204. Basically I have a dynamic framework that I include in my app target as well as other dynamic frameworks, and I want to be able to use Analytics everywhere and am running into runtime issues where it says duplicate symbols are found. Those issues are due to Analytics now being a static library that I am including in multiple dynamic frameworks, which causes the Analytics code to be copied for each of those dynamic framework targets. |
I was running into a runtime issue related to using CocoaPods to include Analytics in a dynamic framework that I then included as a framework dependency for other dynamic frameworks and an app target. I was getting runtime errors about duplicate symbols found. Dependency looked like this: Shared.framework <-- Feature.framework Shared.framework <-- App target Podfile looked like this:
The fix was not to include pod analytics for all the other frameworks and targets, just Shared, so that Podfile looks like
This fix only works because I use Segment code in my swift files only inside the Shared framework. I create wrapper classes around Segment in Shared, and my other framework and app targets reference these wrapper classes and not the Analytics library directly. |
Looking into this today, FYI. |
+1 this update appears to have broken our ability to update the segment pod |
1 similar comment
+1 this update appears to have broken our ability to update the segment pod |
Will close this because it's a duplicate. Please follow #991 for progress. |
I am attempting to update from Analytics 4.1.2 to 4.1.3, and when I do a
pod update
, I get the following error in the console:[!] The 'Pods-xxxxxxx' target has transitive dependencies that include statically linked binaries: (Analytics)
My Podfile has the
use_frameworks!
flag set, I do not haveuse_frameworks! :linkage => :static
in my Podfile. I even trieduse_frameworks! :linkage => :dynamic
and that did not work. I receive the same error every time I attempt to update.CocoaPods:
1.10.1
Xcode:
12.4 (12D4e)
Platform version (in the Podfile):
platform :ios, '11.0'
Am I missing an obvious step here? Any guidance would be helpful.
The text was updated successfully, but these errors were encountered: