I am making an app for the ios environment.
The app supports Strava upload in gpx format.
Most of the items you want are uploaded normally.
However, Strava's Sport items will not be sent as desired.
Below is an example.
let params = [
"name": StravaGPX_TitleName,
"type": "(Sport[userData.Sport_Name])",
"sport_type": Sport[userData.Sport_Name].trimmingCharacters(in: .whitespaces),
"description": "Uploaded from Masil-Tracker",
"data_type": "gpx"
]
Among the above
"type": "Mountain Bike Ride"
"type": "MountainBikeRide"
"sport_type": "Mountain Bike Ride"
"sport_type": "MountainBikeRide"
Even if you specify each one
The Sport item on the Strava is saved as "Ride".
Which code should I use to upload Strava gpx
Will the items you want be designated in Strava's Sport items?
There is a weird character at the start of your values. The correct values should be:
"type" : "Ride", "sport_type" : "MountainBikeRide"
let params = [
"name": StravaGPX_TitleName,
"type": Sport[userData.Sport_Name],
"sport_type": Sport[userData.Sport_Name].trimmingCharacters(in: .whitespaces),
"description":"Uploaded from Masil-Tracker",
"data_type":"gpx"
]
The code above is exactly what I use.
Sport[userData.Sport_Name] 변수는
String "Mountain Bike Ride".
When uploading the Strava, it is still Ride in the Sport item.
let params = [
"name": StravaGPX_TitleName,
"type": Sport[userData.Sport_Name],
"sport_type": Sport[userData.Sport_Name].trimmingCharacters(in: .whitespaces),
"description":"Uploaded from Masil-Tracker",
"data_type":"gpx"
]
The code above is exactly what I use.
Sport[userData.Sport_Name] 변수는
String "Mountain Bike Ride".
When uploading the Strava, it is still Ride in the Sport item.
Reply
Login to the community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.