2

I am trying to increment the build_number of my project with fastlane

new_build_number = Time.now.strftime("%Y%m%d%H%M")
increment_build_number(
    build_number: new_build_number
)

But I am getting the following error:

ld: malformed 64-bit a.b.c.d.e version number: 201901091627 clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is because fastlane is increasing the Current Library version of my dynamic frameworks

enter image description here

(As it is said here, if I set $(DYLIB_CURRENT_VERSION) to the Current Library it works, but each time I execute fastlane it gets modified and fails again).

How can I make that Fastlane doesn't modify that Current Library version or how can I increment the build number and make it works with dynamic frameworks?.

Thank you very much.

Pablo Sanchez Gomez
  • 1,438
  • 16
  • 28

2 Answers2

6

I have fixed in the following way:

I have downloaded versioning plugin:

fastlane add_plugin versioning

And then I have increase the build number in the following way:

build_number = Time.now.strftime("%Y%m%d%H%M")
  increment_build_number_in_plist(
    build_number: build_number,
    target: 'YourDesiredTarget'
  )

Like this you won't get increased the dynamic frameworks library version/build version and the error won't appear! :)

Pablo Sanchez Gomez
  • 1,438
  • 16
  • 28
0

Time.now.to_i returns the value of time as an integer number of seconds since the Epoch. Try to convert this value to minutes.

build_number = Time.now.to_i / 60
increment_build_number(
    build_number: build_number
)

Roman Podymov
  • 4,168
  • 4
  • 30
  • 57