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.6k
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
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.4k
May ’21
Issue with barcode scanning in iOS 14
I've got a fairly old app that I first built back in 2014, and have been maintaining over the years. One of the screens in the app uses the camera to scan barcodes. The barcodes we scan are printed on labels, and are in the org.iso.Code128 format. When the app was first developed, I simply set the metadataObjectTypes property of AVCaptureMetadataOutput to all available types. This worked fine. The app scanned our barcodes very quickly with almost no issues. In 2017, we started seeing issues where barcode scanning was becoming slower. I reasoned that having it configured to scan for every possible barcode format might be the issue, so I went in and changed the code to have it scan only for the org.iso.Code128 format. This helped, for a while. Now, we're seeing the problem again in iOS 14 devices. On some devices it is nearly impossible to scan the barcodes. On others, you have to wait 20 or 30 seconds before the barcode is recognized. What could be causing this issue?
1
0
1.5k
May ’22
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
1.1k
Sep ’21
SwiftUI dynamic positioning of a subview
Hi, I'm trying to figure out how to manually position a subview within a view using SwiftUI. For example, when the user taps the screen, I want to place a small icon on the screen at the position tapped. I know how to get the coordinates of the tapped location but I don't know how to either place a view there or move an existing view already being shown to that location. In a regular non-SwiftUI app I can set the frame, or set up constraints. I don't know what the best approach is in SwiftUI. Thanks.
1
0
480
Oct ’21
Bluetooth scanning in background without service ID?
Is there any way to scan for Bluetooth advertising messages while in the background if the device doesn't advertise any service IDs? I've been asked to build and app that does this. The device in question is an off-the-shelf medical alert button (my company doesn't make the device and can't alter its firmware). Upon examining it, I find that it does not advertise any service IDs nor does it offer any ability to connect, it works purely by sending advertising packets. I'm told that there are Android apps that can work with this device even while in the background. I checked the iOS bluetooth docs to see if any new scanning capabilities had been recently added, but could not find anything. Thanks, Frank
1
0
764
Dec ’21
Silent notification appears on home screen when app not open
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?
1
0
755
Apr ’22
What is a BLE Scan Request?
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
0
0
981
Apr ’22
iPhone app in Portrait only?
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?
1
0
980
Jul ’22
Weird Swift bug with Equatable
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
1
0
611
Jul ’22
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
Replies
2
Boosts
0
Views
6.6k
Activity
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
Replies
3
Boosts
0
Views
3.4k
Activity
Nov ’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
Replies
2
Boosts
0
Views
4.4k
Activity
May ’21
Issue with barcode scanning in iOS 14
I've got a fairly old app that I first built back in 2014, and have been maintaining over the years. One of the screens in the app uses the camera to scan barcodes. The barcodes we scan are printed on labels, and are in the org.iso.Code128 format. When the app was first developed, I simply set the metadataObjectTypes property of AVCaptureMetadataOutput to all available types. This worked fine. The app scanned our barcodes very quickly with almost no issues. In 2017, we started seeing issues where barcode scanning was becoming slower. I reasoned that having it configured to scan for every possible barcode format might be the issue, so I went in and changed the code to have it scan only for the org.iso.Code128 format. This helped, for a while. Now, we're seeing the problem again in iOS 14 devices. On some devices it is nearly impossible to scan the barcodes. On others, you have to wait 20 or 30 seconds before the barcode is recognized. What could be causing this issue?
Replies
1
Boosts
0
Views
1.5k
Activity
May ’22
Store generic Git credentials in Xcode?
How do I get Xcode to remember my Git credentials? I am not using Github, or one of the other brand-name Git repositories that Xcode recognizes. There doesn't appear to be a way to store Git credentials generically.
Replies
0
Boosts
0
Views
465
Activity
Aug ’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
Replies
2
Boosts
0
Views
1.8k
Activity
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
Replies
2
Boosts
0
Views
1.1k
Activity
Sep ’21
SwiftUI dynamic positioning of a subview
Hi, I'm trying to figure out how to manually position a subview within a view using SwiftUI. For example, when the user taps the screen, I want to place a small icon on the screen at the position tapped. I know how to get the coordinates of the tapped location but I don't know how to either place a view there or move an existing view already being shown to that location. In a regular non-SwiftUI app I can set the frame, or set up constraints. I don't know what the best approach is in SwiftUI. Thanks.
Replies
1
Boosts
0
Views
480
Activity
Oct ’21
Silent local notification?
Is it possible to set a silent local notification?
Replies
0
Boosts
0
Views
442
Activity
Dec ’21
Bluetooth scanning in background without service ID?
Is there any way to scan for Bluetooth advertising messages while in the background if the device doesn't advertise any service IDs? I've been asked to build and app that does this. The device in question is an off-the-shelf medical alert button (my company doesn't make the device and can't alter its firmware). Upon examining it, I find that it does not advertise any service IDs nor does it offer any ability to connect, it works purely by sending advertising packets. I'm told that there are Android apps that can work with this device even while in the background. I checked the iOS bluetooth docs to see if any new scanning capabilities had been recently added, but could not find anything. Thanks, Frank
Replies
1
Boosts
0
Views
764
Activity
Dec ’21
Monitor accelerometer or gyroscope in the background?
Is it possible to monitor the accelerometer or gyroscope when running in the background? My goal is to develop an app that detects sudden accelerations, like if the user fell down stairs, or was in a car accident. Thanks, Frank
Replies
0
Boosts
0
Views
657
Activity
Dec ’21
Silent notification appears on home screen when app not open
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?
Replies
1
Boosts
0
Views
755
Activity
Apr ’22
What is a BLE Scan Request?
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
Replies
0
Boosts
0
Views
981
Activity
Apr ’22
iPhone app in Portrait only?
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?
Replies
1
Boosts
0
Views
980
Activity
Jul ’22
Weird Swift bug with Equatable
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
Replies
1
Boosts
0
Views
611
Activity
Jul ’22