Post

Replies

Boosts

Views

Activity

Reply to CloudKit Query does not work
This doesn't look right, are you customizing your recordName when creating objects? What are you using to generate your identifier? The recordName is typically in the form of a UUID if you leave things alone and let the system generate identifiers for you. Can you just do a full query of that PNote type in your development container, see your record, click on it, and copy paste that identifier exactly as is into the screenshots you've provided? I've reported issues with console UI for queries and such in the past and gotten a few fixes, perhaps there is something invalid about having a period in your recordName? That having been said however, I haven't come across any documentation describing limitations.
2w
Reply to Insufficient Metrics Data
@sikandernoori the threshold is not documented, you could ask the performance team at WWDC24 but I doubt you'll get an exact answer. It changes from year to year as you noted--consider it an implementation detail. Regarding Xcode Organizer, depending on what data you're after, you might be better fit to collect MetricKit payloads, ship off device, and do your own analysis. You won't be subject to any aggregation limits, but you do have to manage the data and do some math or visualization by hand.
2w
Reply to How are App Clip updates rolled out to existing users of an App Clip?
I wouldn't be so sure about the app clip getting an update. If the user launched the app clip again, maybe it would get the latest. The language around it staying on your device for 30 days to me feels like it wouldn't auto update. I would create a feedback for this and ask for clarifying documentation in the App Clip Framework or App Store Connect. Out of curiosity, is the update just to get them new features, or is the old version of the app clip no longer compatible with the backend?
Apr ’24
Reply to Can users on old iOS versions download older versions of our app?
Users on iOS 15 will still be able to download your 'final iOS 15' app version if you let them via last compatible version. You can look at this page and see a screenshot of it in App Store Connect. https://developer.apple.com/help/app-store-connect/manage-your-apps-availability/make-a-version-unavailable-for-download Keep in mind any services or APIs that you integrate with are still subject to availability per those providers.
Feb ’24
Reply to Metrickit opt in rate and actual crash numbers dont match
@andreikrn @atul3189 @dkvijay The conversation I had with a MetricKit engineer during WWDC20 or WWDC21 labs was that the user setting to "Share with App Developers" is not used in MetricKit when deciding to generate a metric or diagnostic payload. If you read the footer carefully, "Share with App Developers" is an Apple thing, Apple is sharing it with developers. MetricKit allows YOU, the developer, directly receive the data and then handle it responsibly. I have been operating under this assumption for years. I just wrote up a feedback requesting a docs update for this. Fingers crossed. FB13618353 - MetricKit / Developer Documentation: Add description to the behavior of MetricKit with respect to "Share with App Developers" setting Before operating under this assumption, please consider giving your users the option to control data collection. #privacy-by-design So now that you've thought about letting users choose to participate in this data collection within a feature or setting in your app, it is easy to validate the assumption that MetricKit is not tied to "Share with app developers". Turn off the "Share with App Developers" setting Create a button that crashes your app. Generate logs or save the payload in your subscriber didReceive callback Install this app on a device via Xcode or TestFlight Ensure you are NOT debugging, as the crash will be caught by Xcode Tap the crash button Relaunch the app, your app SHOULD get a callback Verify that your log is printed or the payload is persisted via your process An alternate path if you don't log or save the MXDiagnosticPayload would be: Set a breakpoint on your didReceive diagnostics method Attach the debugger (run app) on your device with Xcode after the app is crashed Verify during app launch that you didReceive diagnostic callback is invoked. I just verified this with iOS 17.3.x in one of my apps using the alternate path and Xcode 15.2. NOTE: For all of this to work, you should be setting the .addSubscriber method somewhere during app startup--my favorite spot is didFinishLaunching. Even for a SwiftUI application, I still have a UIApplicationDelegateAdaptor and in that implementation I put it in didFinishLaunching. Now a note on privacy and MetricKit data collection. Because the user can't control my app's MetricKit payload collection via the global setting "Share with app developers", I have explicitly put reference to MetricKit metrics and diagnostics in my privacy statement. Furthermore I have given users the option to enable/disable directly within my app. With that having been said, I do make a decision that, if you use a TestFlight build of my app for beta testing, both diagnostics and metrics will be recorded by default to help improve my app--that is after all the whole purpose of TestFlight right? P.S. Don't forget to update your App Privacy Label with respect to this data collection too! I conditionally detect installed from TestFlight and add a disclaimer to the very top of my Privacy Policy. If the user did in fact install a TestFlight build, they will see this in the settings to enable/disable collection. Again, note the disclaimer. My apps don't always crash, but when they do MetricKit is there for me to records it. As an added perk, MetricKit can capture events that other off-the-shelf crash reporters just can't do, so I use MetricKit exclusively to build the most privacy preserving crash reporting solution I can.
Feb ’24
Reply to Core Bluetooth Background Modes on a package with SPM
You should unit test your logic, not your CBCentralManager itself. Unit testing Core Bluetooth isn't going to yield the results you expect. It is just as you described, unit testing isn't running in an app per-say. Simple fact, you can't initialize many of the Core Bluetooth types, namely CBPeripheral. I'd check out the following video and refactor your code accordingly for testing. https://developer.apple.com/videos/play/wwdc2018/417/
Feb ’24
Reply to Unable to navigate to Bluetooth Settings
What are you trying to enable the user to do? Most things are not possible to navigate directly into the Settings app. Secret apple sauce. If Bluetooth is off and you want to turn it on AND you're using CoreBluetooth, initialize your manager with the power key. This will trigger a prompt to the user to either enable Bluetooth, or start new connections if that was turned off for the day. self.centralManager = CBCentralManager(delegate: nil, queue: .main, options: [CBCentralManagerOptionShowPowerAlertKey: true])
Feb ’24
Reply to CoreBluetooth write request receives .prepareQueueFull
According to the documentation of the characteristic write options, the write with response SHOULD chop up the message and perform a long write. Core spec 4.0 Part G 4.9.4. https://developer.apple.com/documentation/corebluetooth/cbcharacteristicwritetype I created a feedback for this as I am also encountering the prepareQueueFull unexpectedly. FB13596337 Here are some console logs: Central (iPadOS 17.2) (client) error bluetoothd 21:53:42.361949-0600 com.apple.bluetooth Stack.GATT Received error response 9 for write long value - canceling execution (status=65535) error bluetoothd 21:53:42.421534-0600 com.apple.bluetooth Server.GATT Failed to write long characteristic value at handle 0x001b on device "58B87653-65EE-23CB-2E99-0D70A24D0CE2" - result was 9 error bluetoothd 21:53:42.421727-0600 com.apple.bluetooth Server.GATT Command failed to execute with status 9 error bluetoothd 21:53:42.422360-0600 com.apple.bluetooth Server.GATT Command failed to execute with status 9 Peripheral (macOS 14.2) (server) error bluetoothd 21:54:52.323246-0600 com.apple.bluetooth Server.GATT Refusing Prepare Write Request as it would exceed the maximum amount of data queued (512) for this connection by 135 byte(s) error bluetoothd 21:54:52.323518-0600 com.apple.bluetooth Stack.ATT Failed to write value to attribute handle 0x001B with result 9 (status=65535)
Feb ’24