I have a question about swift function name rule. As I tried in IDA Pro to analyze a iOS app (Maybe OS X is the same case) written in swift, such as swift-2048, I got function n
Using the swift-demangle command line tool you can see the difference between the two functions.
_TToFC10swift_204811AppDelegate27applicationWillResignActivefS0_FCSo13UIApplicationT_ ---> @objc swift_2048.AppDelegate.applicationWillResignActive (swift_2048.AppDelegate)(ObjectiveC.UIApplication) -> ()
_TFC10swift_204811AppDelegate27applicationWillResignActivefS0_FCSo13UIApplicationT_ ---> swift_2048.AppDelegate.applicationWillResignActive (swift_2048.AppDelegate)(ObjectiveC.UIApplication) -> ()
_T
prefixes all swift functions and it looks like To
corresponds to the function having the @objc
attribute.
Unfortunately, I don't have enough knowledge of the internals of swift and the objective-c runtime to tell you what each of these functions does. I think it's safe to assume it's part of the objective-c to swift bridging process though.