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
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Hi,I have an app that includes a very simple one-button interface for recording a video. Our customer wants to be able to switch between the front and rear cameras while the video is being recorded, and without any interruption in the video stream. I notice that even the iOS built-in camera app doesn't do this, but I've heard that some third-party apps do.Is this possible in a practical way? If so, how would I go about it?Thanks,Frank
Hi,I have a universal app that uses the camera along with a preview layer (AVCaptureVideoPreviewLayer) to display a preview of the live camera view.It works fine on an iPhone and fine on an iPad as long as my app is full screen.However, if I open another app in split-view mode, my app loses its live camera view and freezes on the last frame captured.I've tried stopping the AVCaptureSession before the transition and restarting it afterward, and even tearing the whole thing down and building a new one, but neither works.My app is checking permissions and the permissions are fine, and all of the objects created seem valid.Is there some rule that disallows apps from accessing the camera in split screen mode?Frank
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
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
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
I'm getting this message when I try to install Xcode, it says there is not enough disk space.I checked my main volume and there is 60GB available.I'm assuming that Xcode can't possibly require more than 60GB and that this message is a mistake. How do I fix it?Thanks,Frank
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
We have an auto-renewable subscription in our app that we want to stop offering. However, we want to make sure that people who have already purchased the subscription remain subscribed until the end of their current subscription period (and are subsequently unsubscribed and not charged further). What is the right way to do this?We tried submitting the app with the subscription still enabled in App Store Connect but hidden in the app, and our update was rejected because the reviewer couldn't find a way to subscribe.Thanks,Frank
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
Is there a way I can detect at runtime whether the app was installed from Test Flight vs. App Store?Frank
I'd like my app to run in Portrait mode only on iPhones, but any orientation on iPad.
Years ago, I recall being able to do this by overriding or implementing some callback functions for orientation, which seemed to change with every other iOS release.
I'm hoping there is a simpler way to do this today. I was hoping that the Deployment Info tab in Xcode would let me set different Device Orientation choices for iPhone and iPad, but this doesn't seem to be the case.
I'm sure I could hack around and come up with some solution, but I'd like to learn what the "right" way is to do this in current versions of iOS.
Thanks,
Frank
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
I've been unable to upload a build from Xcode on my new M1 Mac Mini since I got it in December. I can still upload builds from my Intel Mac which is on the same Wifi network and logged into the same account (and uploading builds of the same product).
The Transporter application works on my Mac Mini, but it is inconvenient to have to run a separate app to do the uploads. I'd like to figure out why it's not working in Xcode.
Only the upload part of the process is failing. The app compiles fine, the signature works, etc.
Thanks,
Frank
Whenever I try to upload an app from Xcode, I get this error right as the file upload begins:
App Store Connect Operation Error
An error occurred uploading to the App Store.
This is not a transient problem. I have had this issue for months, ever since I started using an M1 Mac Mini for most of my development.
The only workaround I've been able to find so far is to use a different Mac to upload my builds. Luckily, I have another one, but I'm getting tired of doing this.
Both Macs are running the same version of Mac OS, same version of Xcode, and are on the same Wifi network. I also checked to make sure the network settings are identical.
How can I debug this problem?