Dyld_fatal_error with Typhoon + Swift + iOS7.x + Plist-bootstrapping

I have a very nasty problem with Typhoon Framework version 2.3.0 in a Swift project.

I included Typhoon in the Podfile as a reference in the tutorial, installed Pods, created the bridge title and added #import <Typhoon/Typhoon.h>to this title.

Then I created a subclass of the assembly called ApplicationAssebly:

import Foundation

public class ApplicationAssembly: TyphoonAssembly {
    public dynamic func appDelegate() -> AnyObject {
        return TyphoonDefinition.withClass(AppDelegate.self) {
            (definition) in
            definition.injectProperty("myAssembly", with: self)
        }
    }
}

As you can see, I want to add this assembly to AppDelegate. I also added a TyphoonInitialAssemblies entry to the Info.plist file. And at that moment my problems began. I checked a few combinations, resulting in an NSException:

Cannot resolve assembly for name xxx

These combinations (typhestest - project / bundle name):

  • ClassName Info.plist: ApplicationAssembly. :
  • ClassName Info.plist: ApplicationAssembly. :
  • ClassName Info.plist: typhtest.ApplicationAssembly. :
  • ClassName Info.plist: typhtest.ApplicationAssembly. :

StackOverflow, :

  • ClassName Info.plist: _TtC8typhtest19ApplicationAssembly. :

NSException, dyld_fatal_error, iPhone 5s (iOS 7.1) :

iPhone 5s - iOS 7.1 error stack trace

iPhone- (iOS 7.1):

iOS 7.1 emulator error stack trace

, iOS 8.1! , Typhoon Swift .

Xcode DerivedData, , . Xcode 6.1 (6A1052d), OSX Yosemite 10.10.1.

GitHub : https://github.com/papcio28/Typhoon-Dyld-Error

21.11.2014

, factory - , Typhoon . , , :

  • TyphoonInitialAssemblies Info.plist
  • AppDelegate.application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        let factory = TyphoonBlockComponentFactory(assemblies: [AppAssembly()])
        factory.inject(self)
        return true
    }
    

, Typhoon factory , .

+4
1

. Typhoon, pod update, . , - 2.2.1 2.3.0, , . / .

:

, , Typhoon, AppDelegate:

dynamic func initialFactory() -> TyphoonComponentFactory {

    return TyphoonBlockComponentFactory(assemblies:[
        ApplicationAssembly(),
        AnotherAssemblyIfRequired()])
}

Typhoon , plist, UIStoryboard, UIStateRestoration .., , , Plist Typhoon , , . iOS7.1 + Swift + Storyboards, plist - .

:

, plist , - Typhoon , . iOS7.x, :

@objc(ApplicationAssembly)
public class ApplicationAssembly : TyphoonAssembly {
    //etc
}

: Typhoon 2.3.1:

Typhoon 2.3.1, plist Swift + iOS7.x

+4

All Articles