Titanium Mobile 1.4.1.1. deletes Xcode's iOS File Templates
Sorry if this is the wrong place to file a bug report. I searched the whole site and even googled, but no explicit bugreporting option showed up…
I just clean-installed the latest version of Titanium Mobile. I want to implement my own custom module. So i followed the steps in the Module_Developers_Guide_iOS.pdf file. When Titanium installed its Template Files (into /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/File\ Templates/Appcelerator) it deleted all standard Xcode File Templates for iOS at /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/File\ Templates/. Now, if i want to create a new UITableViewController subclass, the file template doesn't show up any more in Xcode's New File Template Chooser. :(
Anyone else having the same issue? Is there a known workaround? Or do we have to wait for a bugfix?
Thanks in advance.
3 Answers
-
Has this been fixed? I just lost all of my xcode templates, again. Pretty frustrating.
-
I don't make a habit of fixing other peoples' buggy software, but this is an updated version of
/Library/Application Support/Titanium/mobilesdk/osx/1.6.2/module/iphone/xcode/install.py
that doesn't destroy the XCode templates every time.#!/usr/bin/env python # -*- coding: utf-8 -*- # # Simple script that installs the Titanium class templates to the default platform location # import os, sys, shutil template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) #TODO: need to run xcode-select to get the true path to xcode xcodedir = os.path.join("/Developer","Platforms","iPhoneOS.platform","Developer","Library","Xcode") target_dir = os.path.join(xcodedir,"File Templates", "Appcelerator") file_dir = os.path.join(xcodedir,"File Templates") if os.path.exists(target_dir): shutil.rmtree(target_dir) if not os.path.exists(file_dir): os.makedirs(file_dir) shutil.copytree(os.path.join(template_dir,'Titanium'), target_dir) print "Appcelerator Titanium XCode templates installed" sys.exit(0)
-
Hi
I had the same issue : I had to copy templates from another mac into my mac.
Thanks