mapbox / mapbox-events-ios-DEPRECATED

DEPRECATED - Now Part of Mapbox iOS SDK
https://www.mapbox.com/ios-sdk/
1 stars 3 forks source link

Make User Agent Dynamic #6

Closed bleege closed 9 years ago

bleege commented 9 years ago

Make UserAgent automatically configure itself to the following pattern:

ImplementingApp/ImplementingAppVersion MapboxEventsiOS/MapboxEventsiOSVersion

bleege commented 9 years ago

Tested pulling AppName and AppVersion from NSBundle in library but it pulled nil values. Likely due to the fact that this is a Library and not an actual app. Still for the time being though I refactored things so that the implementing app needs to provide an AppName and AppVersion for inclusion in the UserAgent. By default it'll just be MapboxEventsiOS/1.0.

    [[MapboxEvents sharedManager] setAppName:@"ImplementingApp"];
    [[MapboxEvents sharedManager] setAppVersion:@"1.2.3"];