Post

Replies

Boosts

Views

Activity

Storyboards not setting the proper custom font in Xcode 15.0 for iOS
Have an app with Storyboards that use a few customer fonts (Poppins and FontAwesome). No issues at all in Xcode 14. Updated to Xcode 15, and can build clean and run no issues reported. But many of the buttons and labels have the incorrect custom Font assigned - instead of FontAwesome, the get assigned Poppin. In a few cases FontAwesome is used, but the incorrect weight (I log the button font in awakeFromNib. I've looked at the Storyboard XML, it looks fine, and if I set the font to some system font all works fine. Setting it to a system font, then back to FontAwesome does not fix anything, and the XML looks identical to what it was before. I'm at a total loss as to what to do next. Any suggestions most appreciated. PS: in awakeFromNib, I can set the font to the correct FontAwsome font, and the control shows as it should. So the font works from code, not from the Storyboard.
2
0
1.8k
Oct ’23
Did autorelease pools become no-ops? Look at this memory usage graph!
Have an app in the store - 10K users. Using the same algorithm for years to download objects, convert them to ManagedObjects, then save them in a context. Been using the exact same Objective-C code for over 5 years - no changes. We build the app with Xcode 15.1, release it a few weeks ago, then slowly start getting reports of the app won't boot. Run the app in 15.1, look at memory usage, and it's a flat line up. But the code is littered with autorelease statements. For this download, max memory was 2.3G! No wonder so many users crashing! [Worked two weekends straight to get this fixed, but why did it happen???] The last developer told me he added those to reduce memory pressure, and that they worked for him. (Unfortunately no old memory usage graphs). But look at the attached image - memory usage increments in a straight line - no saw tooth where memory would get released. Oh, and this is in one runloop on the main thread (don't blame me, I didn't write the original code!):
2
0
629
Feb ’24
Bonjour stopped responding in iOS15
My company's app uses the following code to look for services advertised by a Garmin VIRB 360 camera (now discontinued and unsupported). In the past this code has worked fine. However, on my iPhone 12 Pro Max running iOS 15.0.2 it returns no services. let serviceBrowser = NetServiceBrowser() serviceBrowser.searchForServices(ofType: "_garmin-virb._tcp.", inDomain: "local.") Did something change in iOS 15? Do I need some entitlement? Is the format of the strings incorrect? My recollection is that the strings are from Garmin document (but its years old). Any help greatly appreciated!
3
0
1.1k
Oct ’21
NWPathMonitor.pathUpdateHandler behavior
In my case there are three interfaces. I had a mental model that I now believe is incorrect. If any of the 3 interfaces is "satisfied", then I get one message telling me so. I guess if that one interface goes down, then I should get a second message that tells me that (this is hard to test as Xcode keeps disconnecting from my device when I switch to Settings to change things). in my case, wifi and cellular are both on. I launch the app, get notified that wifi is satisfied, but nothing on cellular. So my guess is there is a hierarchy: wired, wifi, and cellular. If the highest priority path is available, the others are assumed "off" since you have a path. Thus, you will never get "satisfied" for more than one path. Correct?
3
0
475
Dec ’24
App is at 1% deployment, gets updated, what happens then?
Some confusion in my company on this scenario: current users are on 1.0.0 - have been for months Apple approves our latest build, say 1.1.0, and we release to the App Store with "Slow Rollout" a few days later, one of the first 1% reports a serious bug the dev team immediately fixes the bug, QA approves it, and we upload a new 1.1.1 release the same day we ask Apple for expedited approval, and that happens in 3 hours we select "Release 1.1.1 on Slow Rollout" on the App Store. So what then? My understanding is that once 1.1.1 is released, since 1.1.0 is the "Official Release", that anyone with auto update turned on will update quickly to 1.1.0, and that then some of those users will be put into the "1.1.1 slow roll out candidate pool)". Others have opined that I'm wrong - that most users will stay at 1.0.0, and the new 1.1.1 candidate pool will be users on both 1.0.0 and 1.1.0. Would love to hear someone reply who knows what Apple will really do.
4
0
744
Oct ’23
Objective-C: instantiating a Class object
My company wants to be insure that if my Objective-C to Swift conversions fail in anyway, that the app can revert to using the older Objective-C code. By using a remotely controllable flag, the app can switch which code runs as, both are compiled into the app. Essentially, I create a protocol that describes the original class, then both classes (with a "s" or "o" appended to them) conform to the protocol. Protocol: Object Objective-C class: oObject Swift class: sObject That said, I hit one issue that I just can't seem reason out. I create a Objective-C function that returns the appropriate class: Class<Object> classObject(void) { if (myFlag) { return [sObject class]; } else { return [oObject class]; } } Swift deals with this really well - I can create an initialized object using: let object = classObject().init() but I cannot find a way to do this in Objective-C: Object *object = [[classSalesForceData() alloc] init]; fails with "No known class method for selector 'alloc'" Is there a way to do this? David PS: my workaround is to return an allocated object: Object *createObject(void) { if (myFlag) { return [sObject alloc]; } else { return [oObject alloc]; } }
4
0
498
Feb ’25
"private lazy var ..." thread safe?
Just had a weird crash in development in Simulator - first of a kind. The crash was on this line:private lazy var regExTrimSet = NSCharacterSet(charactersInString: " \t\r\n_")and the error was some malloc() already released (grrr, should have copied it). Should that be thread safe? [Its being referenced by a bunch of concurrent blocks at one point]Also, I tried to find out where the Xcode console log might get written, but had no luck finding a link. Is there one that this error should be logged to?
6
0
5.0k
May ’22
xcframework: how to wrap a static library?
This topic was touched on in the notes for the WWDC 2019 session on Binary Frameworks - I even watched the whole video but it wasn't covered there.It appears I should be able to wrap a static library - one that is created by its own (complex) build scripts - and have iOS, iOS Simulator and macOS versions. Also, that the header files can be included as well.I have been unable to find any information googling around on how one might do this. I would greatly appreciate any pointers to some blog/post that covers this.Thanks!
9
1
16k
Oct ’22