xcode6

iOS 8 crashing in a weird pattern

╄→尐↘猪︶ㄣ 提交于 2019-12-11 03:24:37
问题 I have spent over a ton of hours working on an app, it works perfectly on iOS 7, both on device and simulator. When I run it on iOS 8, it works perfectly on simulator. But for some reason, when I run it on my iOS 8 device, it starts crashing weirdly. If I implement CLLocation, the app will run smoothly for the first 5 times that I run it. Then it will crash the MOMENT I compile it for the next 5 times. After that 5 times, it starts compiling smoothly again. Then after 5 more times, it crashes

How to embed private Objective-C framework into iOS app on Xcode 6 with workspaces

强颜欢笑 提交于 2019-12-11 03:22:29
问题 I have written a small private framework that I want to share between a few iOS apps. Here is the work flow I envision: Pull SimpleApp from source control. Pull BobFramework from source control. Somehow embed BobFramework into SimpleApp using Xcode. Build project. Done! The problem is how do I accomplish the "embed using Xcode" step? I cannot find step-by-step instructions on how to do this. Apple's docs are an out-of-date lie. All the Stack Overflow questions I have found assume readers know

Warning when presenting UIActivityViewController

牧云@^-^@ 提交于 2019-12-11 02:59:30
问题 When i present an UIActivityController using the code below i get, it is presented but the console shows " Warning: Attempt to present <UIActivityViewController: 0x7f8788e7aed0> on <MyApp.CustomTableViewController: 0x7f8788e3db60> which is already presenting (null) ". @IBAction func shareImage(sender: AnyObject) { let images: [UIImage] = [image.image!] let activityViewController = UIActivityViewController(activityItems: images, applicationActivities: nil) self.presentViewController

Making four separate variables

左心房为你撑大大i 提交于 2019-12-11 02:57:26
问题 I am trying to make four separate variables that are all different so that a and b are different, a and c are different, b and c are different and so on so forth. Here are the four variables. var a = Int(arc4random_uniform(5)) var b = Int(arc4random_uniform(5)) var c = Int(arc4random_uniform(5)) var d = Int(arc4random_uniform(5)) 回答1: let a = Int(arc4random_uniform(5)) var b = Int(arc4random_uniform(5)) while b == a { b = Int(arc4random_uniform(5)) } var c = Int(arc4random_uniform(5)) while c

Xcode 6.1 Swift Extensions - SourceKit Service Crash

↘锁芯ラ 提交于 2019-12-11 02:37:34
问题 I am trying to add an extension to Swift so I can format Doubles as found in this answer here Precision String Format Specifier In Swift Not ideal, but best solution I can find so far. However I cannot seem to add extensions to my project. Extensions work fine on playground, but when I try to add it to my project, I get the SourceKit service crash error every time I try to add the code in. I also get an error stating "declaration is only valid at file scope". I have not previously used

Provisioning Profiles menu item missing from Xcode 6 (as opposed to Xcode 5)

非 Y 不嫁゛ 提交于 2019-12-10 23:37:06
问题 Xcode 6 does not have a menu item to access provisioning profiles. How can one manage existing provisioning profiles (list, delete, etc)? For reference purposes, a similar question was asked pertaining to Xcode 5: Provisioning Profiles menu item missing from Xcode 5 I commented on the selected answer that in Xcode 6 the Accounts tab now shows Repositories. I was encouraged to start a new question to help others find information relevant to Xcode 6. 回答1: Adding Apple ID As Bo A points out, in

Unwind segue and nav button items not triggering after tab bar controller added

纵饮孤独 提交于 2019-12-10 22:30:17
问题 I'm trying to implement an unwind segue that will take me from the last view controller back to the todo-list controller. Here's my storyboard Without the tab bar controller, the unwind segue works fine. However, as soon as I add the tab bar controller, the unwind stopped triggering. What am I doing wrong? Thanks Edit: Also, actions created on the bar button in the last view controller do not trigger when the tab bar controller is implemented 回答1: I have had a similar situation and I was able

C array memory deallocation from swift

白昼怎懂夜的黑 提交于 2019-12-10 21:49:45
问题 var cpuInfo: processor_info_array_t = nil var numCpuInfo: mach_msg_type_number_t = 0 var coresTotalUsage: Float = 0.0 var numCPUsU: natural_t = 0 let err = host_processor_info(mach_host_self(), PROCESSOR_CPU_LOAD_INFO, &numCPUsU, &cpuInfo, &numCpuInfo); assert(err == KERN_SUCCESS, "Failed call to host_processor_info") Hi, I am calling the above C API host_processor_info to get process load informations from swift, no problem there. cpuInfo is a inout parameter (pointer) that, on return, will

iOS 8 Core Data Issue: global ID may not be temporary when recording

社会主义新天地 提交于 2019-12-10 21:08:35
问题 I'm migrating my App from iOS 7 to iOS 8, and I've been receiving the following error in Xcode when I try to save the Core Data context. This error was not present in iOS 7 and Xcode 5. This is the code I am trying to run: [_managedObjectContext save:&error] This is the exception: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'recordChangeSnapshot:forObjectID:: global ID may not be temporary when recording Here's the code for my managedObjectContext: -

could not find member subscript

流过昼夜 提交于 2019-12-10 20:51:11
问题 I am trying to execute the following code and getting the error Could not find member 'subscript on Xcode6 var b:[[Float]] = [[1,2]] var i2 = 0 // second to last control point var pointIm1 = CGPoint(x: 0.0,y: 0.0) var pointI = CGPoint(x: 0.0,y: 0.0) var pointIp1 = CGPoint(x: 0.0,y: 0.0) var px:Float = b[0][0] * Float(pointIm1.x) + b[0][0] * Float(pointI.x) + b[0][0] + b[0][0] * Float(pointIp1.x) Anyone has idea why is giving error Edit: Do anyone have better idea or i need to create different