Post

Replies

Boosts

Views

Activity

Reply to Safari Extension: Please make sure your manifest.json file contains valid syntax
Today, I was developing Safari plug-ins and encountered this problem. It took me an hour to fix the problem. This is the code generated by the Xcode creation project. {   "manifest_version": 2,   "default_locale": "en",   "name": "__MSG_extension_name__",   "description": "__MSG_extension_description__",   "version": "1.0", // Note here that all image sizes must be present, do not delete any   "icons": {     "48": "images/icon-48.png",     "96": "images/icon-96.png",     "128": "images/icon-128.png",     "256": "images/icon-256.png",     "512": "images/icon-512.png"   },   "background": {     "scripts": [ "background.js" ],     "persistent": false   },   "content_scripts": [{     "js": [ "content.js" ],     "matches": [ "*://example.com/*" ]   }],   "browser_action": {     "default_popup": "popup.html", // Note here that all image sizes must be present, do not delete any     "default_icon": {       "16": "images/toolbar-icon-16.png",       "19": "images/toolbar-icon-19.png",       "32": "images/toolbar-icon-32.png",       "38": "images/toolbar-icon-38.png",       "48": "images/toolbar-icon-48.png",       "72": "images/toolbar-icon-72.png"     }   },   "permissions": [ ] }
Topic: App & System Services SubTopic: General Tags:
Aug ’22
Reply to Big Sur: Detect when menu bar is light/dark
Recently I also encountered this problem, my solution is as follows, work for me swift let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) guard let button = statusItem.button else {       return } button.image = NSImage(named: "console") button.image?.isTemplate = true The previous solution, but there are still problems in Big Sur: swift var isDarkMode:Bool {UserDefaults.standard.string(forKey: "AppleInterfaceStyle") == "Dark"} let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) func listenToInterfaceChangesNotification() {     DispatchQueue.main.async { [self] in       DistributedNotificationCenter.default.addObserver(         self,         selector: #selector(interfaceModeChanged(sender:)),         name: .AppleInterfaceThemeChangedNotification,         object: nil       )     }   } @objc func interfaceModeChanged(sender: NSNotification) { guard let button = statusItem.button else { return }       if(isDarkMode) { button.image = NSImage(named: "console_light") } else { button.image = NSImage(named: "console") } } isTemplate | Apple Developer Documentation https://developer.apple.com/documentation/appkit/nsimage/1520017-istemplate
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Safari Extension: Please make sure your manifest.json file contains valid syntax
Today, I was developing Safari plug-ins and encountered this problem. It took me an hour to fix the problem. This is the code generated by the Xcode creation project. {   "manifest_version": 2,   "default_locale": "en",   "name": "__MSG_extension_name__",   "description": "__MSG_extension_description__",   "version": "1.0", // Note here that all image sizes must be present, do not delete any   "icons": {     "48": "images/icon-48.png",     "96": "images/icon-96.png",     "128": "images/icon-128.png",     "256": "images/icon-256.png",     "512": "images/icon-512.png"   },   "background": {     "scripts": [ "background.js" ],     "persistent": false   },   "content_scripts": [{     "js": [ "content.js" ],     "matches": [ "*://example.com/*" ]   }],   "browser_action": {     "default_popup": "popup.html", // Note here that all image sizes must be present, do not delete any     "default_icon": {       "16": "images/toolbar-icon-16.png",       "19": "images/toolbar-icon-19.png",       "32": "images/toolbar-icon-32.png",       "38": "images/toolbar-icon-38.png",       "48": "images/toolbar-icon-48.png",       "72": "images/toolbar-icon-72.png"     }   },   "permissions": [ ] }
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to draw vision barcodes
You can take a look at this article, I hope it can help you. Barcode detection using Vision framework https://cornerbit.tech/barcode-detection-using-vision-framework/ Some screenshots of the article:
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Application's iCloud drive folder doesn't show in macOS
Hi  sathish_28, Have you solved your problem yet?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Big Sur: Detect when menu bar is light/dark
Recently I also encountered this problem, my solution is as follows, work for me swift let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) guard let button = statusItem.button else {       return } button.image = NSImage(named: "console") button.image?.isTemplate = true The previous solution, but there are still problems in Big Sur: swift var isDarkMode:Bool {UserDefaults.standard.string(forKey: "AppleInterfaceStyle") == "Dark"} let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) func listenToInterfaceChangesNotification() {     DispatchQueue.main.async { [self] in       DistributedNotificationCenter.default.addObserver(         self,         selector: #selector(interfaceModeChanged(sender:)),         name: .AppleInterfaceThemeChangedNotification,         object: nil       )     }   } @objc func interfaceModeChanged(sender: NSNotification) { guard let button = statusItem.button else { return }       if(isDarkMode) { button.image = NSImage(named: "console_light") } else { button.image = NSImage(named: "console") } } isTemplate | Apple Developer Documentation https://developer.apple.com/documentation/appkit/nsimage/1520017-istemplate
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’21
Reply to Application's iCloud drive folder doesn't show in macOS
I ran into the same problem and searched the developer forums and stackoverflow, but still no solution Technical Q&A QA1893: Updating the metadata of iCloud containers for iCloud Drive https://developer.apple.com/library/archive/qa/qa1893/_index.html
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’21
Reply to Application's iCloud drive folder doesn't show in macOS
I spent 2 days trying to find a solution to this problem, but no luck. Currently ready to change plans, not ready to use iCloud Driver. If you solve this problem, you can share it with. There are so many questions like this on the forum, I have read every single Q&A post, I have tried all possible solutions, but the problem is still not solved
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’21
Reply to Files are not visible on the iCloud Drive
I have the same issue. Has anyone solved this problem?
Replies
Boosts
Views
Activity
Mar ’21