Posts

Post not yet marked as solved
2 Replies
imneo, thanks. I can't find a "View As => Source Code" function. But there is a "Open As => Source Code". I tried that but nothing changed. I took a clean copy of the "ContentView.swift" file from the downloaded Zip archive and replaced the existing copy. That also did not change anything. this suggests to me that the bug is in how Xcode uses the xcodeproj file. Looking at my capture above, how is Xcode viewing the code ? As plain text ? As rich text ? I've ditched the entire project and started again – that worked but really it's the nuclear option. I'm glad it's not a production project and is just the Apple tutorial. UPDATE: I opened the old ContentView.swift file in TextEdit and copied and pasted my code into the new copy of ContentView.swift. Xcode seems happy. Cheers.
Post marked as solved
3 Replies
+1 for those comments that "windowResizability" doesn't answer the question. The question still stands: How can a window be specified to be NOT resizable in macOS 11 and 12 ?
Post not yet marked as solved
2 Replies
Piyomaru, thanks you can make standard installer to install AppleScript applets I don't need an installer for my applet. I need a way to automate installing Shortcuts so users do not have to do it themselves in the Shortcuts app. Some minor macOS update may effect your app due to the security reason or bug I don't understand your comment. I would like to use the Shortcuts URL scheme to call Shortcuts Events.app. At present, the URL scheme is useless to me because it always opens the Shortcuts app before running the shortcut. Because the Shortcut app is frontmost and active, it breaks my shortcut which gets URLs from web browsers etc.
Post not yet marked as solved
3 Replies
Quinn, thanks. I've solved the problem. Eventually, I was able to get my applet notarized, in particular, by adding a new Keychain password profile with: xcrun notarytool store-credentials --apple-id "[appleid]" --team-id "[team name]" That was a duplicate with a new name but, at least notarytool did find it. Interesting that it's not visible in the Keychain Access app. I don't know what I would do if I forgot its details. Even then I couldn't get stapling to work. That was caused by a foul-up with the updates to Xcode 14.3 and the related Command Line Tools. Xcode could not link to the CLTs as shown in attached capture – although Xcode 14.3 is selected in the drop down, Xcode still says "No Xcode Selected": I had to switch to an Admin user account and do a reset: " sudo xcode-select -r". That solve all my problems. In fact, I was able to return to using SD Notary, which is a much easier method. I give thanks to discussions @ StackOverflow and NotarizeApp which had code that made things clearer. Cheers.
Post not yet marked as solved
2 Replies
Well, I know, RTFM. But, I did look – and in the post, I quoted the advice provided in the API documentation. As hinted at in my post, the advice gave little information on the topic. The declaration "NSBoxPrimary = 0" was useful. The Human Interface Guidelines have good advice on best practices. Maybe I'm a bit dense but I couldn't find any description of the primary and separator box types in the HIG. I've also Googled for a few hours trying to figure it out with no luck. The search tool in "developer.apple.com" only points to the API doco.
Post not yet marked as solved
4 Replies
See tip #14 in Quinn’s Top Ten DevForums Tips. Many thanks – didn't know about your post. macOS is under very active development and sometimes things break.  Have to admit I was surprised that my applet did hide normally when I tested my first versions years ago. I thought the modal dialogs would not hide. So, I'm not surprised if an under-the-hood change in macOS made apparent my applet's flaw. if you work through my steps but instead use Script Debugger, does that fail? I worked through your steps using SD. I'll try exporting my applet in Script Editor and check whether the result is the same. I'll also do up a test applet using the Dialog Toolkit. At the worst, I'll have to redevelop in SwiftUI. But, that will take me many months if not years – I find Xcode and SwiftUI very hard. Cheers.
Post not yet marked as solved
4 Replies
Many thanks. Yes, that test did work – the applet hides normally. There are quite a lot of things in my applet which are different and could be involved: I use Script Debugger, not Script Editor. The applet is quite large with over 6,000 lines of code in 4 script files, a separate Service and 3 executables. The applet has windows which are created with the Dialog Toolkit Plus script library from Shane Stanley, modified by me. [Sorry can't provide a link - this Forum rejects the URL] All the applet windows are modal (due to design of the Dialog Toolkit). Nonetheless, the main app window has been hiding normally since late 2018. I don't understand why the behaviour would change now. My only guess is that something changed in macOS recently that disclosed a flaw in my applet. Evidence for that is that versions of my applet (e.g. January 2022), which previously behaved normally, do not hide reliably in macOS 13.0.1. There was no such problem in macOS 12. Maybe I have some deprecated code which has become problematic. For example, in the Script Library, I am using a property "NSLeftTextAlignment" instead of "NSTextAlignmentLeft". I stayed with the old form because the new form crashed my applet no matter what I tried. Maybe the problem is the main window being modal. But why would that not be an issue before now ? Anyway, the applet still works which I think is quite something.
Post not yet marked as solved
4 Replies
Problem solved. I clicked on "Learn More..." and got this dialog: I clicked on "Restore Defaults" and the 13.0.1 update became visible. Why would my Mac think updates are "managed externally" ? Beats me. Anyway, back to work.
Post not yet marked as solved
4 Replies
Claude31, darkpaw, many thanks. I did look at the App Store download but, I thought that would be a "combo" update involving a full install. I thought updates were like "delta" updates of the past and not clean installs. I can remove myself from the beta prog but, why can't Software Update show all relevant updates (according to what is installed) ? Anyway, I think I'll just DL from the App Store rather than wait for 13.1. Cheers.
Post not yet marked as solved
3 Replies
Yes, many thanks. It's good to know I'm not the only one caught out. It leaves me wondering: is it possible to create a Ventura beta install drive ? If so, how ? I can't find the Ventura installer anywhere. Also, is there a way to get the Ventura beta into a VM ? I've tried but my Parallels VM refuses to sign in with my Developer Apple ID. How are we expected to test betas if we can't install them safely ? I have sent Apple a (polite) roast via "Feedback Assistant". Maybe someone will read it.
Post not yet marked as solved
2 Replies
This behaviour seems not to occur in macOS 12.4 beta (Build 21F79). Not sure it has been fixed in all situations.
Post marked as solved
9 Replies
+1. Yes, macOS 12.3.1 seems to have fixed my original problem. I've already changed my AS code from Finder to System Events – which is usually quicker than Finder anyway. Think I'll leave it there.
Post marked as solved
4 Replies
Good advice, many thanks. I'll do up a VM or two to help test my applet in various versions of macOS. Currently, I can test cleanly only in 10.13 and 10.14. I had thought adding an app to the "Apps" pane would add the specific copy chosen – I used the "Other" menu item to locate the copy I wanted to add. But, I think you are right about the risks of having multiple copies floating around. Cheers.
Post marked as solved
4 Replies
Many thanks for looking at this. I suspect the problem is with my "strings" files. A while back I had a problem in Script Debugger which, on compiling my applet, removed my custom icns file (Script Editor does that too) and removed the entire "en.lproj" folder. I was advised to rename the custom icns file and to rename all the localisable strings files. I did that. SD now compiles my app normally. More recently, I added French localisation. I think that's why French does not appear in the "Apps" pane – macOS is only looking for strings files which have the default name "localizable.strings". My guess is that macOS has already registered the other three languages and leaves them in place even though I've renamed the strings files. I have tried testing that hypothesis by renaming all the strings files back to "Localizable.strings" and compiling in SD. So far, French still does not appear in the "Apps" pane, although, I don't know how long to wait for the new localisation to be registered (perhaps I have to reboot). The "Apps" pane is weird. I have deleted my applet from the "Apps" pane then added it back. Before adding it back, I can see French is registered: But, after clicking on "Add", the applet is added but French is not shown.