Post

Replies

Boosts

Views

Activity

App marked "removed from sale"
I removed my app from sale when Apple informed me it had to be updated. A few days ago I updated the app and submitted it for approval. It was approved shortly thereafter. On the App Store Connect page for the app, I clicked the Availability button for "All regions" and set the price to "Free". But 24 hours later, I'm still seeing "Removed from sale" displayed on that page. How can I get the app back on sale?
0
0
414
Sep ’22
Entering regular expression in TextField
I'm using a TextField in SwiftUI to enter regular expressions in an iOS app. But when I enter three dots (...) into the field, they are automatically converted to a single Unicode character. This does not create the regular expression I want to use. I've added .disableAutocorrection(true) to the text field, but the auto substitution still occurs. Is there some way I can prevent this from happening?
0
0
271
Oct ’21
Swift print() error
I'm developing a macOS document-based app in Swift, using Xcode 11.6 and the template it provides. I often use Swift print() statements during development to see what's going on as the app runs. But when I try to put one of these in the Document.swift template file, I get errors: Cannot convert value of type 'String' to expected argument type '[NSPrintInfo.AttributeKey : Any]' Missing argument label 'withSettings:' in call Missing arguments for parameters 'showPrintPanel', 'delegate', 'didPrint', 'contextInfo' in call I don't get these errors when I put a print() statement in the AppDelegate.swift or ViewController.swift files. Can someone tell me what the problem is here?
3
0
1.5k
Aug ’20
Distribution certificates
I have just received an email stating that my iOS Distribution Certificate will expire in 30 days. I looked at my account's certificate page, and I see this certificate there. But I also see two plain Distribution Certificates marked "ALL" for platforms, with identical expiration dates in 2021. (1) Do I need to renew the iOS Distribution Certificate in order to upload new iOS apps to the App Store? (2) Why do I have two identical copies of that generic certificate? The answer to (2) may well be that I screwed up the certificate process, since I'm not entirely sure how it's all supposed to work.
0
0
393
Jul ’20
App Store Connect Operation Error
Since updating to Xcode 11.0 yesterday, I've been unable to upload my app. The only error message I get is "App Store Connect Operation Error". Nothing else shows in the log.Previously (i.e. using Xcode 10) I uploaded several archives of this same app without any trouble. The current archive was created with Xcode 11, and validates without any complaints.Is anyone else having this problem at the moment? When I google about it, I see that it has occurred periodically in the past when Xcode has been updated.P.S. The error occurs consistently during the upload process, when Xcode is waiting for a response after sending API usage data.
12
0
7.5k
Sep ’19
Downloading data files in an iOS app
I'm working on an iOS app that will allow users to choose files to download from my server. These are all simple JSON files that are used to display Greek texts. Since many of these files are very large, I want my users to be able to pick which ones they want to have on their device.I was thinking of finding some external directory-listing template code from the internet, and just using a table view to list the files. But now I've discovered the existence of UIDocumentPickerViewController. Would this be a good choice for my purposes? Or would it needlessly complicate things? Any suggestions for good code snippets for connecting to and downloading from my server would also be much appreciated!
1
0
984
Sep ’19
Placing resource files in iOS app
My iOS app displays text content loaded from data files. Some of these data files will be bundled with the app. Others will be downloaded from my server. They are all JSON files, and have the same structure.I want all of these data files to be placed in the same directory. So far, I've just been dragging the bundled files into an Xcode group folder. How would I create a special directory for them? i.e. one that would be part of the directory structure of the app itself?What I'd like to do is have a directory called Data where both bundled and downloaded data files would reside.
6
0
4.6k
Sep ’19
Regular expression to remove characters from strings
Here's one for the regular expression aficionados. I have some strings containing full stops. I want to remove these when they occur immeditately between two other characters, as in "a.2" or "1.2.3". But I don't want to remove them at the end of lines.I presume I'll have to use regular expressions to do this, and I think I know how to write one that will match those characters (although it looks so ugly I'm ashamed to post it here.) But I can't figure out how to use it to filter my strings. Suggestions would be welcome.
16
0
8.9k
Aug ’19
Opening app from my app
There's a dictionary app (Logeion) that I want my app to open. When the user hightlights a word in my app, and presses the Dictionary toolbar button, the dictionary app should open with the dictionary entry for the highlighted word displayed.This is exactly what happens so long as the highlighted word has only ascii characters. But when the word has unicode characters, the dictionary opens, but the entry for the word is not displayed.I know that URLs will not accept unicode characters as-is, so I tried escaping them with this code:let escapedString = selectedText.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" let logeionURL = URL(string: "LogeionLookUp://" + escapedString) if let url = logeionURL { UIApplication.shared.open(url, options: [:], completionHandler: {success in print(url, "\n", success)}) }The selectedText variable is a String that holds the text that the user has highlighted. (Yes, I've checked.) I've tried a few other values besides .urlPathAllowed in line #1, but without effect. I know that the url is valid, because the app does open and the completionHandler runs, even with unicode strings. Is there some other way to get uincode characters into the URL? I know that the dictionary app will work with unicode characters, because I've seen another app do precisely what I want my app to do with them. Apart from "Ask the app developer how they did it", any advice would be appreciated!
3
0
1k
Aug ’19
Automatic signing failure
I keep getting these errors when I try to validate my app archive in Xcode's Organizer:Automatic signing is unable to resolve an issue with the "MyApp.app" target's entitlements.Provisioning profile failed qualification: Profile doesn't match the entitlements file's values for the application-identifier and keychain-access-groups entitlements.I can't understand this error at all. I'm trying to find a way to edit my profile, but so far without success.Can someone explain to me what's going on?
1
0
4k
Aug ’19
Button won't function
Here's one for the "What-the-****-is-it-now?" department. I have a simple view that has some details about my iOS app that I want to display when a toolbar button is touched. The UIViewController is called "AboutViewController". I put a view controller into a storyboard and set its class to AboutViewController. Here's the toolbar button code in the superview controller that loads it:let aboutVC = storyboard.instantiateViewController(withIdentifier: "About") aboutVC.view.frame = CGRect(x: 0.0, y: 0.0, width: 200, height: 300) self.view.addSubview(aboutVC.view) aboutVC.view.center = self.view.centerI put a "Dismiss" button into the controller instance in the storyboard and connected it to this code in AboutViewController: @IBAction func dismissButton(_ sender: Any) { self.view.removeFromSuperview() print("Dismiss button touched.") }When I press the toolbar button, the subview is displayed in the centre of the superview, just as I expected. But when I press the Dismiss button in the subview, nothing happens. The message isn't printed either. I've checked and rechecked that the connection between the button and the IBAction is set.It seems to me I've done this same damned thing many times before and had no problem. What the **** is wrong now?
6
0
646
Aug ’19
Words for integers in Swift 5
I may have been dreaming, but I have a distinct memory of an Int property that does this:let one = 1.propertywhere one would be set to the string "one". I have been googling for ages and can't find any reference to it. I've tried 1.description, but that just comes out as the string "1".
4
0
2.4k
Aug ’19
UIPageViewController: go to first page
I'm using a UIPageViewController to display various text files. My app uses the Xcode template for a page-based app.At the moment, when a new file is loaded the controller displays the old text until a page is turned. It then displays the new text, so the data is being loaded properly. What I'd like the controller to do is display the first page of the new file immediately upon loading. I've defined a notification that's sent when a new text file is loaded. What should my page view controller do when it receives this notification?
5
0
2.4k
Aug ’19
NSAttributedString: left and right alignment
I'm trying to set up a text view to show lines of text, along with line numbers on the right margin. The string for the text view would look something like this:"Text of first line" + "Line 1" + "\n" + "Text of second line" + "Line 2" + "\n"I want the end result to look something like this:Into my heart an air that kills, 1From yon far country blows: 2What are those blue remembered hills, 3What spires, what farms are those? 4(Sorry about the crooked right column: it looked fine in the message editor. The numbers should all be in a straight column, aligned to the right margin of the text view.) Is it possible to use an NSAttributedString to do this? I've tried several different ways of constructing such a string, but no luck so far. I'm beginning to think this is the wrong approach entirely. What is the best way to get the kind of layout that I want?
4
0
5.6k
Aug ’19
UITextView with dynamic width
In my storyboard I have a UITextView pinned to the top and bottom safe areas of its view, and with a constraint that centres it. The various text files it will be displaying have lines of different lengths (e.g. some are poetry, others are prose), so I'd like the text view to adjust its width dynamically in response to its content. I've found some stuff online that shows how to do this for dynamic height, but I can't find anything that shows how to set constraints for dynamic width. Can this be done in a storyboard at all?
2
0
3.6k
Aug ’19