Auto Build Shell Script for iOS app with git hash with wireless distribution

# Below are required environment variables with some example content:
# XCODE_BUILD_COMMAND='xcodebuild -sdk iphoneos4.1 -alltargets -configuration "Ad Hoc" clean build'
# DISTRIBUTION_CERTIFICATE='iPhone Distribution: Your Company Pty Ltd'
# PROVISIONING_PROFILE_PATH='/Users/tomcat/Library/MobileDevice/Provisioning Profiles/Your_Company_Ad_Hoc.mobileprovision'
# GIT_BINARY='/usr/local/git/bin/git'
# REMOTE_PARENT_PATH='/www/docs/ios_builds'
# KEYCHAIN_LOCATION='/Users/tomcat/Library/Keychains/Your Company.keychain'
# Build project
security default-keychain -s "$KEYCHAIN_LOCATION"
security unlock-keychain -p $KEYCHAIN_PASSWORD "$KEYCHAIN_LOCATION"
GIT_HASH="$($GIT_BINARY log --pretty=format:'' | wc -l)-$($GIT_BINARY rev-parse --short HEAD)"
cd "$BUILD_DIRECTORY" || die "Build directory does not exist."
for APP_FILENAME in *.app; do
	APP_NAME=$(echo "$APP_FILENAME" | sed -e 's/.app//')
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "$APP_FILENAME" -o "$BUILD_DIRECTORY/$IPA_FILENAME" --sign "$DISTRIBUTION_CERTIFICATE" --embed "$PROVISIONING_PROFILE_PATH"
# Create legacy archive for pre iOS4.0 users
# Output of this is index.html and manifest.plist
# Create tarball with .ipa, dSYM directory, legacy build and generated manifest files and scp them all across
# Clean up

XCode plugins

Xcode Plugin Listing – Quality Xcode Plugins

Xcode plugins have gone largely unsupported by Apple, and with the the beta of Xcode 6 many of the old plugins have stopped working.

This listing is a summary of useful Xcode plugins that have been listed here on ManiacDev.Com in the past. Please note that not all plugins have not as of yet been updated to work with Xcode 6.

If you run across any issues, or a useful new plugin please mention it in the comments.

Before going on to the Xcode plug-ins, please help us keep this list up to date and share with your Twitter followers by clicking here.
This list was last updated August 27th, 2014

Here are the plug-ins:

MCLog – A plugin that enhances the debug console with output filtering that can work in real time and supports regular expressions.

GitDiff – A plugin for easy visualization of modified and changed code based on the projects Git repo.

ACCodeSnippetRepositoryPlugin – A plugin allowing you to seamlessly integrate the Xcode snippets library with a Git repository.

Extractor Localizable Strings – A plugin allowing you to quickly turn a string into a localizable string bringing up a popup where you can specify the localized string’s key on hotkey press.

Peckham – A plugin allowing you to bring up a popup for quickly creating import statements from anywhere within your code.

XCFui – A plugin allowing you to easily identify unused imports within your code bringing them up as warnings on compilation.

XprobePlugin – A plugin allowing you to easily browse your application’s memory in a nice UIWebView based interface with filtering and searching capabilities.

XcodeBoost – A plugin adding many nice features such as allowing you to extract method declarations from your implementation to paste in the header file, highlight based on regex, paste lines while preserving code formatting and more..

WCGitTagsPlugin – A plugin allowing you to easily add, view, and remove Git tags through a GUI within Xcode.

BBUFullIssueNavigator – A plugin allowing you to display full content in the Xcode issue navigator (no more ellipsis).

BBUDebuggerTuckAway – A plugin that automatically hides the debugger when you start typing within the code editor.

CodePilot – Allows you to quickly search through Xcode projects using keywords allowing you to quickly search and navigate through an Xcode project. Formerly paid plugin now open source and working with Xcode 5.

ClangFormat-Xcode – A plugin that allows you to format code using the Clang Format tool allowing you to chose from a number of preset configurations or your own.

XToDo – A plugin that provides an interface allowing you to jump through todo’s, within your code labeled by your comments.

XCAddedMarkup – A plugin that allows you enabling display of images and hyperlinks within your code using a special markup syntax.

XAlign – A plugin for aligning your code automatically in user definable ways with a number of sample alignments such as align to first euqals included.

ShowInGithub – An Xcode plugin allowing you to quickly jump to the corresponding location for a line or block of code on Github or Bitbucket.

KFCocoaPods – A plugin for working with Cocoapods providing easy downloading and updating of CocoaPods, podfile editing with code completion, and CocoaPods output in the console. (Xcode 5 tested)

SCXCodeMiniMap – Creates a minimap of your code adjusting the color of the currently visible area of the editor so you can quickly see where you are within your code.

Injection – Allows you to inject code in real-time to an app running in the simulator or device so that you can tweak your code without recompiling. Formerly a paid plugin, but now available as open source.

Xcode Fixins – A collection of plugins for minimizing distractions in Xcode, and fixing code completion.

XVim – Adds many Vim key bindings to Xcode.

Mini-Xcode – Allows you to remove the large Xcode IDE toolbar to save screen space providing mini scheme and device selection.

ColorSense – Provides a color picker for adjustments when you highlight a UIColor or NSColor within your code.

BBUncrustifyPlugin -Enables easy use of the Uncrustify code beautification tool.

Lin – Provides a neat interface directly within Xcode to make working with NSLocalizedString easier.

KSImageNamed – Provides auto completion for UIImage imageNamed: within your code by scanning through image files within your workspace.

HOStringSense – Provides a call out bubble in which you can work with an unescaped version of a string.

XcodeColors – Allows you to color code messages in the debugging console so you can make errors stand out and easily separate different messages from differing parts of your code.

AutoresizeMask – Allows you to visualize your autoresizing masks within code.

JDListInstalledPlugins – Allows you to list your installed plugins, and one click remove.

Alcatraz – Provides easy install/removal of Xcode plugins, color schemes, and templates. A newer project so there is not too much in there, but a good idea.

Thanks for reading, please bookmark and share this post.


Plugins that I have installed




Keep position when moving UIView’s inside of other view with XIB’s

I have my UI laid out in and XIB file. I realized that I need it all inside of a UIScrollView, so I drag the UIViews into the UIScrollView but all my UIView’s get repositioned to the center. Is there a way to avoid this? It is extremely frustrating!!

I would do it with code, but I am forced to use XIB files.


Yes, if I understand you correctly.

Select the items in Interface Builder (Xcode) that you want inside the UIScrollView, and then go to the Editor menu, and use the menu command titled “Embed In:Scroll View”.