InjectionIII xcode10更新

Author Avatar
xiaoLit Created: Nov 29, 2018 Updated: May 17, 2019

InjectionIII - overdue Swift4 rewrite of Injection
新的安装包 InjectionIII 1.2
新的路径调用方式,其他和原来都没有变化。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    if DEBUG

    //Swift:
    // for iOS
    Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle")?.load()
    //for tvOS:
    Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/tvOSInjection10.bundle")?.load()
    //Or for macOS:
    Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/macOSInjection10.bundle")?.load()

    //OC :
    // for iOS
    [[NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle"] load];
    // for tvOS
    [[NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/tvOSInjection10.bundle"] load];
    // for masOS
    [[NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/macOSInjection10.bundle"] load];
    endif
}

注意:新的安装包有可能不会提示移动到应用程序里,不过大家一看调用路径的配置就应该知道了,我们手动把它放进应用程序目录就搞定。