Post

Replies

Boosts

Views

Activity

Storekit2 debug: subscription doesn't exist and code still append a subscription??!! BUG??
I am really frustrated with storekit2, is it me or is it an Apple bug? the subscription doesn't exist LITERALLY and the code still append a subscription to my currentSubscriptions!! Unfortunatelly I cannot attach an image but the susbcrioption doesn't exist in the storekit debug window but the code still append a valid subscription! https://stackoverflow.com/questions/77783897/storekit2-subscription-is-not-existant-and-still-append-subscription-bug // update the customers products @MainActor func updateCustomerProductStatus() async { var purchasedSubs: [Product] = [] var purchasedIAP: [Product] = [] //iterate through all the user's purchased products for await result in Transaction.currentEntitlements { do { //again check if transaction is verified let transaction = try checkVerified(result) //Check the `productType` of the transaction and get the corresponding product from the store. switch transaction.productType { case .consumable: if let iap = iaps.first(where: { $0.id == transaction.productID }) { purchasedIAP.append(iap) } case .autoRenewable: if let subscription = subscriptions.first(where: { $0.id == transaction.productID }) { //SUBSCRIPTION DOESN'T EXIST AND STILL GETS APPENDED!! purchasedSubs.append(subscription) } default: break } } catch { //storekit has a transaction that fails verification, don't delvier content to the user print("Transaction failed verification") } //finally assign the purchased products self.purchasedIAPs = purchasedIAP self.purchasedSubscriptions = purchasedSubs } }
0
0
526
Jan ’24
Does Weatherkit have a webhook for push notifications?
I'm implementing PUSH NOTIFICATIONS for an app that uses Weatherkit ("there is a Tornado outside your house, run!") I enabled the capability, the code in app delegate, tested the push notification with the new apple console. and everything WORKS, BUT...how can I receive push notifications from Weather kit? do they have a webhook that I can listen to? I cannot find anything in the documentation. https://developer.apple.com/documentation/weatherkitrestapi/get_api_v1_weatheralert_language_id or do I need to create a server to call weatherkit every min? I don't understand how to listen to weather kit for alerts. thanks
1
1
712
Jun ’23
Use In-App purchases to pay for apartment monthly rentals?
I have an app that shows property listings and allows users/tenants to apply directly to rent the place. The goods offered are physical (an apartment/house). Can I use the in-app purchases without the 30% fee for this purpose? I assume it's possible as Amazon sell physical goods via in-app purchases, but they cannot sell digital goods (kindle books) so they redirect the user to their website. anyways, I thought about asking before start developing and getting rejected.
0
0
577
Dec ’21
Xcode 13 not loading
and I don't know why!! it's a showstopper... can a Good Samaritan help? Date/Time: 2021-09-27 13:33:34.669 -0500 End time: 2021-09-27 13:42:40.904 -0500 OS Version: macOS 11.4 (Build 20F71) Architecture: x86_64h Report Version: 32 Share With Devs: Yes Data Source: Stackshots Shared Cache: 4A889CE9-8D7E-304E-A5F7-84D819B0BF9C slid base address 0x7fff200db000, slide 0xdb000 Command: Xcode Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 13.0 (19234) Build Version: 16 Product Build Version: 13A233 Project Name: IDEFrameworks Source Version: 19234000000000000 App Item ID: 497799835 App External ID: 844005016 Parent: launchd [1] PID: 1128 Time Since Fork: 651s Event: hang Duration: 546.23s Duration Sampled: 1.30s (process was unresponsive for 545 seconds before sampling) Steps: 13 (100ms sampling interval) Report threshold: 2.5s Hardware model: MacBookPro15,1 Active cpus: 12 Boot args: chunklist-security-epoch=0 -chunklist-no-rev2-dev Time Awake Since Boot: 818s Time Since Wake: n/a (machine hasn't slept) Fan speed: 5886 rpm Timeline format: stacks are sorted chronologically Use -i and -heavy to re-report with count sorting Heaviest stack for the main thread of the target process: 13 start + 1 (libdyld.dylib + 89949) [0x7fff20404f5d] 13 NSApplicationMain + 816 (AppKit + 13436) [0x7fff22ca647c] 13 -[DVTApplication run] + 54 (DVTKit + 94452) [0x11053f0f4] 13 -[NSApplication run] + 586 (AppKit + 193081) [0x7fff22cd2239] 13 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 368 (DVTKit + 96004) [0x11053f704] 13 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364 (AppKit + 249541) [0x7fff22cdfec5] 13 _DPSNextEvent + 864 (AppKit + 255730) [0x7fff22ce16f2] 13 _BlockUntilNextEventMatchingListInModeWithFilter + 70 (HIToolbox + 198067) [0x7fff2871e5b3] 13 ReceiveNextEventCommon + 587 (HIToolbox + 198677) [0x7fff2871e815] 13 RunCurrentEventLoopInMode + 292 (HIToolbox + 199347) [0x7fff2871eab3] 13 CFRunLoopRunSpecific + 563 (CoreFoundation + 521804) [0x7fff204e064c] 13 __CFRunLoopRun + 1988 (CoreFoundation + 525523) [0x7fff204e14d3] 13 __CFRunLoopDoTimers + 307 (CoreFoundation + 629002) [0x7fff204fa90a] 13 __CFRunLoopDoTimer + 927 (CoreFoundation + 630189) [0x7fff204fadad] 13 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20 (CoreFoundation + 631481) [0x7fff204fb2b9] 13 __NSFireDelayedPerform + 415 (Foundation + 528871) [0x7fff2128f1e7] 13 -[_DVTTimeSlicedMainThreadActiveWorkQueues _processWorkQueuesOnDeadline] + 101 (DVTFoundation + 1907660) [0x10fd4dbcc] 13 -[DVTTimeSlicedMainThreadWorkQueue _processWithDeadline:] + 167 (DVTFoundation + 1915749) [0x10fd4fb65] 13 -[_DVTTimeSlicedMainThreadUnorderedUniquingWorkQueue _processWorkItemsWithDeadline:] + 466 (DVTFoundation + 1918181) [0x10fd504e5] 13 __67-[IDEContainer initWithFilePath:extension:workspace:options:error:]_block_invoke.409 + 24 (IDEFoundation + 4534088) [0x110c1ff48] 13 -[IDEContainer _resolveFileReference:] + 123 (IDEFoundation + 4517946) [0x110c1c03a] 13 -[IDEFileReference referencedContainer] + 69 (IDEFoundation + 4032369) [0x110ba5771] 13 -[IDEFileReference _recalculateReferencedContainer] + 557 (IDEFoundation + 4030328) [0x110ba4f78] 13 +[IDEContainer retainedContainerAtFilePath:fileDataType:workspace:error:] + 28 (IDEFoundation + 4524448) [0x110c1d9a0] 13 +[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:] + 1518 (IDEFoundation + 4525972) [0x110c1df94] 13 -[DVTModelObjectGraph performBlockCoalescingModelChanges:] + 146 (DVTFoundation + 1287776) [0x10fcb6660] 13 -[DVTModelGraphTransactionScope performTransaction:] + 66 (DVTFoundation + 2528052) [0x10fde5334] 13 __58-[DVTModelObjectGraph performBlockCoalescingModelChanges:]_block_invoke + 130 (DVTFoundation + 1287939) [0x10fcb6703] 13 __82+[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:]_block_invoke + 230 (IDEFoundation + 4526800) [0x110c1e2d0] 13 -[DVTDispatchLock performLockedBlock:] + 60 (DVTFoundation + 2716374) [0x10fe132d6] 13 DVTDispatchBarrierSync + 208 (DVTFoundation + 2895346) [0x10fe3edf2] 13 _dispatch_lane_barrier_sync_invoke_and_complete + 60 (libdispatch.dylib + 67022) [0x7fff2024c5ce]
2
0
917
Sep ’21