Search results for

DTiPhoneSimulatorErrorDomain Code 2

158,533 results found

Post

Replies

Boosts

Views

Activity

Unable to Migrate App to WatchOS 2
When I opened my project for the first time in Xcode 7, I was given the option to convert all of my code to Swift 2, which I did. But my WatchApp was never updated to WatchOS2. Now when I try to change the Base SDK, Xcode just crashes on me. Is there any other way to migrate my WatchApp and WatchKitExtension to WatchOS 2?
0
0
342
Jun ’15
I have two objects colliding that shouldn't be
I have two objects that collide even when they are not moving, and are apart from each other. Now I know it's rude not to include code. But before I start reducing my code to post it up here, at let me describe what's happening with a photo. Maybe I'll get lucky and it's something I'm overlooking since I am still learning. Here are the two screenshots. I had to spilt the link because the forum won't let me post it completely. https ://i.ibb.co/QYHcp3L/Untitled.png In the left shot, everything you see, the two balls, and the left and bottom edges are created where you see them. The only thing I have not done is given the edges their SKPhysicsBodies. The edges purposes are just to keep the balls on screen. My intent is to keep the edges just a little off screen, but the same thing happens. I merely moved them in for the screenshots. But in the right shot, I've just given the edges their physics bodies, isPinned is set to true for the edges and the masks are set so th
2
0
451
Oct ’20
watchOS 2 Keychain
I know that with watchOS 2 group containers are no longer allowed however I would like to know if this alos applies to accessGroup for keychain. I did not see any specific mention of this in the Apple Migration Docs. Will keychain with accessGroup still work in watchOS 2 or do we need to figure out some other way to track user login status???
0
0
359
Jun ’15
Aligning two images
Hi,I just started learning swift and was wondering, if there is any way to align two images to each other. My scenario would be the following: I have two picutures taken shortly after each other and now I have to align them. In python I am using a histogram registration approach for that and I was wondering, if an implementation of this exists already somewhere in swift. Or some other algorithm that does that.I really appreciate your help.Best,
0
0
343
Apr ’16
Issue with Reachability.m in Swift 2
Hello.Updated to xCode 7 and swift 2 and now cannot implement the Reachability functionality in my application. Using the following code to check the status of connection:func statusChangedWithReachability(currentReachabilityStatus: Reachability) { var networkStatus : NetworkStatus = currentReachabilityStatus.currentReachabilityStatus() var statusString : String = print(Network Status value: (networkStatus.value)) if networkStatus.value == NotReachable.value { print(Network Not Reachable...) reachabilityStatus = kNOTREACHABLE } else if networkStatus.value == ReachableViaWiFi.value { print(Reachable via WIFI...) reachabilityStatus = kREACHABLEWITHWIFI } else if networkStatus.value == ReachableViaWWAN.value { print(Reachable via WWAN...) reachabilityStatus = kREACHABLEWITHWWAN } }Against each networkStatus.value have an error: Value of type 'NetworkStatus' has no member 'value'. How should I implement this function in Swift 2?Thanks a lot!
3
0
4.9k
Sep ’15
Performance Issues with UITextView and TextKit 2
I've been working with UITextView and TextKit 2, which became the default text engine since iOS 16, and I've encountered performance issues when handling very large text documents. Even on iPhone 14 Pro, I've noticed stuttering and frame drops when scrolling through the text view containing a large amount of text. To reproduce the issue, you can use the following code: // In iOS 16 let textView = UITextView() textView.text = some really large string (say 1 million characters) The scrolling performance in this scenario is not smooth. However, if you switch to TextKit 1 by accessing the layoutManager property, the performance significantly improves: // In iOS 16 let textView = UITextView() let _ = textView.layoutManager // this enables the compatibility mode textView.text = some really large string (say 1 million characters) With this code, scrolling remains smooth even with large text documents. It's very disappointing to see TextKit 2 performing worse than TextKit 1, even t
2
0
2k
May ’23
Reply to bindings with custom fieldeditor problem
The sample code does two things you're missing:Boy did I feel stupid after reading that comment 😟I did read the documentation but for some reason I missed those 2 critical lines of code.1. It sets the fieldEditor property to YES.2. It creates one field editor and caches itAs it seems both are required!It now works as expected
Topic: UI Frameworks SubTopic: AppKit Tags:
Jun ’17
Reply to Problems with randomised array items
You do not show the code where the UILabel is set, so it is difficult to be sure.Do you usevar question = [1+1=2, 2+2=22]somewhere ?But most likely you have a synchronization issue, because UILabel is not updated yet, but code has moved after. That's often the case when you have an alert and try to use the result of the alert outside of the alert code.There are several solution:- using completion handlers- setting semaphoresBut once again, need to see your code first.
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’18