How to set license

Get License Key

If you already have a Dynamsoft account, please sign in here. If not, sign up here.

Once logged in, please navigate to DCS Mobile License Center on the left panel. license info

Set the license in your Xcode project

1. Open ViewController.m file
In the file ViewController.m, use setLicense() to set the license .

        
        @interface ViewController () {
        DcsView *dcsView;
        }
        @end
        
        @implementation ViewController
        
        - (void)viewDidLoad {
        [super viewDidLoad];
        
        [DcsView setLicense:@"****"]; //Please replace **** with your license copied from the portal

        dcsView = [[DcsView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
        
        [self.view addSubview:dcsView];
        }
        
        @end
        
1. Open ViewController.swift file
In the file ViewController.swift, use setLicense() to set the license .

        
        class ViewController: UIViewController{
        var dcsView=DcsView()
        override func viewDidLoad() {
        super.viewDidLoad()
        DcsView.setLicense("****") //Please replace **** with your license copied from the portal
        dcsView = DcsView(frame: CGRect(x:0,y:0,width:self.view.frame.size.width,height:self.view.frame.size.height))
        view.addSubview(dcsView)
        }
        }
        
Is this page helpful?

Leave a Reply

Your email address will not be published.