Post

Replies

Boosts

Views

Activity

Discontinue an auto-renewable subscription?
We have an auto-renewable subscription in our app that we want to stop offering. However, we want to make sure that people who have already purchased the subscription remain subscribed until the end of their current subscription period (and are subsequently unsubscribed and not charged further). What is the right way to do this?We tried submitting the app with the subscription still enabled in App Store Connect but hidden in the app, and our update was rejected because the reviewer couldn't find a way to subscribe.Thanks,Frank
3
1
13k
Sep ’22
Rules for "promo codes"?
I've always understood it to be the case that apps could permit users to log in or use a code to access paid content, as long as the app did not direct the user to an external web site to make a purchase. For example, apps like Netflix or Kindle.My app isn't even doing anything close to this. I have an app in which digital content is unlocked via in-app purchase. Occasionally I give away promo codes that allow a user to unlock one free piece of content. These codes can only be used once, and are distributed in very limited numbers on cards, in person, at events like trade shows.My app has been in the store for about four years using this method. This week I attempted to publish a small bug-fix update, and was flagged by Apple and told that my use of Promo Codes in this manner violates the rules.What happened here? Did Apple misunderstand what my app is doing? Did the rules change recently and I was unaware of the change? Has this always been against the rules, but either Apple didn't enforce it before or they never reviewed my app thorougly enough to find it?Thanks,Frank
5
0
10k
Sep ’23
Format Decimal as string in Swift?
I'm trying to figure out the right way to format a Decimal number as a currency value in Swift. For example, if the Decimal contains the value 25.1 I'd want this to print as "$25.10". If it had the value 25, I'd want "$25.00". If it happened to contain a value like 25.4575, I'd want to round it off and display "$25.46". There are a confusing amount of functions surrounding Decimals and string formatting. I know I can't just use String(format: "%.2f", value) like I can do with floats and doubles. There appears to be a new FormatStyle property of Decimal, but I can't use that yet because it requires iOS 15. Thanks, Frank
2
0
7.6k
Feb ’22
What is the future of Objective-C?
Will Apple continue to support it, or will we wake up one day to find that Swift is the only viable language?It's a serious question. Careers depend on it. I don't accept the "No comment" approach that Apple usually takes. It's cruel.I'm willing to put the time into learning Swift if I have to. I'm not going to do it if I don't. I want to know.Frank
23
1
34k
Oct ’25
Sending location to a server in the background?
Hi,My app is configured to receive location updates while running in the background.I need to send these updates to a server. I'd like to do it as soon as possible, but it isn't absolutely necessary.If I receive a location update in the background, am I allowed to send the data to a server immediately using an NSURLRequest? Do I need to call "beginBackgroundTaskWithExpirationHandler" to request time for the request to complete?Or, should I just store the location update in a local database and send it when the app is running in the foreground?I'm assuming that I can use an expression such as "[[UIApplication sharedApplication] applicationState] != UIApplicationStateActive" in my CLLocationManagerDelegate callback to determine whether I'm getting locations in the background.Thanks!
3
0
5.3k
Aug ’21
async/await in Swift
I happen to have a lot of experience writing a Windows application in c#, where the async/await pattern has been a standard feature for years. I can say from this experience that it's a great way to handle concurrency and I'm really happy that Apple is bringing this to Swift. I'm often critical of language improvements that end up reproducing things you could already do with a different syntax, but in this case it's definitely worth it. If you've never used async/await, it may initially look confusing. It looks like all you're doing is blocking your thread from running until another thread completes, but what really happens is that your thread returns at the point where the await keyword appears, and then resumes later when the result is available. So if your thread is the main thread, which is the most common case, using await doesn't block the main thread. Exactly how the compiler manages to suspend and resume the thread without destroying your local variables, I don't know, but I'm sure they figured out a way that makes sense. Frank
1
1
1.5k
Jun ’21
Custom font doesn't appear in Interface Builder
I installed a custom font (Font awesome) into my app. I triple checked that I did everything right: the font files are included in the bundle (they appear in the "Copy Bundle Resources" build phase) and the names of the fonts appear in the Info.plist file under "Fonts provided by application". In Interface builder, I select a Label, set the font to "Custom", then I click the Family list to select the font I want. Once or twice, I was actually able to see the Font Awesome fonts in this list and select one. However, they no longer appear there when I create new labels in new views. I do not understand why. I've been limping along by copying a label from one of the views where it worked and pasting it into the new view, but this is tiresome. I know the fonts are installed correctly because I can see them when I run the app. Why are the fonts not showing up on the font list in interface builder?
4
8
868
Mar ’25
Annoying documentation issue
I've been using Xcode and Objective-C for years, and rely heavily on the built-in documentation, which is for the most part good.There's an issue that's always bothered me. Today I was looking up a function called class_getName. I found its documentation page, and was also able to navigate to the page showing the overview of the runtime system, all of which is fine.When I typed "class_getName" into my program, the compiler immediately flagged it as an unknown symbol.I knew I probably had to include a header, but none of the documentation pages I looked at mentioned the name of the header file. I had to end up searching the internet for examples until I hit one that showed <objc/runtime.h> being imported.Why isn't this very small, simple and extremely useful bit of information included in the documentation?Frank
5
1
1.5k
May ’23
Is AVMutableVideoComposition missing the customVideoCompositor property?
Hi,According to the documentation for the AVVideoCompositing protocol:"When creating instances of custom video compositors, AV Foundation initializes them by calling init and then makes them available as the value of the customVideoCompositor property of the object to which it was assigned. You then can do any additional setup or configuration to the custom compositor."AVMutableVideoComposition has a customVideoCompositorClass property, but does not have a customVideoCompositor property.Am I misunderstanding this? I need to access the instance to set some properties on it, but I cannot.Thanks,Frank
1
0
966
Apr ’22
Xcode won't remember Git credentials
Is there any way to get Xcode to remember my Git credentials? My company uses a service called Beanstalk to host our Git repositories. Beanstalk is not one of the choices available under "Source Control Accounts", but the repository itself is a standard Git repository. I can access it by giving my credentials at the time I pull or push, but Xcode forgets them whenever I close it.
0
0
541
May ’22
Silent push notifications not working when app is in background
I want to send my app silent push notifications while it is running in the background, but I've been unable to get it to work. I understand how to send the notification by setting the content-available flag, and I've implemented the "didReceiveRemoteNotification" function in my app delegate. It works, but only if the app is open and running in the foreground. As soon as I put it in the background, didReceiveRemoteNotification doesn't get called again unless I reopen the app. I feel certain that I should be able to receive these notifications when my app is in the background. I have both "Remote notifications" and "Background processing" checked in Signing & Capabilities. Thanks, Frank
3
0
2.1k
Mar ’23
Using TestFlight with multiple devices?
Hi,One of my external testers wants to run my app on a second device.He asked me to please send him another invitation for the second device. I don't know how to do this. If I try to add his email address again, nothing happens. If he tries to re-use the original invitation, it doesn't work.How do I invite the same person to test on a new device? Does he need to get another email address?Frank
3
2
27k
Jun ’21