2023年4月18日 星期二

STBLESensor_iOS-master error

 真的是有夠難用的範例, 從github下載後解超多問題才能順利run.


1. 沒安裝CocoaPods的直接裝了.

2.最常見的錯誤

File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/Libarclite-Files/libarclite_iphoneos.a


這得用終端機打指令, 先跳到該位置看有沒有libarclite_iphoneos.a 

沒有的話, 就麻煩了

跟我一樣

可以參考 https://stackoverflow.com/questions/75574268/missing-file-libarclite-iphoneos-a-xcode-14-3

我是選這解法

Create the folder arc:

Go to System Preferences - Security & Privacy - Full Disk Access - Terminal

sudo mkdir arc
cd  arc
sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git .

Give the necessary permission:

sudo chmod +x *

然後會發現指令打了沒權限...WTF? 
先關機, 然後長按開機鍵不放, 幾秒後會顯示繼續按就進入還原模式就是按到底.
一路進到左上角工具列有終端機可以選, 就點開下這個指令

csrutil disable


然後就重開機, 此時上面新增arc跟安裝的指令就能過了.


接著還要關機, 進去還原模式裡面把保護csrutil enable


接著會發現還是有東西會跳錯誤, 就算把絕對目錄到處貼爆他還是顯示找不到libarclite_iphoneos.a 

此時單獨點有問題的編譯, 你會發現黃色驚嘆號, 馬的就是這個, target 版本, 有的還在8 or 10. 通通改12就全過了.

超煩, 要一個一個點.


到這應該就能在手機跑起來了.

智障ST! 有夠難用欸

沒有留言:

張貼留言