This is a dedicated space for developers to connect, share ideas, collaborate, and ask questions. Introduce yourself, network with other developers, and join us in fostering a supportive community.

All subtopics
Posts under Community topic

Post

Replies

Boosts

Views

Activity

APNs server certificate update and how it affects my app
Hello, I am seeking inputs on a recent news received from Apple on "Apple Push Notification service server certificate update". Link: https://developer.apple.com/news/?id=09za8wzy. We have some apps which uses Firebase push notifcation and Amazon SNS services. Since these are managed services, isn't it the responsibility of provider server to update the root certificate. Need someone to confirm. What about the applications which uses local servers?
1
0
570
Nov ’24
The Future of Native Development
Hello, Apple Developer Community, In recent years, I've found myself increasingly concerned about the future of native ecosystems (iOS, Android), and I'd like to share my thoughts with you. It seems that small startups and cost-conscious companies are increasingly opting for cross-platform technologies like React Native, Flutter, and WebView, aiming to reduce expenses and speed up development cycles. Even large companies are following this trend in many cases. While this approach may be efficient from a business perspective, can it truly match the quality of user experience (UX) provided by native interfaces? Personally, I don't believe it does. There are undeniable advantages to cross-platform (or web-based) development, including rapid deployment and quick updates, as well as the ability to incorporate user feedback without going through a review process at every iteration. However, from my experience, once the initial version of a product has been somewhat stabilized, most companies tend to stick with cross-platform rather than transitioning to native development. In South Korea, where I am based, interest in native development education and entry-level training is on the decline. Most students and educational institutions favor frontend or backend development, and even mobile development curricula often prioritize cross-platform approaches. If this trend continues, we may face a shortage of native developers in the long run, which could lead companies to fall back on cross-platform solutions. This cyclical trend raises questions about whether a career in native development will continue to hold its advantages. On the surface, Apple appears invested in maintaining and expanding the native ecosystem. However, in practice, I feel that support for startups and smaller businesses trying to approach native development has been limited. I believe platform providers like Apple should place more focus on sustaining this ecosystem by providing practical, accessible support. (Perhaps including something as extreme as requiring a minimum percentage of native development?) I'm curious to hear what other developers in the community, particularly those who work extensively with Apple platforms, think about this shift. I'd appreciate hearing a variety of perspectives on this topic. Thank you.
0
0
225
Oct ’24
CarPlay not working
After updating to iOS 18.1 my CarPlay won’t work at all just says “ unsupported iPod 🤷‍♂️🤷‍♂️🤷‍♂️🤷‍♂️wired CarPlay in works vehicle however it works in my Audi 2021 I wired , using original Apple cable and works vehicle is 2023 model worked fine untill the update, still charges but nothing else 😤😤😤😤😤
1
0
258
Nov ’24
Apple Account Primary Address to Alias Change
Hello all, I recently shared a post to Reddit r/iCloud "Apple Alias Converted to Primary Apple Account" about an experience I had with changing my primary iCloud address to my alias after a name change. All the outlets have picked up on this story which may be misleading. I was under the impression this may be a bug, and now everyone's replicating this process without precaution. My question to the amazing Apple Developers and potentially Apple as well: Is the ability to change your Primary Apple Account to an Apple Alias (permanently) a known, previously discussed, upcoming feature? All Apple docs & support state otherwise. Really just seeking confirmation and I greatly appreciate expert input. Also happy to change Tags based on feedback (if possible). Thanks all! Caol
0
0
463
Oct ’24
Firebase Realtime Database Error "Operation Canceled" Causes Observers to Stop Receiving Updates in Xcode 15.3
I'm developing an iOS application using Xcode 15.3 and Firebase SDK 11.3.0. My app utilizes Firebase Realtime Database to monitor changes in foodEntries through Firebase observers. Here's a simplified overview of my implementation: Setting Up Observers: I set up Firebase observers to listen for changes in the foodEntries node. This allows my app to react in real-time to any additions or modifications. Monitoring Connection Status: I check the Firebase connection status whenever the app becomes active. Additionally, I track the network connection using NWPathMonitor to handle connectivity changes. Issue: When I send the app to the background and then bring it back to the foreground, I occasionally encounter the following error in the console. This happens approximately once in ten attempts: 2024-10-10 17:49:08.588502+0200 MyApp[22614:2112636] [[FirebaseDatabase]] 11.3.0 - [FirebaseDatabase][I-RDB083016] Error sending web socket data: Error Domain=NSPOSIXErrorDomain Code=89 "Operation canceled" UserInfo={NSDescription=Operation canceled}. Consequences: Once this error occurs, my app stops receiving updates from the Firebase observers. The observers' closure callbacks are no longer triggered, effectively halting real-time data synchronization. Additionally, the Firebase connection status change is not triggered when this happens. Temporary Workaround: Interestingly, the issue resolves itself when I send the app to the background and then bring it back to the foreground. This action seems to reset the Firebase connection, allowing observers to function correctly again until the error reoccurs. What I've Tried: Reinitializing Observers: Attempted to remove and re-add observers upon detecting connection issues. Connection Monitoring: Implemented NWPathMonitor to track network changes and attempt reconnections. Error Handling: Tried catching errors during data operations to trigger retries or reconnections. Despite these efforts, the Operation canceled error persists and disrupts the observer functionality. Sample Code: Here's how I set up the Firebase observers and monitor the network connection: `import FirebaseDatabase import Network import Combine class UserData: ObservableObject { private let monitor = NWPathMonitor() private let networkQueue = DispatchQueue(label: "NetworkMonitor") private var cancellables = Set() @Published var isAppFirebaseConnected: Bool = false @Published var isAppNetworkConnected: Bool = false init() { setupFirebaseMonitoring() startNetworkMonitoring() } private func setupFirebaseMonitoring() { let db = Database.database().reference() let connectedRef = db.child(".info/connected") connectedRef.observe(.value) { [weak self] snapshot in if let connected = snapshot.value as? Bool { DispatchQueue.main.async { self?.isAppFirebaseConnected = connected if connected { print("Firebase is connected.") // Initialize observers here self?.initObservers() } else { print("Firebase is disconnected.") self?.removeObservers() } } } } } private func startNetworkMonitoring() { monitor.pathUpdateHandler = { [weak self] path in let isConnected = path.status == .satisfied DispatchQueue.main.async { self?.isAppNetworkConnected = isConnected print("Network connection status: \(isConnected ? "Connected" : "Disconnected")") if isConnected && self?.isAppFirebaseConnected == false { // Attempt to reconnect Firebase if needed self?.reconnectFirebase() } } } monitor.start(queue: networkQueue) } private func initObservers() { let db = Database.database().reference() db.child("foodEntries").observe(.childAdded) { snapshot in // Handle new food entry print("New food entry added: \(snapshot.key)") } db.child("foodEntries").observe(.childChanged) { snapshot in // Handle updated food entry print("Food entry updated: \(snapshot.key)") } } private func removeObservers() { let db = Database.database().reference() db.child("foodEntries").removeAllObservers() print("Removed all Firebase observers.") } private func reconnectFirebase() { print("Attempting to reconnect Firebase...") Database.database().goOffline() DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { Database.database().goOnline() } } }` Problem Description: Observers Stop Working: After some time, the Operation canceled error appears, and the Firebase observers stop receiving updates. No Triggered Closures: The closure callbacks for .childAdded and .childChanged are no longer invoked. Manual Reset Required: Backgrounding and foregrounding the app temporarily fixes the issue by resetting the Firebase connection. Question: How can I prevent the NSPOSIXErrorDomain Code=89 "Operation canceled" error from disrupting Firebase Realtime Database observers in my SwiftUI app using Xcode 15.3 and Firebase SDK 11.3.0? Additionally, how can I effectively track and handle network connectivity changes to ensure that Firebase observers remain functional without requiring manual app state resets? What I Need Help With: Understanding the Cause: Insights into why the Operation canceled error occurs and how it affects Firebase's WebSocket connections. Robust Error Handling: Best practices for handling such network-related errors to maintain continuous observer functionality. Network Monitoring Integration: Examples or suggestions on effectively integrating network monitoring to trigger Firebase reconnections when necessary. Alternative Solutions: Any alternative approaches or configurations that can mitigate this issue. Additional Information: Firebase Configuration: I'm using default Firebase configurations and have enabled offline persistence. Device Environment: The issue occurs on both simulators and physical devices with stable internet connections. App Lifecycle Management: Observers are set up when the app becomes active and removed when it resigns active, as shown in the sample code. Any guidance or examples on handling this Firebase connection error and maintaining observer reliability would be greatly appreciated!
1
0
449
Oct ’24
TrueDepth Sensor Depth Measurement: Direct or Perpendicular?
I'm working on an app that use the TrueDepth sensor, and I have a question about how exactly the depth values are measured. I've been looking at the AVDepthData class documentation, but I couldn't find a clear answer to my specific question. My question is: Does the TrueDepth sensor measure the direct distance from the object to the sensor, or the perpendicular distance from the object to the plane of the sensor?
0
0
232
Sep ’24
Power button not turning screen off bug
Just got a launch day iPhone 16 pro max. This morning I updated to the security and bug fix update that came out. All day I have noticed that randomly when I push the power button and put my phone into my pocket the screen won’t actually go to sleep. I have AOD on so I know it won’t go fully black until it’s been in my pocket for a bit but I might pull my phone out a minute later and screen is on and has opened a random app or something. Sometimes it’s also at full brightness when I take it out. i assume this is a iOS bug?
1
0
250
Sep ’24
sequoia 15.0 after update issue
with my Mac air m2, after the update finished it started normally but after logging in, the Home Screen is blank (only wallpaper) no apps, no control bar, no dock nothing is showing up it’s just a blank normal screen I can move my mouse but can’t do anything with keyboard, when I lock and re-login it still stays same screen, I tried to reboot it, restart so many times but nothing helps, please if you have solution for this, I will be more than happy to know, thank you.
2
0
671
Oct ’24
In iOS 18, using AudioUnit for audio recording, converting PCM format to AAC crashes the application.
`// PCM -> AAC AudioBufferList* convertPCMToAAC (XDXRecorder *recoder) { UInt32 maxPacketSize = 0; UInt32 size = sizeof(maxPacketSize); OSStatus status; status = AudioConverterGetProperty(_encodeConvertRef, kAudioConverterPropertyMaximumOutputPacketSize, &size, &maxPacketSize); // log4cplus_info("AudioConverter","kAudioConverterPropertyMaximumOutputPacketSize status:%d \n",(int)status); AudioBufferList *bufferList = (AudioBufferList *)malloc(sizeof(AudioBufferList)); bufferList->mNumberBuffers = 1; bufferList->mBuffers[0].mNumberChannels = _targetDes.mChannelsPerFrame; bufferList->mBuffers[0].mData = malloc(maxPacketSize); bufferList->mBuffers[0].mDataByteSize = kTVURecoderPCMMaxBuffSize; AudioStreamPacketDescription outputPacketDescriptions; UInt32 inNumPackets = 1; pthread_mutex_lock(&pcmBufferMutex); status = AudioConverterFillComplexBuffer(_encodeConvertRef, encodeConverterComplexInputDataProc, pcm_buffer, &inNumPackets, bufferList, &outputPacketDescriptions); pthread_mutex_unlock(&pcmBufferMutex); if(status != noErr){ // log4cplus_debug("Audio Recoder","set AudioConverterFillComplexBuffer status:%d inNumPackets:%d \n",(int)status, inNumPackets); free(bufferList->mBuffers[0].mData); free(bufferList); return NULL; } if (recoder.needsVoiceDemo) { OSStatus status = AudioFileWritePackets(recoder.mRecordFile, FALSE, bufferList->mBuffers[0].mDataByteSize, &outputPacketDescriptions, recoder.mRecordPacket, &inNumPackets, bufferList->mBuffers[0].mData); // log4cplus_info("write file","write file status = %d",(int)status); if (status == noErr) { recoder.mRecordPacket += inNumPackets; } } return bufferList; } ` The above code for converting PCM to AAC works normally in iOS versions below 18, but in iOS 18, crashes occur during the conversion process. The console does not provide much useful information, and the application crashes at malloc(maxPacketSize) or AudioConverterFillComplexBuffer(), displaying the message AURemoteIO::IOThread (14): EXC_BAD_ACCESS (code=1, address=0x0). Please help identify the cause of the crash.
1
0
344
Oct ’24
Language Display Issue in iOS 18.2 Beta - iCloud Interface
Dear Apple Developer Team, After installing the iOS 18.2 Beta, I encountered a language inconsistency in the iCloud interface. Although my system language is set to Traditional Chinese, the iCloud section in Settings now displays in Simplified Chinese. This issue only affects the iCloud page, as other sections retain the correct language setting. I kindly request that you address this issue by providing a fix, either through an executable update or an upcoming Beta release. A timely solution would help improve the beta experience for users who rely on specific language settings. Thank you for your attention.
1
0
319
Nov ’24
HealthKit Read Permissions Not Displayed in Health App Settings After App Update
I am encountering a problem with HealthKit authorization in my app. In a previous version of the app, write permission for HKWorkoutType was already granted. In the new version of the app, I added a request for read permissions for both HKWorkoutType and HKWorkoutRoute. After updating the app, the following occurs: I can successfully fetch workout data using HKSampleQuery, and authorizationStatus(for: HKObjectType.workoutType()) returns .sharingAuthorized, indicating that the app has access to the data. However, when I check the Health app (Settings -> Health -> Data Access & Devices -> [App Name]), the read permission does not appear in the list. The write permission is still visible, but the newly requested read permission is missing. This behavior is unexpected because, despite being able to access the data programmatically, the read permission is not listed in the Health app settings. I have already verified that I am requesting the read permissions correctly in the code using requestAuthorization for both HKObjectType.workoutType() and HKObjectType.seriesType(forIdentifier: .workoutRoute). I would appreciate guidance on why this issue is occurring and how to ensure that read permissions are displayed correctly in the Health app settings.
1
0
518
Oct ’24
AirPods audio glitching
since updating to the newest ios 18 beta last night, my Audio is glitching out, like it is having connection problems while I’m sitting on my bed, with my phone 2 feet away from the AirPods. It sounds like a phone call breaking up when I am listening to music, or watching a video. I have restarted my phone several times, and it has not fixed it, and I have forgotten my AirPods, and reconnected the AirPods after.
0
0
336
Sep ’24
I am unable to add my Apple MagSafe Wallet to my iPhone
Exact same issues on my old leather MagSafe wallet, so I brought a new one from the Apple Store ‘blackberry’ colour. Yep that’s a word we don’t hear often in tech anymore. Anyway, I’ve reported it in all versions of iOS 18.1 when in beta and they still exist in iOS 18.2 beta 1. I’ve removed them, restarted phone to no avail unfortunately.
1
0
533
Nov ’24