美文网首页
Xcode15.3 安装AloneMonkey

Xcode15.3 安装AloneMonkey

作者: CoderShmily | 来源:发表于2024-06-10 11:29 被阅读0次

\color{red} {安装指令}

//安装
sudo /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/AloneMonkey/MonkeyDev/master/bin/md-install)"

\color{red} {安装脚本报错}

//报错

/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
//创建目录 如果没权限 在设置--隐私安全性--App 管理增加终端.app 或者打开终端的允许开关
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/

\color{red} {运行报错}

  • \color{red} {Theos 找不到} Failed to locate Logos Processor. Is Theos installed
按照如下路径进行解决:
git clone --recursive https://github.com/theos/theos.git 然后拖到/opt 目录下
  • 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/

image.png
  • \color{red} {Executable\ Path\ is\ a\ Directory}
set ENABLE_USER_SCRIPT_SANDBOXING to NO
image.png

\color{red} {Failed\ to\ install\ the\ app\ on\ the\ device.}

有台手机 iOS17 有问题  换个系统版本的手机

\color{red} {报错找不到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

\color{red} {报错 mpack.sh} /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

\color{red} {工程没有Product目录}

找到**.xcodeproj 显示包内容,打开project.pbxproj,搜索mainGroup,把后边的值替换掉productRefGroup后边的值

相关文章

网友评论

      本文标题:Xcode15.3 安装AloneMonkey

      本文链接:https://www.haomeiwen.com/subject/arviqjtx.html