What I Whant
I'm making a component. This component is used to display a list of tags. I want a context menu to pop up on the tag when the user long-presses it. Like this:
What I Got
Here is My Code
VStack(alignment: .leading) {
ForEach(groupedItems, id: \.self) { itms in
HStack {
ForEach(itms, id: \.self) { tag in
Text(tag.title ?? "")
.font(.callout)
.padding()
.frame(height: 24.0)
.frame(alignment: .center)
.cornerRadius(100)
.contextMenu {
Button {
deleteTheTag(tag)
} label: {
Label("Delete", systemImage: "trash")
}
}
}
}
}
}
I tried several methods, but all failed. How should I modify my code?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
resize indicator什么样
红色箭头所指的就是resize indicator。
如何显示这个indicator
错误的做法是使用一个色块当作indicator。
正确的做法:
NavigationStack {
MyView()
.navigationTitle("愿景")
.sheet(isPresented: $showAddVisionView) {
MySheetView()
.presentationDetents([.large, .medium]) // 这里如果只有一种大小就不会显示resize indicator,如果有多个大小选项就会显示resize indicator
}
}
I created a subscription in App Store Connect. I'd like to submit it for review along with my new app.
App Store Connect prompts me to select it from the app's In-App Purchases and Subscriptions section on the version page before submitting the version to App Review. But I didn't find the In-App Purchases and Subscriptions section in the version page.
I'm not sure if the version page as I understand it is the same as the version page as App Store Connect.
So, can anyone tell me where I can find the In-App Purchases and Subscriptions section.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
Subscriptions
I’m developing a Safari App Extension and I want to debug the background.js script.
However, I can’t find any tool or option to do this.
When I run the extension from Xcode using the ProjectName Extension (macOS) scheme, I expect to see a “ProjectName” item under the Develop → Web Extension Background Content menu.
But there’s nothing there.
Has anyone encountered the same issue? How did you fix it?
Environment:
Manifest Version: V3
Safari: 26.0.1 (21622.1.22.11.15)
Xcode: 26.0.1 (17A400)
Hi everyone,
I want users not to see the system context menu when long-pressing text on a page in Safari on iOS. I found on MDN that the CSS property -webkit-touch-callout: none; can achieve this. But in reality, it doesn't really work.
MDN documents URL: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/-webkit-touch-callout
Here’s a minimal example:
function preventIOSSafariContextMenu() {
if (document.getElementById(STYLE_ELEMENT_ID)) return;
if (!IS_TOUCH_DEVICE) return;
const style = document.createElement("style");
style.id = STYLE_ELEMENT_ID;
style.textContent = `
html, body {
-webkit-touch-callout: none !important;
}
`;
(document.head || document.documentElement).appendChild(style);
}
The context menu persists.
Has anyone else encountered this? Is this an intentional change in WebKit, or could it be a regression? If it’s intentional, is there a recommended alternative?
Thanks in advance for any insights!
Hello everyone,
I'm currently developing an iOS application and have a question regarding project architecture changes and App Store Connect submissions.
My app is already uploaded to App Store Connect and is being used for internal testing via TestFlight. During development, I've realized my initial project architecture is flawed and unsustainable.
The Problem and Proposed Solution
I've decided the best approach is to completely redevelop the app from scratch using a new, clean Xcode project that implements a better architecture (e.g., MVVM, Clean Architecture).
The Core Question
If I create a brand new Xcode project for the redeveloped app, can I:
Use the same Bundle Identifier (com.mycompany.myapp) in the new project?
Successfully archive and upload the build from this new Xcode project to the existing app on App Store Connect?
In essence, does App Store Connect require the new build to originate from the same Xcode project structure as the previous builds, or does it only validate the Bundle Identifier and Version/Build Number?
Any advice or confirmation from developers who have gone through a similar complete project overhaul would be greatly appreciated.
Thank you!
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
Bundle ID
App Store Connect
Xcode
I'm using Xcode Cloud to build for internal TestFlight testing.
But it stuck in Archive. No warning or error. Unable to complete the workflow.
What could be causing this? I have absolutely no idea what to do now.