Search Unity

[SOLVED] Xcode ArgumentError - Malformed version number string ["5.1", "5.0"]

Discussion in 'iOS and tvOS' started by DevDop, Sep 19, 2020.

  1. DevDop

    DevDop

    Joined:
    May 1, 2016
    Posts:
    6
    When trying to use the command "pod install" in the terminal on MacOS for a Unity build that uses Facebook SDK, cocoapods, and a few others I got the error "ArgumentError - Malformed version number string ["5.1", "5.0"]"

    If someone is stuck with this too, here is how I fixed it: open the project in Xcode, go to Build settings, go to Swift Language Version, change it to Swift 5 (even if it's already on Swift 5) then try pod install again
     
    Last edited: Sep 19, 2020
    WarrenGame, ADNCG, Joyixir and 7 others like this.
  2. nanotribegmbh

    nanotribegmbh

    Joined:
    Sep 13, 2017
    Posts:
    7
    Thanks for sharing the solution @DevDop , much appreciated.

    I had this with MoPub library, and if you search for the key "SWIFT_VERSION" in imported SDK's, you ll probably find something like the following;

    Code (CSharp):
    1. project.AddBuildProperty(target, "SWIFT_VERSION", "5");
    2.  
    Simply correct it as below by stating the exact version as follows, so you wont need to change Swift Language Version every time you have a new build

    Code (CSharp):
    1. project.AddBuildProperty(target, "SWIFT_VERSION", "5.0");
    2.  
     
  3. koliy_163

    koliy_163

    Joined:
    Apr 25, 2021
    Posts:
    1
  4. caltingok98

    caltingok98

    Joined:
    Oct 17, 2020
    Posts:
    2

    This one worked for me, thanks a lot. I ve spent 2 days on this!