-
Notifications
You must be signed in to change notification settings - Fork 129
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
Cannot install with cocoapods without use_frameworks #131
Comments
I also can't use the use_frameworks option because my project depends on other pods that are incompatible with this option. |
hi @amloelxer 👋 thanks for reporting and looking into the issue! you are right, we use a custom you can use Carthage or Swift Package Manager without this problem, but i assume you use only Cocoapods in your projects you can try the snippet below in your target 'Your-Target-Name' do
use_frameworks!
pod 'DatadogSDK'
pod 'YourOtherPod'
...
target 'Your-TestTarget-Name' do
inherit! :search_paths
pod 'YourTestPod'
...
end
end
# the array below needs to include Datadog frameworks and their dependencies
# today we only have Kronos as dependency, that may change one day
dynamic_frameworks = ['DatadogSDK','DatadogSDKObjc','Kronos']
pre_install do |installer|
installer.pod_targets.each do |pod|
if !dynamic_frameworks.include?(pod.name)
def pod.static_framework?;
true
end
def pod.build_type;
Pod::BuildType.static_library
end
end
end
end this code should keep all your other pods static while DatadogSDK being dynamic ✅ i verified the fix by using i hope that solves your problems @amloelxer and @hyling 🤞 IMPORTANT UPDATE:
|
@buranmert thanks so much for the response! I've been swamped with work but will look into this as soon as I have a free moment. |
hi @amloelxer and @hyling, have you had a chance to see if that works for you? |
@buranmert Carthage along side Cocoapods works for me! Thanks for the solution. |
@hyling glad to hear that! |
ℹ️ this issue is fixed in |
The issue
Hey all, first thanks so much working on this, I'm excited to give it a whirl in our app. When trying to install with cocoapods, I get the following error:
Using Swift static libraries with custom module maps is currently not supported. Please build DatadogSDK as a framework or remove the custom module map
. Unfortunately for my team, we can't move touse_frameworks
and need to keep modules. When looking at your custom Datadog module map, I see it is eerily similar to an autogenerated one with the exception of the sudo private module you have set exposing_Datadog_Private
Any reason this can't just be exposed in DatadogObjc and let the autogenerated module map be used (other than the fact you want to discourage 3d party devs from consuming
ObjcExceptionHandler.m
)? Or any easy workarounds short of manually integrating into our project? Thank you for your time.Datadog SDK version:
DatadogSDK (1.2.1)
Last working Datadog SDK version:
First time using
Dependency Manager:
Cocoapods 1.9.1
Other toolset:
N / A
Xcode version:
Version 11.5 (11E608c)
Swift version:
Swift 5
Deployment Target:
iOS 11
macOS version:
Mac OS Catalina v 10.15.2
The text was updated successfully, but these errors were encountered: