Search results for

DTiPhoneSimulatorErrorDomain Code 2

158,544 results found

Post

Replies

Boosts

Views

Activity

Reply to Swift 4.2 code only runs once...
Hi All,I have cracked it.Simply delay code execution using the Dispatch framework. GDC framework.> DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) {> runagain() //this runs my code in the main thread.> //this code will be executed only after 2 seconds have been passed , I will eventually make this longer because I dont need to poll sensor as often. > }
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’18
Will 2 environmentObject work?
Ive read posts where you can pass 2 .environmentObject() but what i noticed is that if i call object1.objectWillChange.send() , object2 also is affected is this normal? or supposedly only published properties of object1 only gets affected? discussion quwstion. thoughts?
1
0
429
Dec ’22
Reply to Does Swift Playgrounds for iPad exist?
From the iOS 10 b2 Release Notes:Swift Playgrounds Swift Playgrounds is a brand new app designed to help people learn to code with Swift 3. It offers downloadable content, including Learn to Code Part 1—which teaches the fundamentals of coding in Swift—and additional challenges you can explore. You can also experiment on your own by creating playgrounds based on the templates, create a blank playground, or open playgrounds created in Xcode.Swift Playgrounds is included with iOS 10 beta 2 and up.Swift Playgrounds beta 2 contains Learn to Code Part 1. Learn to Code Part 2 is coming in later releases.Connect to Wi-Fi to download the Learn to Code and Challenge content. Cellular downloads are not supported.
Jul ’16
Combine two applications in to the new one
My company has customers in different cities. The company has developed two the same B2B applications (one application per city).There was some reason to do that, but now we need to combine them in to the new application and after that we will remove old applications. The applications too old and source code was lost. Is it possible to upload two empty applications that contains only link to download new application and some text that we have developed new app? Any other ideas to achieve that?
0
0
185
Dec ’15
How to use dataWithRequest in Swift 2?
let session = NSURLSession.sharedSession() if let url = NSURL(string: someURL) { let request = NSMutableURLRequest(URL: url) let task = session.dataTaskWithRequest(request) { (data, response, error) in if data != nil { print(NSString(data: data, encoding: NSUTF8StringEncoding)) } } task?.resume() }This one works fine on Swift 1.2 ( with println and task.resume() ) and I was able to get the data as I expected.But, when I run this code on Swift 2 (Xcode 7) I got rejected from the server. What is the correct way to implement this in Swift 2.0?
2
0
1.9k
Jun ’15
NSOutlineView with 2 columns
Hi, ALL,I am developing an application and I need to create NSOutlineView. I need it to look like the List Control (not a Tree Control). I need the control to not to have the column header. I also need the control to have 2 columns as follows:Second column will have a constant width (lets say 100 - this is not the actual width). It will be permanent for all rows in control.First column (the leftmost one) will have a width of (view_width - width_of_second_column).First column will contain the strings of the different width. The second column will contain the checkbox with the labelThere will be no horizontal scrollbar visible - the strings will be short enough to fit in the column.And as I said before - the control will not have a column header.Is creating such control with such layout possible?My understanding is that I can do something like this:[m_OutlineView setColumnAutoresizingStyle:NSTableViewSequentialColumnAutoresizingStyle];[column resizingMask:NSTableColumnAutoresizingMask];[m_OutlineView s
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
673
Jun ’20
Two-Finger DragGesture()
Hi everyone!How can one configure the DragGesture() to fire on two finger input instead of just one. In UIKit this was easily possilbe by setting the minimumNumberOfTouches and maximumNumberOfTouches properties on UIPanGestureRecoginzerThanks in advance!Max
1
0
2.0k
Apr ’20
Airplay 2 implementation on Linux
Hi all, I am looking for the information about the Airplay2 (client) implementation on linux but there aren't much info about it. As far as I searched on the internet, it seems possible to implement it on the linux by Swift which is cross platform supported solution, but I wonder what the specific procedure for developing Airplay 2 on the linux . Is Apple providing Airplay2 source code in Swift form? Is there any detail guide about this? if there's is any person who have experience about it, please share the information. Thanks.
0
0
1.3k
Oct ’21
Reply to Problem when using "if" statement in SwiftUI
the following code fails to compileYou should better show the error message, and more details to reproduce the issue.As you found, a slight change make your code compile successfully, so some this-code-compiles examples would not solve your problem.As far as I tried, this code compiles. var body: some View { VStack(alignment: .leading) { ForEach(0 ..< self.halfNumber) { index in BookItemGroupHorizontal(items: [self.items[index * 2], self.items[index * 2 + 1]] as [BudgetBook]) } if items.count % 2 == 1 { Text(it) } } }But I do not know what's happening inside the Swift compiler and cannot be sure if this solves your issue or not.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’20
Swift 2 REPL
HiWhere can I find the swift 2 REPL? I'm now running Mac OSX v10.11 with XCode 7 installed and running, but when I use the swift command in Terminal it tells me its using swift 1.2.Thanks in advance,Rugen Heidbuchel
1
0
405
Jun ’15
Programmatically determining if my user using Two Step, Two Factor or none
I want to help users enroll into Two Step / Two Factor authentication for iCloud in order to best secure their data.The tool I'm building is a privacy-helper tool that walks users through the nessary steps of achieving better security, and answers questions they may have along the way.To help with this workflow, I want to take my iCloud/ CloudKit app and determine what (if any) actions need to be taken. The only properties I need are:enum:isTwoStepisTwoFactornoneNo other personal information is needed other than that enum. Is this possible, or how can I request this to be a feature?
2
0
424
Apr ’17
CloudKit and Swift 2
I am trying to simultaiously learn iOS, Swift 2, x-code, and how to use CloudKit (yeah, unlikely). This is frustrating due to lack of Swift 2.0 examples provided by Apple and the fact that there's a lot of out-of-date info on the web. I have this code trying to get data out of the Cloud. Lines 40 & 41 throw consecutive statements on a line must be separated by ';' I don't understand the reason. I suspect I am conflating two different ways of using CloudKit in trying to hack something together from various examples. I can get records out from iCloud, but I am struggling to understand how to get data out, that is, what's in values={ . . . }}> as shown in output at line 38.If someone could point me in the direction of getting ICloudKit to work, I'd be greatful.import Foundation import CloudKit protocol CloudKitDelegate { func errorUpdating(error: NSError) func modelUpdated() } class MovieDataBase { var container : CKContainer var publicDB : CKDatabase let privateDB : CK
2
0
691
Oct ’15
watches 2 downgrade
it appears to be so many bugs on watchos 2 first my contacts are gone. Now sending heartbeat is totally wrong even receiving it. It beats so fast even if your last measure is 60. Even when you receive heartbeat is viberate so fast. Any solution? I'm regretting this upgrade
9
0
2.6k
Jun ’15