Skip to content

Instantly share code, notes, and snippets.

View macfanr's full-sized avatar
🙂
I may be slow to respond.

Danny macfanr

🙂
I may be slow to respond.
View GitHub Profile
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
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
1. install meson
brew install meson
2. set min version
export CFLAGS="-mmacosx-version-min=10.9" before exe 'meson ./build_dir'
[[NSUserDefaults standardUserDefaults] setObject:@[@"en_US"] forKey:@"AppleLanguages"];
http://www.dyndns.org/cgi-bin/check_ip.cgi
codesign -d --entitlements :- /Applications/Whatever.app/
lldb ffmpeg -- -i file.mp4 -c:v libx264 -an ./out.mp4
@macfanr
macfanr / change install name.txt
Last active January 17, 2018 05:27
install name
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 / view process arguments
Last active January 17, 2018 05:26
查看其它进程命令行参数
ps ax | grep ffmpeg
@macfanr
macfanr / hide desktop icon
Last active January 16, 2018 09:47
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