Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

Usb Keyboard will wake up the system when sending command to it at system start to sleep
Development environment: Electron 30.2.0 Run-time configuration: macOS 14.5 (23F79) DESCRIPTION OF PROBLEM I have one keyboard which will wake up the Mac OS from sleep when sending command to it at the time system starting to sleep. But this keyboard will not have such problem on Window OS, I don't know why sending command to that keyboard will wake up the Mac OS system from sleep. Does anyone know from a hardware or software point of view, what kind of usb keyboard operation will cause the macos system to wake up? Or can someone give us guidance, how to debug and solve the usb keyboard caused by the wake up system problem on Mac OS system? STEPS TO REPRODUCE Sending command to that keyboard when the system start to sleep
0
0
212
Sep ’24
CoreData/Database question
I am working on an app that will have about 200mb of data in a database. I would like to install a json file with 3-4 mb on the phone with the app, and then be able to send small packets of information to the user of the app as they are using the app, for example if they hit a button with a link to an instagram page, I can have the database/server send the link to the app, it will be just small bits of information going from the database to the phone, and perhaps I would do some location tracking and getting some information from the user to build up personal preferences etc. I'm wondering if coredata would be the best way to get smaller packets of information to the phone quickly or if I should think about firebase or something else. I was interested in using Cloudkit, but it seems like Cloudkit is really more about syncing devices and for getting information from the user to the database. It's been really hard to find any information about the strengths versus weaknesses of different databases and how they interact with mobile apps.
0
0
299
Oct ’24
PDFKit PDFPage.setBounds(_:for:) returns unexpected results in Xcode16
In XCode15, if you specify mediaBox for PDFDisplayBox, the page will be shrunk to fit the specified range. However, in XCode16, the page is cropped to fit the specified range, as when cropBox is specified for PDFDisplayBox. I think it's a bug because the setBounds documentation hasn't been updated, but has anyone had the same problem? Please let me know if there are any workarounds.
0
1
525
Sep ’24
Testflight app cannot load the widgets
It is a very strange situation I am suffering now. I am hosting thingsboard CE on AWS EC2 (443, 1883, 80 and 8080 port are opened), I can access the console GUI through domain name, public IP and my ESP32 device can register and report MQTT data, all the widgets everything work like a charm ! I can use Simulator (iPhone 16 Plus Max) to access the dashboard, widgets, alarms, devices and audit logs, and I can install the Runner on my iPhone 16 Plus Max through Xcode and the Runner works well as expected on the Simulator. Whereas, when I created Testflight app, download and install the testing release in on my iPhone, I can access the GUI, see the dashboard, but after click the dashboard, all widgets cannot be loaded, thingsboard icon continues spinning ! The alarms, devices and audit logs on the Testflight app works well, no issues. Did you ever experience such issue? Thanks !
0
0
146
Nov ’24
Deep/universal links not working in ios with edge broser
Deeplinks in our Mobile (native) application work fine from email clients such as Gmail and Outlook with a default browser such as Safari. If the app is already installed, clicking the link launches it. However, when we click on the same link from Outlook email with the default browser, Edge, it opens directly in the browser, because any external links in Outlook email route through safe links, which prevents deep linking to the APP. The current behavior is as follows: When Safari is the default browser, the process works seamlessly, and the app opens directly. outlook->deep link pressed -> redirect to safari ->opens the app if already installed However, when Microsoft Edge is set as the default browser, it opens the App Store link in a popover, with an option to open the app if installed. outlook->deep link pressed -> redirect to Edge->opens the app store inside edge even app already installed Note : outlook is enforcing safe link policies and also App protection policies. I would like to achieve the same behavior with Microsoft Edge as with Safari, where the app opens directly rather than redirecting to the App Store. Is there a specific configuration or workaround to ensure that Microsoft Edge, when set as the default browser, opens the app directly instead of redirecting to the App Store? Any insights or suggestions would be greatly appreciated. I am expecting that this safe link works the same as works with a safari in iOS Devices. I have also tried this - https://learn.microsoft.com/en-us/mem/intune/apps/app-protection-policy-settings-ios#exempt-universal-links but not working I'd appreciate it if you could assist me with this matter as soon as possible. How to handle deep links in Outlook when using a default browser like Edge
0
1
788
Oct ’24
Code Review: SwiftData functions in a Service, Model functions in a Manager
First off, given that I didn't find a tag for Code Review, I hope I am not out of scope for the forums here. Second, some background. I am a long time Windows Power Shell developer, moving to Swift because I don't like self loathing. :) Currently I am trying to get my head around SwiftData, and experimenting with creating a Service to handle the actual SwiftData functionality, and a Manager to handle various tasks that relate to instances of the Model. I am doing this realizing that it MAY NOT be the best approach, but it gives me reps both producing code and thinking about how to solve a problem, which I think is useful even if the actual product in throw away. That said, I am hoping someone with more experience than I can comment on this approach, especially with respect to expanding to more models, more complex models, lots of data and a desire to use ModelActor eventually. DataManagerApp.swift import SwiftData import SwiftUI @main struct DataManagerApp: App { let container: ModelContainer init() { let schema = Schema([DataModel.self]) let config = ModelConfiguration("SwiftDataStore", schema: schema) do { let modelContainer = try ModelContainer(for: schema, configurations: config) DataService.instance.assignContainer(modelContainer) container = modelContainer } catch { fatalError("Could not configure SwiftData ModelContainer.") } } var body: some Scene { WindowGroup { ContentView() .modelContainer(container) } } } DataModel.swift import Foundation import SwiftData @Model final class DataModel { var date: Date init(date: Date) { self.date = date } } final class DataService { static let instance = DataService() private var modelContainer: ModelContainer? private var modelContext: ModelContext? private init() {} func assignContainer(_ container: ModelContainer) { if modelContainer == nil { modelContainer = container modelContext = ModelContext(modelContainer!) } else { print("Attempted to assign ModelContainer more than once.") } } func addModel(_ dataModel: DataModel) { modelContext?.insert(dataModel) } func removeModel(_ dataModel: DataModel) { modelContext?.delete(dataModel) } } final class ModelManager { static let instance = ModelManager() let dataService: DataService = DataService.instance private init() {} func newModel() { let newModel = DataModel(date: Date.now) DataService.instance.addModel(newModel) } } ContentView.swift import SwiftData import SwiftUI struct ContentView: View { @Environment(\.modelContext) var modelContext @State private var sortOrder = SortDescriptor(\DataModel.date) @Query(sort: [SortDescriptor(\DataModel.date)]) var models: [DataModel] var body: some View { VStack { addButton List { ForEach(models) { model in modelRow(model) } } .listStyle(.plain) } .padding() .toolbar { ToolbarItem(placement: .topBarTrailing) { addButton } } } } private extension ContentView { var addButton: some View { Button("+ Add") { ModelManager.instance.newModel() } } func modelRow(_ model: DataModel) -> some View { HStack { Text(model.date.formatted(date: .numeric, time: .shortened)) Spacer() } } }
0
0
506
Oct ’24
Merchant ID
Our team want to transfer money to card with Apple Pay. I am iOS developer. I have access Admin. I created Merchant ID. I added domain. Our backend team uploaded .txt file to database. Url is working, you can see .txt file content when open it. But when I press verify I get error as following: Domain verification failed. Unable to access verification file on server. Confirm that the file is in the correct location, proxies and redirects are not enabled, and the documented Apple Domain Verification IP addresses can access your server. Please, help to fix this problem.
0
0
289
Sep ’24
Iphone 14 Pro Max Keeps restarting
My phone keeps restarting randomly every few seconds to every few minutes at random. It also feels like its overheating at the same time. Heres the panic log: bug_type":"210","timestamp":"2024-10-22 12:23:26.00 -0400","os_version":"iPhone OS 18.0.1 (22A3370)","roots_installed":0,"incident_id":"E2DC5427-D751-4339-827B-181625987FCF"} { "build" : "iPhone OS 18.0.1 (22A3370)", "product" : "iPhone15,3", "socId" : "8120", "socRevision" : "11", "incident" : "E2DC5427-D751-4339-827B-181625987FCF", "crashReporterKey" : "df026d01d48e533d7258182dafc82a95473d59d4", "kernel" : "Darwin Kernel Version 24.0.0: Thu Aug 8 01:15:37 PDT 2024; root:xnu-11215.2.562/RELEASE_ARM64_T8120", "date" : "2024-10-22 12:23:26.77 -0400", "panicString" : "panic(cpu 0 caller 0xfffffff040697444): AOP PANIC - !pulse pearl@0x1173490 - power(2) OUTBOX3 not ready - \nuser handlers:\nEiger::probe=0 [e4 30 1] conn=0\n\nPrAS Comp = stat [0, 0], dbg [205452, 41680, 416832, 0, 12665, 404163, 1, 9973, 4] \n\n\n!pulse pearl@0x1173490\nRTKit: RTKit-2758.2.1.debug - Client: iphone15aop:DEBUG:AppleSPUFirmwareBuilder-632.0.717199\n!UUID: 26e83ac2-7536-30ff-9f4c-57d91477a498\nASLR slide: 0x0000000000000000\nTime: 0x000000025b5db6d5\n\nFaulting task 2 Call Stack: 0x00000000011078c4 0x0000000001107250 0x0000000001107064 0x000000000110acf4 0x000000000110adb4 0x00000000010ef884 0x00000000010f3c38 0x00000000010e9438 0x00000000010148cc 0x00000000010e93a8 0x00000000011069b4 0x0000000001106730
0
0
605
Oct ’24
Screen Time API - Device Activity Report
I need some assistance with the Screen Time API’s DeviceActivityReport extension. I know the extension is sandboxed but I need the data inside my app. Jomo is currently doing this so it’s not impossible. I see they’re saying it’s an estimate which is about 5 - 10 off of the actual screen time, but how are they doing this? Any attempt to store the screen time data inside some sort of database or UserDefaults always fails of course due to the sandbox. Any advice would be greatly appreciated!
0
0
459
Oct ’24
Apple Push Notification service server certificate update
The Certification Authority (CA) for Apple Push Notification service (APNs) is changing. APNs will update the server certificates in sandbox on January 20, 2025, and in production on February 24, 2025. All developers using APNs will need to update their application’s Trust Store to include the new server certificate: SHA-2 Root : USERTrust RSA Certification Authority certificate. To ensure a smooth transition and avoid push notification delivery failures, please make sure that both old and new server certificates are included in the Trust Store before the cut-off date for each of your application servers that connect to sandbox and production. At this time, you don’t need to update the APNs SSL provider certificates issued to you by Apple.
0
0
2k
Oct ’24
Updating SKAdNetwork Certificates for AdAttributionKit Compatibility
We are trying to test AdAttributionKit integration and receive a postback in the testing environment with our existing SKAdNetwork identifier and SKAdNetwork certificates, that we had received after registering SKAdNetwork profile via an e-mail. The issue is that existing certificates were generated by Apple with prime192v1 algorithm, which is not supported by JWT, when we try to create token to sign AdAttribution impression. We have generated the updated private and public keys according to the documentation https://developer.apple.com/documentation/adattributionkit/registering-an-ad-network. Is it possible to update our existing SKAdNetwork certificates to the new AdAttributionKit certificates? Or do we need to do something else in order to make our SKAdNetwork certificates work with AdAttributionKit?
0
1
376
Oct ’24
Apple Health PDFs
Hi, In Apple Health, when there is an entry for a visit with a doctor, many times there are accompanying PDFs that are loaded into Apple Health along with the numerical/text data. Is there a way to pull PDFs into an app as well as the numerical/text data? Thanks
0
0
266
Oct ’24
watchOS app workout doesn't launch
I am creating a watchOS app with XCode, and am experiencing an issue where workouts do not start on watchOS versions 9.6.3 and later. ・App specifications Start workout when app starts code (swift) workout?.startActivity(with: Date()) ·phenomenon In watchOS version 9.6.3 or later, after the Apple Watch runs out of battery or is turned off. When you turn on your Apple Watch and start using it, even if you start a workout (startActivity),The status may not change to running and the workout may not work. *Workout always worked on watchOS versions earlier than version 9.6.3. *The workout will work if you close the app and start the app again. If anyone has any information, please provide it.
0
0
274
Nov ’24
Can't ping ip address releated apple login
We want to support apple login in our application, and our domain has protection from public access, so we have followed document "Configuring your environment for Sign in with Apple" from Xcode ---> window --- > Developer Document to use ip connect to apple. when we ping the ip list in the document, like: 17.32.139.128/27 17.32.139.160/27 17.140.126.0/27 17.140.126.32/27 17.179.144.128/27 17.179.144.160/27 17.179.144.192/27 17.179.144.224/27 17.253.0.0/16 but they have no response. what's wrong with it? hope help!
0
0
162
Nov ’24
App Clip card can be opened by tapping universal link or custom links?
Can the App Clip card be invoked by tapping on a link (not a default appclip link) which is shared through message box or whatsApp chat or Email? I gone through the reference of App Clip Card invocation from scanning QR code, App Clip Code, NFC Tag, Safari smart banner, default App Clip links and link presentation framework. But I didn't find any reference or documentation that custom links will invoke App Clip Card or won't invoke App Clip Card. So, need reference if possible that App Clip card be invoked by tapping on a custom link which is shared through whatsApp chat or message box or Email.
0
0
357
Oct ’24
Battery Displays for Custom Hardware
I am having difficulty figuring out two indicators for a custom piece of battery hardware. Firstly, on the home screen, scrolling all the way to the left in the widget screen, you can see the battery for connected wireless devices, electronic pencils, etc. Additionally, when you use Apple battery packs, you can see the battery for it on the top right of your phone I am wondering where I should look to see how I could integrate both of these. I have searched the documentation for a while, and I am having a hard time knowing where to start. If anyone can point me to something, it would be very appreciated. Thank you!
0
0
518
Oct ’24
Selling the same subscription in multiple apps
I want to sell the same subscription in multiple apps so that if someone subscribes in one they show up as having a subscription in the other. Apple's documentation states "To get started, use App Store Connect to create a separate and equivalent auto-renewable subscription for each app that offers the multi-app subscription so that users can subscribe from any app." (https://developer.apple.com/documentation/storekit/in-app_purchase/original_api_for_in-app_purchase/subscriptions_and_offers/offering_a_subscription_across_multiple_apps) But I'm unable to create two subscriptions with the same Product ID. I could create two subscriptions that are equivalent but with different Product IDs that are treated as the same by our server, which would accomplish the main goal, but I believe this risks someone subscribing to both subscriptions if they do so directly through the App Store, for example using a promo code link, because they're still two different subscriptions to Apple. Thanks!
0
0
385
Oct ’24
Apple In App Purchase Validation through Server Notification
We are currently experiencing an issue where our server is not receiving Apple’s server notification (webhook) for in-app purchase confirmations. This notification is critical as it helps us confirm the purchase status and fulfill the corresponding services to the users. Despite the successful completion of purchases within the app, the lack of webhook notifications prevents us from tracking and processing these payments on our backend. In addition to resolving this issue, we are also concerned about the security aspect of receiving server notifications. Specifically, we want to ensure that any requests or notifications we receive are indeed coming from Apple, and not subject to potential man-in-the-middle (MIM) attacks. We are looking for information or best practices on how to validate that the request originates from a legitimate Apple source, ensuring the integrity of the communication and safeguarding our system from spoofed or malicious requests. Key questions: Server Notification Issue: Why might we not be receiving Apple's payment confirmation notifications, and what steps can we take to troubleshoot this issue? Request Validation: What security mechanisms or validation techniques can we implement to confirm that the server notifications are genuinely from Apple, ensuring no interference from MIM attacks? Does Apple provide any headers, tokens, or signatures in the server notification that we can use to verify the origin? Are there any known methods or configurations to ensure secure receipt of in-app purchase confirmations? We are looking for guidance and possible solutions to ensure a secure and reliable payment validation process for our in-app purchases. Any support in this regard would be highly appreciated.
0
0
471
Oct ’24
get properties of device in kIOTerminatedNotification handler
Hello, I am facing with misunderstanding how to read usb device properties correctly. The notification 'kIOTerminatedNotification' is delivered after an IOService has been terminated. Can I use IORegistryEntryCreateCFProperties() to get properties of terminated device? I am asking because I/O Registry is a dynamic database that captures the connections of all driver and nub objects currently active. Howerver, can we say that terminated device is still active? If IORegistryEntryCreateCFProperties() can not be used, are there any other way? (e.g. using Device Interface) Thank you in advance!
0
0
477
Oct ’24
SwiftData: Predicate using optional Codable enum
Hello, I'm currently developing an app using SwiftData. I want the app to use CloudKit to sync data, so I made sure all my model properties are optional. I've defined a Codable enum as follows: enum Size: Int, Codable { case small case medium case large } I've defined a Drink SwiftData model as follows: @Model class Drink { var name: String? var size: Size? init( name: String? = nil, size: Size? = nil ) { self.name = name self.size = size } } In one of my Views, I want to use a @Query to fetch the data, and use a Predicate to filter the data. The Predicate uses the size enumeration of the Drink model. Here is the code: struct DrinksView: View { @Query var drinks: [Drink] init() { let smallRawValue: Int = Size.small.rawValue let filter: Predicate<Drink> = #Predicate<Drink> { drink in if let size: Size = drink.size { return size.rawValue == smallRawValue } else { return false } } _drinks = Query(filter: filter) } var body: some View { List { ForEach(drinks) { drink in Text(drink.name ?? "Unknown Drink") } } } } The code compiles, but when I run the app, it crashes with the following error: Thread 1: Fatal error: Couldn't find \Drink.size!.rawValue on Drink with fields [SwiftData.Schema.PropertyMetadata(name: "name", keypath: \Drink.name, defaultValue: nil, metadata: nil), SwiftData.Schema.PropertyMetadata(name: "size", keypath: \Drink.size, defaultValue: nil, metadata: nil)] How can I filter my data using this optional variable on the Drink model? Thanks, Axel
0
3
613
Oct ’24