injectionIII 加载组件化构建项目的方法
在主工程项目下加入 injectionIII 的代码后,如果其他模块没有在主工程项目下,修改代码是不起作用。
在injection 文档看到这一段:
If your project is organised across multiple directories or the
project file is not at the root of the source tree you can add other
directories to be watched for file changes using the “Add Directory”
menu item. This list resets when you select a new project.
点开菜单栏Add Directory
,将其他组件文件加进来。
这时候修改代码,就可以看到:
💉 Compiling /Users/xxx/xxxx/xxxx/xxViewController.swift
💉 Loading .xxxxxxx
💉 Loaded .dylib - Ignore any duplicate class warning ⬆️
💉 Injected class 'xxxx.xxxx' (103,64)