Post

Replies

Boosts

Views

Activity

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
289
Oct ’24
iOS 18 CarPlay - all apps freeze when selected
Ever since updating to iOS18, CarPlay has been buggy for me. One of the constant issues is that after it connects, when I select an app (eg google maps or Spotify), the entire app will freeze. This happens regardless of the app I choose. Nothing on the app will be responsive unless I use the physical car controls to back out of the app. Once I’m on the main view of carplay (where it shows all the apps or where it shows the maps/audio mixes screen) then carplay becomes responsive again. But since I can’t use any of the apps as soon as I select one, I have to reboot my phone to resolve the issue. However, the issue will just happen again ok a subsequent attempt to connect. Some times it will work ok, probably happens again every 2-3 times I connect. This never happened prior to iOS18. Any suggestions?
0
0
33
6h
Bug with Transferable + AppEntity
Hello all, I'm finding myself with a compile error when trying to use a defined UTType for Transferable conformance when the type is also an AppEntity. The compiler error is Could not determine the identifier of `.todo`. Please use a UTType defined by the UniformTypeIdentifiers framework However, said compiler error only shows up after adding AppEntity conformance. So, in order to reproduce: Create any type, conform to Codable struct Todo: Codable { var id: UUID var title: String var completed: Bool } Create a UTType extension for the new type extension UTType { public static let todo: UTType = UTType(exportedAs: "org.nameghino.types.todo") } Add Transferable conformance extension Todo: Transferable { static var transferRepresentation: some TransferRepresentation { CodableRepresentation(contentType: .todo) ProxyRepresentation(exporting: \.title) } } At this point, the code compiles correctly on Xcode 16.2 beta 2 (16C5013f) Add AppEntity conformance extension Todo: AppEntity { static var typeDisplayRepresentation: TypeDisplayRepresentation = "todo_title" static var defaultQuery = Todo.Query() var displayRepresentation: DisplayRepresentation { DisplayRepresentation(title: "\(title)") } struct Query: EntityQuery { typealias Entity = Todo init() {} func entities(for identifiers: [UUID]) async throws -> [Todo] { return [] } func suggestedEntities() async throws -> [Entity] { return [] } } } Now the code is not compiling with the aforementioned error.
1
1
116
2w
Finder Sync Extension turning sidebar icons into generic document icons
Not able to replicate this myself but have had a couple of users report this. I have a Finder Sync Extension. It does not, at least intentionally, change any sidebar icons. The hosting app mostly uses asset catalogs and the icon file it specifies in its info.plist is a icns file, not an iconset. Any idea what may be causing this? Seems odd to me that there isn't some explicit setting to enable this instead of requiring some set of configurations lining up.
7
0
178
1w
App intermittently disappearing after installation
We're build a pkg with three apps in it from the command line. There is one primary app and two supporting apps. We build a folder structure inside a temp directory like below (some folder names replaced with generic ones): mkdir -p ./tmp/Applications/.hiddenfolder/ mkdir -p ./tmp/Library/Application\ Support/Company/ mkdir -p ./tmp/Library/Preferences/ mkdir -p ./tmp/Library/Logs/Company/ mkdir -p ./tmp/Library/LaunchAgents/ mkdir -p ./tmp/Library/Company/ mkdir -p ./tmp/Library/LaunchDaemons/ #Grant Logs Folder Read-Write Access to All chmod a+rw ./tmp/Library/Logs/Company/ chmod a+rw ./tmp/Library/Application\ Support/Company/ We then build and sign each app dependency and place them into the temporary folder. For each app we're calling: xcodebuild -workspace "$PROJECT" -scheme "$TARGET" -configuration Release -derivedDataPath "$WORKING" clean build codesign --force --deep -o runtime --entitlements "../$TARGET/$APPLICATION.entitlements" --sign "$DEVKEY" "$WORKING/Build/Products/Release/$APPLICATION.app" cp -R "$WORKING/Build/Products/Release/$APPLICATION.app" "$DESTINATION" The primary app is copied into ./tmp/Applications/.hiddenfolder/ . The other two apps are put in ./tmp/Library/Company/ and ./tmp/Applications/ We then create the component list, build, and notarize the final pkg using the script below: Some definitions of the variables used below: IDENTIFIER=com.company.pkg.app1 (not real id but an example) ROOT=./tmp SCRIPTS=./scripts GUI=./pkggui pkgbuild --analyze --identifier "$IDENTIFIER" --version "$VERSION" --root "$ROOT" --scripts "$SCRIPTS" "$NAME-tmp.plist" /usr/libexec/PlistBuddy -c "SET 0:BundleIsRelocatable NO" "$NAME-tmp.plist" /usr/libexec/PlistBuddy -c "SET 1:BundleIsRelocatable NO" "$NAME-tmp.plist" /usr/libexec/PlistBuddy -c "SET 2:BundleIsRelocatable NO" "$NAME-tmp.plist" pkgbuild --identifier "$IDENTIFIER" --version "$PKGVERSION" --root "$ROOT" --scripts "$SCRIPTS" --component-plist "$NAME-tmp.plist" "$NAME-tmp.pkg" productbuild --synthesize --package "$NAME-tmp.pkg" distribution.xml sed -i "" \ -e '$ i\ \ <title>App1</title>' \ -e '$ i\ \ <background file="background.icns" alignment="bottomleft" scaling="proportional" />' \ -e '$ i\ \ <welcome file="welcome.txt" />' \ -e '$ i\ \ <installation-check script="InstallationCheck()"/> \ <script> \ function InstallationCheck(prefix) { \ if (system.compareVersions(system.version.ProductVersion, '12.0') &lt; 0) { \ my.result.message = "This update requires OS X version 12.0 or later."; \ my.result.type = "Fatal"; \ return false; \ } \ return true; \ } \ </script>' \ "distribution.xml" productbuild --distribution distribution.xml --resources "$GUI" --package-path "./$NAME-tmp.pkg" --sign "$DEVKEY" "$NAME.pkg" Once built and notarized this pkg becomes the base for the installers we give to customers. For each customer we have some custom parameters we set in a plist file inside the pkg, which requires us to expand the pkg out, add the plist file to /Library/Preferences/ in the expanded pkg, and then flattent/re-notarize the edited pkg. What we're running into is that the primary app (App1 above) will intermittently disappear after installation. We check all of the files we lay down in the postinstall script, and usually it detects the app in the correct location (/Applications/.hiddenfolder/), so it appears that it is correctly laying the files down but something is removing the app after installation. A couple of times the postinstall script has detected that the app is not in the correct place and fails, but usually the install will finish and only the other two apps remain. So far we've found no logs or evidence of it being moved or deleted; it just ceases to exist after installation. Has anyone else had this issue and found a solution?
0
0
42
9h
Identifying same underlying card
Is there a way to determine if the same underlying card was used in multiple Apple Pay payments? Is there any sort of FPAN ID, fingerprint or card ID that would be the same between Apple Pay payments that used the same card? Could it be the "ApplePayPaymentPass"? https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentpass
0
0
43
14h
iOS 18.1.1 Share button not working
Updated to iOS 18.1.1 ‘share’ button is not working across various apps. For example, if I receive a pdf on WhatsApp, and I intend to share it to my Google Drive, nothing happens when I hit the button. Anyone else encountering the same problem? And how do I fix it? It’s been like this for a couple of days now and it’s really frustrating.
0
0
41
16h
Using Network Framework + Bonjour + QUIC + TLS
Hello, I was able to use the TicTackToe code base and modify it such that I have a toggle at the top of the screen that allows me to start / stop the NWBrowser and NWListener. I have it setup so when the browser finds another device it attempts to connect to it. I support N devices / connections. I am able to use the NWParameters extension that is in the TickTackToe game that uses a passcode and TLS. I am able to send messages between devices just fine. Here is what I used extension NWParameters { // Create parameters for use in PeerConnection and PeerListener. convenience init(passcode: String) { // Customize TCP options to enable keepalives. let tcpOptions = NWProtocolTCP.Options() tcpOptions.enableKeepalive = true tcpOptions.keepaliveIdle = 2 // Create parameters with custom TLS and TCP options. self.init(tls: NWParameters.tlsOptions(passcode: passcode), tcp: tcpOptions) // Enable using a peer-to-peer link. self.includePeerToPeer = true } // Create TLS options using a passcode to derive a preshared key. private static func tlsOptions(passcode: String) -> NWProtocolTLS.Options { let tlsOptions = NWProtocolTLS.Options() let authenticationKey = SymmetricKey(data: passcode.data(using: .utf8)!) let authenticationCode = HMAC<SHA256>.authenticationCode(for: "HI".data(using: .utf8)!, using: authenticationKey) let authenticationDispatchData = authenticationCode.withUnsafeBytes { DispatchData(bytes: $0) } sec_protocol_options_add_pre_shared_key(tlsOptions.securityProtocolOptions, authenticationDispatchData as __DispatchData, stringToDispatchData("HI")! as __DispatchData) sec_protocol_options_append_tls_ciphersuite(tlsOptions.securityProtocolOptions, tls_ciphersuite_t(rawValue: TLS_PSK_WITH_AES_128_GCM_SHA256)!) return tlsOptions } // Create a utility function to encode strings as preshared key data. private static func stringToDispatchData(_ string: String) -> DispatchData? { guard let stringData = string.data(using: .utf8) else { return nil } let dispatchData = stringData.withUnsafeBytes { DispatchData(bytes: $0) } return dispatchData } } When I try to modify it to use QUIC and TLS 1.3 like so extension NWParameters { // Create parameters for use in PeerConnection and PeerListener. convenience init(psk: String) { self.init(quic: NWParameters.quicOptions(psk: psk)) self.includePeerToPeer = true } private static func quicOptions(psk: String) -> NWProtocolQUIC.Options { let quicOptions = NWProtocolQUIC.Options(alpn: ["h3"]) let authenticationKey = SymmetricKey(data: psk.data(using: .utf8)!) let authenticationCode = HMAC<SHA256>.authenticationCode(for: "hello".data(using: .utf8)!, using: authenticationKey) let authenticationDispatchData = authenticationCode.withUnsafeBytes { DispatchData(bytes: $0) } sec_protocol_options_set_min_tls_protocol_version(quicOptions.securityProtocolOptions, .TLSv13) sec_protocol_options_set_max_tls_protocol_version(quicOptions.securityProtocolOptions, .TLSv13) sec_protocol_options_add_pre_shared_key(quicOptions.securityProtocolOptions, authenticationDispatchData as __DispatchData, stringToDispatchData("hello")! as __DispatchData) sec_protocol_options_append_tls_ciphersuite(quicOptions.securityProtocolOptions, tls_ciphersuite_t(rawValue: TLS_AES_128_GCM_SHA256)!) sec_protocol_options_set_verify_block(quicOptions.securityProtocolOptions, { _, _, sec_protocol_verify_complete in sec_protocol_verify_complete(true) }, .main) return quicOptions } // Create a utility function to encode strings as preshared key data. private static func stringToDispatchData(_ string: String) -> DispatchData? { guard let stringData = string.data(using: .utf8) else { return nil } let dispatchData = stringData.withUnsafeBytes { DispatchData(bytes: $0) } return dispatchData } } I get the following errors in the console boringssl_session_handshake_incomplete(241) [C3:1][0x109d0c600] SSL library error boringssl_session_handshake_error_print(44) [C3:1][0x109d0c600] Error: 4459057536:error:100000ae:SSL routines:OPENSSL_internal:NO_CERTIFICATE_SET:/Library/Caches/com.apple.xbs/Sources/boringssl/ssl/tls13_server.cc:882: boringssl_session_handshake_incomplete(241) [C4:1][0x109d0d200] SSL library error boringssl_session_handshake_error_print(44) [C4:1][0x109d0d200] Error: 4459057536:error:100000ae:SSL routines:OPENSSL_internal:NO_CERTIFICATE_SET:/Library/Caches/com.apple.xbs/Sources/boringssl/ssl/tls13_server.cc:882: nw_endpoint_flow_failed_with_error [C3 fe80::1884:2662:90ca:b011%en0.65328 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: en0[802.11], scoped, ipv4, dns, uses wifi)] already failing, returning nw_endpoint_flow_failed_with_error [C4 192.168.0.98:65396 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: en0[802.11], scoped, ipv4, dns, uses wifi)] already failing, returning quic_crypto_connection_state_handler [C1:1] [2ae0263d7dc186c7-] TLS error -9858 (state failed) nw_connection_copy_connected_local_endpoint_block_invoke [C3] Client called nw_connection_copy_connected_local_endpoint on unconnected nw_connection nw_connection_copy_connected_remote_endpoint_block_invoke [C3] Client called nw_connection_copy_connected_remote_endpoint on unconnected nw_connection nw_connection_copy_protocol_metadata_internal_block_invoke [C3] Client called nw_connection_copy_protocol_metadata_internal on unconnected nw_connection quic_crypto_connection_state_handler [C2:1] [84fdc1e910f59f0a-] TLS error -9858 (state failed) nw_connection_copy_connected_local_endpoint_block_invoke [C4] Client called nw_connection_copy_connected_local_endpoint on unconnected nw_connection nw_connection_copy_connected_remote_endpoint_block_invoke [C4] Client called nw_connection_copy_connected_remote_endpoint on unconnected nw_connection nw_connection_copy_protocol_metadata_internal_block_invoke [C4] Client called nw_connection_copy_protocol_metadata_internal on unconnected nw_connection Am I missing some configuration? I noticed with the working code that uses TCP and TLS that there is an NWParameters initializer that accepts tls options and tcp option but there isnt one that accepts tls and quic. Thank you for any help :)
16
0
215
5d
SwiftData Migration: Keeps failing at the end of willMigrate
I've been trying to setup a successful migration, but it keeps failing with this error: NSCloudKitMirroringDelegate are not reusable and should have a lifecycle tied to a given instance of NSPersistentStore. I can't find any information about this online. I added breakpoints throughout the code in willMigrate, and it originally failed on this line: try? context.save() I removed that, and it still failed. After I reload the app, it doesn't run the migration again and the app loads successfully. I figured since it crashed, it would keep trying, but I guess not. Here's how my migration is setup. enum MigrationV1ToV2: SchemaMigrationPlan { static var schemas: [any VersionedSchema.Type] { [SchemaV1.self, SchemaV2.self] } static var stages: [MigrationStage] { [stage] } static let stage = MigrationStage.custom( fromVersion: SchemaV1.self, toVersion: SchemaV2.self, willMigrate: { context in // Get cycles let cycles = try? context.fetch(FetchDescriptor<SchemaV1.Cycle>()) if let cycles { for cycle in cycles { // Create new recurring objects based on what's in the cycle for income in cycle.income { let recurring = SchemaV2.Recurring(name: income.name, frequency: income.frequency, kind: .income) recurring.addAmount(.init(date: cycle.startDate, amount: income.amount)) context.insert(recurring) } for expense in cycle.expenses { let recurring = SchemaV2.Recurring(name: expense.name, frequency: expense.frequency, kind: .expense) recurring.addAmount(.init(date: cycle.startDate, amount: expense.amount)) context.insert(recurring) } for savings in cycle.savings { let recurring = SchemaV2.Recurring(name: savings.name, frequency: savings.frequency, kind: .savings) recurring.addAmount(.init(date: cycle.startDate, amount: savings.amount)) context.insert(recurring) } for investment in cycle.investments { let recurring = SchemaV2.Recurring(name: investment.name, frequency: investment.frequency, kind: .investment) recurring.addAmount(.init(date: cycle.startDate, amount: investment.amount)) context.insert(recurring) } } //try? context.save() } else { print("The cycles were not able to be fetched.") } }, didMigrate: { context in // Get new recurring objects let newRecurring = try? context.fetch(FetchDescriptor<SchemaV2.Recurring>()) if let newRecurring { for recurring in newRecurring { // Get all recurring with the same name and kind let sameName = newRecurring.filter({ $0.name == recurring.name && $0.kind == recurring.kind }) // Add amount history to recurring object, and then remove matching for match in sameName { recurring.amountHistory.append(contentsOf: match.amountHistory) context.delete(match) } } //try? context.save() } else { print("The new recurring objects could not be fetched.") } } ) } Here's is my modelContainer in the app file. There is a fatal error occurring here that's crashing the app. var sharedModelContainer: ModelContainer = { let schema = Schema(versionedSchema: SchemaV2.self) let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) do { return try ModelContainer( for: schema, migrationPlan: MigrationV1ToV2.self, configurations: [modelConfiguration] ) } catch { fatalError("Could not create ModelContainer: \(error)") } }() Does anyone have any suggestions for this? EDIT: I found this error in the console that may be relevant. BUG IN CLIENT OF CLOUDKIT: Registering a handler for a CKScheduler activity identifier that has already been registered (com.apple.coredata.cloudkit.activity.export.8F7A1261-4324-40B4-B041-886DF36FBF0A). CloudKit setup failed because it couldn't register a handler for the export activity. There is another instance of this persistent store actively syncing with CloudKit in this process. And here is the fatal error Fatal error: Could not create ModelContainer: SwiftDataError(_error: SwiftData.SwiftDataError._Error.loadIssueModelContainer, _explanation: nil)
0
0
41
18h
Torch Strobe not working in light (ambient light) environments on iOS 18.1
As of iOS 18.1 being released we are having issues with our users experiencing issues with our app that relies on strobing the device torch. We have narrowed this down to being caused on devices with adaptive true-tone flash and have submitted a radar: FB15787160. The issue seems to be caused by ambient light levels. If run in a dark room, the torch strobes exactly as effectively as in previous iOS versions, if run in a light room, or outdoors, or near a window, the strobe will run for ~1s and then the torch will get stuck on for half a second or so (less frequently it gets stuck off) and then it will strobe again for ~1s and this behaviour repeats indefinitely. If we go to a darker environment, and background and then foreground the app (this is required) the issue is resolved, until moving to an area with higher ambient light levels again. We have done a lot of debugging, and also discovered that turning off "Auto-Brightness" from Settings -> Accessibility -> Display & Text Size resolves the issue. We have also viewed logs from Console.app at the time of the issue occurring and it seems to be that there are quite sporadic ambient light level readings at the time at which the issue occurs. The light readings transition from ~100 Lux to ~8000 Lux at the point that the issue starts occurring (seemingly caused by the rear sensor being affected by the torch). With "Auto-Brightness" turned off, it seems these readings stay at lower levels. This is rendering the primary use case of our app essentially useless, would be great to get to the bottom of it! We can't even really detect it in-app as I believe using SensorKit is restricted to research applications and requires a review process with Apple before accessing? Edit: It's worth noting this is also affecting other apps with strobe functionality in the exact same way
2
3
126
1w
Wallet is not highlighting boarding pass changes
Hi, I'm making changes in boarding pass through my webService and I changing Seat information but Wallet is not highlighting this information. Am I doing wrong? What do I need to do? Do need I inform anything? The request I do to silent push notification: apns-priority: 5 apns-topic: pass.**** apns-push-type: background { "aps": { "content-available": "1" } } Images links (before/after changes) https://ibb.co/0sPkbSZ https://ibb.co/rZR1jcC https://ibb.co/BCZKF1h https://ibb.co/zxQNGWW
0
0
35
18h
CloudKit production index not being applied to existing records
I created a new index on two record types on Oct 12th. I still cannot query the records using the new queryable index on records that were created before that date. There is no indication in the schema history that the reindexing has started, completed, failed, or still in progress. What is the expectation for new indices being applied to existing records? Well over a week seems unacceptable for a database that has maybe 5000 records across a few record types. When I query my data using an old index and an old record field, I get hundreds of matching results so I know the data is there. FB15554144 - CloudKit / CloudKit Console: PRODUCTION ISSUE - Query against index created two weeks ago not returning all data as expected
1
0
132
Oct ’24
Apple Watch 8 OS11.2 not synching my activity (intermittently)
My Apple Watch after the beta update is not syncing the activities sometimes with Apple Health. I just completed a 2.5 km walk, and it showed on Apple Health, yes, but it did not affect my daily goals. This is not the first time this has happened; this is just one of the examples that I'm sharing, other than what has been some problems that I am seeing after the beta update. Additionally, the camera remote app is not working correctly as I cannot see anything on the watch screen like I used to.
0
0
36
22h
Help Needed with Saving Geofence Events Offline (UserDefaults/Core Data)
Hi everyone, I've implemented geofencing in my app, and it works well when the device is connected to the internet. The app successfully triggers region entry and exit events, even when it's in a terminated state, and sends the details to the server. However, I'm facing an issue with offline functionality. I attempted to cache geofence events (region entry/exit) when the device is offline and send them to the server once the device comes back online. I’ve tried using both UserDefaults and Core Data for caching these events, but the offline events are not being stored or processed correctly. Here’s the code that triggers the region events: func locationManager(_ manager: CLLocationManager, didEnterRegion region: CLRegion) { if let region = region as? CLCircularRegion { handleRegionEvent(region: region, eventType: "enter") } } func locationManager(_ manager: CLLocationManager, didExitRegion region: CLRegion) { if let region = region as? CLCircularRegion { handleRegionEvent(region: region, eventType: "exit") } } The region entry/exit triggers correctly, and I even receive notifications. However, nothing is being saved to storage. To cache events, I'm using this method: private func cacheEvent(_ event: GeofenceEvent) { var cachedEvents = getCachedEvents() cachedEvents.append(event) if let encoded = try? JSONEncoder().encode(cachedEvents) { UserDefaults.standard.set(encoded, forKey: cachedEventsKey) } } For UserDefaults, we've added the app group and suite name, but it's still not working as expected. Has anyone encountered similar issues or have any suggestions on how to reliably cache and sync geofence events during offline scenarios? Any help would be greatly appreciated!
0
0
31
22h
I would like to know why I didn't receive a VoIP notification.
We have modified the program as we received in the previous(thread 764479) issue. Our program works very well and the notification problem has been almost solved in the test. Then, we tested it in the user's environment. At that time, one of the three iPhones stopped receiving notifications. After 10 minutes, VoIP notifications were received again. This device received PUSH notifications even when VoIP notifications did not come. We must explain to the user why this incident occurred. We would like to know if these three notifications were sent correctly to the device. Also, is there any other way for us to deal with this other than improving the network? [APNS LIST]Nov. 20th could not receive(failed) 15:06:13 5793987C-D1A4-811F-917F-87DD7F5083B3 15:07:09 667E0A2F-43B5-37FC-2F2A-45A6C27EFC34 15:19:31 1353DF78-519E-B1DC-82B7-8B890E59FE37 received(success) 15:04:09 19CC1937-533A-9AF4-9472-41C839E461D7 15:35:00 CD23AC57-6EC7-4523-941F-B103EDB4DEFB
0
0
23
1d
incomplete route data in Apple Health
When we upload workout data to HealthKit the route information with the workout detailed data is incomplete: just a few dots. When we select "Show all workout routes" the route data for the same workout shows correctly. We use the HKWorkoutBuilder to store the workout data, and add the location data with the HKWorkoutRouteBuilder to the workout with Is this an Apple Health issue, or do we have to change something in the way we store the location data to the workout?
0
0
17
1d