SiarheiFedartsou / fastlane-plugin-versioning

Extends fastlane versioning actions. Allows to set/get versions without using agvtool and do some other small tricks.
MIT License
504 stars 60 forks source link

get_version_number_from_xcodeproj and get_build_number_from_xcodeproj causing "Unknown method 'plist'" #52

Closed ppamorim closed 3 years ago

ppamorim commented 4 years ago

Hi, I have a project where these values are set with $(MARKETING_VERSION) for bundle version string and $(CURRENT_PROJECT_VERSION) for bundle version.

I am getting this error:

[23:04:04]: ----------------------------------------
[23:04:04]: --- Step: Verifying fastlane version ---
[23:04:04]: ----------------------------------------
[23:04:04]: Your fastlane version 2.144.0 matches the minimum requirement of 1.109.0  ✅
[23:04:04]: ------------------------------
[23:04:04]: --- Step: default_platform ---
[23:04:04]: ------------------------------
[23:04:04]: The `generated_fastfile_id` action was deprecated, you can remove the line from your `Fastfile`
[23:04:04]: Driving the lane 'bla' 🚀
[23:04:04]: -----------------------------------------------
[23:04:04]: --- Step: get_version_number_from_xcodeproj ---
[23:04:04]: -----------------------------------------------
[23:04:05]: Unknown method 'plist'
+------------------+-----+
|      Lane Context      |
+------------------+-----+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME    |     |
| LANE_NAME        | bla |
+------------------+-----+
[23:04:05]: To call another action from an action use `other_action.plist` instead

By removing build_configuration_name: 'Release' it's working now. But it still a bug, no?

jdouglas-nz commented 4 years ago

hey @ppamorim , there was a PR that I was super slow to get around to merging. This should be fixed in the new 0.4.3 release. please update and get back to me.

alouanemed commented 4 years ago

I am using the latest version and this still occurs.

lukecharman commented 4 years ago

Still seeing this in 0.4.3

jdouglas-nz commented 4 years ago

@lukecharman / @alouanemed : could you please send some snippets of fastfiles so I can figure out what about your setups I haven’t accounted for ?

jefferythomas commented 3 years ago

Sorry, I created a dup (https://github.com/SiarheiFedartsou/fastlane-plugin-versioning/issues/55). Here is what I found. When you have a target and a build_configuration_name.

get_version_number_from_xcodeproj.rb:44

UI.user_error! "Cannot resolve $(MARKETING_VERSION) build setting for #{build_configuration_name}." if plist.nil?

should be

UI.user_error! "Cannot resolve $(MARKETING_VERSION) build setting for #{build_configuration_name}." if version_number.nil?
jdouglas-nz commented 3 years ago

hey team, was hoping someone could have a quick skim through my PR #56 - when I first wrote one of the tests, it crashed which is great! I then made the suggestion @jefferythomas suggested, then said crash went away. My apologies for the crash in the first paste.. copy-paste is dangerous.

jdouglas-nz commented 3 years ago

oof. well, its live now. I just took silence as the delta seems legit. Please reopen this ticket if you are still having issues!