Skip to content

Instantly share code, notes, and snippets.

Avatar
🧨
Focusing

Danny macfanr

🧨
Focusing
View GitHub Profile
View xcode 12 low sdk
1. 拷贝OldSDK到Xcode装SDK的目录下
2. 修改plist文件
sudo /usr/libexec/PlistBuddy -c "Set :MinimumSDKVersion 10.7"
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist
3. 重启XCode
Xcode build svn: /Library/Developer/CommandLineTools/usr/bin
View gist:ce3d4cabcc42f2ea76f6ecef772dbcb0
1. install meson
brew install meson
2. set min version
export CFLAGS="-mmacosx-version-min=10.9" before exe 'meson ./build_dir'
View command
tccutil reset ScreenCapture com.company.appname //reset warnning
tccutil reset All com.company.appname
sudo xattr -d com.apple.quarantine /Applications/xxxx.app //app is damaged, ...move to track
View backup
[[NSUserDefaults standardUserDefaults] setObject:@[@"en_US"] forKey:@"AppleLanguages"];
http://www.dyndns.org/cgi-bin/check_ip.cgi
View find out entitlements
codesign -d --entitlements :- /Applications/Whatever.app/
@macfanr
macfanr / view process arguments
Last active Jan 17, 2018
查看其它进程命令行参数
View view process arguments
ps ax | grep ffmpeg
@macfanr
macfanr / hide desktop icon
Last active Jan 16, 2018
hide desktop icon
View hide desktop icon
hide:
defaults write com.apple.finder CreateDesktop -bool false && killall Finder
unhide:
defaults write com.apple.finder CreateDesktop -bool true && killall Finder
View change install name.txt
1. install_name_tool -id new/install/name.dylib libso.dylib //change install name
2. install_name_tool -change old_name new_name libso.dylib //change dependence
3. otool -L libso.dylib //display install name and dependence
4. otool -D libso.dylib //display install name of libso.dylib
注意: 在xcode project中写脚本修改install name 会造成sandbox之后运行奔溃,原因在于copy的时候对dylib签名,然后又去修改dylib内容(change install name),这样中破坏了之前的签名,所以会奔溃
@macfanr
macfanr / removelogo.sh
Last active Jul 2, 2017
remove logo with ffmpeg
View removelogo.sh
#!/bin/sh
if [ $# != 2 ]; then
echo "usage: videoshot.sh /Users/danny/MyVideoDir /Users/danny/MyOutputDir"
exit -1
fi
inputDir=$1
outputDir=$2
binaryEXE=./ffmpeg