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
Post
Replies
Boosts
Views
Activity
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.
I'm trying to save a Dictionary to UserDefaults. My Dictionary is defined as [String:Data]. Since both String and Data are property objects, I expected this to work, but it doesn't: my app blows up with a "this class is not key-value coding compliant" error.
Is this a bug, or am I doing something wrong?
I'm getting the dreaded "Failed to prepare the device for development" error when I connect my iPhone running iOS 15 to the latest version of Xcode. I've tried rebooting both devices. How do I fix this?
Do string functions such as "replacingOccurrences" and "trimmingCharacters" always return a new string, even if the old string did not need to be modified?
In other words -- if I'm doing a large number of "replacingOccurrences" in my app but only a small number of the strings actually contain the sequence I want to replace, should I check to see if the sequence exists before calling replacingOccurrences, in order to avoid an unnecessary string allocation?
I would guess that Swift would return the same string if it didn't require any modifications, but the documentation just says "Returns a new string".
Thanks,
Frank
How do I disable the predictive text feature (word suggestions) of the keyboard when used with a UISearchBar?
I want to customize or limit the typing suggestions for a UISearchBar input to a list of known words that exist within the material that is being searched. How is this done?
Thanks,
Frank
Views A and B are equal in width (set up via a constraint). The actual width will vary at runtime.
What I want to do is arrange view A such that it is horizontally centered on B but offset to the left by 1/10th of the total width.
In other words, if views A and B were 100 units in length, I'd want A to be positioned 10 units to the left of B. If the width were 150 units then the A position would be 15 to the left, etc.
I thought I could do this with either a leading constraint or a centerX constraint using a multiplier of 0.9, but it isn't working out the way I want.
What's the best solution?
I've got an iOS project that I've been working on for some months. Just recently, I started seeing a compiler error to the effect that "Referencing instance requires that X conforms to Equatable". It shows up in places where you'd expect something to be Equatable, such as the argument to firstIndexOf: on an array.
The class in question is written in Swift, but descents from an Objective-C base class. I know there are some issues with how Equatable interacts with Obj-C but I think I've done it right. The base class extends NSObject, and the subclass implements both the isEqual function and the static == function. (I don't think the latter is necessary but I included it just in case).
I've tried explicitly including "Equatable" in the definition of the subclass but the compiler rejects this as "Redundant conformance to protocol". I'm not exactly sure how that works since NSObject doesn't extend Equatable but I guess Swift considers them equivalent.
Here's where things get super weird though. Xcode still builds and runs the project despite the compiler error, and the code runs, and it works. I even put a breakpoint in the isEqual function to make sure it was getting called. Also, when I clean and rebuild the project, the compiler error often disappears for some time, reappearing hours or days later. So I think this must be some kind of bug in Xcode or Swift itself.
What do you think?
Frank
I can't get my latest iPhone app to run in portrait mode only. In Xcode I've checked only the box that says "Portrait" under Device Orientation, and I've also examined the Info.plist file to ensure that there aren't any hidden settings for other orientations.
I've also tried checking or un-checking iPad, and checking "Requires Full Screen" when that option appears. No matter what I do, when I run the app on my phone and rotate the screen, the interface rotates.
What am I doing wrong?
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.
Hi,
I'm working with a BLE device manufacturer on a new device for which I'm tasked with developing the iOS app.
The hardware developer told me: "In response to a Scan request (from a phone or other device) the BLE stack is configured to include a device identifier". The device identifier is something I need to see in the advertising packet before I connect to the device.
I don't know what a "Scan request" is. Is this something I have to specifically ask for in my app? Is it something iOS does automatically?
Thanks,
Frank
I'm trying to send my app silent push notifications by setting the "content-available" flag to 1 in the notification payload. This works, but there is a problem: if my app is not running in the foreground, the notification is visible on the home screen. I don't want this: I just want the app to see it, without waking up the screen or alerting the user.
If the app is open when the notification comes in, it works as expected; I receive the notification inside my app, and iOS does not display any alert or banner.
I configured my app with the "Remote Notifications" background mode.
What am I doing wrong?
I have an app that I distribute to an Enterprise customer via private app store distribution. Recently, I published an update. The update went through the App Store review process, was approved, and is currently listed as Ready for Sale.
However, my Enterprise customer says he cannot access the update. His view of the app still shows the latest version as being the prior version.
I can't figure out what is wrong. Is there some additional step I need to take to make sure the app is available to him?
Thanks,
Frank
Hi,
I'm looking at the function activityViewController(_:dataTypeIdentifierForActivityType:) in the UIActivityItemSource protocol. The documentation says "For items that are provided as data, returns the UTI for the item." The return type of the function is a String.
I don't know what "UTI" means in this context. The data I'm trying to provide is an HTML document (a string containing HTML). I tried returning "text/html", but I don't think this worked.
I'm also unsure whether my "itemForActivityType" function ought to be providing the HTML as a String, or perhaps converting it to Data first.
The end result I'm seeing is that I can share the HTML document via Mail, and it looks fine, but if I try to air drop it, I get an error that says "Extension request contains input items but the extension point does not specify a set of allowed payload classes."
I'd like my app to be able to share the HTML document via Mail or Airdrop. I don't care if it doesn't support sharing to any other services.
Thanks,
Frank