iosswiftcocoapodsmapboxmapbox-navigation

Cocoapods Error - Trouble in installing MapboxNavigation podfile -Mapboxnavigation sdk


In order to implement MapbocNavigation podfile according to mapboxnavigationsdk official documentation.adding Mapbox-iOS-SDK and MapboxNavigation through Cocoapods, always get error, shown bellow.enter image description here

Also tried: Generate access token and use secret key from Mapbox account and also configure .nertc file with secret key, follow all the steps of .nertc file configuration and research more about this error and implement all the possible ways but yet I am facing this error...


Solution

  • First, please remove already created .netrc files with this command.

    sed -i '' '/^machine api.mydomain.com$/{N;N;d;}' ~/.netrc
    

    Then Try To create new .netrc file with this steps:

    To create .netrc file do next

    Fire up Terminal
    cd ~ (go to the home directory)
    touch .netrc (create file)
    open .netrc (open .netrc)
    Set required data.
    Save
    

    .netrc file should be like this

    machine api.mapbox.com
    login mapbox
    password <secret_key_created_from_your_mapbox_account>
    

    May be it will help to you. If Its Help then please upvote to my answer.