Failed to distinguish value of type "LLAppDelegateProxy"

I integrated the Localtyics iOS SDK. After that, I get an error as shown below: Failed to distinguish value of type "LLAppDelegateProxy"

This means that I cannot get a link to the application delegation object. I have problems right now because I want Localitics and I also want the reference object of the application delegate.

Does any body know the solution to this?

+4
source share
1 answer

Localizers replace your AppDelegate behind the scenes with their proxy class ( LLAppDelegateProxy). Localitics suggests creating a static link to your original AppDelegate for access like this:

class AppDelegate: UIResponder, UIApplicationDelegate {
    static var originalAppDelegate: AppDelegate!

    // ...

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        AppDelegate.originalAppDelegate = self

        // ...

}

Access Using:

AppDelegate.originalAppDelegate.someMethod()
+5

All Articles