xcode6

iOS - Custom Configuration - “No such module”

被刻印的时光 ゝ 提交于 2020-01-21 01:38:05
问题 In my ios app, I'm trying to distinguish environments, to make web api calls to the proper environment ( Development , Staging and Production ). For that I have created a configuration.plist file with the different endpoints for each environment and: Duplicated the Debug Configuration and called it Development Build . Created a new Scheme called Development (duplicated the Debug scheme) and in the Info tab ( Run section) chose the Development Build configuration. When I run in Debug mode,

In Xcode 6.1. 'UIImage?' does not have a member named 'size' Error

大城市里の小女人 提交于 2020-01-19 04:11:48
问题 I'm getting an image's Size and used the below code. It was working perfectly fine with Xcode 6.0.1 . After updating to Xcode 6.1 , I'm getting Error Like : 'UIImage?' does not have a member named 'size' var image = UIImage(named: imageName) let sizeOfImage = image.size Is it bug with my code or Apple ? Please help me in here. TIA. 回答1: That initializer is now a failable initializer, and as such it returns an optional UIImage . To quickly fix your bug just unwrap the image: let sizeOfImage =

Swift core data does not store data permanently

旧街凉风 提交于 2020-01-17 17:12:05
问题 I have an Entity called "Friend".. Attributes are name and age..here I have implemented bridging because NSManagedObject class for Friend has .h and .m file. My code to store data: var err: NSError? var delegate:AppDelegate = UIApplication.sharedApplication().delegate as AppDelegate var friend:Friend = Friend(entity: NSEntityDescription.entityForName("Friend", inManagedObjectContext: delegate.managedObjectContext), insertIntoManagedObjectContext: delegate.managedObjectContext) friend

EXC_BREAKPOINT in xcode 6

余生长醉 提交于 2020-01-17 09:28:07
问题 I have an issue that I can not seem to find the solution for. I am new to Swift and was trying to create a TicTacToe game. Whenever I finish playing the game in multiplayer mode a play button pops up. I click it and it automatically crashes and indicates there is a breakpoint ( EXC_BREAKPOINT ) Reset game button is attached to the @IBAction func @IBAction func playAgainPressed(sender : AnyObject) { goNumber = 1 winner = 0 gameState = [0, 0, 0, 0, 0, 0, 0, 0 ,0] label.center = CGPointMake

Getting dyld_fatal_error Xcode 6.3.2

南笙酒味 提交于 2020-01-17 09:01:05
问题 Seems like it randomly started giving me this fatal error today, no matter which program I try to run. I don't recall downloading any updates recently... I can't successfully run any programs, even programs that I know for a fact work. Call stack: Thread 1 0 dyld_fatal_error 4 _dyld_start and a breakpoint in some assembly code with a nop instruction dyld`dyld_fatal_error: 0x7fff5fc01074 <+0>: int3 -> 0x7fff5fc01075 <+1>: nop The console error I get is dyld: Symbol not found: _heim_data_get

Move specific UITextField when the Keyboard show

牧云@^-^@ 提交于 2020-01-17 08:56:20
问题 I followed the Apple documentation to move a textfield upwards when the keypad appears. The code works fine my problem is that I need that one specific textfield is moved towards the other, instead of implementing the code Apple every textfield I select is moved upwards ... How can I do to move a specific textField and not all? Thank you very much, I insert the following code used -(void)viewWillAppear:(BOOL)animated { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector

When I try to instantiate a UINib I get: this class is not key value coding-compliant for the key view

╄→гoц情女王★ 提交于 2020-01-16 07:50:32
问题 Followup on this question. I have an app, where the main view has one button, and a file 'popup.xib' which is now empty (Just a view, no buttons, no labels, nothing). And I want it to popup when I press the button. For some reason I get the following error whenever I press the button: ... this class is not key value coding-compliant for the key view.' I have read that this is because of outlets from the NIB which have been deleted or changed, that's why I removed all objects and what to

Compilation flags using bash in Xcode

拜拜、爱过 提交于 2020-01-16 06:07:52
问题 I am trying to pass in a compiler macro definition in Xcode that relies on a simple system shell command. The first thing I tried was to add it to the specific file in Build Phases->Compile Sources like this: to my surprise that didn't work, so I tried this: This printed out the value correctly but the macro wasn't passed to the source file correctly. I figure this one didn't work because it creates a separate shell instance and thus the environment variable is not persisted to the

How to get iAdBannerView to stretch across full width of Adaptive Layout Storyboard xcode 6

天涯浪子 提交于 2020-01-16 01:09:06
问题 Just wondering how you are supposed to stretch the iAdBannerView across the full width of the Adaptive Layout Storyboard that exists in Xcode 6. When I try and stretch it to the corners (so I can set auto layout values), it does allow it to be stretched. 回答1: Your ADBannerView will know which device it is on and set its dimensions correctly. You should just let auto layout know where you want the ad to be. For example, if you wanted the ADBannerView to be at the bottom of the screen then pin

AppStore submission: ERROR ITMS-9000: "Invalid Bundle Structure - The binary file 'MyApp.app/BuildAgent' is not permitted

谁说胖子不能爱 提交于 2020-01-15 06:25:50
问题 I'm stuck with the following error which I simply don't even understand. ERROR ITMS-9000: "Invalid Bundle Structure - The binary file 'MyApp.app/BuildAgent' is not permitted. Your app may contain only one executable file. When I export from the Archive with Xcode to IPA, I see that BuildAgent as 0 entitlement. Is that related to my error? What's a BuildAgent? How should I fix this? 回答1: Please remove any reference to BuildAgent executable file that was accompanied with the HockeySDK-iOS 来源: