This project provide a iOS & macOS framework for parsing/generating GPX files. This Framework parses the GPX from a URL or Strings and create Objective-C Instances of GPX structure.
GPXKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'GPXKit', :git => 'https://github.com/hulab/GPX.git'
To parse a GPX file, simply call the parse method :
GPXRoot *root = [GPXParser parseGPXWithString:gpx];
You can also generate the GPX :
GPXRoot *root = [GPXRoot rootWithCreator:@"Sample Application"];
GPXWaypoint *waypoint = [root newWaypointWithLatitude:35.658609f longitude:139.745447f];
waypoint.name = @"Tokyo Tower";
waypoint.comment = @"The old TV tower in Tokyo.";
GPXTrack *track = [root newTrack];
track.name = @"My New Track";
[track newTrackpointWithLatitude:35.658609f longitude:139.745447f];
[track newTrackpointWithLatitude:35.758609f longitude:139.745447f];
[track newTrackpointWithLatitude:35.828609f longitude:139.745447f];
##Note GPXKit is based on FLCLjp/iOS-GPX-Framework.
GPXKit is available under the MIT license. See the LICENSE file for more info.