xcode4

How to create framework from Xcode 4 project?

旧时模样 提交于 2019-12-04 14:17:58
I want to use CHDataStructures as framework: https://github.com/davedelong/CHDataStructures . However there is no binary of the project. So I assume I have to build the .a file myself using xcode. How do I do that in xcode 4? I read the documentation but it is very confusing... Any ideas? First we'll grab the CHDataStructures project: git clone https://github.com/davedelong/CHDataStructures.git Next, open the relevant CHDataStructures xcode project open CHDataStructures-iOS.xcodeproj I'll assume you're building for iOS from here on out (and mention what will be different for a mac app). Once

Why does Xcode 4 auto-generate a instance variable?

ⅰ亾dé卋堺 提交于 2019-12-04 14:01:24
问题 I'm coming from C# development and just started to learn Objective-C and Xcode 4. As far as I understand "@synthesize" is replacing getter/setter methods for properties if you don't need to check/control the values which are being read or written. But why does Xcode 4 create a instance variable for me automatically? Wouldn't this be enough: @synthesize myProperty; instead of: @synthesize myProperty = _myProperty; ? Why would I want to use/have the instance variable instead of the actual

CoreAnimation, moving UIImageView with animating shadow in iOS 5 Xcode 4

烂漫一生 提交于 2019-12-04 13:42:38
问题 I am trying to add a (fake)3d like effect for an image (UIImageView moving from point A to B, during this movement I want at point C=(A+B)/2 for it to have the biggest shadow size (or larger shadow offset), so it looks like it is going up and down again. when I try to even change the shadow size, it is not animating. could you help me how to edit this code: NSValue *pointB = [NSValue valueWithCGPoint:CGPointMake(CGRectGetMinX(imageView.frame)+50, CGRectGetMinY(imageView.frame)+50)]; [self

Can't build XCode 4 Project from Textmate

有些话、适合烂在心里 提交于 2019-12-04 13:30:05
问题 I've opened a newly created XCode 4 project in TextMate (by dropping the project folder on the TextMate icon like the manual suggests) and have attempted to build it using the Command-B shortcut and selecting 2 for an XCode build. I get the following error xcodebuild: error: invalid option '-activebuildstyle' Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [

XCode fails to deploy iPhone app to iPhone 3GS

北战南征 提交于 2019-12-04 13:06:43
问题 So I built my iPhone app and it runs fine in the simulator so I wanted to deploy it to my iPhone for one last testing round before I go into open beta testing wiht my distribution profile. I did this numerous times already and it has never been a problem. However since the last test run I upgraded both my iPhone (iOS 4) and XCode (Version 4 DP2) so maybe the problem is rooted there. The build process runs fine and successful - after that XCode tries to deploy it to my iPhone and fails with a

Point XCode4 to my client certificate

最后都变了- 提交于 2019-12-04 12:57:35
I'm having the same problem with XCode4. My svn cmd line is set to use client certificates. Everytime I launch XCode I get a dialog saying server.mycompany.com requires a client certificate but I have no idea where to tell it to find my client .p12 and my CA pem files. I have it set correctly in ~/.subversion/servers but XCode doesn't seem to care about these configs. I'm almost certain there's a magic overriding svn config sitting somewhere that XCode relies on but I don't know where! Help? 来源: https://stackoverflow.com/questions/6463781/point-xcode4-to-my-client-certificate

How to rename a project in XCode?

不打扰是莪最后的温柔 提交于 2019-12-04 12:50:36
There are some pretty horrible instructions out there for renaming projects in XCode. Is there no easy way to do this? In Xcode 4 try this: ⌘+1, click the blue node with the project name, wait a second, click again (the name becomes editable). That's it. In the menu bar choose Project -> Rename... It'll do all the hard work for you and rename everything that needs renaming apart from the folder that the project is in. In XCode 4, select the project name at the top of the documents list on the left and hit enter, rename it, and then XCode will show you a list of files that will be altered, as

How to create a new “templates” category on Xcode 4 and use my own file templates there?

余生颓废 提交于 2019-12-04 12:28:43
问题 I would like to start using my own templates for iOS applications. I don't want any significant changes, but simpler things like add/remove some boilerplate code add some pragma mark sections hardcode my company's name and some comments for every file change the indentation etc etc etc The idea is that we will share these templates when we create apps, but at the same time we want to keep the default template files that Xcode 4 already provides. So, in the following screenshot, how can I add

How can I get iphone device type?

我只是一个虾纸丫 提交于 2019-12-04 12:19:45
问题 I want to get iphone device type if it is iphone 2 or 3G or 4 in xcode 4.0. Is there any way to get it? If it is, please tell me. 回答1: Caleb is right, you shouldn't check for device type, but for functionality. For example, you can check whether the device supports multitasking like so: UIDevice *device = [UIDevice currentDevice]; if ([device respondsToSelector:@selector(isMultitaskingSupported)] && [device isMultitaskingSupported]) { // ...code to be executed if multitasking is supported. //

How to ignore some static library for iOS simulator

寵の児 提交于 2019-12-04 12:13:37
I am trying to build my project for sdk iphoneos and iphonesimulator. There are few .a static libraries that can only be utilized for iphoneos. Where can I go an ignore these files if its being build for iphonesimulator within XCode? Thanks. Instead of hard linking the libraries, use the "Other Linker Flags" setting in the project configuration settings. You'll be able to link different versions of libraries based on the current build configuration. By default you already have Debug and Release build configuration, press the "plus" button on the Debug will add a configuration for a specific