Developer Forums

RSS for tag

Ask questions about how to use the Apple Developer Forums. Discuss forums bugs and enhancements requests that you’ve filed via Feedback Assistant.

Post

Replies

Boosts

Views

Activity

Firebase Cloud Messaging Campaigns Not Delivering Notifications to iOS App
I’m having an issue with Firebase Cloud Messaging (FCM) where direct messages sent via the FCM token work perfectly, but notifications from Firebase Messaging Campaigns don’t reach my iOS app. Here’s what I’ve tried and confirmed so far: Setup & What’s Working: Direct Messages via FCM Token: These are received by the app without any issues. Notification Permissions: All necessary permissions are granted on the device. APNs Authentication Key: This is configured in Firebase, and the Firebase Console shows the campaign status as “Completed,” but messages don’t appear on the target device. My Steps: Uploaded the APNs Authentication Key in Firebase: Opened Apple Developer Console > Certificates, Identifiers & Profiles > Keys > Registered a New Key > Checked APNs service. Downloaded the APNs Key and uploaded it to Firebase under Project Settings > Cloud Messaging. Firebase Console Campaign Setup: Notification title and body are configured. Target set to “All Users” (for testing purposes). Message settings: sound enabled, Apple badge enabled, badge count set to 1, expiration set to 4 weeks. Code Setup (relevant parts): Using Firebase for authentication and data storage with Firestore. Configured AppDelegate for Firebase, FCM, and APNs token registration. Implemented UNUserNotificationCenterDelegate methods to show notifications when the app is in the foreground. Observed Behavior: The Firebase Console indicates the campaign is “Completed,” but the messages are not received on the device. There are no errors in the Firebase Console or my Xcode logs when sending the campaign. My AppDelegate is correctly handling the APNs token and FCM token registration. Here’s My Code Setup in AppDelegate: class AppDelegate: NSObject, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { FirebaseApp.configure() Messaging.messaging().delegate = self UNUserNotificationCenter.current().delegate = self UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { granted, error in if granted { print("Notification permission granted") } } application.registerForRemoteNotifications() return true } func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { Messaging.messaging().apnsToken = deviceToken } func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) { print("FCM Token received: \\(String(describing: fcmToken))") } func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { completionHandler([.alert, .badge, .sound]) } }
0
1
162
3w
Unable to inspect SwiftUI view embedded inside UITableView
We have been trying to migrate screens that were developed using UITool Kit to SwiftUI. In the process we have some screens that have SwiftUI embedded inside the UITool kit view. Our developers have defined accessibility ids for all elements in these views and these are inspectable using the native iOS xcode inspector. However when i try inspecting it with the appium inspector i get an empty list with no elements in the hierarchy tree. Attaching a screenshot of the element when inspecting through the native xcode accessibility inspector, Attaching a screenshot of the same screen when inspected through the appium inspector, Also tried printing the XCTest UI dump using appium method, `driver().executeScript("mobile:source", Map.ofEntries(Map.entry("format","description"))) The UI tree i get is the same that i get when inspecting through the appium inspector. Requesting support from the Apple team based on this ticket, [https://github.com/appium/appium/issues/20759)
0
0
36
17h
Localized Folder Created After Installing App with Same Name as Existing Application
I have two macOS applications: Application A, named My App.app with the bundle ID com.comp.myapp, and Application B, named My App.app with the bundle ID com.comp.myapp2. Both applications have the same name. Application A is installed at /Applications/My App.app. When I run the installer for Application B, it gets installed in a folder at /Applications/My App.localized/My App.app. Even if I remove Application A using the preinstall script of Application B's installer, the result remains the same. Does the installer determine the installation path with the new folder before the preinstall script executes? How can it be addressed so the new folder will not be created? Notes: We have a composite package that contains multiple components. Instead of just running pkgbuild, we use our own components.plist rather than a synthesized one. The components.plist is attached. The PackageInfo for Application B is also attached. components.plist PackageInfo packageInfo.xml components.plist
0
0
33
15h
How to interact programatically with the popup paste button
I am trying to figure out a way to programatically paste the contents of the clipboard into a series of text input fields. Specifically, this is for a security code entry screen, where the user will receive a code as a string of number characters. After verifying that the string represents a number, I split it into an array of single number chars, then paste the value at each index into each input. This works fine in Chrome and Firefox, but fails in Safari. After a lot of research, I have found that programatic pasting is a challenge on this platform. I did discover that if I listen for the focusin event and then get the contents of the clipboard, a popup "paste" button will appear. Clicking it does nothing, but I'm thinking that I might be able to grab the button in code and bend it to my will. Can anyone tell me how to interact with that button?
0
0
34
14h
Maintain rotation sense while dragging
Hi, I heve a problem with an visionOS app and I couldn't find a solution. I have 3D carousel with cards and when I use the drag gesture and I drag to the left I want the carousel to rotate clockwise and when I drag to the right I want the carousel to rotate counter clockwise. My problem is when I rotate my body more than 90 degrees to the left or to the right the drag gesture changes it's value and the carousel rotates in the opposite direction? Do you know how can I maintain the right sense taking into account that the user can rotate his body? I've tried to take the user orientation with device tracking and check if rotation on Y axis is greater than 90 degrees in both direction but It is a very small area bettween 70-110 degrees when it still rotates in the opposite direction. I think that's because the device traker doesn't update at the same rate as drag gesture or it doesn't have the same acurracy.
0
0
47
10h
On-Device Website Filtering Without VPN/Root Certificates
Hi everyone, Our app helps users block adult websites to promote focus and digital wellness. During the App Store review, it was flagged under Guideline 2.5.1 for using a VPN profile to block content, with Apple advising us to remove this feature. Since blocking adult content is core to our app, we’re looking for compliant alternatives: Can Network Extensions Framework (e.g., NEDNSProxyProvider) be used for on-device filtering? Would pre-configured safe DNS (e.g., CleanBrowsing) be acceptable? Are there compliant examples of similar apps? Any advice on achieving this functionality within Apple’s guidelines would be greatly appreciated. Thanks!
0
0
35
6h