Posts

Post not yet marked as solved
3 Replies
You should read the document of the Timer. The timer need to run in a runloop, which Window has but menu hasn't. So if you want to use a timer inside the menu, you may need to create a runloop and add the timer to it. That might work.
Post marked as solved
4 Replies
This is not a meaningless issue. This will cause unexpected behavior like error alert doesn't show in SwiftUI. If you encounter the same like me. You can get the window and make it key and front to fix this issue. I used https://github.com/happycodelucky/SwiftUIWindowBinder to get the NSWindow. And used below func to make it key and front. var body: some View { WindowBinder(window: $window) { // content view } .onAppear { makeKeyAndFront() } } private func makeKeyAndFront() { if let window { window.makeKeyAndOrderFront(nil) } else { DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(100)) { makeKeyAndFront() } } }
Post marked as solved
13 Replies
I have a workaround. Get Critical Alert Permission from User instead of Apple https://zhaoxin.pro/16703819971617.html
Post not yet marked as solved
20 Replies
Oddly enough, I found that App Store accepted my app in iOS/iPadOS while it rejected the macOS version with the same core. Both of them shared the same core. So there was also a "libswift_Concurrency.dylib" in iOS version, but it was accepted.
Post not yet marked as solved
1 Replies
The error message was totally misleading. At the very beginning to debug an Apple Watch app, we should use target of the WatchKit Extension. However, I didn't know since when, to debug we should use the Watch App target instead of the WatchKit Extension.
Post not yet marked as solved
4 Replies
There is no section for developer forum in bug report. And I think it is suggested to post here. The "to" in the title should be "two".
Post not yet marked as solved
2 Replies
I didn't find a solution to localized that value either. However, we could change the label value in code. override func validateToolbarItem(in window: SFSafariWindow, validationHandler: @escaping ((Bool, String) -> Void)) { 		// This is called when Safari's state changed in some way that would require the extension's toolbar item to be validated again. 		window.getToolbarItem { (toolbarItem) in 				toolbarItem?.setImage(NSImage(named: "MonochromeIcon")) 				toolbarItem?.setLabel(NSLocalizedString("Open URL in Page By Poster 2", comment: "")) 		} 		 		validationHandler(true, "") } Then you can localized the text what you want.
Post marked as solved
1 Replies
A further investigation had shown that the issue was happened here. arguments.completionFunction({ keyword : document.getElementsByClassName(keyword)[0].innerHTML }) There were two keywords used. arguments.completionFunction({ keyword : document.getElementsByClassName(keyword)[0].innerHTML }). The issue was on the first keyword. It didn't convert to its value "link" but used its variable name "keyword" as the key. Maybe I should file a bug for this? UPDATES Just found this. https://stackoverflow.com/questions/10640159/key-for-javascript-dictionary-is-not-stored-as-value-but-as-variable-name In fact, this was a well-known issue of how javascript interprets. The code should changed to arguments.completionFunction({ [keyword] : document.getElementsByClassName(keyword)[0].innerHTML }) Just using [] around keyword in key part. I am not familiar with Javascript. But now I hate it. :( Problem Solved!
Post not yet marked as solved
5 Replies
So far, for Xcode 11 and after. The best way to test Shortcuts is using: for Xcode 11.x with macOS 10.15.x, downloading in Xcode with 11.3 simulators. This is the best choice. for Xcode 12 betas with macOS 11 betas, just use the latest simulator with Xcode 12. This is the second choice, as some APIs don't work in localization, but works in English. The issue also exists in iOS 14 betas real devices.(My bug issue id: FB8550556, Siri doesn't use Localized String in some API. "INIntentResolutionResult.success((with resolvedString: String) -> Self".) Others: simulator 11.3 doesn't work in macOS 11, either with Xcode 11 or Xcode 12.
Post not yet marked as solved
28 Replies
For those who had filed issues to Apple. Did you get any replies? As this issue still exists in beta 4 now.
Post not yet marked as solved
28 Replies
In my own experiences with two projects, either building from Xcode 11.6 or Xcode 12 beta 3, the issue of Realm lock file in shared group did exist on real devices. If you use the simulator, everything is fine. Realm 5.3.2. There is an issue on realm too. But it seams people believe it is Apple who to blame. https://github.com/realm/realm-cocoa/issues/6671
Post not yet marked as solved
11 Replies
I have the same issue on a real device.Also I didn't use any network at all. What I used was only RealmSwift framework.