Post

Replies

Boosts

Views

Activity

Captured photos in wrong orientation
I'm building a custom camera screen that displays the camera image on a preview layer and then captures an image, using AVCaptureSession. When the picture is captured, I immediately load it into a UIImageView in order to display it to the user for approval. I've actually done this many times before, but this is the first time I've tried to do it in an app that supports interface rotation. If I hold the phone in Portrait mode and capture a picture, everything works as expected. When the user rotates the phone into Landscape orientation, I detect this and I replace the preview layer (AVCaptureVideoPreviewLayer) with a new one, specifying connection.videoRotationAngle in order to make the image appear in the right orientation. I'm a little surprised that this is necessary, and it's not a smooth transition, but that doesn't matter. What does matter is that when I capture the image, it is in the wrong orientation. I tried rotating it myself, but this doesn't seem to make any difference. What am I doing wrong?
2
0
186
Nov ’24
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?
0
3
184
Oct ’24
Location "While in use" + Background?
I need some clarification on what is supposed to happen if the "allowsBackgroundLocationUpdates" flag on CLLocationManager is set to true, and only the "While in Use" permission has been given. The customer I'm working with thinks that this combination should allow the app to receive location updates in the background indefinitely, as long as the app was in the foreground when we started receiving them. What we've experienced is inconsistent. App updates do continue when the screen locks and in some cases when we switch to another app, but often they do not. Our app doesn't require location updates 24/7, it requires them for a period of time when the user is performing an activity. The user starts and stops the activity in the app, and the activity might last up to a couple of hours. Can we do this using "While in Use" or do we need to request "Always" ?
1
0
227
Oct ’24
User Defined Runtime Attributes
You used to be able to use the "User Defined Runtime Attributes" section in Interface Builder to add attributes such as layer.borderColor, layer.borderWidth, layer.cornerRadius, etc. I can still enter these values, but they don't do anything. What happened? I can still set them via code and then they work, but it's much more convenient to be able to do it in interface builder.
0
0
232
Oct ’24
How do I use an Analytics file?
One of my customers is reporting a crash. He sent me a file called "Analytics-2024-07-08-200041.ips.ca.synced". I don't know what to do with this file. It appears to contain thousands of lines of JSON. I can read them, but the file is too large for me to find any specific problem. What is this file, how was it generated, and how am I supposed to use it? When I searched for the answer online, I kept running into instructions asking me to choose tabs or press buttons in Xcode that don't exist. I assume that this is because Xcode changed since those instructions were written. I did check for crash reports in the Organizer and it does not report any for the current version of my app, or any within the past two weeks for any version.
1
0
435
Jul ’24
Decoding JSON with a reserved property name
I need to decode JSON into a class. The JSON has a field called "Type", and I cannot declare a property with that name in my class since Type is a reserved word. I tried declaring CodingKeys, but that doesn't work unless I declare EVERY property in the CodingKeys. This class has about a hundred properties and I have others like it, I do not want to do this. Is there a better solution?
2
0
411
Jul ’24
Associated domains not working
I'm setting up Auth0 to work with my app according to their instructions. I need to add an associated domain, but it doesn't work. When I try to use Auth0, it returns a message that says "Application with identifier (my-bundle-id) is not associated with domain (my-auth0-domain)". In Signing & Capabilities, I have the Associated Domains capability set up with this domain: "webcredentials:(my-auth0-domain)". I also added another version with ?mode=developer on the end of it, but neither works. I am sure that the domain I'm using is correct because I'm able to use it in Postman to authenticate with Auth0. I checked everything else against their documentation and samples several times.
1
0
704
Jul ’24
White text on white background
Whenever I make a new app I end up getting bug reports from people who say they can't see text, or they can just about see white text against an almost white background. It always turns out to be because their phone is in dark mode, which I don't use. Almost all of my views have the background color set to "System background color" which is the default value when you create a view. Why does dark mode change the color of the text but not the background?
1
0
538
Jun ’24
Do personal accounts support teams? Are there restrictions?
I'm assisting a customer with an iOS app. He has a personal (non-company) Apple Developer account. I know that this kind of account didn't used to support collaborators, but I'm not sure what the current status is. He was able to add me to his account and give me permissions (Developer, App Manager). However when I run Xcode, his account does not appear in the list of Teams under my Apple ID, which is preventing me from working. Is this a bug or temporary problem or is the fact that his account is a personal account preventing me from doing this?
3
0
1.2k
May ’24
IBOutlet becomes nil after ViewController is initialized
I have an extremely straightforward situation where an @IBOutlet in a ViewController is connected to a property in an XIB file. I've been working with iOS apps for more than ten years, and done this about a million times. For some reason, the property becomes nil at some point after the view is loaded. I can check with the debugger to see that it is not nil at viewDidLoad, and there is nothing in my code that sets it to anything else. I added a custom setter and getter to the variable so that I could stop in the debugger when it gets set, and the setter only gets called once, with a non-nil value. I suspect that somehow, a different copy of my ViewController is getting instantiated, but when it does, there are no calls to any of the usual methods like viewDidLoad. In fact there is not even a call to the init method. I don't understand how this is possible.
1
1
533
May ’24
TLS client certificate
I have a customer who wants to protect the REST API of their app with a private certificate. They would then distribute the client certificate to the authorized users. Their app would not work unless the client certificate is already installed on the user's phone before they run the app. I have never done this before. Is it possible to install a client certificate on an iPhone without running an app, for example if it were sent in an email message? And if it is possible, is App Review going to let such an app into the app store? Thanks, Frank
1
0
610
Apr ’24
European Union Digital Services Act trader requirements
I have a new app that needs to be submitted for review this week. When I tried to submit it, I was told I could not do so because "Under the Digital Services Act, you must provide and verify information regarding your account". I am working on behalf of a large corporate customer. They are telling me that they cannot do anything without consulting their legal team, which is going to take time. In the meantime, they asked me if I could omit the European region from the app's distribution list. I tried this, but it did not work. I manage about 20 apps for different customers and I have never seen this requirement appear on any other account. Is it new? Does it only apply to certain kinds of accounts, or to new apps, or new accounts publishing their first app? If this is a European Union requirement, why is it needed if I don't distribute to EU countries? Thanks, Frank
3
1
1.6k
Apr ’24
Privacyinfo.xcprivacy doesn't work
I added this file as Apple requested due to my app using UserDefaults, but it still complains when I upload it. This is the message: TMS-91053: Missing API declaration - Your app’s code in the “Production” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryUserDefaults. And this is my file, what's wrong? <dict> <key>NSPrivacyAccessedAPITypes</key> <array> <dict> <key>NSPrivacyAccessedAPIType</key> <string>NSPrivacyAccessedAPICategoryUserDefaults</string> <key>NSPrivacyAccessedAPITypeReasons</key> <array> <string>CA92.1</string> </array> </dict> </array> </dict>
3
0
857
Apr ’24