<key>LSEnvironment</key> <dict> <key>DYLD_INSERT_LIBRARIES</key> <string>/Applications/test.app/Contents/MacOS/inject.dylib</string> <key>DYLD_FORCE_FLAT_NAMESPACE</key> <string>1</string> </dict>
上面代码插入到info.pist里面,重启下机器,你懂的~
或者用下面的方法,不需要重启机器
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/你的APP名称.app
发表评论