Closed TheArchitect123 closed 6 months ago
Hi there,
Thank you for reporting this. I haven't been able to reproduce this in a fresh cocoapods project, so I think we'll need to take a more in depth look at this. Could you please email support@braze.com to kick off our formal internal support procedure? Having a lot more information about your xcode project and Braze integration would be very helpful here.
Thank you.
I'm statically linking the Firebase Remote Config library. That's probably why there's a duplication issue. It looks like BrazeSDK uses FirebaseCore, and if I'm also linking FirebaseRemoteConfig (which uses Firebase core internally) then it causes the Duplication issue.
I have to statically link the libraries for performance reasons.
Hi,
I've modified my podfile to link statically and have still been unable to reproduce the issue. I think that being able to see parts of your project such as your podfile or even KMP setup might be helpful and I'd encourage you to reach out to support@braze.com so we can get some of that additional context.
Thanks.
Since the issue exists only for iOS, here is a very specific part of the Core Module's gradle file (where the iOS Pod configuration is set)
iosX64()
iosArm64()
iosSimulatorArm64()
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
version = "1.0"
ios.deploymentTarget = "15.0"
podfile = project.file("../sharediOS/Podfile")
framework {
baseName = "shared"
isStatic = true
}
pod("SVProgressHUD"){
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("FBSDKLoginKit"){
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("FBSDKCoreKit"){
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("ApplicationInsights"){
version = "1.0-beta.8"
}
pod("BrazeKit") {
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("SwiftRater") {
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("Dynatrace") {
extraOpts += listOf("-compiler-option", "-fmodules")
}
}
And here's the podfile in use for iOS (On the Xcode side):
target 'sharediOS' do
#use_frameworks!
inhibit_all_warnings!
platform :ios, '15.0'
pod 'shared', :path => '../shared'
pod 'ApplicationInsights', '1.0-beta.8', :inhibit_warnings => true
pod 'BrazeKit', :inhibit_warnings => true
pod 'XCoordinator', :inhibit_warnings => true
pod 'Toast-Swift', :inhibit_warnings => true
pod 'MaterialComponents', :inhibit_warnings => true
pod 'Alertift', :inhibit_warnings => true
pod 'KRProgressHUD', :inhibit_warnings => true
pod 'Dynatrace', :inhibit_warnings => true
pod 'SwiftLint', :inhibit_warnings => true
pod 'lottie-ios',:modular_headers => true, :inhibit_warnings => true
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
end
end
end
Hi,
I can't say I'm super familiar with KMP. Some of our support engineers whose job it is to help clients with their integrations might have seen similar cases in the past. I also think that getting to see your full gradle file and other project related files could end up being very helpful.
Could I ask, is there a particular reason why BrazeKit and ApplicationInsights are listed as both iOS-specific dependencies and dependencies of the core module? (If I'm reading these files correctly.) Also, from some research online, it seems like this might be a known issue when working with static frameworks?
Thanks.
BrazeKit and ApplicationInsights are both exposed as a Platform Services written in Kotlin. This way it keeps the source code all in Kotlin compared to having both Swift/Kotlin logic exposed as interfaces in the shared module.
Also I tried setting the library as dynamic. It doesn't fix the issue. The issue persists. I'll send the braze support team a copy of the gradle file.
And just to confirm, it's this email here? support@braze.com
Hey,
Sorry for missing this yesterday. That is the correct email. Thanks for filing this. I think it'll help move this support issue along.
Thank you.
issue is resolved now. I just added this into top of my pod file. use_frameworks! :linkage => :static
Platform
iOS
Platform Version
iOS 17
Braze SDK Version
5.10.1 (Latest)
Xcode Version
15.0
Computer Processor
Apple (M1)
Repro Rate
100% of the time
Steps To Reproduce
Import into your podfile 'BrazeKit' 'FirebaseRemoteConfig'
Then compile the xcode project.
Expected Behavior
That both libraries can be used at the same time without any issues.
Actual Incorrect Behavior
Compiler error comes up when building the xcode project. This happens everytime if both libraries are imported at the same time.
error: Executing of 'xcodebuild -project Pods.xcodeproj -scheme FirebaseRemoteConfig -sdk iphoneos -configuration Release' failed with code 65 and message:
Verbose Logs
Additional Information
I have a firebase remote config service that fetches key/value pair data from firebase. However I can't seem to use BrazeKit at the same time without seeing this issue.
If I remove one library and keep the other, or vice versa, then it works.