Closed tc-sgupta closed 2 years ago
We specify using cocoapods like this
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if ['Mixpanel'].include? target.name
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'MIXPANEL_UNIQUE_DISTINCT_ID=1']
end
end
end
end
@zihejia Could you please help us, how we can execute this code https://github.com/mixpanel/mixpanel-iphone/blob/b213461deae5356be7e917f1addbb3ebffe26b37/Sources/Mixpanel.m#L339 after adding mixpanel using SPM
It is happening because MIXPANEL_UNIQUE_DISTINCT_ID preprocessor is not defined.
hi @tc-sgupta , thanks for bringing it up. We are thinking of making this configurable through API in addition to the preprocessor. So you will be able to set it when initializing the SDK.
@zihejia Thanks, that would be perfect. Is there any ETA on this?
@zihejia Any update on this issue?
@tc-sgupta this is available in v4.1.0, we've added a useUniqueDistinctId
parameter. See: https://github.com/mixpanel/mixpanel-iphone/pull/972
Integration Method: Swift Package Manager Xcode Version: 13.2.1 Library Version: 4.0.0 Platform: iOS Language: Objective-C Description: Where do we specify preprocessor MIXPANEL_UNIQUE_DISTINCT_ID when we add mixpanel using SPM Expected Behavior: