Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<rss version="0.2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>XcodeHelper App Changelog</title>
<link>https://gist.githubusercontent.com/dhcdht/41a1c484f3c1b6dae0a0224b52b5437d/raw/XcodeHelperReleases.xml</link>
<description>Most recent changes with links to updates.</description>
<language>en</language>
<item>
<title>Version 0.2.0</title>
<description>
@dhcdht
dhcdht / warningDeprecatedUsing.sh
Created September 26, 2015 15:59
脚本添加到 Xcode 的 Build Phases 中,当使用到不想要被使用的类时,会报警告。
DeprecatedClasses=("UITableView" "UILabel")
ClassesString=${DeprecatedClasses[*]}
SearchString=${ClassesString// /|}
find "${SRCROOT}" \( -name "*.m" \) -print0 |
xargs -0 egrep --with-filename --line-number --only-matching "($SearchString).*\$" |
perl -p -e "s/($SearchString)/ warning: Use deprecated Class \$1\n/"
@dhcdht
dhcdht / replaceOCFunction.py
Last active August 29, 2015 14:19
批量替换 Objective-C 的方法
# -*- coding: utf-8 -*-
__author__ = "dhcdht"
import os
import re
walk_path = 'path_to_project_root'
search_function = 'customSizeWithFont:constrainedToSize:lineBreakMode:'
re_replace = '[\g<1> customSizeWithFont:\g<2>constrainedToSize:\g<3>]'
@dhcdht
dhcdht / searchAndAddUUIDForXcodePlugin.py
Last active February 17, 2020 18:20
每次升级Xcode都要把插件们挨个升级才能用,很烦,其实它们大部分只需要在plist里边添加一个UUID而已,这个脚本可以帮你一次性升级Xcode plugin,不保证每个都能用
__author__ = 'dhcdht'
import os
import re
plugin_path = os.path.expanduser('~/Library/Application Support/Developer/Shared/Xcode/Plug-ins')
#for Xcode 6.3
#plugin_uuid = '9F75337B-21B4-4ADC-B558-F9CADF7073A7'
#for Xcode 6.3.2
#plugin_uuid = 'E969541F-E6F9-4D25-8158-72DC3545A6C6'