Table of contents

Status Retrieval Methods

Method Description
getVersion Get version information of SDK.
setLogConfig Set the directory and the saving mode of log. It helps you on debugging.

getVersion

Get version information of SDK.

  • Objective-C
  • Swift
  1. + (NSString *_Nullable)getVersion;
    
  2. class func getVersion() -> String?
    

Return Value

The version of DynamsoftBarcodeReader iOS SDK and DynamsoftBarcodeReader algorithm.

Code Snippet

  • Objective-C
  • Swift
  1. NSString *version = [DynamsoftBarcodeReader getVersion];
    
  2. let version = DynamsoftBarcodeReader.getVersion();
    

setLogConfig

Set the directory and the saving mode of log. It helps you on debugging.

  • Objective-C
  • Swift
  1. - (BOOL)setLogConfig:(NSString*)logDir
                mode:(EnumLogMode)mode
               error:(NSError* _Nullable * _Nullable)error;
    
  2. func setLogConfig(_ logDir: String, mode: Int) throws
    

Parameters

[in] logDir: Where to save the log. [in] mode: The saving mode of the log. [in,out] error: A pointer to an error object.

An error occurs when:

  • The directory you input is invalid.

Return Value

A boolean value that indicates whether the log config is approved.

Code Snippet

  • Objective-C
  • Swift
  1. [DynamsoftBarcodeReader setLogConfig:"" mode:EnumLogMode.LM_TEXT error:nil];
    
  2. do{
       try DynamsoftBarcodeReader.setLogConfig("", mode:EnumLogMode.LM_TEXT, error:nil);
    }catch{
       // Add your code to deal with exceptions
    }
    

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: