Post

Replies

Boosts

Views

Activity

Reply to Can my app still be listed?
You got an answer from review team. So now, you just have to wait and hope that your tentative imitation of another app will be "forgiven". In submitting the new version, did you explain what you did, the answer you got on the forum, etc…   My goal is to have the app listed before my account is disabled, This would be useless as the app would immediately be removed from the appstore on account termination.
Sep ’24
Reply to Variable for DestinationView
I would do it this way with ViewBuilder: struct ZodiacSign: Identifiable { let id = UUID() var name: String var symbol: String // as per Swift conventions, should start with lowercase // Replaced by ViewBuilder var DestinationView: View } @ViewBuilder func zodiacDestination(name: String) -> some View { switch name { case "Aries" : AriesView() case "Taurus" : TaurusView() case "Gemini" : GeminiView() case "Cancer" : CancerView() case "Leo" : LeoView() case "Virgo" : VirgoView() case "Libra" : LibraView() case "Scorpio" : ScorpioView() case "Sagittarius": SagittariusView() case "Capricorn": CapricornView() case "Aquarius" : AquariusView() case "Pisces" : PiscesView() default: EmptyView() } } struct ContentView: View { @State var starSigns = [ // Need to be a State var ZodiacSign(name: "Aries", symbol: "♈︎"), // DestinationView: AriesView()), ZodiacSign(name: "Taurus", symbol: "♉︎"), // DestinationView: TaurusView()), ZodiacSign(name: "Gemini", symbol: "♊︎"), // DestinationView: GeminiView()), ZodiacSign(name: "Cancer", symbol: "♋︎"), // DestinationView: CancerView()), ZodiacSign(name: "Leo", symbol: "♌︎"), // DestinationView: LeoView()), ZodiacSign(name: "Virgo", symbol: "♍︎"), // DestinationView: VirgoView()), ZodiacSign(name: "Libra", symbol: "♎︎"), // DestinationView: LibraView()), ZodiacSign(name: "Scorpio", symbol: "♏︎"), // DestinationView: ScorpioView()), ZodiacSign(name: "Sagittarius", symbol: "♐︎"), // DestinationView: SagittariusView()), ZodiacSign(name: "Capricorn", symbol: "♑︎"), // DestinationView: CapricornView()), ZodiacSign(name: "Aquarius", symbol: "♒︎"), // DestinationView: AquariusView()), ZodiacSign(name: "Pisces", symbol: "♓︎") // DestinationView: PiscesView()) ] var body: some View { // VStack { NavigationView { // You have to put in a NavigationView List { ForEach(starSigns, id: \.id) {zodiacSign in // should start with lowercase NavigationLink(destination: zodiacDestination(name: zodiacSign.name)) { Text(zodiacSign.symbol) Text(zodiacSign.name) } } } } } } struct AriesView: View { var body: some View { VStack { Text("♈︎ Aries is a constellation…") } } } struct TaurusView: View { var body: some View { VStack { Text("♉︎ Taurus is a constellation…") } } } struct GeminiView: View { var body: some View { VStack { Text("♊︎ Gemini is a constellation…") } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to Passing C++ Types as Reference using SWIFT_IMMORTAL_REFERENCE.
Just a remark on the use of the forum. You may ask as many questions as needed, but you have to answer to replies you get to tell if that answers your question (and then close the thread) or if not explain in the same post what is the remaining issue. Otherwise, developers on this forum may get tired to answer your repeated posts on very similar questions if they never receive a feedback. Have a good day.
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’24
Reply to Variable for DestinationView
When you post code, please post more so that we can better explain the solution. So, show how stasSigns is defined and how each zodiacSign is defined in this structure. A typical pattern would be: struct ContentView : View { @ViewBuilder func destination(name: String) -> some View { switch name { case "aries": AriesView() // other case here default: EmptyView() } } var body: some View { List { ForEach(starSigns) {zodiacSign in // zodiacSign should start with lowercase, as it is an instance NavigationLink(destination: destination(name: zodiacSign.name)) {// destinationView should start with lowercase, as it is a property HStack { Text(zodiacSign.Symbol) Text(zodiacSign.name) } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to Testflight issue: "Could not install <app_name>. The requested app is not available or doesn't exist."
But when I archive the build and distribute it to TestFlight via AppStore Connect, I always get this error message as shown below. Did you get a reply from Appstore, such as this one: Dear raahimkhan, The following build has completed processing: Platform: iOS App Name: SomeRandomApplication Build Number: 1000 Version Number: 1.0.0 App SKU: yyyyyyyyyyyyy App Apple ID: xxxxxxxx You can now use this build for TestFlight testing or submit it for distribution. If you have any questions regarding your app, click Contact Us in App Store Connect. Regards, Apple Developer Relations If you have received, have you submitted to TestFlight ? How did you do it ?
Sep ’24