Post

Replies

Boosts

Views

Activity

XCUIElement with zero frame but showing.
I have a bug I am writing a UI Test for and I am struggling to find a way to test the fixed UI vs the buggy UI. In the buggy version, the UI element is visible on the screen but has a 0,0 width and height. It's visible because it's not set to 'clip to bounds', so it's overlaying the rest of my UI. The app sets the element to be hidden in certain situations and I wanted to make sure in my test, that it's not on the screen in that situation. The problem is that .exists returns true in both situations (.hidden == true, .hidden == false), and .isHittable always returns false because its either no on the screen at all or has a 0,0 width, height. So I can't use .exists; I can't use .isHittable; and I can't use the .frame either. Is there simply a way to check if it's actually visible?
1
0
599
Jun ’24
Swift Charts use custom font for legend
We have a custom font we use through-out our app we've recently starting playing with Swift Charts but can't work out how to use our font in the chart legend easily. Currently we have a simple chart using the default .chartLegend(...). I've managed to use our font in the X-axis and Y-axis by creating our own labels using AxisValueLabel() {} However without making our own completely custom legend, is there a way to specify the font to use in the legend?
0
0
1.1k
Jan ’23
Our app can consistently kill springboard
In our app we have a form builder and something that has been working fine for years now crashes springboard every time without fail. The whole screen goes black with a grey spinner in the middle, and then after a little period I get put back on the home screen. In the Xcode Simulator, it doesn't crash springboard but instead the Simulator process and its child 'backboardd' end up using up all the memory in my machine until either it grinds my machine to the point its barely usable or I manually force kill the backboardd process. I really dont understand how my sandboxed app is killing springboard. I've gone through my code and commented out bits until it stopped crashing springboard, and its something to do with calling invalidateIntrinsicContentSize of a UIView. I suspect this is not the issue and may just be some weird side affect of the real problem. I need to have that code in there, so I really can't ship a version without it easily. I really dont want to rewrite alot of my layout code here. Because my app is not 'crashing', I'm not getting any crash logs so I really can't tell how many of my users are being affected by this. Has anyone had an experience with anything like this? Any suggestions? I have filed a Feedback (FB11751672), and I am hopeful that it has enough information.
2
0
944
Nov ’22
UIImagePicker returns without an image
Currently I'm using UIImagePickerController to allow our users to take photos within the app like so: UIImagePickerController *picker = [UIImagePickerController new]; picker.sourceType = UIImagePickerControllerSourceTypeCamera; picker.mediaTypes = @[(NSString *)kUTTypeImage]; picker.delegate = self; [self presentViewController:picker animated:YES completion:nil]; And I use the delegate method to get the image out and do what is needed: -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info { // Do stuff. } This seems to work fine for 99.9% of our users but for some reason we occasionally have an odd info dictionary with no image in it. When I print the info dictionary, it looks like this every time: {    UIImagePickerControllerMediaMetadata =     {        "{MakerApple}" =         {            25 = 0;        };    };    UIImagePickerControllerMediaType = "public.image"; } As you can see there is no UIImagePickerControllerEditedImage or UIImagePickerControllerOriginalImage in that dictionary. Anyone have any ideas on what this is, and what I might be able to do to 'fix it' ?
0
0
521
Jun ’22