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
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,I'm having a really weird problem. Brand new project, using a UINavigationController. I want to set the background color of my navigation bar to match the background color of my root view controller.I thought that this was the right way to do it: [[UINavigationBar appearance] setTranslucent:NO];
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0x2d/255.0 green:0x55/255.0 blue:0x97/255.0 alpha:1.0]];However, this generates a navigation bar with a color value of #234185 instead of the expected #2D5597. What is the explanation for this, and how do I fix it?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
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
Is there a way I can detect at runtime whether the app was installed from Test Flight vs. App Store?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?
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
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
I happen to have a lot of experience writing a Windows application in c#, where the async/await pattern has been a standard feature for years.
I can say from this experience that it's a great way to handle concurrency and I'm really happy that Apple is bringing this to Swift.
I'm often critical of language improvements that end up reproducing things you could already do with a different syntax, but in this case it's definitely worth it.
If you've never used async/await, it may initially look confusing. It looks like all you're doing is blocking your thread from running until another thread completes, but what really happens is that your thread returns at the point where the await keyword appears, and then resumes later when the result is available. So if your thread is the main thread, which is the most common case, using await doesn't block the main thread.
Exactly how the compiler manages to suspend and resume the thread without destroying your local variables, I don't know, but I'm sure they figured out a way that makes sense.
Frank
Hi,One of my external testers wants to run my app on a second device.He asked me to please send him another invitation for the second device. I don't know how to do this. If I try to add his email address again, nothing happens. If he tries to re-use the original invitation, it doesn't work.How do I invite the same person to test on a new device? Does he need to get another email address?Frank
Hi,Is it possible using MusicKit to play songs through audio filters, such as pitch shift or time stretch filters?Is it possible to play two songs at once for the purpose of fading between them?Is there a way that I can access tempo information about songs?Thanks,Frank
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.
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
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!