Post

Replies

Boosts

Views

Activity

Reply to The content regarding app forced termination in the Apple guidelines
There is only one reference to termination in the guidelines: 2.3.1 (a)ASR & NR Don’t include any hidden, dormant, or undocumented features in your app; your app’s functionality should be clear to end users and App Review. All new features, functionality, and product changes must be described with specificity in the Notes for Review section of App Store Connect (generic descriptions will be rejected) and accessible for review. Similarly, marketing your app in a misleading way, such as by promoting content or services that it does not actually offer (e.g. iOS-based virus and malware scanners) or promoting a false price, whether within or outside of the App Store, is grounds for removal of your app from the App Store or a block from installing via alternative distribution and termination of your developer account.
Apr ’24
Reply to Developing for just myself
Welcome to the forum. You can use full fledged Xcode for free and load the app you develop on your devices and of course test on simulators. That's the free account. Really great to get started. Limits: no publishing on AppStore (I understand you don't care) you will have to rebuild and reload the app on devices frequently (I think once a week). But's that not a big issue. Good start and enjoy.
Apr ’24
Reply to TextField with Double clear button / currency format for string value
I may have a solution to propose. It is a bit circumvolved, but seems to do the job. Idea is to have 2 TextFields that overlap, and select which one is tab the front in a ZStack (with zIndex), and change focus as needed. I have set coloured background so that you can track what's happening and also hide the overlapped field. struct ContentView: View { @State private var checkAmount : Double = 0.0 @State private var valueToEnter = true @FocusState private var checkAmountIsFocused: Bool @FocusState private var checkAmount2IsFocused: Bool var totalPerPerson: Double { // calculations including (Double(checkAmount) ?? 0) return 0.0 } private let quantityFormatter: NumberFormatter = { let formatter = NumberFormatter() formatter.locale = Locale.current formatter.numberStyle = .decimal formatter.minimumFractionDigits = 2 formatter.maximumFractionDigits = 2 formatter.zeroSymbol = "" return formatter }() var body: some View { NavigationStack { Form { Section("Check amount") { ZStack { TextField("Enter check amount", value: $checkAmount, format: .currency(code: Locale.current.currency?.identifier ?? "USD")) .keyboardType(.decimalPad) .focused($checkAmountIsFocused) .onTapGesture { // onTap, we shall change focus valueToEnter = false // That puts this field behind and the "yellow" at the front checkAmount = 0 // quantityFormatter will not display any content in the yellow field checkAmountIsFocused = false checkAmount2IsFocused = true } .background(.green) // replace by Color(UIColor.systemBackground) .zIndex(valueToEnter ? 1 : 0) TextField("", value: $checkAmount, formatter: quantityFormatter) .keyboardType(.decimalPad) .focused($checkAmount2IsFocused) .onSubmit { valueToEnter = true // That puts this field behind and the "green" at the front checkAmountIsFocused = true checkAmount2IsFocused = false } .background(.yellow) // replace by Color(UIColor.systemBackground) .zIndex(valueToEnter ? 0 : 1) } } }.navigationTitle("We split") .toolbar { ToolbarItemGroup(placement: .keyboard) { Spacer() if checkAmountIsFocused { Button("Done") { checkAmountIsFocused = false } } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to How can I link to multiple views using Foreach. When I have five options with icons. Each option goes to a different link View
You should use code formatter tool to present your code properly in the post. It is really a pain to read it unformatted. And remove extra blank lines. What is the problem and the error you get ? You should handle a default case with EmptyView a good way to do it is to use ViewBuilder. Create a ViewBuilder (I use item.name and not item): @ViewBuilder func selectedView(name: String) -> some View { switch name { case "Medical": MedicalView() case "Illnes": IllnesView() case "Vaccune": VaccuneView() case "Dewor": DeworView() case "Allergie": AllergieView() default: EmptyView() } } And call with: Button(action: { }) { NavigationLink(destination: selectedView(name: item.name)) { } So you should change the definition of Item to get the name directly struct MockData { static var items = [Item(name: "Medical", color: .red, image: "heart"), Item(name: "Illnes", color: .blue, image:"pill"), Item(name: "Vaccune", color: .orange, image: "syringe"), Item(name: "Dewor", color: .green, image: "microbe"), Item(name: "Allergie", color:.purple, image: "allergens")] } Note that you'd now better use navigationDestination in a navigationStack. See how here: https://www.hackingwithswift.com/books/ios-swiftui/handling-navigation-the-smart-way-with-navigationdestination
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’24
Reply to Unable to Enrol in Apple Developer Program
Is it the first time you try to unroll or did you unroll in the past ? If so, how was your account terminated ? today have been told by several people on the phone that I can't continue with the enrolment Who are this people ? Apple Support ? Did you call them or did they contact you ? In which country are you trying to enrol ?   I was told they'd reset my enrolment Told by whom ?
Apr ’24
Reply to Guideline 5.2.1 - Legal - Intellectual Property
A patent would not solve (and if there is a copyright issue, you would not logically get it). What I would do in such a case: either find information from Espressif Systems that the use of their product is free, and provide this information to reviewer or ask to Espressif Systems for a letter that authorises you to use in an app published on Appstore. Good luck.
Apr ’24
Reply to Failed to product diagnostic error
I think the main error comes from a missing NavigationStack in RosaView. And you should have rosa In addition, I had to test on an iPad in order for Table to show columns names and all columns (see here: https://stackoverflow.com/questions/75277014/swift-table-only-show-1-column) Finally, I made a few changes before it works ok. Please test and tell if that works for you, otherwise, explain what is failing. struct Rosa: Identifiable, Codable, Hashable, Equatable { var id = UUID() let stagione: String let nomeGiocatore: String let cognomeGiocatore: String let nascitaGiocatore: String let etàGiocatore: Int let ruoloGiocatore: String init(stagione: String, nomeGiocatore: String, cognomeGiocatore: String, nascitaGiocatore: String, etàGiocatore: Int, ruoloGiocatore: String) { self.stagione = stagione self.nomeGiocatore = nomeGiocatore self.cognomeGiocatore = cognomeGiocatore self.nascitaGiocatore = nascitaGiocatore self.etàGiocatore = etàGiocatore self.ruoloGiocatore = ruoloGiocatore let dateFormatter = DateFormatter() dateFormatter.dateFormat = "dd-MM-yyyy" guard let birthDate = dateFormatter.date(from: nascitaGiocatore) else { return} let currentYear = Calendar.current.component(.year, from: Date()) let birthYear = Calendar.current.component(.year, from: birthDate) _ = currentYear - birthYear } static func testRosa() -> [Rosa] { return [ Rosa(stagione: "2023/2024", nomeGiocatore: "Matt", cognomeGiocatore: "Bar", nascitaGiocatore: "31-03-2000", etàGiocatore: 24, ruoloGiocatore: "Portiere"), Rosa(stagione: "2023/2024", nomeGiocatore: "Fabio", cognomeGiocatore: "Bel", nascitaGiocatore: "30-11-1982", etàGiocatore: 41, ruoloGiocatore: "Difensore"), Rosa(stagione: "2023/2024", nomeGiocatore: "Ale", cognomeGiocatore: "Nev", nascitaGiocatore: "23-04-2001", etàGiocatore: 23, ruoloGiocatore: "Attaccante"), Rosa(stagione: "2022/2023", nomeGiocatore: "Matte", cognomeGiocatore: "Repe", nascitaGiocatore: "28-02-1999", etàGiocatore: 25, ruoloGiocatore: "Centrocampista") ] } } // Run on iPad: See https://stackoverflow.com/questions/75277014/swift-table-only-show-1-column struct RosaView: View { @State var rosa: [Rosa] = Rosa.testRosa() @State private var apriNuovoGiocatore = false @State var stagione: String = "2023/2024" var rosaFiltrata: [Rosa] { rosa.filter { // <<-- replace Rosa.testRosa() $0.stagione == stagione } } @State private var selezioneGiocatore: Set<Rosa.ID> = [] @State private var ordine = [KeyPathComparator(\Rosa.ruoloGiocatore)] var body: some View { NavigationStack { // <<-- ADD THIS VStack(alignment: .leading) { Text("Stagione: \(stagione)") .fontWeight(.bold) .font(.headline) .foregroundColor(.blue) .padding() Table(rosaFiltrata, selection: $selezioneGiocatore, sortOrder: $ordine) { TableColumn("Nome", value: \.nomeGiocatore) // REMOVE Text( and .foregroundStyle(.blue) TableColumn("Cognome", value: \.cognomeGiocatore) TableColumn("Ruolo", value: \.ruoloGiocatore) TableColumn("Data di nascita", value: \.nascitaGiocatore) TableColumn("Età") { rosa in Text("\(rosa.etàGiocatore)") } .width(100) } } .frame(width: 700, height: 300) .toolbar { Button { apriNuovoGiocatore = true } label: { Image(systemName: "person.badge.plus") .foregroundColor(.blue) } .sheet(isPresented: $apriNuovoGiocatore, content: { NuovoGiocatore(rosaArray: $rosa, nomeNuovoGiocatore: "", cognomeNuovoGiocatore: "", nascitaNuovoGiocatore: "", ruoloNuovoGiocatore: "", etàNuovoGiocatore: 20) // <<-- pass $rosa as parameter to a Binding }) } .navigationTitle("Rosa") } } } struct NuovoGiocatore: View { // should start with uppercase @Environment(\.dismiss) var dismiss @Binding var rosaArray : [Rosa] // <<-- ADD THIS @State var nomeNuovoGiocatore: String = "" @State var cognomeNuovoGiocatore: String = "" @State var nascitaNuovoGiocatore: String = "" @State var ruoloNuovoGiocatore: String = "" @State var etàNuovoGiocatore: Int = 20 var body: some View { NavigationStack { Form { TextField("Nome:", text: $nomeNuovoGiocatore) TextField("Cognome:", text: $cognomeNuovoGiocatore) } .navigationTitle("Nuovo giocatore") .toolbar { Button("Cancel") { dismiss() } Button("Aggiungi giocatore") { let nuovoGiocatore = Rosa(stagione: "2023/2024", nomeGiocatore: nomeNuovoGiocatore, cognomeGiocatore: cognomeNuovoGiocatore, nascitaGiocatore: nascitaNuovoGiocatore, etàGiocatore: etàNuovoGiocatore, ruoloGiocatore: ruoloNuovoGiocatore) // REMOVE THIS var rosa = Rosa.testRosa() rosaArray.append(nuovoGiocatore) dismiss() } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to I plan to study iOS Development. I need to buy a MacBook.
For Xcode development, the most important, in order: recent enough Mac (in case you buy a second hand), so 2020 as the oldest to be able to load recent OS version and consequently Xcode If you intend to develop for visionOS, you need a M-Mac. And M-Mac is future proof. Disk storage: 500 MB is a minimum, more (1 TB or even 2 TB) is just better. Xcode is disk hungry for installing Memory: 8 GB may soon be short, specially because you will not be able to upgrade. I would advise 16 GB Screen size: Xcode needs to display a lot of content. So, a good compromise if you buy a MacBook is to buy an external large display (21" or better 27"). But that could be a second step purchase. Performance: that's not critical (you don't really care if building the app takes 40 seconds instead of 30). Chip is not crucial (M1 quite enough). So, at the end: you can look for a MacBook, possibly second hand, with: any number of Core CPU: 8-Core CPU is OK any number of Core GPU: 8-Core GPU is OK 16GB Unified Memory 512GB SSD Storage or better 1TB 13" screen if you can buy a large (21") external display later. Otherwise, 15" is much preferred. M-Mac. M1 chip would still be OK.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’24
Reply to Developer program in Moldova
AFAIK, it is possible, as AppStore is accessible from Moldova. You may find more information here: https://apple.stackexchange.com/questions/164009/which-countries-can-an-individual-ios-developer-reside-in-in-order-to-receive-pa And see Moldova is in the list: https://www.apple.com/choose-country-region/
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’24
Reply to New App for my Business
Welcome to the forum. First, you must be sure that your app will provide more functionality than a website. Otherwise it may be rejected from the appstore. And it would not be worth the effort. -> See appstore guidelines 4.2 Minimum Functionality https://developer.apple.com/app-store/review/guidelines/#design For the stack, you should probably use Xcode and SwiftUI (you could use UIKit but I understand your app would be well suited for SwiftUI development). Budgeting: do you intend to develop yourself ? Then budget is mainly your training time to learn to develop. If you subcontract, the general rules for subcontracting a software development will apply: cost will be very variable from one developer to another make sure you keep all the rights and submit the app yourself to the appstore, not by the developer and gat all source code, documented properly, to be able to continue if you decide to change to a different developer.
Mar ’24
Reply to Screenshot for iOS and iPad
My iPad screen shot is using the same version as iPhone That's a mistake. You have to provide screenshots as required by AppStoreConnect. Required are: iPhone Screen 6.5" (e.g., iPhone 11 Pro Max) iPhone Screen 5.5" (e.g, iPhone 8 Plus) iPad Pro (6th gen) Screen 12.9" iPad Pro (2nd gen) Screen 12.9"   iPhone Screen 6.7" (e.g., iPhone 15 Pro Max) is optional. So that means at least 4 sets of screenshots from simulators.
Mar ’24