-1

I am trying to use objective-c in swift project.I want to use THIS library of objective-c in swift.I imported this library in my swift project.I want this library to run in the beginning when I build my project,but when I build my project,ViewController.swift is being run.So,how do I run the library in the beginning?

Niloy Mahmud
  • 97
  • 1
  • 10

1 Answers1

1

In objective C you can have a class with a +(void)load method... this will get run very early, maybe before everything is set up... you can also investigate the constructor attribute.

Community
  • 1
  • 1
Grady Player
  • 14,399
  • 2
  • 48
  • 76