VSDKUtil

@interface VSDKUtil : NSObject

Util methods

  • Helper method that generates a User-Agent string similar to the one generated by the AFNetworking framework with the adition of containing an name of the VelodiciSDK framework and version number. Example: AppName/AppVersion VelocidiSDK/0.3.2 (iPhone; iOS 11.0.1; Scale/3.00). @returns User-Agent string

    Declaration

    Objective-C

    + (nonnull NSString *)getVersionedUserAgent;

    Swift

    class func getVersionedUserAgent() -> String
  • Modify an AFHTTPSessionManager to accept all types of responses.

    Declaration

    Objective-C

    + (void)setAcceptAllResponses:(nonnull AFHTTPSessionManager *)sessionManager;

    Swift

    class func setAcceptAllResponses(_ sessionManager: AFHTTPSessionManager)
  • Undocumented

    Declaration

    Objective-C

    + (nullable NSDictionary *)tryParseJsonEventString:(NSString *)jsonStr error:(NSError **)error;

    Swift

    class func tryParseJsonEventString(_ jsonStr: String) throws -> [AnyHashable : Any]