I've got a MacOS app, written in Python, using Tkinter, and built into a MyAppName.app bundle with pyinstaller.
When I run open -a MyAppName in terminal, everything works, great.
When I run /path/to/app/dist/MyAppName.app/Contents/MacOS/main, it works and I see terminal output. Great!
However, when I double-click on MyAppName.app, it bounces around in the icon tray a bit then disappears. If I change the app to just open a message box, it works, so I know it's something about the app itself that's wrong.
How can I debug this? Is there some way I can see the logs from the app after opening it in finder, so I can find out what is crashing?
Related
Recently I developed an application in Xcode using Swift that starts up the Terminal like this and:
open -a /Application/Utilities/Terminal.app /project/run_stack.sh
After exporting the Application and trying to run it I get this message if my Terminal is running already or I have previously started the same command from the same app (the command is executed through a menu item).
ru_stack.sh can’t be opened because Sandbox is not allowed to open documents in Terminal.
Anyone know why this happens ? If I run it on my Mac it works fine and each time a new terminal starts on the call but when I tried the application on my friend's Mac we get that error in the described cases.
I was having the same problem. I ended up setting iTerm2 as the "Open With" application for .sh files and that fixed my issue. https://iterm2.com/
I have an electron app I develop on MacOS and build for Windows. I can properly install the .exe that's generated from electron-builder on to Windows.
When I run the app on Windows, I get a spinning loader for 1-2 sec. and then nothing happens. The app, when running properly, shows an icon in the task bar and opens a browser window for the user to login.
I'm using electron-log, but nothing is printed to the logs. It seems like the app is dying before it can start. I'm looking through Event Viewer and don't see anything obvious. I feel like I'm missing something and don't have a great way to understand what's happening.
Any suggestions on where to look on Windows 10 to understand why an electron app isn't doing anything?
So I'm trying to track down an issue that crops up when I'm NOT debugging with Xcode on the Apple watch, and I've discovered that the Apple Watch has some serious problems with console output if it wasn't launched via the debugger. Given the following code:
- (IBAction)onPrint:(id)sender
{
NSLog(#"############## Printing! ##################");
printf("************** Printf! ******************\n");
}
When launching via the debugger, it shows both lines in Xcode's console window. Great, no problems there.
If, however, I launch the watch app manually (from the watch itself), I get nothing in the console log via the devices window in Xcode, and nothing in the Console app on the mac (other than the normal "kernel[0] : prevent idle sleep list" messages the watch emits to the console from time to time).
I also tried connecting to the watch extension process using the Debug -> Attach to Process menu in Xcode, but it still won't print anything. Clear console, reload console... nothing works. I've looked all over SO for answers, and tried everything marked as an accepted answer or not, but nothing seems to work. This app is as simple as it can get: A single button that executes the code above to print to the console.
Is it just broken? Or is there some other arcane magic I must weave? I'm running Xcode 8.1 and WatchOS 3.1 on an Apple Watch 2.
It looks like this is just a limitation of WatchOS. The only way I've been able to get data back is by storing logs in a file and then fetching the file later.
Thing that can help you is called sysanalyse: you'll have to add special profile to both iPhone and Watch, and this will allow to see your app's logs in Console and via sysanalyse reports. Instructions and profiles are provided here.
If you are debugging background tasks, important to know: watchos's daemon will not terminate process what had already used it's background execution time limit if it is connected to debugger.
This is really odd because I was able to see log statements on the console. It's just now, I'm not. This is for Watch OS 6, xcode 11.2.1.
I've followed the directions from: https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/DistributingApplicationsOutside/DistributingApplicationsOutside.html
I am able to run and archive the application, but when I attempt to open the application (double clicking and control clicking -> open) Nothing happens. The app doesn't seem to run and I get no error messages.
Any direction on to what to do would be great, even if I could get an error message that would be useful.
Thanks.
I am trying to make a kiosk, I actually wanted to lauch my app before the Finder got launched, I wrote the following command:
defaults write com.apple.loginwindow Finder ~/Desktop/myapp.app
and it worked, but now I have a huge issue, my Finder wont get launched at all, instead everytime my application is launched when I press the Finder, Before I was getting erroR -10810 but I fixed that. I tried reversing the process but it isnt working. My mac is useless and I cant get to my files.
Target is to reverse the process and make my finder works again as normal