Post

Replies

Boosts

Views

Activity

Reply to Localized App Info values are reset to English on app release
However, each new version requires us to set the same values again. Is this a known issue, and are there any known workarounds? It is not a bug, it is a design decision, to force to update subtitle for each new version of an app. If that's a problem, file a bug report for enhancement request. Workaround is not to forget to re enter subtitles. Note: I've found a good practice: I created a text document with all the fields required in AppStore Connect, with entries in any language. I have all information in one place. I update this file with new entries for the new release. Doing so, less risk to forget something ; and I can copy and paste from text file to AppStore Connect.
Aug ’21
Reply to Value of type 'Text' has no member 'searchable'
You can use conditional statement : if #available(iOS 15.0, *) {    Text(data.name)                 .font(.custom("Helvetica Neue", size: 14))                  .searchable(text: $searchText) } else {    Text(data.name)                 .font(.custom("Helvetica Neue", size: 14)) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to What language is the "unbrella" keyword from?
Aren't there extra curly braces ? framework module SwiftyJSON { umbrella header "SwiftyJSON.h" export * module * { export * } } AFAIK, That's C declaration statements. https://releases.llvm.org/3.3/tools/clang/docs/Modules.html#umbrella-directory-declaration See also: https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_objective-c_into_swift This may clarify as well: https://developer.apple.com/forums/thread/42737 https://clang.llvm.org/docs/Modules.html#link-declaration
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to How to set up XCode Server
This should help you set up the local web server on your Mac (it is not Xcode server, just a web server). https://discussions.apple.com/docs/DOC-250003138 This is older and maybe a bit outdated, but should help as well. https://websitebeaver.com/set-up-localhost-on-macos-high-sierra-apache-mysql-and-php-7-with-sslhttps
Aug ’21
Reply to Editor placeholder in source file
First point is to solve this: var textFields = var textFieldKeys = [ "benchPressPB", "squatPB", "deadliftPB", "ohpPB", "rackPullPB", "legPressPB", "pullUpsPB" ] var textFieldStrings = What is your intent ? Where did you copy it from (with errors) ? Do you mean : var textFields : [UITextField] = [] var textFieldKeys = [ "benchPressPB", "squatPB", "deadliftPB", "ohpPB", "rackPullPB", "legPressPB", "pullUpsPB" ] var textFieldStrings : [String] = [] If so, your code is now: class ViewController: UIViewController, UITextFieldDelegate { @IBOutlet weak var benchPressPB: UITextField! @IBOutlet weak var squatPB: UITextField! @IBOutlet weak var deadliftPB: UITextField! @IBOutlet weak var ohpPB: UITextField! @IBOutlet weak var rackPullPB: UITextField! @IBOutlet weak var legPressPB: UITextField! @IBOutlet weak var pullUpsPB: UITextField! var textFields : [UITextField] = [] var textFieldKeys = ["benchPressPB", "squatPB", "deadliftPB", "ohpPB", "rackPullPB", "legPressPB", "pullUpsPB"] var textFieldStrings : [String] = [] override func viewDidLoad() { super.viewDidLoad() self.benchPressPB.delegate = self self.squatPB.delegate = self self.deadliftPB.delegate = self self.ohpPB.delegate = self self.rackPullPB.delegate = self self.legPressPB.delegate = self self.pullUpsPB.delegate = self textFields = [benchPressPB, squatPB, deadliftPB, ohpPB, rackPullPB, legPressPB, pullUpsPB] for (index, key) in textFieldKeys.enumerated() { let aValue = UserDefaults.standard.string(forKey: key) textFields[index].text = aValue textFieldStrings.append(aValue ?? "") } } func textFieldShouldReturn(_ textField: UITextField) -> Bool { textField.resignFirstResponder() let newText = textField.text ?? "" // textField.text is an optional, but textFieldStrings[index] is String, not String? ; so ?? make it sure you get a String (maybe empty) and not String? if let index = textFields.firstIndex(of: textField) { textFieldStrings[index] = newText UserDefaults.standard.set(newText, forKey: textFieldKeys[index]) } return true } } Try with those changes and tell what you get.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’21
Reply to Editor placeholder in source file
You probably had written var TextFieldsStrings = [String] () // without the space and got the error: Please fix the following URL related errors. This domain "" is not a permitted domain on this forums. This is a forum bug ! I filed a bug report on it. So, does your code work now (or at least compile) ? If so, you should close the thread (just mark my previous answer as correct answer). As for learning Swift, I think I did like a lot of us: learn Xcode and iOS API (I used books that are now totally outdated) work from books to practice Swift (Apple Books are pretty good) used on line materials (Stanford course for iOS notably). and then start developing some app, making extensive use of this forum and other information on the web each time I had a problem. and most important, Kept continuing learning over the years… Wish you good learning and enjoy.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’21
Reply to I am having trouble with this question can anybody help me with the solution
First error: func displayArray expects to return an array [[[Int]]]. So, it tries to interpret print as a return value, which fails. So, add a return statement return someArray of type [[[Int]]] or more likely, declare func without return value func displayArray(array1: [[[Int]]] { print(array1) } Second error: you try to pass a second argument to displayArray which expects one only. Change as: outputobj.displayArray(array1: myArray)
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21