Posted on Aug 16, 2014
by de_poon
With the help of my colleagues, I am trying to request the author of calabash to fix (via Pull Request) an issue of run_loop repo with XCode6.
Apparently the issue lies with the output of
xcrun instruments -s templates
when XCode6SDK is set at /Applications/Xcode.app/Contents/Developer
the output is:
Known Templates:
"Activity Monitor"
"Allocations"
"Automation"
"Blank"
"Cocoa Layout"
"Core Animation"
"Core Data"
"Counters"
"Dispatch"
"Energy Diagnostics"
"File Activity"
"GPU Driver"
"Leaks"
"Multicore"
"Network"
"OpenGL ES Analysis"
"Sudden Termination"
"System Trace"
"System Usage"
"Time Profiler"
"UI Recorder"
"Zombies"
However if your SDK is at a different location, eg /Applications/Xcode6.app
, the output becomes
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/PlugIns/OpenGLESAnalyzerInstrument.xrplugin/Contents/Resources/OpenGL ES Analysis.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/PlugIns/XRMobileDeviceDiscoveryPlugIn.xrplugin/Contents/Resources/Energy Diagnostics.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/PlugIns/XRMobileDeviceDiscoveryPlugIn.xrplugin/Contents/Resources/GPU Driver.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/PlugIns/XRMobileDeviceDiscoveryPlugIn.xrplugin/Contents/Resources/templates/Core Animation.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/PlugIns/XRMobileDeviceDiscoveryPlugIn.xrplugin/Contents/Resources/templates/System Usage.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Activity Monitor.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Allocations.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Blank.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Counters.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Leaks.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Network.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/Resources/templates/System Trace.tracetemplate"
"/Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Time Profiler.tracetemplate"
"/Applications/Xcode6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Instruments/PlugIns/CoreData/Core Data.tracetemplate"
"/Applications/Xcode6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Instruments/PlugIns/templates/Cocoa Layout.tracetemplate"
"/Applications/Xcode6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Instruments/PlugIns/templates/Dispatch.tracetemplate"
"/Applications/Xcode6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Instruments/PlugIns/templates/File Activity.tracetemplate"
"/Applications/Xcode6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Instruments/PlugIns/templates/Multicore.tracetemplate"
"/Applications/Xcode6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Instruments/PlugIns/templates/Sudden Termination.tracetemplate"
"/Applications/Xcode6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Instruments/PlugIns/templates/UI Recorder.tracetemplate"
"/Applications/Xcode6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Instruments/PlugIns/templates/Zombies.tracetemplate"
The difference in output affects how run_loop interprets and parses it.
If you need a quick fix for v.1.0.2
/Users/xxxXXXXxxx/.rvm/gems/ruby-2.0.0-p353/gems/run_loop-1.0.2/lib/run_loop
lib/run_loop/core.rb 560: not name == 'Automation'
change to
lib/run_loop/core.rb 560: not name = ~ /\/ Automation/
Posted on Jul 16, 2014
When search around how to update version number of an iOS project, most of the result is about how to update the info.plist
file using scripts.
Actually, apple provides a command line tool called agvtool to update the version numbers for us. It’s simple and gets the task done.
The thing is, before you know it, it may not be obvious about how to start. So here are the steps.
Steps
Setup Xcode project to use apple’s scheme for versioning
In project build settings, set Versioning System to “Apple Generic”
Set Current Project Version to the current build version of the project.
In command line, check the current build version of the project:
$ agvtool what-version
Set the build version number based on what we got in step 2 and what need to set for next build version.
$ agvtool new-version -all new_version_number
Check the current marketing version of the project:
$ agvtool what-marketing-version
Set the new marketing version of the project based on what we got in step 4 and what we need for next marketing version.
$ agvtool new-marketing-version new_marketing_version_number
If you want to increase the version number to the next highest integral value, use agvtool bump -all
instead.
References