Widget not appearing or loading on a specific Iphone - ios

I made a widget based off of the default template. It works on my phone when I run it on that, but when I uploaded it to TestFlight, one of my testers did not get the widget (he has an Iphone 6s). I checked with other testers and it showed up for them, so I tried installing the widget by running it from xcode and it still did not work. It doesn't crash, the app starts up fine except for the fact that it doesn't do anything. viewDidLoad() doesn't get called, along with widgetPerformUpdate().
The app runs fine on his phone, and other testers with a 6s didn't have any issue with using the widget.
Is there anything I can do or is it safe to assume it is a bug on the specific device? How can I troubleshoot this if no functions are getting called?
The only other thing I noticed about the phone is that the charging port was damaged in some way, making somewhat difficult to run the widget without the device being disconnected from xcode. However I am fairly certain I was able to completely run the widget with breakpoints and none of them were triggered.

Related

IOS widget can't update its content when Xcode debugger not attached, but it runs fine when the debugger is attached

My app provides a Lock Screen widget on iOS 16, the app retrieves and showing data from the Internet in the background every 15 mins.
When the app is attached with Xcode debugger, it can constantly retrieves and showing data smoothly, but after the debugger is un-attached, it will fail to show data most of the time.
For more context, the widget can run very well on the simulator with or without the debugger attached, the issue only occur on real device.
Since the debugger console and break points don't work with my Widgetkit extension after many attempt (looks like this is a common issue for Xcode), so it's hard for me to find out where the problem is.
What can make the difference from running the app with or without the debugger attached?
I need some directions to find the issue.
Any clue would be much appreciated.

How to debug react-native iOS app crashing on startup after a week or so

I started messing around with react-native. I've built a small application and it seems to work fine (package.json). I can work on it in Debug or Release mode, using the simulator or my iPhone 6S device, and all is well.
This app is just for me so I don't pay for the Apple Developer thing, and I just run the app in Release mode on my device, and it...seems to be fine? I can quit xcode and go places and the app works fine.
After a week or so, it's hard to tell, the app stops loading. It'll display the splash screen for a split second and then it's gone back to the home screen.
I setup Rollbar, but it doesn't catch anything. I look in the Privacy -> Analytics area and don't see anything there either.
I'm not really looking for an answer to my exact problem since various SO questions and other places suggest it's probably something weird and specific. My main problem is I don't know even where to look/how to debug this kind of thing. If I build the app and run it on device again, it'll run fine. I need to try to debug without loading new code, and have no idea how that works on iOS. I've tried poking around at the Debug -> Attach to Process by Name, but the app never gets far enough to do anything with that.
Alternatively, I throw react-native in the garbage and use something that works...
App provisioning with a free developer license (?) is 7 days. See: Why does my free XCode Provisioning Profile only last 7 days?
You can likely verify this by looking at error messages in the console window. Connect your device, and in Xcode go to Window/Devices and Simulators/Open Console, then launch your app.

Released app crashes several days after install

I have developed an app and have it successfully released on App Store. I have downloaded it from the App Store onto my device. At first everything worked perfectly, until after a few days, when some parts of (not all of) the app stops working properly, specifically, the device returns to its home screen when certain buttons are clicked.I have received reports from users about this issue as well.
After using XCode to build and run the app on my device, everything goes back to normal. Since this only happens after several days have passed, I cannot recreate this problem right now, hence apologies for not having error messages to show. Any ideas on possible reasons of this issue?

Today Widget debugging: Crashes not showing up in TestFlight?

I have several beta users who are testing (via TestFlight Internal Testing) an app I've built which features a Today widget. Many of them are reporting frequent crashes (The widget appears, then when it attempts to update, the "Unable To Load" message appears in its place). I've replicated it on my own phone as well.
However, TestFlight is reporting zero crashes, even after this has been going on for several days. Does this have to do with the fact that it's the extension, rather than the main app, that's crashing? If so, how can I get at the extension's crash logs?

tvOS Difference Between TestFlight Installed App and Direct USB Run App on AppleTV Hardware

I am working to add a TopShelf implementation to my tvOS app. I am also working to create a Collection View implementation that has a similar functionality from within the app. Both work fine in the simulator on my Mac but don't work when deploying to my Apple TV using TestFlight. I tried using the USB-C cable to try to capture some logs or see what is going on when the UIActivityIndicator just spins. I thought it could be related to trying to download too many images or some other networking issue. I started caching the images and again that works well in the simulator but not on the device.
When I plugged into the device and ran the app it worked as it should, even with a higher number of downloads. I later updated the version via TestFlight and was back at the same position. Right now I am in a position where the app works every time with my own view controller and the TopShelf part, but does not work at all if deployed via TestFlight. I can't get any logs to figure out what is going on because when I connect the USB cable and run the app, it starts working.
Has anyone seen similar behavior or know of any way to troubleshoot what is going on?
I was able to determine there were a couple of things going on. The first was that the simulator was setup for a build configuration of debug. I went in to Edit Scheme and changed the Build Configuration for Run to "Release." This allowed me to recreate on the simulator what I was seeing on the device. It also made it a lot easier to debug as I could easily add logs to track down where the code was hanging.
The root of the problem was that I had a while loop doing nothing while I waited for a network block to update a flag. I've used this hack in other situations and have never run into a problem. If I added one NSLog command to the while loop it would flow through fine, but with nothing in the loop it just hung even though the network dispatch was done downloading data.
To fix this, I read up on using
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER)
which solved my problem (and I'm assuming made my code a lot more reliable too).

Resources