GPX coordinate injection from iPhone

I am looking for a way to inject coordinate values into a blank GPX file from my iPhone. I have created a basic interface for this but I am unsure how to submit the coordinates into the GPX file. Is there a way to do this? I also want the file to automatically simulate the location as soon as the values are submitted.
GPX coordinate injection from iPhone
 
 
Q