This project is a fastlane plugin. To get started with fastlane-plugin-ios_dependency_parser, add it to your project by running:
fastlane add_plugin ios_dependency_parserThis plugin analyzes a Cocoapods project dependencies by running pod outdated and parsing the results into an array of Pods available further on in the script via lane_context[SharedValues::POD_ANALYZER_RESULTS].
Pod object structure:
{
pod_name: 'Alamofire',
current_version: '4.8.2',
update_version: '4.9.0',
latest: '5.0.0-rc.2'
}You could use it, for example, to alert you when a dependency used in the project has changed its major version number (e.g. using versionomy).
In this example we'll assume running pod outdated returns the following:
The following pod updates are available:
- Alamofire 4.8.2 -> 4.9.0 (latest version 5.0.0-rc.2)
- Crashlytics 3.13.1 -> 3.13.1 (latest version 3.14.0)
- GoogleMaps 3.2.0 -> 3.2.0 (latest version 3.4.0)
- RxSwift 4.5.0 -> 4.5.0 (latest version 5.0.0)
Our objective will be to retrieve Alamofire's current and latest version numbers with the alamofire lane in the following Fastfile.
fastlane_version "2.131.0"
default_platform :ios
platform :ios do
desc "Check Alamofire version"
lane :alamofire do
parse_pod_dependencies()
pods = lane_context[SharedValues::POD_ANALYZER_RESULTS]
alamofire_pod = pods.detect { |pod| pod.pod_name == 'Alamofire' }
puts("Alamofire current version: #{alamofire_pod.current_version}")
puts("Alamofire latest version: #{alamofire_pod.latest}")
end
endFor any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
For more information about how the fastlane plugin system works, check out the Plugins documentation.
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.
