When my app is terminate in background, I found the class's + (void)load method called before I relaunch or bring it to foreground.
APP terminated in background also auto reload
Yes. The +load
method is called by the Objective-C runtime when it discovers your class. If your app is terminated then the relaunch will start your code in a new process. So the Objective-C runtime starts from scratch, discovering all of your classes anew, and thus calling their +load
methods.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"