Posts

Post not yet marked as solved
0 Replies
279 Views
My macOS application is trying to fetch location, but everytime LocationManager responds with locationUnknown. Application is granted with permission to access location. Issue is seen in only one device with OSVersion: 14.2.1(23C71), chipset: Apple M1 pro. Other devices with same OS don't have this issue. My application is a background agent, means it has given UIElement in the plist. Issue persists even after restarting device, re-installing application, re-applying location permission. But Google Chrome shows correct location when using Openstreet Map or Google Maps. Is there any troubleshoot/alternative methods here? Any idea why it occurs? Code: if CLLocationManager.locationServicesEnabled() { if #available(OSX 10.14, *) { self.locationManager.requestLocation() } else { // Fallback on earlier versions self.locationManager.startUpdatingLocation() } } I need to get location in certain intervals. So After LocationManager updates I stop location with locationManager.stopUpdatingLocation() and request again after the interval.
Posted Last updated
.
Post not yet marked as solved
6 Replies
2.9k Views
I have given location permission for the app i'm developing. Now i need to reset location permission and want to see the permission pop-up. I have tried tccutil reset and /var/db/locationd/clients.plist is not accessible. Both are failing even with sudo. Please suggest any methods.
Posted Last updated
.
Post not yet marked as solved
7 Replies
2.6k Views
I need to create a new keychain for my mac os app. Currently there is a function SecKeychainCreate in Appledocumentation. But this function will be deprecated in mac OS 12.0. Is there another way to create keychain using swift (without using terminal commands)? Or will mac provide new function for this in update? Anybody knows?
Posted Last updated
.
Post not yet marked as solved
0 Replies
566 Views
I am developing a mac os application with electron. Is there a way to get device token for apple push notification? Is it possible to receive push notification in electron app?
Posted Last updated
.
Post not yet marked as solved
1 Replies
664 Views
I'm trying to add .pfx certificate to keychain which comes with password protection. So i decided to get identity from certificate and store it. I'm using system keychain to store identity.And program will run as root. if let password = CFStringCreateCopy(kCFAllocatorDefault, "something" as CFString) { let p12 = SecPKCS12Import(data as CFData, [kSecImportExportPassphrase as String: password] as CFDictionary, &cfarray) print(cfarray) if let identityArray = cfarray as? NSArray { if let identityDict = identityArray.object(at: 0) as? NSDictionary { let identityKey = String(kSecImportItemIdentity) let identity = identityDict[identityKey] as! SecIdentity let query: [String: Any] = [kSecClass as String: kSecClassIdentity, kSecValueRef as String: identity, kSecAttrLabel as String: "iddata", kSecUseKeychain as String: keychain, kSecImportExportPassphrase as String: password] let status = SecItemAdd(query as CFDictionary, nil) print(status) } } } When executing I'm getting -50 as output for print(status). I also tried with this query dictionary for SecItemAdd let query: [String: Any] = [kSecClass as String: kSecClassIdentity,kSecValueRef as String: identity,kSecAttrLabel as String: "iddata",kSecUseKeychain as String: keychain,kSecImportExportPassphrase as String: password] What is wrong with this? Please help
Posted Last updated
.