Post

Replies

Boosts

Views

Activity

StoreKit issue
Hey everyone! I’m currently working on a new app called Kept – a simple and elegant journaling app designed to help you capture your thoughts and ideas effortlessly. However, I’ve hit a bit of a snag with the TestFlight distribution of the app. When I test the in-app purchases locally, everything works perfectly. But once the app is pushed to TestFlight, users only see "Loading products..." indefinitely and are unable to make purchases. Here are the details: The app works locally with sandbox accounts. Product identifiers and configurations have been double-checked. All in-app purchases are correctly set up and approved in App Store Connect. Using correct sandbox account settings on the device.
1
0
60
19h
Updating iOS beta from Mac not working properly
I have no storage on my iphone 11 pro so for every developer beta i usually have to delete a bunch of apps and then update. My mac is already on the sequoia beta This time i wanted to update from my mac so after looking at a tutorial I downloaded the iOS 18 beta 2 download file from the developer website (i did pick the iphone 11) after connecting my phone i held down option and selected the respective update file and after putting my phone password in im met with 'iphone could not be updated, you must authorize with the signing server before making the request' any idea how to do this
0
0
25
19h
Are there cases where a response to an error returned from the AppStore Server API is considered a subscription cancellation by the user?
According to the following document, when the AppStore Server API is executed and the account does not exist, the response "errorCode: 4040001" is returned. If this response is returned, is it safe to assume that the account has been deleted and treat the subscription as cancelled? Also, please let us know if there are any other error codes other than this error code that can be used to determine that the subscription has been cancelled. https://developer.apple.com/documentation/appstoreserverapi/accountnotfounderror
1
0
61
21h
FinanceKit requestAuthorization denied
Hello all 👋 I'm getting unexpected behavior when testing FinanceKit for my app and was hoping to get assistance. Pre-reqs (defined at https://developer.apple.com/documentation/financekit): I've been given the FinanceKit entitlement I have the com.apple.developer.financekit entitlement set to financial-data I also have NSFinancialDataDescription set in Info.plist. I am targeting iOS 17.4 (a physical device) When I call FinanceStore.shared.requestAuthorization(), I immediately get a denied status without any alert dialogs. No data about my app is listed in Settings > Privacy & Security > Wallet Any idea what else is needed here? Thanks so much for the help! Code import SwiftUI import FinanceKit @main struct myApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { @State private var status: AuthorizationStatus? @State private var dataAvail: Bool? var body: some View { VStack { Text("Data available \(String(describing: dataAvail))") Text("Auth status \(String(describing: status))") Button("Get Status") { Task{ dataAvail = FinanceStore.isDataAvailable(.financialData) status = try await FinanceStore.shared.authorizationStatus() } }.buttonStyle(.borderedProminent) Button("Request Auth") { Task{ do{ status = try await FinanceStore.shared.requestAuthorization() }catch{ print(error) } } }.buttonStyle(.borderedProminent) } .padding() } } #Preview { ContentView() } app.entitlements: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.financekit</key> <array> <string>financial-data</string> </array> </dict> </plist> Info.plist: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>NSFinancialDataDescription</key> <string>Budget across all your accounts</string> </dict> </plist> VIdeo demo:
1
1
52
23h
Air drop
If receive an file by the air drop when the iPhone is unlocked only with the face id ( i mean like when you are only looking at the time or the notification) can’t accept the file also when you slide down the notification you can’t accept it also . Thx
0
0
34
1d
Concurrency-friendly version of `ArchiveByteStream` and `ArchiveStream`?
The AppleArchive module is pretty cool, but it relies almost entirely on two stream types, ArchiveByteStream and ArchiveStream, which don't really work well in a Swift Concurrency-based workflow since they all use thread-blocking mechanisms like pthread mutexes for synchronization, and threads in the cooperative pool should not be blocked. They also use their own thread pools for processing, independently of the cooperative thread pool, making it easy to end up with more threads than one has cores. (Perhaps even more so if you try to compress/decompress multiple files at once? The documentation isn't clear on whether separate archive operations share the same thread pool or not, but since it allows you to choose the size of the pool, it seems that these may be separate from each other as well.) Are there any plans for an interface to Apple Archive that would fit better with the structured concurrency model?
1
0
58
1d
When I will receive the App Store Server notification?
I'm migrating my app to Store Kit V1, to Store Kit V2, and, due some legacy circumstances I'm implemented in past using a synchronous method, calling verify receipt on my server to validate receipt and do the needed business logic, but due to the deadline I changed the entire app integration and some questions starting to appear in my mind. First of all, when I processing the purchase when basically I will receive the notification? When the Store Kit calls the transaction.finish or after the purchase was successful I always will receive this notification?
1
0
50
1d
iPadOS 18 Beta and SwiftData issues
I had a series of @Model classes with some mandatory attributes and some optional. Pre-move to 18, everything was working fine. After the migration, it reports that every single non-Optional attribute is nil upon trying to save. The error is CoreData related but not sure if its in the Core layer or Swift layer. Sample error (with app data removed) is : SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1560 "Multiple validation errors occurred." Error Domain=NSCocoaErrorDomain Code=1570 \"%{PROPERTY}@ is a required value.\" UserInfo={NSValidationErrorObject=<NSManagedObject: 0x30388b2a0> NSLocalizedDescription=%{PROPERTY}@ is a required value., NSValidationErrorKey=systemName, NSValidationErrorValue=null}" I have modified the code to provide default values for all constructors in an attempt to see a difference, but get the same errors
0
1
74
1d
Concurrency Crash - PushToTalk Framework
With the integration of Apple's pushToTalk framework - we create the PTChannelManager using its async initializer from AppDidFinishLaunching - using an actor to ensure the PTChannelManager is only created once. With this we have been seeing a lot of crashes for users in our analytics dashboards happening about ~2 seconds after app launch around a task-dealloc. Here is a simplified version of our actor and Manager - where the manager just shows the init. The init of it is an async optional init because the creation of the PTChannelManager uses an async throws. actor PushToTalkDeviceContainer { private var internalPushToTalkManagerTask: Task<PushToTalkManager?, Never>? func pushToTalkManager() async -> PushToTalkManager? { #if !os(visionOS) if let internalPushToTalkManagerTask { return await internalPushToTalkManagerTask.value } let internalPushToTalkManagerTask = Task<PushToTalkManager?, Never> { return await PushToTalkManagerImp() } self.internalPushToTalkManagerTask = internalPushToTalkManagerTask return await internalPushToTalkManagerTask.value #else return nil #endif } } public class PushToTalkManagerImp: PushToTalkManager { public let onPushToTalkDelegationEvent: AnyPublisher<PushToTalkDelegationEvent, Never> public let onPushToTalkAudioSessionChange: AnyPublisher<PushToTalkManagerAudioSessionChange, Never> public let onChannelRestoration: AnyPublisher<UUID, Never> private let ptChannelManager: PTChannelManager private let restorationDelegate: PushToTalkRestorationDelegate private let delegate: PushToTalkDelegate init?() async { self.delegate = PushToTalkDelegate() self.restorationDelegate = PushToTalkRestorationDelegate() self.onPushToTalkDelegationEvent = delegate.pushToTalkDelegationSubject.eraseToAnyPublisher() self.onPushToTalkAudioSessionChange = delegate.audioSessionSubject.eraseToAnyPublisher() self.onChannelRestoration = restorationDelegate.restorationDelegateSubject.eraseToAnyPublisher() do { ptChannelManager = try await PTChannelManager.channelManager(delegate: delegate, restorationDelegate: restorationDelegate) } catch { return nil } } } The crash stack trace is as follows: 0 libsystem_kernel.dylib 0x00000001e903342c __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x00000001fcdd2c0c pthread_kill + 268 (pthread.c:1721) 2 libsystem_c.dylib 0x00000001a7ed6c34 __abort + 136 (abort.c:159) 3 libsystem_c.dylib 0x00000001a7ed6bac abort + 192 (abort.c:126) 4 libswift_Concurrency.dylib 0x00000001ab2bf7c8 swift::swift_Concurrency_fatalErrorv(unsigned int, char const*, char*) + 32 (Error.cpp:25) 5 libswift_Concurrency.dylib 0x00000001ab2bf7e8 swift::swift_Concurrency_fatalError(unsigned int, char const*, ...) + 32 (Error.cpp:35) 6 libswift_Concurrency.dylib 0x00000001ab2c39a8 swift_task_dealloc + 128 (TaskAlloc.cpp:59) 7 MyApp 0x0000000104908e04 PushToTalkManagerImp.__allocating_init() + 40 (PushToTalkManager.swift:0) 8 MyApp 0x0000000104908e04 closure #1 in PushToTalkDeviceContainer.pushToTalkManager() + 60 9 MyApp 0x00000001041882e9 specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 (<compiler-generated>:0) 10 MyApp 0x0000000103a652bd partial apply for specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 (<compiler-generated>:0) 11 libswift_Concurrency.dylib 0x00000001ab2c2775 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:463)
1
0
59
1d
Can't write a property through ScriptingBridge
Staring to use ScriptingBridge in Swift to enable faster scripting access to an external app (Devonthink) and therefore avoid having to use an AppleScript as a conduit to call a Swift command line utility and deal with its results. The plan is to be able to read the plaintext of a record (no problem) and change the record name in Devonthink based on its contents. But I can’t seem to write to a property, instead getting an error “Cannot assign to property: ‘***’ is immutable”. Any guidance how to get around this?
0
0
38
1d
Notification Service Extension restrictions
I have an iOS app which uses Notification Service Extension (NSE) to process incoming notifications before it displayed to user. In NSE, as part of initialization of my app, I need to iterate through a 2D array. There are roughly 65k iterations. I've noticed that this iteration fails somewhere in between and the NSE process crashes... I can say it crashes because the logs stopped in between the iterations. This results in 'unmodified notification' getting displayed immediately, whereas NSE is granted 30 sec of background execution. My question is, why does this happen? The above iteration of 2D array works in app, but fails in NSE. Is there some kind of restriction on background extensions? - the documentation only talks about a time limit of 30sec. If there is some kind of restriction (like CPU and memory), how does one know this and code for it... since Apple did not provide any documentation. Or perhaps, there is a completely different reason?
3
1
74
1d
Catch the «Swipe Finger from Corner» event/notification ?
Hello, Our application communicates with our hardware to control a motor. For security reasons, if an alert, popup or window appears, we must stop the motor immediately. I haven't found how to detect (event ?, notification ?, delegate ?) the window if a user swipe their finger to the (bottom right) corner of the screen to display the «Quick note». The bottom left corner (screenshot) works fine, the motor is stopped. Is there a way to capture an event or notification when the «Quick Note» window is displayed or cleared ? Thanks,
2
0
43
1d
In-App purchase required for a support app?
Hi, I am trying to determine if an in-app purchase will be required within the app we are developing. We provide a web platform where the user can sign in and offer/search services correlated to entertainment world (showman, catering, DJ, live food lesson, etc.). The web app has 2 target: consumer users and business user. Consumer users can search services that tay want and chat business users owner of that services. Business users can create their ownpages in order to be visible to the consumer users in the community. Business users can also access too specified premium features for visibility. We are now designing a mobile app with only few features: Register login section Search business pages The users are the same and there is no differences in the mobile features (no hide premium functionalities). For these small features we have to implement the in-app purchase? The idea is to provide initially a small "companion" app to search business pages. Fo the next releases, where we want to provide more features, premium functionalities for business user we will integrate in-app and we already have plans to implement it. Thanks in advance!
0
0
53
1d
Apple Pay 115% limit
Hi. About to start integrating Apple Pay for the first time. Other gateways I've integrated have a limit from the initial authorisation, above which you can't capture payment. E.g. customer authorizes £100, but then adds items to their order taking the value to £120. Is there such a limit with Apple Pay? Is there a workaround without having to contact the customer again. Jon
0
0
30
1d
NEFilterManager completion handler not called from Command Line Tool
Hello, I'm experiencing an issue with enabling a Content Filter Network Extension from a command line tool. When I call the LoadFromPreferences method on NEFilterManager.shared() the completion handler is not called. I've tried this with a simple semaphore and tried running it on a RunLoop, but none of this works. Any help would be appreciated. I've tried adding a small demo project illustrating the issue, but the add file option does not seem to work. I'll paste the code here: Semaphore Demo class SemaphoreDemo { let filterManager = NEFilterManager.shared() var semaphore = DispatchSemaphore(value: 0) func demo() { print("Semaphore demo") self.filterManager.loadFromPreferences { (error) in print("Load from preferences callback") if let error = error { print("ERROR \(error.localizedDescription)") return } let config = NEFilterProviderConfiguration() config.filterDataProviderBundleIdentifier = "BUNDLE_IDENTIFIER" config.filterSockets = true self.filterManager.isEnabled = true self.filterManager.localizedDescription = "LOCALIZED_DESCRIPTION" self.filterManager.providerConfiguration = config self.filterManager.saveToPreferences { (error) in if let error = error { print("ERROR \(error.localizedDescription)") } else { print("SUCCESS") } self.semaphore.signal() } } self.semaphore.wait() } } class RunloopDemo { let filterManager = NEFilterManager.shared() func demo() { print("Runloop demo") let currentRunLoop = CFRunLoopGetCurrent() // let currentRunLoop = CFRunLoopGetMain() self.filterManager.loadFromPreferences { [weak currentRunLoop] (error) in print("Load from preferences callback") if let error = error { print("ERROR \(error.localizedDescription)") return } let config = NEFilterProviderConfiguration() config.filterDataProviderBundleIdentifier = "Bundle IDENTIFIER" config.filterSockets = true self.filterManager.isEnabled = true self.filterManager.localizedDescription = "LOCALIZED DESCRIPTION" self.filterManager.providerConfiguration = config self.filterManager.saveToPreferences { (error) in if let error = error { print("ERROR \(error.localizedDescription)") } else { print("SUCCESS") } CFRunLoopStop(currentRunLoop) } } CFRunLoopRun() } } The callback is never called. Thanks.
2
0
28
1d
WeatherKit REST API down?
I'm just getting 400 error responses to my requests sent to the WeatherKit REST API... haven't changed anything in my code for months. Here is the verbose output from curl: # curl -v "https://weatherkit.apple.com/api/v1/weather/en/51.5203/-0.1775?dataSets=forecastHourly%2CforecastNextHour&hourlyEnd=2024-07-04T09%3A03%3A36.962Z&hourlyStart=2024-06-24T09%3A03%3A36.962Z" -H "Authorization: Bearer [REDACTED]" * Trying 23.73.4.202:443... * Connected to weatherkit.apple.com (23.73.4.202) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * CAfile: /etc/ssl/certs/ca-certificates.crt * CApath: /etc/ssl/certs * TLSv1.0 (OUT), TLS header, Certificate Status (22): * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS header, Certificate Status (22): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS header, Finished (20): * TLSv1.2 (IN), TLS header, Supplemental data (23): * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * TLSv1.2 (IN), TLS header, Supplemental data (23): * TLSv1.3 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS header, Supplemental data (23): * TLSv1.3 (IN), TLS handshake, CERT verify (15): * TLSv1.2 (IN), TLS header, Supplemental data (23): * TLSv1.3 (IN), TLS handshake, Finished (20): * TLSv1.2 (OUT), TLS header, Finished (20): * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS header, Supplemental data (23): * TLSv1.3 (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * ALPN, server accepted to use http/1.1 * Server certificate: * subject: C=US; ST=California; O=Apple Inc.; CN=weather-data.apple.com * start date: May 8 16:30:14 2024 GMT * expire date: Nov 4 16:40:14 2024 GMT * subjectAltName: host "weatherkit.apple.com" matched cert's "weatherkit.apple.com" * issuer: C=US; O=Apple Inc.; CN=Apple Public Server ECC CA 1 - G1 * SSL certificate verify ok. * TLSv1.2 (OUT), TLS header, Supplemental data (23): > GET /api/v1/weather/en/51.5203/-0.1775?dataSets=forecastHourly%2CforecastNextHour&hourlyEnd=2024-07-04T09%3A03%3A36.962Z&hourlyStart=2024-06-24T09%3A03%3A36.962Z HTTP/1.1 > Host: weatherkit.apple.com > User-Agent: curl/7.81.0 > Accept: */* > Authorization: Bearer [REDACTED] > * TLSv1.2 (IN), TLS header, Supplemental data (23): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.2 (IN), TLS header, Supplemental data (23): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * old SSL session ID is stale, removing * TLSv1.2 (IN), TLS header, Supplemental data (23): * Mark bundle as not supporting multiuse < HTTP/1.1 400 Bad Request < Server: Apple < Content-Length: 0 < X-Frame-Options: SAMEORIGIN < Strict-Transport-Security: max-age=31536000; includeSubdomains < X-XSS-Protection: 1; mode=block < Access-Control-Allow-Origin: * < X-Content-Type-Options: nosniff < Content-Security-Policy: default-src 'self'; < X-REQUEST-ID: ed7d038c-ef82-61d8-a2cb-4522ff7d32ca < X-Apple-Origin: fdcbff05-73b4-3a53-948b-343caa55a40e < Date: Mon, 24 Jun 2024 09:18:00 GMT < X-Cache: TCP_MISS from a23-73-3-202.deploy.akamaitechnologies.com (AkamaiGHost/11.5.2-56655770) (-) < Connection: keep-alive < * Connection #0 to host weatherkit.apple.com left intact
4
1
95
1d
I think there is a problem changing the application rules using 'socketfilterfw'.
My Situation: I use the process 'socketfilterfw' related to the firewall. However, in macOS 15, the result message was different from previous versions. Some messages have only a few changes. However, the option '--listapps' has many changes. In previous version, the option showed results, including the path of each application. However, this is not the case with macOS 15. It only shows the name and status of the application. The list only shows the name and current status of the application. The results of this list alone cannot change the policy. I think this is a bug. I think we should let them know the absolute path of the application in the list, or we should be able to change the policy just with the name of the application. My Question: I wonder if these changes are intentional, and I want to get an absolute path for each application additionally, so I wonder what method to take. Terminal input : $ /usr/libexec/ApplicationFirewall/socketfilterfw --listapps Previous macOS result —————————————————————————————————— ALF: total number of apps = 5 1 : /Applications/Google Chrome.app ( Block incoming connections ) 2 : /usr/sbin/smbd ( Block incoming connections ) 3 : /Applications/FaceTime.app ( Block incoming connections ) 4 : /Applications/Safari.app ( Allow incoming connections ) 5 : /usr/sbin/cupsd ( Allow incoming connections ) —————————————————————————————————— On macOS 15, result —————————————————————————————————— 2024-06-24 16:21:15.599 socketfilterfw[2988:52866] ApplicationFirewall::AFGetAllApplications() processing response dictionary Total number of apps = 5 Google Chrome.app (state: 4) smbd (state: 4) FaceTime.app (state: 4) Safari.app (state: 1) cupsd (state: 1) —————————————————————————————————— —————————————————————————————————— —————————————————————————————————— On macOS 15 —————————————————————————————————— Terminal input: % /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp FaceTime.app —————————————————————————————————— 2024-06-24 16:51:59.091 socketfilterfw[3185:69041] ApplicationFirewall::AFSetAppStateByPath() result: 1 response: { Result = 1; } —————————————————————————————————— Terminal input: % /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp /System/Applications/FaceTime.app —————————————————————————————————— 2024-06-24 16:52:34.093 socketfilterfw[3186:69310] ApplicationFirewall::AFSetAppStateByPath() result: 1 response: { ErrorMessage = "vendor config update success"; Result = 1; } ——————————————————————————————————
1
0
22
1d
I think there is a problem changing the application rules using 'socketfilterfw'.
My Situation: I use the process 'socketfilterfw' related to the firewall. However, in macOS 15, the result message was different from previous versions. Some messages have only a few changes. However, the option '--listapps' has many changes. In previous version, the option showed results, including the path of each application. However, this is not the case with macOS 15. It only shows the name and status of the application. The list only shows the name and current status of the application. The results of this list alone cannot change the policy. I think this is a bug. I think we should let them know the absolute path of the application in the list, or we should be able to change the policy just with the name of the application. My Question: I wonder if these changes are intentional, and I want to get an absolute path for each application additionally, so I wonder what method to take. Terminal input : $ /usr/libexec/ApplicationFirewall/socketfilterfw --listapps Previous macOS result —————————————————————————————— ALF: total number of apps = 5 1 : /Applications/Google Chrome.app ( Block incoming connections ) 2 : /usr/sbin/smbd ( Block incoming connections ) 3 : /Applications/FaceTime.app ( Block incoming connections ) 4 : /Applications/Safari.app ( Allow incoming connections ) 5 : /usr/sbin/cupsd ( Allow incoming connections ) —————————————————————————————— In macOS 15, result —————————————————————————————— 2024-06-24 16:21:15.599 socketfilterfw[2988:52866] ApplicationFirewall::AFGetAllApplications() processing response dictionary Total number of apps = 5 Google Chrome.app (state: 4) smbd (state: 4) FaceTime.app (state: 4) Safari.app (state: 1) cupsd (state: 1) —————————————————————————————— On macOS 15 —————————————————————————————— Terminal input: % /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp FaceTime.app —————————————————————————————— 2024-06-24 16:51:59.091 socketfilterfw[3185:69041] ApplicationFirewall::AFSetAppStateByPath() result: 1 response: { Result = 1; } —————————————————————————————— Terminal input: % /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp /System/Applications/FaceTime.app —————————————————————————————— 2024-06-24 16:52:34.093 socketfilterfw[3186:69310] ApplicationFirewall::AFSetAppStateByPath() result: 1 response: { ErrorMessage = "vendor config update success"; Result = 1; } ——————————————————————————————
1
0
29
1d