Post

Replies

Boosts

Views

Activity

Xcode upgrade to iOS won't install
There is some new UI in Xcode for upgrading OS versions. I clicked the new Get button at the top of the screen. It went and got the new iOS 17.4. Great, but it is just sitting there. After much floundering around, I eventually found the UI that has the Install button. Clicked it. Nothing happens. I have restarted Xcode several times, went looking for an Xcode update, no joy. My development is now dead for two days. Really not happy.
3
1
399
May ’24
Large array failure
I have a Swift project with some C code in it. The C code creates a byte array with about 600K elements. Compiling under Xcode, the compilation takes a really long time. When I try to run the code, it fails immediately upon startup. When I cut this large array out of the build, everything else works fine. Does anyone know what's going on here, and what I might do about it?
1
0
360
Apr ’24
Backspace character ⌫ is blue
My iOS app has a custom keyboard. I recently changed the backspace key glyph from ⬅️ to ⌫. The character is blue. All keys on the keyboard are created by the same code, and no other character does this. I looked around on the web, found several complaints about blue backgrounds for things like backspace and shift keys, but nothing about the character itself being blue. The character does not appear blue when I paste it into text. Does anyone have a clue?
1
0
357
Mar ’24
Compiler error messages disappearing
You know how XCode shows your compile errors in real time with the red ribbons to the right of the code? Now they are not there. Or they might appear occasionally after a deliberate build, but then they disappear after a few seconds, or after I click on anything. I can't write code like this. Yes, I have restarted. Didn't help. Is there some new configuration I have to set?
3
1
1.1k
Jun ’23
NSMutableAttributedString is irrational with 𝛑 and 𝒆.
NSMutableAttributedString does strange things with 𝛑 and 𝒆. This is Unicode "Mathematical Bold Small Pi" and the 𝒆 that is near it in the Unicode table. Less exotic characters don't have this problem. Changing the attribute map of an existing NSMutableAttributedString containing these characters with some foreground colors (like white, for instance) results in a strange doubling of the character when the resulting string is rendered in a CATextLayer. It doesn't happen if the NSMutableAttributedString is created with the different map. It only happens when you use #setAttributes on an existing string. Displaying an NSMutableAttributedString containing these characters with various colors applied in a UITextField results in the strange doubling regardless of the colors involved. Furthermore, attribute ranges are thrown off by this.
2
0
548
Jul ’22
CALayer.hitTest(CGPoint) EXC_BAD_ACCESS
In iPadOS, I'm building a tree on the screen using CALayer subclasses. Touching a visible node on the screen selects the node using CALayer.hitTest(CGPoint). This works reliably when I arrange the layers like this: But when I rearrange the same CALayer objects to look like this, after an unpredictable number of touches on the a*b composite structure, the app dies with EXC_BAD_ACCESS: Here is my code at the point of death. The LOOK HERE print statement just before invoking hitTest verifies that both layer and ksCGPoint have reasonable values. Here is the stack trace: Here is where the code actually dies in computeZ, which is called by CALayer.hitTest, which is invoked by VNode.touchesBegan, where VNode is a subclass of UIView. Does anyone know what's going on here, or how to fix it?
5
0
625
Jun ’22
Animation duration won't change
I am moving layers around using UIView.animate(withDuration:,animations:,completion:). The animation works as it is supposed to, but changing the duration parameter doesn't change the duration. It always goes at the same speed. What might I be doing wrong? Is there some global thing I have to turn on for this to work?
4
0
1.1k
Jan ’22
Delete local changes in Xcode?
I imported an external project into my project by dragging its project file into mine. It didn't work. Now those files show up whenever I check something in. I don't want them and I never select them at checkin, but how do I get rid of them? I don't find them in the underlying file system, and I haven't found any controls that will get rid of them. They appear in the source control navigator under the changes tab as Local Changes.
0
0
377
Dec ’21
UITextView only follows links once
I use UITextView to display rtf text loaded from a file. The text has links in it. Tapping a link opens the correct page in Safari. Then I go back to my app. When I tap another link, or even the same one, nothing happens. Is there some kind of reset that I have to invoke on UITextView to make this behave correctly?
2
0
661
Dec ’20
Memory management on older iOS
My app is configured for iOS 9.3.5. It runs fine on newer versions of iOS. But when I run it on an actual 9.3.5 device (iPad2 from 2011) it crashes with memory management issues. In particular, when a specific class is instantiated, the allocation is visible in the stack trace and the init runs. But as soon as I put anything into its instance variables, the deinit runs on that instance and the app crashes. I put a print statement at the start of the init method. That executes just fine. The next line is where value initializations begin, and that is where the deinit is invoked behind my back. I don't know why it would do this. Do you?
2
0
395
Dec ’20
iOS custom keyboard has stuff I don't want attached to it
I'm building an iPad app. I have a custom screen keyboard attached to a text field, which all works. But when it pops up, there is this other thing on top of it, containing four controls. These appear to be undo and redo arrows, copy-to-pasteboard, and a down-arrow over on the right. The down-arrow on the right makes this extra stuff go away, but not permanently. The other three controls don't seem to do anything. I don't want this stuff. I haven't figured out how to make it go away in code. I tried setting the text field's inputAccessoryView to nil. Didn't help. What is this thing? How do I make it go away? If I wanted to use it, how would I?
2
0
521
Sep ’20