I have an app for watchOS 3 that works perfectly fine and doesn't really do much. But when I try to launch and debug it on a real device the app crashes and the console logs this:
SandboxViolation: logd(46) deny(1) file-read-data /private/var/containers/Bundle/Application/*Identifier*/*appname*/Frameworks/libswiftos.dylib
I honestly have no clue what is going wrong. I remember it to work before but then on one point it stopped (can't remember changing anything relevant)
Usually this is because you requested for something that requires permission (e.g. Location, Contacts, etc) and didn't provide a permission reason in the Info.plist file.
In my case the solution was that the Watch app took too long to launch. I deleted all upfront initialisation and found out that it was somehow too much (In fact I wasn't doing that much but initialising a picker with images from an extension which took too much time).
After optimising this it worked as expected!
Related
I've got an app that uses Core Data that sporadically stops launching so I have to reinstall it using XCode and then it launches again like normal for a while, with all the Core Data information still preserved.
I have seen that an app often stops launching when the target of an app is too low in comparison to the device software version, however this is not so for this app and device (iPhone 6s).
Have you had such an issue before? What do you think could be causing this problem?
There are many, many, many things that could cause an app to fail to launch. You need to narrow things down and collect some data so that you can find out what the problem is and do something about it. Right now you don't even know that it's related to Core Data, you're just guessing.
For a crash on launch, look at the device console and see what messages appear when you try to launch the app and it fails. You can get the device console messages by
Connecting your device to your Mac
Opening Xcode's "Devices" window (cmd-shift-2)
Looking in the bottom half of the window
A better way to watch the console is to use the free iOS Console app.
The problem was that, as mentioned by dan in the comments, the code was being signed for a short period of time (7 days) and so I had to keep re-installing it on the iOS device to keep it working. Thus to keep the app working indefinitely a paid developer account is needed.
Also mentioned in this reddit forum:
https://www.reddit.com/r/jailbreak/comments/4hotx3/news_free_developer_account_installs_reduced_to_7/
A user has reported that my app suddenly won't launch on their device. They sent me a video, and they launch the app, the launch image screen shows for a split second, but then crashes back to the iOS home screen.
The user tried deleting and reinstalling the app with no benefit.
I use Crashlytics, and am not getting any reports of crashes from them (or any other user- although I've seen them in prior versions so I know it's working correctly). I'm also not seeing any crashes in iTunes connect.
I asked the user to send me any crash reports in the Settings Diagnostics section and they said there are none listed for my app.
I have confirmed that their iOS version is supported by my app. (iOS 8.4).
I'm not sure where to go next, and would appreciate any pointers. Sorry for the vague question but I have posted everything that I know about the situation.
Just wanted to provide some closure on this. The user ended up wiping and restoring their device, and it solved the problem. It seems extreme to me but it was their own suggestion and didn't take them long to do. So I'm not sure what caused this but that's one (albeit brute force) way to fix it.
I'm close to completing my first app and I just discovered a potentially devastating issue. When the battery ran out on my iPhone my app would not open after recharge. Whatever happened, it appears to have been fatal. I was able to recreate the error on another iPhone as well.
Can anyone help me? I have found very little about this on the internet.
I seems to me that you store some data for your app on the device. And this data is in incorrect state after the recharge. Try to figure it out and rewrite data saving code.
I know it's a bit weird but I have no code at all to put here, unless I copy all of it.
My project is crashing with no apparent reason. I've read this solution: iPhone application is crashing and not leaving behind a .crash log file
and I'm using Instrument for searching for leaks and other possibilities for those crashes.
Another strange thing is: even when I run my app with debug on XCode, it just stop to work on my IPad but it looks it is still running.
And the last and more strange thing: there's no crash log at all on my device. Before somebody ask, it is enable to record crash logs.
Does anybody have any idea for helping me?
Regards
I've had this happen to me before on various platforms. If its crashing on you, whether its an iPhone app, openGL / DirectX program, try these steps:
Have you tried to undo your last change and get to the point where it last worked?
Have you tried placing a print outputs to the terminal to see how far your program is executing? Start at the beginning and work your way into your program. This is especially useful when there is no crash log.
Also in particular to iPhone apps: Have you checked your xib's? Did you recently re-factor and change the name of a class maybe? You might need to re-link your nib to your classes. This on more than one occasion has caused apps of mine to crash with no error. Hope this helps.
I doubt you are still wondering about this, but my answer is that you were experiencing your app getting killed by the OS due to using too much memory. This will silently fail in the log in my experience when running on the device.
You will have to go into the Organizer to the device console and crash reports that get stored on the device to see the clues.
The reason your crash stopped when you got an iPad 2 is because the iPad 2 has twice the memory of the iPad 1 (which is dramatically under-stocked with RAM)
I have an app I have written for IOS3, but I want to polish it up for IOS4. What do I have to do differently (or in addition). I have noticed that every one in a great while, it will crash on the hardware at startup, but I haven't yet gotten a good debug session while it does it. I am hoping that the info received here will help me solve that problem also. (Note that I didn't have the crashes pre-IOS4.)
Thanks
Really, there isn't much that is required. If your build is clean of warnings and you have implemented applicationWillResignActive to save all your data you should be fine with iOS 4 and the multi-tasking features added. Supporting anything else isn't required to run on iOS 4...