xcode4

Xcode expired certificate problem

做~自己de王妃 提交于 2020-01-01 09:04:08
问题 please look at the following screenshot As you see there are two certificates. All are mine, with maching user's ID and common name. Whenever I build the application and launch it in Xcode for device I receive the fatal, that this certificate is duplicated. So I delete the expired one and launch the application again - it's being installed and debugged on device without any problems. But when I launch other project or reboot that expired certificate is shown in the keychain again and again

Xcode 4 archive results in slow/unresponsive Organizer & pngcrush process takes up 100% cpu

二次信任 提交于 2020-01-01 08:45:41
问题 sorry about the rather confusing title, but I tried to get in as much info as possible. Problem: I'm trying to archive my iPhone app into an ipa file for OTA testing (via TestFlightApp) - so in Xcode, I perform a Project > Archive. After the archive is successful, it opens the Xcode Organizer to create the ipa file. BUT as soon as Organizer is opened, Xcode becomes VERY slow & essentially unresponsive. So naturally I open Activity Monitor to see what's going on and there's a process called

How do I get list of all classes conform to certain protocol in Xcode 4?

大城市里の小女人 提交于 2020-01-01 08:29:04
问题 I am new to Xcode. I want to know how can I know all classes conform to certain protocol in Xcode 4.3.1? And how can I know all subclasses of one class? 回答1: Use the Objective-C runtime functions. objc_getClassList to get the list of Class es class_getSuperclass or the -superclass method to walk the superclass chain class_conformsToProtocol or the -conformsToProtocol: method to check if a class conforms to a protocol 回答2: Protocol *protocol = @protocol(YourProtocol); int numberOfClasses =

Programmatically rename an XCode project

こ雲淡風輕ζ 提交于 2020-01-01 06:46:39
问题 I know one can rename a project by slowly double clicking the project name but I was wondering if it's possible to automate that through the command line (any language, possibly Apple Script) ? 回答1: You will have to manipulate the .xcodeproj file, which is in XML format. In my build process I have placeholder names that I simply search & replace with a command line app. If you need a generic solution you will have to parse the XML format (which is undocumented but not that hard to grasp). 回答2

Programmatically rename an XCode project

萝らか妹 提交于 2020-01-01 06:45:07
问题 I know one can rename a project by slowly double clicking the project name but I was wondering if it's possible to automate that through the command line (any language, possibly Apple Script) ? 回答1: You will have to manipulate the .xcodeproj file, which is in XML format. In my build process I have placeholder names that I simply search & replace with a command line app. If you need a generic solution you will have to parse the XML format (which is undocumented but not that hard to grasp). 回答2

Xcode 4.2 - App Loader: Unable to verify icon dimensions, no icon found

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 05:42:05
问题 I have never had this problems until I began to use Xcode 4.2. I'm getting the following error trying to upload my app: Unable to verify icon dimensions, no icon found. Your minimum os version is below 3.2, so you must define CFBundleIconFile or provide a default Icon.png that is 57x57 I have an "Icon.png" image and is 57x57. I tried add it and remove it from info.plist. No success. I don't know what to do. Here is my info.plist file Info.plist edited again SOLUTION Thanks for your comments.

Is UILabel Inset effect Possible? [duplicate]

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-01 05:19:13
问题 This question already has answers here : UILabel text margin [duplicate] (38 answers) Closed 6 years ago . I am giving border to UILabel with Label.text = lbltext; Label.layer.borderColor = [[UIColor grayColor] CGColor]; Label.layer.borderWidth = 2; But There is no space between text and border. so how can i set inset effect like UIButton in my Label? 回答1: Put the label in a container view and apply the border to the container. 回答2: You can subclass UILabel, and override a couple of methods:

Is there a way to list all files and their targets in Xcode?

前提是你 提交于 2020-01-01 03:37:13
问题 I am part of a project with multiple developers. The project contains multiple targets. VERY often, files are committed to the Xcode project repository with some targets not-included (careless programmers). So whenever i do a 'svn up', and run the app, my program crashes. I then have to look through all those files and see which one was committed with the missing target, then add the target, and recommit the file to the repository (for that careless programmer) Is there some way through a

How to turn off NSZombieEnabled in Xcode 4

落花浮王杯 提交于 2020-01-01 02:43:08
问题 I have just migrated to Xcode 4 and i had zombie activated in Xcode 3 for my app. I used the following method: Go to Project -> Edit Active Executable Click Arguments Click + in the "Variables to be set in the environment" section Enter NSZombieEnabled in the Name column and YES in the Value column. Make sure the checkmark for the NSZombieEnabled entry is checked. Now i want to make sure it is off for my application but do not understand how to check/do that in XCODE4, anyone that can share

How do i associate excel file type (xlsx) with iPhone application

寵の児 提交于 2020-01-01 02:32:09
问题 Hi i have managed to open .xls files form mail app by adding document type to the project build and set the Types field to "com.microsoft.excel.xls" (see screen shot). I want to do the same with xlsx files but can't do it. I tried to add "com.microsoft.excel.xlsx" but it didn't work 回答1: I solved that by defining custom UTI as follows. Try to add these definitions into your info.plist. It works as expected. <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeDescription</key>