Create elegant and intuitive apps that integrate seamlessly with Apple platforms.

All subtopics

Post

Replies

Boosts

Views

Activity

MacOS: Spacing between NavigationLink-s in a sidebar with NavigationView.
How can I put one list item at the top and another one at the bottom, retaining the NavigationView functionality? Here is a simple app: struct ContentView: View { var body: some View { NavigationView { Sidebar() } } } struct Sidebar: View { @State private var isActive = true var body: some View { List { NavigationLink(isActive: $isActive) { HomeView() } label: { Text("Home") } NavigationLink { SettingsView() } label: { Text("Settings") } } } } struct HomeView: View { var body: some View { VStack {} .navigationTitle("Home") } } struct SettingsView: View { var body: some View { VStack {} .navigationTitle("Settings") } } Which looks like this: My initial though was to put a Spacer() between each NavigationLink, but it results in an unexpected view: What i can do: Place an empty VStack between each NavigationLink with a hard-coded height like this: VStack {}.frame(height: 275) Which looks like this: But it wouldn't work if a user would want to increase the height of a window. I could disable window resizing which is kind of fine, but not the most optimal. Another obvious option was to replace the List with a VStack, but with this approach the styling of the NavigationLink gets broken and it does not get highlighted when I click on it. It looks like this: P.S. I know that NavigationView is deprecated, but i want to support macOS 12.0.
1
0
104
1d
Guideline 4.3(a) - Design - Spam
Dear App Review team, My app Goodie AI (Apple ID 6741483227) has been flagged as violating Guideline 4.3(a) - Design - Spam. I thought I would reach out to the team to explain that Goodie AI is an entirely original concept, and would seek guidance on if we misunderstood what specifically the problem with the submission is. DESCRIPTION Please suggest next steps? We've already appealed, and have resubmitted the app. Thanks! SCREENSHOTS ATTACHED
2
0
162
2d
Image & Text inside picker.
Hi, I am trying to use a flag image inside a picker like this: Picker("Title: ", selection: $selection){ ForEach(datas, id: \.self){ data in HStack{ Text(data.name) if condition { Image(systemName: "globe") }else { Image(img) } } .tag(data.name) .padding() } } All images are loading successfully but only system images are resized correctly. Images loaded from Assets are appearing in their default size. I have tried to size the images with frames, etc but with no luck. Any idea, help will be much appreciated. Thanks in advance!
2
0
198
6d
Design-Copycats Rejection
Hi, Since last week, I’ve been trying to publish the new version of my Voxel game, which aims to fix many bugs and significantly optimize the game. This update is very important for improving the overall quality of the game. Unfortunately, this version is not being accepted on the App Store due to a Design - Copycats issue related to guideline 4.1. I’ve tried everything to resolve the problem by changing the screenshots, app preview, description, game name, icons, and even all metadata that could cause issues in the build. But nothing seems to work. I keep receiving the same rejection just a few minutes after submitting my build for review. Here is the full warning message: —————— “Guideline 4.1 - Design - Copycats This app or its metadata appears to be misrepresenting itself as another popular app or game already available on the App Store, from a developer's website or distribution source, or from a third-party platform. Apps should be unique and should not attempt to deceive users into thinking they are downloading something they are not.” Next Steps Learn more about requirements to prevent apps from impersonating other apps or services in guideline 4.1. Revise the app to comply with these requirements. Once the app is fully compliant, resubmit the app for review. —————— Also I've already tried contaction the Apple Developer team but I got no answer. I don't know what to do. Thanks
1
0
233
1w
ReferenceError: ReadableStream is not defined, Command PhaseScriptExecution failed with a nonzero exit code
ReferenceError: ReadableStream is not defined at Object. (/Users/anaadmin/Documents/AnaNewApp/node_modules/@expo/cli/node_modules/undici/lib/web/fetch/response.js:528:3) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:119:18) at Object. (/Users/anaadmin/Documents/AnaNewApp/node_modules/@expo/cli/node_modules/undici/lib/web/fetch/index.js:11:5) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) After trying out all suggestions and different versions of tools such as XCode, nvm, yarn, node, etc., nothing works for me i added : <PROJECT_PATH>/node_modules/@langchain/core/dist/utils/stream.cjs - add const { ReadableStream } = require("web-streams-polyfill"); npm install web-streams-polyfill Tried downgrading to Node 18 as well as various polyfills but haven't been able to get it to work Following does not work in xcode Delete your Podfile.lock (I like to use the command '-rm -rf Podfile.lock' on the terminal for this) Delete your Pods folder (I like to use the command '-rm -rf Pods' in the terminal for this) Delete your .xcworkspace Pod install Clear your project into XCode> Product> Clean Build Folder i have tried cd ios pod install Continuously i am getting same error. Any one know, how to resolve this error
0
0
354
1w
Is using to SwiftUI entry point and using NSViewControllerRepresentable to add NSViewController to hirarchy right approach ?
In macOS application, we are using SwiftUI as an entry point to our application and attaching appdelegate using NSApplicationDelegateAdaptor. We are using NSViewControllerRepresentable to add a View Controller to the hiracrchy so that we can store intance of viewcontroller and add content to it programatically . @main struct TWMainApp: App { @NSApplicationDelegateAdaptor private var appDelegate: TWAppDelegate internal var body : some Scene { TWInitialScene () } } TWInitialScene : public struct TWInitialScene : Scene { public var body : some Scene { WindowGroup { TWInitialView () } } } TWInitialView : struct TWInitialView : View { @Environment(\.scenePhase) private var scenePhase var body : some View { TWAppKitToSwiftUIBridge () } } TWAppKitToSwiftUIBridge : struct TWNSKitToSwiftUIBridge : NSViewControllerRepresentable { func makeNSViewController(context: Context) -> TWNSViewController { let view_hierarchy : TWNSViewController view_hierarchy = TWStaticContext.sViewController return view_hierarchy } func updateNSViewController(_ nsViewController: TWNSViewController, context: Context) { } } @objc public class TWStaticContext : NSObject { public static let sViewController = TWNSViewController () public override init () {} @objc public static func GetViewController () -> TWNSViewController { return TWStaticContext.sViewController } } public class TWNSViewController : NSViewController { override public func viewDidLoad () { super.viewDidLoad () } } To add content to the hirarchy we are accessing viewcontroller's intance and adding content to it like this : public func PaintInitialScreen () { let label = NSTextField(labelWithString: "TW window") label.frame = NSRect(x: 100, y: 200, width: 200, height: 200) // Adding content to viewcontroller TWStaticContext.sViewController.view.addSubview(label) } We are using this approach because we have a contraint in our application that we have to update UI programatically and on compile time we dont know what we want to show . We will be adding content on runtime based on how many button we want, what label we want , where to place it etc. When we were using purely appKit application, doing things programatically was simple but since SwiftUI is a declarative application we have to use above approach. Rational for shifting to SwiftUI entry point is that we want our application to be future safe and since apple is more inclined to SwiffUI, we want to design our entry flow to use SwiftUI entry point . And SwiftUI being declarative, we are using appKit to add content to hiracrchy programtically. We have used similar apprach in iOS also , where are using UIApplicationDelegateAdaptor inplace of NSApplicationAdaptor . And UIViewControllerReprestable in place of NSViewControllerRepresentable. Is this right approach to use ?
1
0
310
1w
Removing Grid Lines from Charts in SwiftUI
Hi, I have created a line graph using LineMark in Charts, which by default includes grid lines and axes lines. My requirement is to remove the grid lines but retain the axes lines and the values. I have tried the following code: .chartXAxis { AxisMarks(preset: .extended, values: .stride(by: 2), stroke: StrokeStyle(lineWidth: 0)) } This is removing grid lines as well as axes lines. How to retain axes lines while removing grid lines ?
2
0
207
1w
My iOS game is compatible with visionOS and MacOS
I already have an opinion ( I should never release to a platform without testing on a physical platform device ) on this but wanted to learn from experience and expertise and see if there were any viable options. My hybrid casual puzzle game is released on the App Store for iOS. (Whew!) Apparently it is compatible to both Mac OS and VisionOS I would love to make it available everywhere however, I am not sure it is best to do so without testing on these physical devices. Which could also mean making the design adjustments for those devices, having test devices ready etc. and I would have to update my Laptop to silicon. Has anyone tried this without testing on physical devices? What are your thoughts/best suggestions? Thanks in advance!
1
0
228
1w
Multiple issues with SwiftUI TabView in sidebarAdaptable mode
We are trying to write an iOS app that supports regular and constrained widths using a TabView with .tabViewStyle(.sidebarAdaptable). On the surface this seems like a great way to write an app that supports all the different widths that your app may run in. Especially since Stage Manager and Apple Vision have made it easy for users to resize your apps window while it is running. We are facing many challenges though. I will give a brief one liner of each below, but to truly experience them you need to run the sample app, or watch the sample videos included. Issues Basic TabView Issues Double Navigation Bar: When tabs are collapsed into a "More" tab, there's an unwanted double navigation bar Selection Sync: Tab selection gets out of sync when switching between narrow/wide layouts through the "More" tab TabView Crash Fatal crash occurs when resizing window to narrow width while Tab 5 is selected Error: SwiftUI/SidebarAdaptableTabViewStyle_iOS.swift:482: Fatal error: Tried to update with invalid selection value Section Handling Issues Section Display Bug: Bottom tabs incorrectly show section names instead of tab names in narrow width Tab Selection Mismatch: Tab identifiers don't match selected tabs in narrow width mode Customization Issues Inconsistent "Edit" button behavior in More tab Unable to properly disable tab customization Sample app and video https://github.com/copia-wealth-studios/swiftui-tabview-sample
1
1
251
1w
Can we now launch an app for trading mobile game accounts on the AppStore?
AppStore download link:https://apps.apple.com/cn/app/%E7%9B%BC%E4%B9%8B%E4%BB%A3%E5%94%AE-%E4%B8%93%E4%B8%9A%E7%9A%84%E6%B8%B8%E6%88%8F%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0/id6737429967. Why can this app be listed on the AppStore when it involves game account transactions? I have recorded and reported many times, but it has no effect. Is it possible to launch the app for game account trading in Chinese Mainland now? Seeking answers.
0
0
163
2w
Car play mirroring with flexy limitation and what about new Gen. of Carplay that gonna launch end of this year?
right now it looks like the app type must follow the guidelines like Messenger app, Navigate app, and Music app only. What about the Automotive app itself, What is the flexibility of it? We have an app for service cars for one brand (officially)(car users around 1m+). but we looking to merge the experience between outside the car and inside the car. Can we top up some features on the app to share some information that is a part of the car like trip calculation or car info display on the screen? or services time to notice them? And following that question can we know about the exact spot or brief from Apple car play for now and next-gen? Or can we work with your team closely as a partner? to make things happen and develop it to be a flagship product, we can share some data and talk about it with real insight.
0
0
181
2w
Set the ui resources for the face id page
I am developing an app that requires calling the iPhone's Face ID module to scan users' facial data. Where can I find Apple's design resources and guidelines for Face ID? The Face ID resources available in Figma are incomplete, and I need more support. For example, in the iPhone settings, the scenario: the UI interface for scanning the user's face to collect data, specifically the circular design in the "How to Set Up Face ID" screen.
0
0
293
2w
Email icons
The most recent update included coloured icons for grouping of emails anybody previously needing to group emails we’re able to achieve this alphabetically by simply searching for what you were looking for. These icons clutter the page with totally unnecessary screen pollution. if you want to persist with this folly can you please provide a classic display option for those of us who have happily survived using email for 30 years without this fluff.
2
0
320
2w
not work paragraphStyle in AttributedString
I tried to create a Text View using attributedString. I want to set the line height using paragraphStyle and return the Text, but paragraphStyle is not being applied. Why is that? extension Text { init?(_ content: String, font: StyleType, color: Color = .ppBlack) { var attributedString = AttributedString(content) attributedString.font = Font.custom(font.fontWeight, fixedSize: font.fontSize) attributedString.foregroundColor = color let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.minimumLineHeight = 16 paragraphStyle.maximumLineHeight = 16 paragraphStyle.lineSpacing = 0 attributedString.mergeAttributes(.init([.paragraphStyle: paragraphStyle])) self = Text(attributedString) } }
1
0
191
2w
Apple Maps annotations and markers
In Apple's Maps app, an annotation is made up of a circle shape or rounded rectangles with a glyph-image. When selecting an annotation, the annotation animates into a balloon marker (see attached GIF). How does Apple Maps solve this - from custom annotation to balloon marker with spring animation? I switched my Maps implementation from SwiftUI to UIKit with a UIViewRepresentable to support annotation clustering - and it works beautifully. But how to subclass an MKAnnotationView (or MKMarkerAnnotationView <- the balloon) to enable selection and animation as in Apple Maps? MKMarkerAnnotationView only show balloon markers and I tried everything inside MKAnnotationView (CALayer, etc.)
1
0
222
3w
Correct way to label TextField inside Form in SwiftUI
Hello everyone. I'm building a simple Form in a Multiplatform App with SwiftUI. Originally I had something like this. import SwiftUI struct OnboardingForm: View { @State var firstName: String = "" @State var lastName: String = "" @State var email: String = "" @State var job: String = "" @State var role: String = "" var body: some View { Form { TextField("First Name", text: $firstName, prompt: Text("Required")) TextField("Last Name", text: $lastName, prompt: Text("Required")) TextField("Email", text: $email, prompt: Text("Required")) TextField("Job", text: $job, prompt: Text("Required")) TextField("Role", text: $role, prompt: Text("Required")) } } } #Preview { OnboardingForm() } In macOS it looks ok but then in iOS it looks like this: and it's impossible to know what each field is for if all the prompts are the same. I tried adding LabeledContent around each text field and that solves it for iOS but then on macOS it looks like this: The labels are shown twice and the columns are out of alignment. I think I could get around it by doing something like this: #if os(iOS) LabeledContent { TextField("First Name", text: $firstName, prompt: Text("Required")) } label: { Text("First Name") } #else TextField("First Name", text: $firstName, prompt: Text("Required")) #endif but it seems to me like reinventing the wheel. Is there a "correct" way to declare TextFields with labels that works for both iOS and macOS?
2
0
289
3w