安装指令
//安装
sudo /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/AloneMonkey/MonkeyDev/master/bin/md-install)"
安装脚本报错
//报错
/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/Resources/Embedded-Device.xcspec not found
//查找路径
cd /Applications/Xcode.app/Contents
find . -name Embedded-Device.xcspec
//查到的路径
./SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/PlugIns/XCBSpecifications.ideplugin/Contents/Resources/Embedded-Device.xcspec
//创建目录
sudo mkdir -p /Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/Resources/
//拷贝
sudo cp /Applications/Xcode.app/Contents/SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/PlugIns/XCBSpecifications.ideplugin/Contents/Resources/Embedded-Device.xcspec /Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/Resources
//报错
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/MacOSX Package Types.xcspec not found
//查找路径
cd /Applications/Xcode.app/Contents
find . -name MacOSX\ Package\ Types.xcspec
//查到的路径
./SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/PlugIns/XCBSpecifications.ideplugin/Contents/Resources/MacOSX Package Types.xcspec
//创建目录
sudo mkdir -p /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/
//拷贝
sudo cp /Applications/Xcode.app/Contents/SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/PlugIns/XCBSpecifications.ideplugin/Contents/Resources/MacOSX\ Package\ Types.xcspec /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/
//报错
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/MacOSX Product Types.xcspec not found
//查找路径
cd /Applications/Xcode.app/Contents
find . -name MacOSX\ Product\ Types.xcspec
//查到的路径
./SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/PlugIns/XCBSpecifications.ideplugin/Contents/Resources/MacOSX Product Types.xcspec
//拷贝
sudo cp /Applications/Xcode.app/Contents/SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/PlugIns/XCBSpecifications.ideplugin/Contents/Resources/MacOSX\ Product\ Types.xcspec /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/
运行报错
- input files cannot be found: '/usr/lib/libstdc++.dylib', '/usr/lib/libc++.dylib'.--替换fishhook 修改other link
按照如下路径进行解决:
* 项目地址:[https://github.com/facebook/fishhook](https://github.com/facebook/fishhook)
* 下载项目文件,复制 fishhook.h 、fishhook.c 文件到如下路径,覆盖替换历史的 fishhook 文件
* /opt/MonkeyDev/templates/MonkeyAppMac.xctemplate/fishhook/
* /opt/MonkeyDev/templates/MonkeyAppLibrary.xctemplate/fishhook/
- Executable Path is a Directory
set ENABLE_USER_SCRIPT_SANDBOXING to NO
报错找不到target 确定target存在的话 只是临时修改 因为硬编码的path
/opt/MonkeyDev/Tools/mpack.sh
的下面部分
#exename
TARGET_APP_PATH=$(find "$SRCROOT/$TARGET_NAME/TargetApp" -type d | grep ".app$" | head -n 1)
修改
find "/Users/mac/Desktop/chuanqibox/chuanqibox/TargetApp" -type d | grep ".app$" | head -n 1
报错/opt/MonkeyDev/Tools/mpack.sh: line 57: 27954 Killed: 9 "$APP_BINARY_PATH"
/opt/MonkeyDev/Tools/mpack.sh: line 57: 27954 Killed: 9 "$APP_BINARY_PATH"
在Xcode 项目内: Targets ---> Build Phases ---> Run Script
勾选:Show environment variables in build log
勾选: For install builds only / Run script only when installing
工程没有Product目录
找到**.xcodeproj 显示包内容,打开project.pbxproj,搜索mainGroup,把后边的值替换掉productRefGroup后边的值