Post

Replies

Boosts

Views

Activity

Can we use SF Pro fonts in apps?
I'm confused about the SF Pro fonts. Can these be used in our apps? I tried pasting characters from SF Pro into a label, but was unable to get them to display properly. "SF Pro" doesn't appear in the list of available fonts in Xcode. If these are not intended to be used by app developers, then what is their purpose? Are "SF Symbols" different that SF Pro? What about the list of icons that appears in the "Symbols Library" in Xcode? There are so many different sources of symbols and icons, it is very confusing. If any of these sources is OK to use in an iOS app, is it also OK to export them for use in the event that business needs require me to create an alternate version of my app for some hypothentical non-iOS platform? Thanks, Frank
4
1
9.6k
Oct ’23
Problems with AVAudioPlayerNode's scheduleBuffer function
Hi,I'm having two problems using the scheduleBuffer function of AVAudioPlayerNode.Background: my app generates audio programatically, which is why I am using this function. I also need low latency. Therefore, I'm using a strategy of scheduling a small number of buffers, and using the completion handler to keep the process moving forward by scheduling one more buffer for each one that completes.I'm seeing two problems with this approach:One, the total memory consumed by my app grows steadily while the audio is playing, which suggests that the audio buffers are never being deallocated or some other runaway process is underway. (The Leaks tool doesn't detect any leaks, however).Two, audio playback sometimes stops, particularly on slower devices. By "stops", what I mean is that at some point I schedule a buffer and the completion block for that buffer is never called. When this happens, I can't even clear the problem by stopping the player.Now, regarding the first issue, I suspected that if my completion block recursively scheduled another buffer with another completion block, I would probably end up blowing out the stack with an infinite recursion. To get around this, instead of directly scheduling the buffer in the completion block, I set it up to enqueue the schedule in a dispatch queue. However, this doesn't seem to solve the problem.Any advice would be appreciated. Thanks.
9
0
4.8k
Oct ’23
Apple Developer Program License Agreement Updated... again.
Is there any way an account owner can authorize a different user to accept updated license agreements? I manage multiple apps on behalf of customers, most of whom fail to accept these agreements until the day they need me to publish a new app and I have to hunt them down and ask them to do it. If it were one or two customers it wouldn't be a big deal, but I have nearly 40 of them, and this happens several times per year. It's a major hassle.
1
1
689
Sep ’23
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
"Encryption is insufficient" message with BLE
I'm working on a BLE app with a hardware partner using samples of their device, which I am able to erase and re-flash when needed. When I try to use the device it initially works fine. I can connect to it, make requests, and get back responses. However, after a short time and a few successful runs, I start getting the error "Encryption is insufficient". The error is seen in the "didUpdateValueFor" function. I can still connect to the device, and enumerate all of its services and characteristics, but I can't read any data. If at this point I re-flash the device and also go into the iOS setting app and "forget" it, then I can use the device normally again, at least for a while. What causes this? Is there a way I can fix it in my app? Thanks, Frank
3
0
2.0k
Aug ’23
Unable to issue an app identifier or access the Certificates page
I manage several different apps for different customers, who have invited me as a user to their Apple Developer accounts. This week a new customer invited me and I accepted the invitation. If I go to App Store Connect, I can select that customer, view the Users screen and see that he has given me Admin access which is what I requested. However, when I go to developer.apple.com/account, I cannot access the "Certificates, IDs & Profiles" section. In fact, I do not even see the new customer in the pick list underneath my name. This customer is non-technical and needs me to do everything involved with publishing his app, starting with creating the App Store listing and certificates. In App Store Connect I can "Add App" but there are no bundle IDs in the pick list. If I click the link that says "Register a new bundle ID" it takes me to the Certificates page but with a different customer's account selected. Why am I unable to do this given that I have Admin access? Is there some other way I can set up this app? Frank
0
0
547
May ’23
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
What does "#if DEBUG" really mean in Swift?
I've seen examples of Swift code with #if DEBUG / #endif, and have even used it myself.I know exactly how preprocessor macros work in c, c++ and Objective-C. In those languages, I know I can say:#ifdef DEBUG ... some code ...#endifAnd I know that if the DEBUG flag is false at build time, the code will not only not run, but it won't even be compiled. This is important to me because the code inside that block contains some sensitive information that must not end up in my compiled code for non-debug builds.In Swift, I'm really not sure what happens. I know the code doesn't execute, but I'm also told that Swift doesn't have a preprocessor. So, what exactly is going on here?Specifically, can I hide sensitive information inside an #if DEBUG block in Swift and be assured that it won't get compiled or in any way be present in the executable when the DEBUG flag is false? Or is #if DEBUG evaluated at runtime in Swift?Thanks,Frank
7
0
36k
May ’23
Auto resize UITextView in table cell
I have a table cell containing a UITextView. The table is using automaticDimension for the cell height and the cell itself is formatted in a way that the UITextView can be a variable height. The intention is that the textview and the cell should reisize as the user types and the text flows into additional lines. If I do nothing else, this doesn't happen. If I add a UITextViewDelegate and call sizeToFit() on the textview whenever the text changes, and then reload the table cell, it does resize, but it does so in an extremely sloppy and unusable way. Specifically, the textview loses focus, the cursor disappears, and the text starts to render in odd ways with overlapping characters or graphics from surrounding elements. What is the correct way to accomplish this? Thanks, Frank
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
631
Mar ’23
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
Team not available?
A customer added me to their team today as a developer.When I sign in to App Store Connect, I can see and select their team from the list that appears under my name. However, when I open Xcode, the team doesn't appear under my Apple ID in Account Preferences or in the Team drop-down in the signing tab.I also noticed that even though I can select the team in App Store Connect, my name doesn't appear on the Users and Access screen. But I can see the app that I was assigned to work on.I tried closing and opening Xcode several times. I also removed and re-added my Apple ID.I waited several hours in case this was some sort of data propagation issue, but it hasn't resolved. What should I do next?Frank
2
0
6.5k
Feb ’23
How are referral codes handled today?
Hi, My customer wants to do the thing where an app store URL is advertised which contains a referral code. When a user follows the link, it should take them to the app store to install the app, and then when the app is installed, it should be able to get access to the referral code in the original URL. I know such a thing was possible at one time because I remember talking to some of my colleagues about it, but I have never done it myself and whatever my coworkers did 8 years ago in Objective-C probably doesn't work anymore. Can someone let me know how to do this, or at least, let me know what the correct name for this procedure is so I can look it up? Thanks.
2
0
6.7k
Dec ’22
Check if character in character set?
Hi,How do I check to see if a Character is in a Character Set?In Objective-C, I could write:[[NSCharacterSet lowercaseLetterCharacterSet] characterIsMember:c]Where "c" is a variable of type char.In Swift, I tried to write:CharacterSet.lowercaseLetters.contains(c)Where "c" is of type Character, but I received an error saying that the function was expecting a parameter of type "Unicode.Scalar".Thanks,Frank
5
0
7.4k
Nov ’22
Detect end of transition?
Hi,I'm familiar with the "willTransition" method of view controllers that lets you detect when a transition to a new UITraitCollection is about to begin.What I need is a callback that happens after the transition is finished. There doesn't seem to be any "didTransition" method, nor any delegate property on the UIViewControllerTransitionCoordinator that I can use for this.How does one obtain this callback?Thanks,Frank
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
3.4k
Oct ’22