Skip to content

Commit

Permalink
patch: Adding underlying library version to library field
Browse files Browse the repository at this point in the history
  • Loading branch information
izaaz committed Jun 21, 2024
1 parent 963f48d commit 4bacaaa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ class FlutterLibraryPlugin(val library: String): Plugin {
override lateinit var amplitude: Amplitude

override fun execute(event: BaseEvent): BaseEvent? {
event.library = library
if (event.library == null) {
event.library = library
} else {
event.library = "$library_${event.library}"
}
return super.execute(event)
}
}
7 changes: 5 additions & 2 deletions ios/Classes/FlutterLibraryPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ class FlutterLibraryPlugin: BeforePlugin {
}

override func execute(event: BaseEvent) -> BaseEvent? {
event.library = library

if let eventLibrary = event.library {
event.library = "\(library)_\(eventLibrary)"
} else {
event.library = library
}
return event
}
}
2 changes: 1 addition & 1 deletion ios/amplitude_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'AmplitudeSwift', '~> 1.4.4' # enable default app lifecycle events
s.dependency 'AmplitudeSwift', '~> 1.6' # enable default app lifecycle events

s.ios.deployment_target = '13.0'
end
Expand Down

0 comments on commit 4bacaaa

Please sign in to comment.