I have a question about how UIKit expects us to handle interaction events at scale.
From what I understand so far:
For UIControls (UIButton, UISwitch, UITextField, etc.), we explicitly register with addTarget(_:action:for:).
For gestures, we add UIGestureRecognizer instances to views.
For UIView subclasses, we can override touch methods like touchesBegan/touchesEnded.
All of this must be done on the main thread, since UIKit isn’t thread-safe.
Now here’s my main concern
If I have a complex UI with hundreds or thousands of widgets, am I expected to perform these registrations individually for each widget and each high-level event (tap, long press, editing changed, etc.)?
Or does UIKit provide a more centralized mechanism?
In short: Is per-widget, per-event registration the “normal” UIKit approach, or are there best practices for scaling event handling without writing thousands of addTarget or addGestureRecognizer calls?
Thanks!
Overview
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
After recently updating my MacBook Pro (14-inch, 2021, M1 Pro) to macOS Sequoia (15.6), my docking station sporadically disconnects and reconnects about once every 1-5 minutes. This causes my external screens to switch off for about a second, and my external drive to disconnect.
This has (obviously) completely broken my workflow, and I've had to resort to connecting two screens directly to the MacBook. I've had to completely disconnect the external drive for fear of corrupting due to the sudden disconnects.
I've seen other people report the same or similar issues here, and other places. I've tried all kinds of fixes suggested on various forums (reinstalled drivers, cleared preference files, etc.) without any luck.
To be frank, this is a completely unacceptable bug that needs to be fixed ASAP. I cannot accept that installing an os update completely breaks something as fundamental as connecting to external devices via a docker. Especially when this worked completely fine on macOS 13, and I was essentially forced to update because the (working) macOS 13 was no longer supported.
Hi, I am a new IOS developer, trying to learn to integrate the Apple Foundation Model.
my set up is:
Mac M1 Pro
MacOS 26 Beta
Version 26.0 beta 3
Apple Intelligence & Siri --> On
here is the code,
func generate() {
Task {
isGenerating = true
output = "⏳ Thinking..."
do {
let session = LanguageModelSession( instructions: """
Extract time from a message. Example
Q: Golfing at 6PM
A: 6PM
""")
let response = try await session.respond(to: "Go to gym at 7PM")
output = response.content
} catch {
output = "❌ Error:, \(error)"
print(output)
}
isGenerating = false
}
and I get these errors
guardrailViolation(FoundationModels.LanguageModelSession.GenerationError.Context(debugDescription: "Prompt may contain sensitive or unsafe content", underlyingErrors: [Asset com.apple.gm.safety_embedding_deny.all not found in Model Catalog]))
Can you help me get through this?
Greetings,
func stepForward(_ input: Int) -> Int {
return input + 1
}
func stepBackward(_ input: Int) -> Int {
return input - 1
}
func chooseStepFunction(backward: Bool) -> (Int) -> Int {
return backward ? stepBackward : stepForward /* Error
type of expression is ambiguous without a type annotation */
}
Why am I getting this error. If I change the function to
func chooseStepFunction(backward: Bool) -> (Int) -> Int {
if backward {
return stepBackward
else {
return stepForward
}
}
Why is the previous chooseStepFunction giving me an error ?
Thx in advance
We have an app which is hybrid using React Native and Native features. We released our app recently which showed issues related to missing packages/corrupt package but xCode didn't gave any error and we were able to Archive and submit app successfully.
Topic:
Code Signing
SubTopic:
General
We're trying out using a 3rd party java applet as part of our suite, but we're getting inconsistent results that seem to be related to signing. "Fortunately," I can trivially reproduce it!
It pops up a dialogue saying "Apple could not verify “java” is free of malware that may harm your Mac or compromise your privacy"; if I click through the dialogue and the system settings, it then does the same for each of the dylib files.
The file seems to be signed, so is this a matter of it not being notarized? Will we have to sign and notarize them all on our own?
I have a question. I work for a mobile operator, and when you insert the SIM, the default APN is automatically configured. However, afterward, using the internal Device Manager platform, we send the corresponding APN of an MVNO to that MSISDN. However, the iPhone device (any model, recent iOS versions) receives the notification of the APN change, but it doesn't reflect the change in the APN settings menu. Do you know how we could make the iPhone device reflect the APN change?
Has anybody else experienced something similar? This is on the login screen.
I call update() and it doesn't call me back with view()
2025-08-21 17:04:38.669 Db SecurityAgentHelper-arm64[1134:2df1] [***:LoginView] calling update()
Then silence...
The Wi‑Fi Alliance’s Wi‑Fi Aware data communication uses IPv6.
However, in Chapter 53 “Wi‑Fi Aware” of the Accessory Design Guidelines for Apple Devices, Release R26, it is stated that “The Neighbor Discovery Protocol (NDP) for IPv6 address resolution is not supported.”
This has caused confusion among developers: Does Apple’s Wi‑Fi Aware data communication actually use IPv6?
What is the impact of “The Neighbor Discovery Protocol (NDP) for IPv6 address resolution is not supported” in Apple’s implementation?
Hello, I am new to App development, so I am looking for some advice.
I want to develop an app for iPhone, which downloads files (pdf, jpg)from a server to the local storage. I also want to get data from the server to be used in my app. This could be a database access or just simple xml files. I
want a secure access based on userid and password.
Since in a later version, my app should also run on Android Phones, I am reluctant to use iCloud.
I was thinking sftp, but that does not seem to be supported for iOS.
But the NMI and NDI of Samsung's Wi Fi Aware are not the same MAC address. May I ask Apple engineers why they are different from Samsung?
Any one experience this bug, when playing a video the bluetooth headphones loose audio? my workaround is to select from one of the other audio outputs, and go back again and select the affected headphone.
Topic:
Media Technologies
SubTopic:
Video
Hi guys,
Is there any good up-to-date tutorial about publishing a Python based app on Apple Store?
Now, I have developed a standalone Python app from PyCharm, and it's using Pyside6 for UI and some major Python libraries. It's a productivity app with a little A.I. features. I used PyInstaller to prepare the app. Currently, I am stuck at the stage of codesign and Apple Review process, because I am manually doing codesign and building the package from command-line. Without using Xcode, things can get messy or miss easily.
It would be nice to follow a up-to-date tutorial about how to complete the codesign and Apple Review process for a Python based app. For example, what to do, how to do, what to be careful during the Apple Review process, etc. Thanks!
Almost everytime, when I try to search apps in App library, the icons go invisible, o are showed for and instant to quickly go invisible.
Hi, this is the first app and time using apple forums and my question. I published an app and it says ready to distribute i have tested the link and installed it on my phone, however on the App Analytics it says "Not Enough Data".
Know its been downloaded and installed because i did it but it shows as i said not enough data, is there a delay of a certain time, is there a difference between private and business.
How can i find out if there has been a purchase, nothing is displaying as i was expecting.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Hi everyone,
I’m working on adapting our app to iOS 26’s new passkey feature, specifically Automatic Passkey Upgrades.
https://developer.apple.com/videos/play/wwdc2025/279/
Our app already supports passkey registration and authentication, which have been running reliably in production. We’d like to extend passkey coverage to more users.
According to the WWDC session, adding the parameter requestStyle: .conditional to createCredentialRegistrationRequest should allow the system to seamlessly upgrade an account with a passkey. However, in my testing, I consistently receive the following error:
Error | Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1001 "(null)"
Test environment:
Xcode 26.0 beta 4 (17A5285i)
iPhone 11 running iOS 26.0 (23A5297n)
Questions:
Is the Automatic Passkey Upgrades feature currently available in iOS 26?
I understand that the system may perform internal checks and not all upgrade attempts will succeed. However, during development, is there a way to obtain more diagnostic information? At the moment, it’s unclear whether the failure is due to internal validation or an issue with my code or environment.
Thanks.
A bit of a novice to app development here but I have a paid developer account, I have registered the identifier for MusicKit on the developer website (using the bundle identifier I've selected in Xcode) but the option to add MusicKit as a capability is not available in Xcode?
I've manually updated the certificates, closed the app and reopened it, started a new project and tried with a different demo project?
Apologies if I am missing something obvious but could someone help me get this capability added?
When using a custom keyboard set via UIResponder.inputView, a gap appears between the text field and the custom keyboard after rotating from portrait to landscape and back to portrait.
On a portrait screen, when switching to a custom keyboard:
The input field at the top and the custom keyboard below it appear normally, with no empty space in between.
When I rotate from portrait to landscape, a gap appears in the middle.
Topic:
UI Frameworks
SubTopic:
UIKit
I'm creating an iPad app using Xcode 26 Beta 6. I have the following simple code and web page, but when I tap the file selection button, nothing appears. Do I need to add any additional code?
code
struct SwiftUIWebView: View {
@State private var webPage = WebPage()
private let url = URL(string: "https://www.xxxx.com/")!
var body: some View {
WebView(webPage)
.onAppear {
webPage.load(URLRequest(url: url))
}
}
}
web page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test</title>
</style>
</head>
<body>
<div id="container">
<input type="file" />
</div>
</body>
</html>
The issue I am facing is that even when I run my app from a physical device, I get
the error "No FCM token found," while push notifications are enabled in my
Xcode capabilities. I don't see the FCM token generated in the users' collection on
Firestore. While the code setup seems good, the same error persists. I have implemented the logic to retrieve the FCM token,
hat the necessary permissions are granted in my app.Here are my Firestore rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Allow authenticated users to read and write their own user data
match /users/{userId} {
allow read: if request.auth != null;
allow update: if request.auth != null &&
(request.auth.uid == userId ||
// Allow FCM token updates
request.resource.data.diff(resource.data).affectedKeys().hasOnly(['fcmToken']));
allow create: if request.auth != null;
match /followers/{followerId} {
allow read: if request.auth != null;
allow write: if request.auth != null && request.auth.uid == followerId;
}
match /following/{followingId} {
allow read: if request.auth != null;
allow write: if request.auth != null && request.auth.uid == userId;
}
match /blockedUsers/{blockedUserId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
// Messages collection
match /messages/{messageId} {
allow create: if request.auth != null &&
(request.resource.data.senderId == request.auth.uid ||
request.resource.data.receiverId == request.auth.uid);
allow read, update, delete: if request.auth != null &&
(resource.data.senderId == request.auth.uid ||
resource.data.receiverId == request.auth.uid);
}
// Chats collection
match /chats/{chatId} {
allow create: if request.auth != null &&
request.auth.uid in request.resource.data.participants;
allow read, update, delete: if request.auth != null &&
request.auth.uid in resource.data.participants;
}
// Call-related documents
match /calls/{callId} {
allow create: if request.auth != null &&
request.auth.uid in [request.resource.data.callerId, request.resource.data.receiverId];
allow read, write: if request.auth != null &&
(request.auth.uid == resource.data.callerId ||
request.auth.uid == resource.data.receiverId);
}
// Posts
match /posts/{postId} {
allow read: if true;
allow create, update: if request.auth != null;
allow delete: if request.auth != null && request.auth.uid == resource.data.userId;
}
// Reports
match /reports/{reportId} {
allow create: if request.auth != null;
allow read: if request.auth != null;
allow update: if request.auth != null;
}
// ✅ New livestreams collection rule added here
match /livestreams/{document} {
allow read, write: if request.auth != null;
}
}
}
[my index.js](https://developer.apple.com/forums/content/attachment/bffd0276-ece5-4ce9-b08b-83e8770cb8f2)
[My code of class AppDelegate](https://developer.apple.com/forums/content/attachment/abba6a58-d513-49d4-a1d4-dc7dfae56e0a)
[code of class AVDelegateWrapper:](https://developer.apple.com/forums/content/attachment/acd15ac0-ba9e-415f-9503-aea88377e92f)
`
[struct ContentView](https://developer.apple.com/forums/content/attachment/4f75c535-860e-488f-835b-63c76586ac50)
`
[And for after Login code : ](https://developer.apple.com/forums/content/attachment/f6af060e-f2bb-417f-af08-a946dd650474)
`
Topic:
Developer Tools & Services
SubTopic:
Xcode