Post

Replies

Boosts

Views

Activity

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
Portrait mode on iPad?
How do I configure an iPad app to only work in portrait mode?In Xcode there are checkboxes for the four orientations, and only Portrait is checked, but the app still rotates into landscape mode.I also tried checking the "Requires full screen" box, but this didn't have any effect.Thanks,Frank
3
0
3.4k
Nov ’21
Can't upload to App Store from M1 Mac Mini
I've been trying all day to upload a build to Test Flight but kept getting a message that says "App Store Connect Operation Error" and "An error occurred uploading to the App Store." Eventually, I tried to upload the build from another Mac, and this time it worked fine. The Mac that won't upload is a new M1-based Mac Mini. The one that works is an Intel MacBook Pro. Both are on the same Wifi network. Frank
2
0
1.1k
Jan ’21
What is NSURLErrorSecureConnectionFailed?
My app has been reporting error code -1200, "NSURLErrorSecureConnectionFailed", on a very small number of end user devices. I cannot reproduce the error. The devices that report this error have ranged from very old iOS 9 devices to modern iOS 14 devices. The documentation says, "An attempt to establish a secure connection failed for reasons that can’t be expressed more specifically." Can anyone elaborate on what kinds of reasons might cause this error? I'm otherwise stuck, with no way to explain this to my customers and no advice for how they might fix it. Thanks, Frank
2
0
4.3k
May ’21
How to create US Central timezone in Swift?
The server I'm working with returns a date/time string that is always expressed in US central time. There is no timezone information in the string itself. In order to parse this string, I need to create a DateFormatter and then assign its timeZone property. I'm having trouble figuring out the right way to do this. I know that the correct string that means US central time is "America/Chicago", but it appears that the TimeZone initializer is looking for an abbreviation, rather than a full string. I don't know what the correct abbreviation is. I don't want to use "CST" or "CDT" since those denote standard or daylight time. I need something that means whatever the current timzeone is in Chicago. In Java, as an example, the Timezone class accepts "America/Chicago" as an initializer and it works whether or not the calendar is on daylight savings time. Thanks, Frank
2
0
1.8k
Aug ’21
Sign In with Apple - Not getting email address
I'm using Sign In with Apple and requesting both .fullname and .email. The first time I sign in on any given device, the callback to my app has an authorization credential that contains an email address and a fullname, as expected. However, any subsequent login on the same device does not return either the email address or the fullname. All I get is the user ID string. The server I'm working with requires an email address to log in, so I need that email address. Why does it only appear the first time? Frank
2
0
1k
Sep ’21
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
Swift string manipulation
I need to do something that seems simple but I can't figure out the right syntax. Given a string, I need to search for the first occurrence of a substring (not a character). If found, I need to create a new string by removing the part of the old string that is before the substring. I can't see how this is done in Swift. There is a "firstIndexOf" function, but it only searches for one character at a time. I also know that there is a "range(of:)" function, but I can't find its documentation, and I don't know what the return type is, or how I would use it. Thanks, Frank
2
0
712
Feb ’22
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
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
594
Jul ’24
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
781
Nov ’24
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
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
scalesPageToFit with WKWebView?
Hi,The UIWebView class has a convenient property called scalesPageToFit, which can be used to allow small web pages to scale automatically to fit the frame of the web view.But this class is now deprecated in favor of WKWebView, which doesn't seem to have an equivalent property. How do I get the same functionality with WKWebView?Thanks,Frank
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
20k
Dec ’21