xcode4.5

CopyPNGFile error

寵の児 提交于 2019-12-04 01:46:05
When I archive the application I get CopyPNGerror for all images in my project.I tried all means deleting all the images,adding them again,check Build Phases(copy bundle resources).No duplicates are found.I couldnot understand what to do further and submit the app.When I archive another application with same images archive is successful CopyPNGFile "/Users/admin/Library/Developer/Xcode/DerivedData/App1-auevnkwujohdqtflzyputmxbvrmt/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App1.app/about2 copy.png" "Classes/../about2 copy.png" cd "/Users/admin

How to set the Identifier of a UIView in Xcode/iOS for debugging auto layout?

有些话、适合烂在心里 提交于 2019-12-03 22:14:21
During a talk from WWDC 2012 (Best Practices for Mastering Auto Layout), the presenter said that you can set a UIView identifier in Xcode to aid in debugging auto layout: This seems like a really good idea, but in Xcode 4.5.1 for my iOS project, there is no way that I can see to set the Identity of a UIView. How can I set the Identity of a UIView in Xcode 4.5.1? If this isn't possible in iOS projects, how can I get the same functionality? Setting accessibilityIdentifier on UIView does the trick. Tested on Xcode 6.4, iOS 8.4. Seem like Identifier is only available on NSView in Mac OSX only. It

Convert date to next day's date in iOS

ぃ、小莉子 提交于 2019-12-03 21:39:48
I have a date in string format just like 30-11-2012 . I want the date next to it like 01-12-2012 again in string format. Is there any way of getting it? You should use NSCalendar for best compatibility NSDate *today = [NSDate dateWithNaturalLanguageString:@"2011-11-30"]; NSCalendar *calendar = [NSCalendar currentCalendar]; NSDateComponents *dayComponent = [NSDateComponents new]; dayComponent.day = 1; today = [calendar dateByAddingComponents:dayComponent toDate:today options:0]; //2011-12-01 12:00:00 +0000 I got the answer by someone I forget the name, I was about to accept his/her answer but

When recording using UIAutomation on a device, it hangs on 'Starting Capture…' . Works fine on Simulator

ε祈祈猫儿з 提交于 2019-12-03 17:04:24
Has anyone else had this problem? I'm new to UIAutomation. Am using Xcode4.5, trying to record commands on my iPad 3 running ios6. When I click the record button, it just hangs on 'Starting Capture...'. I had this problem initially when trying to run on the simulator and was able to solve it using. sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer. Can't seem to get it working on my device. Do the accessibility settings need to be set a certain way? I have multi-tasking turned on. When I try to run a script, nothing happens. No errors or anything. Totally stumped. Make sure

avoid Headset plugout stops AVAudioPlayer in iOS

半城伤御伤魂 提交于 2019-12-03 16:06:15
In my iPhone app I am using AVAudioPlayer to play the songs...But when I plug out or plugin the headset during song playing, It automatically stops the AVAudioPlayer... I need to run audio player even though these changes occur.. any ideas will be appreciated.Thanks in advance. First, you have to tell AVAudioSession the audio behaviour of your app. Apple name this the audio session category , an can be set by [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error:&setCategoryErr]; For example, AVAudioSessionCategoryPlayback : When using this category, your app audio

Where to set translatesAutoresizingMaskIntoConstraints in Xcode 4.5

半城伤御伤魂 提交于 2019-12-03 14:29:27
问题 I need to set translatesAutoresizingMaskIntoConstraints to NO . By default it is set to YES (to assist with the majority of apps that are transitioning from struts and springs to the new Auto Layout). Is there somewhere in Xcode where the default can be changed from YES to NO ? Or do I have to manually set it for every view? 回答1: This is a great question - and one I've tried to find an answer to myself. Sadly, it looks like there is no "quick fix". Currently, Apple considers Constraint-based

iOS: Is there absolutely no way to build for armv6 in Xcode 4.5?

一个人想着一个人 提交于 2019-12-03 12:02:30
Starting with Xcode 4.5 the possibility of building for armv6 devices is not given anymore (iPhone/iPod touch 1st and 2nd generation). This means no new versions of our app for iPhone 2G and 3G which is very unlucky. Does anyone know if there will be a workaround? I really don´t see any technical reasons for this. You can have multiple versions of xcode installed. In the past, that has been the fix needing to use an older xcode feature. It is a workaround, and the project files may eventually evolve in a way that no longer supports the older tools, but for the time being, that will allow you

runtime exception after upgrade to Xcode4.5 iOS6 Base SDK

半城伤御伤魂 提交于 2019-12-03 11:43:00
I recently upgraded my codebase to use iOS6 Base SDK - I am using XCode 4.5. I only had to change the dylibxml2.2.3.7 to dylibxml2.2. It works fine on the 6.0 simulator. I am using libs like GoogleAnalytics, Three20. But when i run the code on iOS 5 (iPhone4), it crashes at launch with this following error: I can't tell where it is exactly crashing because all I see is the machine codes when it crashes dyld: lazy symbol binding failed: Symbol not found: _objc_setProperty_nonatomic Referenced from: /Users//Library/Application Support/iPhone Simulator/5.0/Applications// /Applications/Xcode.app

Did Apple remove the 'git gui' command in XCode 4.5 command line tools?

夙愿已清 提交于 2019-12-03 11:12:22
问题 After updating to XCode 4.5 and installing the developer tools I can no longer run the 'git gui' command from the command line. It says: $ git gui git: 'gui' is not a git command. See 'git --help'. I'm running this version: $ git --version git version 1.7.10.2 (Apple Git-33) Searching the git docs (http://git-scm.com/docs/git-gui) shows 'git gui' should be available, and hasn't changed since version 1.7.7. So did this Apple version of git remove this command? I use it all the time! 回答1: Apple

how to set iphone tab bar icon by custom images using story board

烈酒焚心 提交于 2019-12-03 10:23:52
I am newbie to iphone development,I need to put a custom image icon in the tab bar .But it showing only the default colour(Black&blue) .Help me to overcome from this bug friends...? add the Images in application, and See attached Image Use this code in viewDidLoad UIImage *selectedImage0 = [UIImage imageNamed:@"selected.png"]; UIImage *unselectedImage0 = [UIImage imageNamed:@"unselected.png"]; UITabBarItem *item0 = [tabBar.items objectAtIndex:0]; [item0 setFinishedSelectedImage:selectedImage0 withFinishedUnselectedImage:unselectedImage0]; Use below code in AppDelegate (BOOL)application: