Post

Replies

Boosts

Views

Activity

iOS 16 simulator keyboardWillShowNotification firing every keystroke
Just downloaded and installed the latest Xcode and simulator (Version 14.0 (14A309)). I have an in progress app that listens to keyboardWillShowNotification to move the screen up. As of iOS 16, keyboardWillShowNotification keeps firing every (or every few) key strokes. The additional events seem to all come in with animation duration of 0. Seems like a huge bug, maybe i'm missing something First correct event: keyboard will show: NSConcreteNotification 0x600002d67f20 {name = UIKeyboardWillShowNotification; userInfo = {   UIKeyboardAnimationCurveUserInfoKey = 7;   UIKeyboardAnimationDurationUserInfoKey = "0.25";   UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {393, 119}}";   UIKeyboardCenterBeginUserInfoKey = "NSPoint: {196.5, 911.5}";   UIKeyboardCenterEndUserInfoKey = "NSPoint: {196.5, 867.5}";   UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 852}, {393, 119}}";   UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 808}, {393, 119}}";   UIKeyboardIsLocalUserInfoKey = 1; }} Second event after typing a few characters: keyboard will show: NSConcreteNotification 0x600002d1c8e0 {name = UIKeyboardWillShowNotification; userInfo = {   UIKeyboardAnimationCurveUserInfoKey = 7;   UIKeyboardAnimationDurationUserInfoKey = 0;   UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {393, 119}}";   UIKeyboardCenterBeginUserInfoKey = "NSPoint: {196.5, 867.5}";   UIKeyboardCenterEndUserInfoKey = "NSPoint: {196.5, 867.5}";   UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 808}, {393, 119}}";   UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 808}, {393, 119}}";   UIKeyboardIsLocalUserInfoKey = 1; }} Was successfully able to return to previous experience by adding a check if duration exists and is not zero to my callback logic. Feels like that shouldn't be necessary if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue, let duration = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? String), duration != "0" {
0
0
1.3k
Sep ’22
Xcode SPM will only search for my fork
Some time ago I was trying to use a Swift package, but there was an issue in the github repo, so I forked it, fixed it and pointed Xcode towards my fork. I contacted the team and they resolved the issue. I want to go back to using the official version, but Xcode will only pick up my fork. Even if I delete my fork, Xcode thinks it might be private access and is asking me for new credentials, rather than using the url i'm supplying. I've tried removing the dependency, clearing cache, derived data, package.resolved, restarted Xcode, restarted MacOS etc. Nothing seems to work. You can see in the below picture i've typed in https://github.com/airgap-it/... but its complaining that it can't find https://github.com/simonmcl/... Anyone have any idea how to clear whatever is lingering around?
1
0
1.9k
May ’22
Mismatched Translation
I'm experimenting with github actions, xcodebuild -exportLocalizations / xcodebuild -importLocalizations and the web application lokalise.com, trying to automate the localisation process for my app. As a test I marked all my storyboards as localisable with base (english) localisation, exported the .xcloc and imported it into lokalise. Lokalise correctly imports this as English and shows all the keys / values. If I make any change to the English translations as a test (such as adding a "$" to the end), Lokalise changes both source and target inside the xliff <trans-unit id="JOQ-R1-RUU.text"> <source>Total $</source> <target>Total $</target> <note>Class = "UILabel"; text = "Total"; ObjectID = "JOQ-R1-RUU";</note> </trans-unit> I'm assuming this is what I would want. Given English is my base language. I would want my storyboard to update and display this new value while i'm working on it, not just on my app when its set to English. However when I import (either manually or via command line) I get a warning about a mismatch with no option to accept the new value. Importing just ignores it and does nothing. Is there no way to tell Xcode that this is what I want, accept the change?
1
0
1.5k
Oct ’21
Xcode 12.5 Interface Builder can't find framework
I've just received my M1 MacMini and i'm trying to get my current project setup and running. My project is using storyboards and all my IBDesignables are in a separate framework embedded inside the project as a separate target. This all functions perfectly on my old machine running Xcode 12.4. On the M1 the simulator launches and displays the app correctly, but interface builder can't render my custom controls. The error it gives, says it is looking for my framework in: ".../xcode/DerivedData/.../products/Debug-iphoneos/..." This path doesn't exist but this one does: "....products/Debug-iphonesimulator/..." How do I either generate the "Debug-iphoneos" that interface builder is looking for, or how do I tell it to use the one thats present? I've tried changing some of the settings around "Build active architecture only" and made sure the framework wasn't excluding arm64. But none of this works and i'm out of my depth trying to learn all of this stuff at once
0
0
1.3k
Apr ’21