I tried "WWDC24: Build compelling spatial photo and video experiences | Apple" and it can successfully capture spatial video.
But I found the video by my app differs from the iPhone build-in camera app in:
Videos captured with the iPhone's build-in camera app tend to have a more natural or warmer tone, while videos taken with my app appear whiter or cooler in color temperature.
In videos recorded using the iPhone's built-in camera app, the left eye image is typically sharper than the right eye image. However, in my app, this is reversed: the right eye image is clearer than the left eye image.
I've noticed that when I cover the wide-angle lens while shooting, the entire preview screen in my app becomes brighter. However, this doesn't occur when using the iPhone's built-in camera app.
Is there any api or parameters to make my app more close to the iPhone build-in app? I have tried "whiteBalanceMode" and "exposureMode" but no luck.
Posts under iOS tag
72 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
The company produces MFI-certified devices.
A lot of users are affected. it happens when users are in the background.
The crash happens in NSArray; it looks like the array is out of bounds to which EAAccessoryManager tries to access.
The only assumption I have is that something is wrong with Threads. Maybe we are blocking a Thread somewhere, or EAAccessory should always work on the Main Thread but we switch streams to another thread.
It is hard to believe that Apple could have such a simple bug. If it were Apple's bug, other companies who produce MFI devices could also experience the identical bug, but I don't see anyone raising the identical issue.
The issues don't have a relation to iOS versions; it happens for us from iOS 13 till iOS 18.
Thanks in advance,
Eugene.
Hello everyone,
I’m facing an issue with my iOS app where the GPS/location services icon appears in the status bar immediately when the app is launched, even though I’m not intentionally accessing location services at that point.
Issue Summary:
• GPS Icon Activation: When I launch my app, the GPS icon turns on. It turns off when the app is minimized or closed.
• No Intentional Location Usage at Launch: I have ensured that no instances of CLLocationManager are created when the app is launched.
What I’ve Tried So Far:
1. Checked Controllers and Related Classes:
• Reviewed all the code for the controllers that are active at launch.
• Verified that none of these controllers create instances of CLLocationManager or call location-related methods.
2. Commented Out startUpdatingLocation:
• Commented out all calls to startUpdatingLocation throughout the entire project.
3. Ensured No CLLocationManager Instances at Launch:
• Searched for any code that might instantiate CLLocationManager during app launch.
• Confirmed that no such instances are being created.
4. Commented Out Google Maps SDK Configuration:
• In AppDelegate, commented out the Google Maps SDK configuration, so it’s not initialized with the API key.
• No map views (GMSMapView, MKMapView) are initialized or used when the app is launched.
5. Tested Location Permissions:
• When I change the location permission for the app to “Never” in the Settings app, the GPS icon does not appear upon app launch.
• This suggests that the app is accessing location services when it has permission, even though I haven’t explicitly requested it at launch.
Objective:
• Control GPS Activation: I want to ensure that the GPS does not turn on when the app is launched. I intend to activate location services only when needed later in the app.
Request for Assistance:
I’m seeking guidance on the following:
1. Debugging Techniques:
• How can I trace the code that’s causing the GPS to turn on at app launch?
• Are there tools or methods to identify hidden or indirect calls to location services?
2. Forcing Location Services Off at Launch:
• Is there a way to programmatically prevent location services from activating during app launch?
• Can I defer any implicit location service initialization until I explicitly enable it?
3. Potential Hidden Triggers:
• Are there known scenarios where location services could be activated without direct use of CLLocationManager?
• Could frameworks like Google Maps SDK trigger location services even if not fully initialized?
4. Additional Suggestions:
• Any other insights or suggestions to prevent the GPS icon from appearing on app launch.
Additional Information:
• Third-Party Frameworks:
• I have not removed third-party frameworks yet, as I wanted to check other possibilities first.
• Open to the idea that a third-party framework might be causing this, but need guidance on how to confirm.
• Code Availability:
• I’m happy to provide specific code snippets if that would help diagnose the issue.
Environment:
• Xcode Version: Xcode 15.4, Xcode 16.0
• iOS Deployment Target: iOS 15.0
• Devices Tested: iPhone SE 2nd and 3rd gen, iPhone 15, iPhone 15 pro, iPhone 11
• Programming Language: Swift
What I’m Looking For:
• Assistance in tracing the cause of the GPS activation on app launch.
• Suggestions on how to prevent location services from starting until explicitly needed.
• Insights into any hidden triggers or indirect usages that might cause this behavior.
Thank you for your time and assistance. Any help to resolve this issue would be greatly appreciated.
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
iOS
Debugging
Core Location
Maps and Location
I recently built a habit tracker app and got a few initial users. One of them reported that the widgets appear black and are not interactive. Does anyone know what might have happened to widgets in iOS 18 that could cause this issue? By the way, it works for me in the Simulator but not on a real device.
How it supposed to work (simulator):
https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExMWQ1N29sN2xvNnVjMjN5dGJqMHFxaGhtcGswaW43bTVvMnBmNW9wbSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/jevHq6JorR374YwuKF/giphy.gif
How it actually works (real device):
https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExaXNyZzRyYms4eG0yYzh0enF5ZXJyM29kN2VxMGszMHd4NTRkZnE1diZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/k4mVTFE84kdztbwlDV/giphy.gif
Currently, I have achieve shadow and corner effect for UICollectionViewListCell, using the following code.
UICollectionViewListCell
class NoteCell: UICollectionViewListCell {
override func awakeFromNib() {
super.awakeFromNib()
initShadow()
initCorner()
}
private func updateShadowColor() {
// Determine the shadow color based on the current interface style
let shadowUIColor = UIColor.label
self.layer.shadowColor = shadowUIColor.cgColor
}
private func initShadow() {
// https://www.hackingwithswift.com/example-code/uikit/how-to-add-a-shadow-to-a-uiview
self.layer.shadowOpacity = 0.3
self.layer.shadowOffset = CGSize(width: 0.5, height: 0.5)
self.layer.shadowRadius = 2
self.layer.masksToBounds = false
self.updateShadowColor()
// Remove the following two lines if you experience any issues with shadow rendering:
self.layer.shouldRasterize = true
self.layer.rasterizationScale = UIScreen.main.scale
}
private func initCorner() {
var backgroundConfig = UIBackgroundConfiguration.listPlainCell()
backgroundConfig.backgroundColor = .systemBackground
backgroundConfig.cornerRadius = 16
self.backgroundConfiguration = backgroundConfig
}
layout
private func layoutConfig() -> UICollectionViewCompositionalLayout {
let layout = UICollectionViewCompositionalLayout { section, layoutEnvironment in
var config = UICollectionLayoutListConfiguration(appearance: .plain)
config.headerMode = .none
config.footerMode = .none
config.showsSeparators = false
config.headerTopPadding = 0
config.backgroundColor = nil
config.trailingSwipeActionsConfigurationProvider = { [weak self] indexPath in
guard let self = self else { return nil }
// Knowing what we are tapping at.
var snapshot = dataSource.snapshot()
let sectionIdentifier = snapshot.sectionIdentifiers[indexPath.section]
let itemIdentifiers = snapshot.itemIdentifiers(inSection: sectionIdentifier)
let itemIdentifier: NoteWrapper = itemIdentifiers[indexPath.item]
let deleteHandler: UIContextualAction.Handler = { action, view, completion in
completion(true)
// TODO:
//snapshot.reloadItems([itemIdentifier])
}
let deleteAction = UIContextualAction(style: .normal, title: "Trash", handler: deleteHandler)
var swipeActionsConfiguration = UISwipeActionsConfiguration(actions: [
deleteAction,
])
deleteAction.image = UIImage(systemName: "trash")
deleteAction.backgroundColor = UIColor.systemRed
swipeActionsConfiguration.performsFirstActionWithFullSwipe = false
return swipeActionsConfiguration
}
// https://developer.apple.com/forums/thread/759987
let layoutSection = NSCollectionLayoutSection.list(using: config, layoutEnvironment: layoutEnvironment)
layoutSection.interGroupSpacing = 16 // Distance between item.
layoutSection.contentInsets = NSDirectionalEdgeInsets(
top: 16, // Distance between 1st item and its own header.
leading: 16,
bottom: 16, // Distance of last item and other header/ bottom edge.
trailing: 16
)
return layoutSection
}
return layout
}
This is the outcome.
However, when I perform swipe action, the shadow effect is gone.
Do you have any idea how I can resolve such? Thanks.
Hi everyone,
We're fighting an issue that's driving us up the wall.
We developed an Apple Watch Only standalone app, which cost $2.99; once you paid, you could download and use the app on your Apple Watch.
We've released a companion iOS app for iPhone that goes into the same bundle (as it's the same app, now supporting two platforms). Nevertheless, the Watch app is still available as a separate app (you can download the Watch app only if you wish without needing to download the iPhone app as well).
The iOS companion reads information from the watch and provides more insights into the data it displays. Similar to the sleep tracking apps where you use the watch to sleep and track and the iPhone to see the results.
When we released the latest version, including both, we changed the price to Free in all countries.
After this, we now have a huge problem we haven't been able to solve:
Our existing users (who paid for the Apple Watch-only app) cannot download the companion iOS app. If they go to the App Store, it'd just say "Purchased" with no option to download it (nor the "Get" button or the "Cloud" icon).
If you go to your App Store account in your iPhone and then to "Purchases," the app won't appear there. Because technically, you never bought it, and it's now free.
If you do the same on your Apple Watch, you can still see the app on your purchases, but that would only download the Apple Watch app, not both.
But on top of that, I want my users to be able to download the companion app from the App Store with their iPhones because that's what they'll do anyway (only 9% of our app downloads happen straight in an Apple Watch; most come from iPhones).
Did anyone have this problem? I'm already talking with support because this is having a very negative impact on our app, and it all looks to be a bug on the App Store or an edge case that Apple hasn't considered.
The thing is, I experienced this issue myself with an app from another dev previously where I had the Apple Watch app installed and paid for it. When I wanted to download the companion they released, it was impossible for the same reasons stated above.
He managed to fix it, but I couldn't find any information.
Xcode 16 RC refuses to recognise my iPhone 13 mini running IOS 18 as a device and won’t compile onto it. Using the exact same setup I can compile onto my iPad running IOS 17.5.
Xcode used to compile onto it (Xcode 15.x and iphone on IOS 17.x). My iphone is a known device in my developer account. I have switched on ‘Developer Mode’ in the iPhone Settings and rebooted. I am using an Apple lightning cable. I’ve tried changing USB ports. The Mac recognises it in Finder.
On one app my minimum deployment is IOS 17. I have created a new app where the minimum deployment is IOS 18 and tried both in combinations, below.
I can plug in my iPad running iPadOS 17 and Xcode 16 RC will compile successfully onto it (app is minimum deployment IOS 17) , just not my iPhone now that I upgraded it to IOS 18. I have:
installed the Iphone 13 mini simulator with IOS 18 on Xcode 16 RC and compiled successfully to that with both apps.
rebooted all devices and replugged all devices in countless combinations, countless times.
tried different apps with different minimum deployments, including sample code written by others.
tried setting my minimum deployments to IOS 18
The main issue is that at best, Xcode 16 RC ‘sees’ my iPhone mini and tries to pair with it but doesn’t succeed. I tried following this thread: https://developer.apple.com/forums/thread/764196?answerId=804884022#804884022
and tried ‘Quick fix 1’. Which at least allowed Xcode to sometimes ‘see’ my phone, but after a few reboots, no longer does.
Quick Fix 1:
“Open Terminal and run (replacing the path to Xcode 16.0 if needed):
sudo installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /“
Apple M1 Pro - Sequoia 15.0 (24A335)
Xcode Version 16.0 (16A242d)
I have submitted feedback:
FB15264854
SoundRecognition causes Input/Output callbacks to have varying Buffer sizes and introduces Glitching
Hello,
We have noticed an issue with SoundRecognition that causes glitching with our AudioUnit setup in Smule.
Input and output frame sizes are inconsistent.
Input frame size does not match [AVAudioSession sharedInstance].IOBufferDuration
My best guess is that SoundRecognition influences the input frame size and not the output frame size.
To reproduce use the example app here:
https://github.com/MarkoGill/SoundRecognitionBug
Hardware/OS
iPhone 14 Pro on iOS 18 -> Experiences the problem
iPhone 11 on iOS 18 -> Experiences the problem
iPhone 15 on iOS 18 -> Not experiencing the problem
Reproduction Steps
Enable Sound Recognition (Settings > Accessibility > Sound Recognition > On)
Enable a Sound for detection (Sounds > Dog > On)
Open the example app with headset (it routes input to output)
Notice glitching occurs
Check the logs. Record and Playback buffer sizes vary
Example Log:
AU input sample rate: 48000.000000
AU output sample rate: 48000.000000
hardware sample rate: 48000.000000
hardware buffer size: 1104.000000
updated record frame counts: 1024
updated playback frame counts: 1104
Notes:
You can disable Sound Recognition, restart the app, and playback behaves correctly.
I've got a bit of code which is making a HTTPS GET request.
On an iPhone it runs as expected, however when running on the simulator there's a HTTP 400 response.
I've logged the url and my http headers that I'm adding, and in both cases they are identical for the simulator and iPhone (there is no http body content).
Therefore, as everything is identical, I'm wondering how it could work with hardware and not with the simulator?
Does the OS append any additional HTTP headers before the request goes out (such as User-Agent for example) and might those be different between iPhone/simulator?
After installing iOS 18, the iPhone would have consistent low volume and from this low, it wants to go more down suddenly when playing some media and gets back to its normal condition (already low) itself. I have tried several things from Internet like forced restart, several times restart, turning on vocal shortcut and turning it off back, but nothing helped. Any suggestions? Its Iphone 16 pro max by the way
Can’t start fitness video with my iPhone on my tv since new update 18.1. Air play is connecting I see the countdown then the dots rolling but nothing happens and I end up receiving a « can’t read video » message.
I’m using an iphone 16 pro max, an apple watch ultra (1st gen) and an apple tv HD (A1625 model).
I have almost the same issue with a more recent Apple TV, but on that one it’s just painfully long before the video starts but it does start eventually (just taking much longer than it used to). That some tv is an A2843 model (apple tv 4k 3rd gen).
Has anyone else had this issue?
My app isn’t a game app, but iOS 18 always enable Game Mode for my app automatically. I didn’t find a switch to disable it in Xcode.
Hello
We have a health app that triggers a critical alert when a vital limit is exceeded. Used to work fine until IOS 18 update. Now, after the update, critical alert is triggered correctly when connected to Xcode. However, when disconnected from Xcode, nothing happens.
Please help
In iOS 18 if a number is registered with CallKit to be blocked, then if that number is also in contacts, then the number isn't blocked.
If a user has added a number to their contacts, then in all probability they might not want the number blocked, so this might seem reasonable behaviour.
However the point is, this is new behaviour for CallKit in iOS 18, and its never been like this before going back several years to the very first release. Why suddenly change it now, after all these years, without notice nor documentation, and take away that option from the user, should for some reason, they want to block a number which is also in their contacts.
This is quite a disruptive change for apps using CallKit.
[[PHImageManager defaultManager]
requestAVAssetForVideo:asset
options:videoOptions
resultHandler:^(AVAsset *_Nullable avAsset,
AVAudioMix *_Nullable audioMix,
NSDictionary *_Nullable info) {
if ([avAsset isKindOfClass:[AVURLAsset class]]) {
AVURLAsset *urlAsset = (AVURLAsset *)avAsset;
NSURL *videoURL = urlAsset.URL;
mediaInfo[@"path"] = videoURL.absoluteString;
} else {
// Failed to get video asset
completion(nil);
}
}];```
Before iOS 18, i could able access AVAsset video using the method mentioned above with the url, but starting from the iOS 18 version, the following error appears
'You don’t have permission. - The AVPlayerItem instance has failed with the error code 257 and domain "NSCocoaErrorDomain".'
I am working on an application that has some complex navigation needs, and I'm considering abandoning SwiftUI, at least in a few core areas of the app. I found SwiftUI intuitive and useful for simple things like:
Using a state to toggle the appearance or disappearance of an element
Using state to alter the look of UI elements
Watching the values of built-in interfaces like TextField or Slider
Controlling out-of-the-box UI elements like NavigationSplitView
But now I've got a UI that depends on a data model that can change at any time, and from that data I'll display lists of objects, and objects in detail, and all of this will be displayed according to a NavigationPath that depends on the data model's internal structure. This means that, for instance, I may be in the detail view of element X after having traveled to it from the detail view of element Y which was tapped in a list of XYZ, which was the result of tapping into part of the detail view of element W. This whole path could be invalidated by an update to the data model when it's received from the network. Furthermore, any element could have it's details changed, or be deleted, and I'd want the UI to reflect that right away if possible.
For the navigation work, I'm still optimistic that custom edits to a NavigationPath could be the way to go. However, for propagating data updates around my app, I know @State, @Bindable, etc are intended to handle this kind of thing, but when I'm try to send these bindings through the circuitous path of views I mentioned above, and I run into any unexpected hiccup, it feels like I'm at a disadvantage when debugging because I'm relying on opaque SwiftUI Magic to handle things under the hood in a way I don't really understand. I could put more effort into learning how this works, and potentially come up against some platform limitations, bugs, or other dead-ends, or I could just use Pub/Sub and a network of custom queues/pipes, and send updates around my app the old fashioned way, but using primitives whose functions are clear to me. I've been using SwiftUI for about a year and it still trips me up, and I have watched a few WWDC talks on the topic.
I'd appreciate any advice on this front from the frequenters of this forum. Thanks for reading my post.
Is there way to read the Apple Heart rate zones from HealthKit? I want to read the min/max bpm for each of the 1-5 zones.
I went through the Apple HealthKit developer documentation but couldn't find it https://developer.apple.com/documentation/healthkit
Topic:
App & System Services
SubTopic:
Health & Fitness
Tags:
iOS
watchOS
Health and Fitness
HealthKit
When I go to the software update tab in settings and have beta updates off 18.0.1 does not show up. I need to get off 18.1 since it’s ruining my battery life, is there any way to get 18.0.1 without a computer?
On iPhone devices with dynamic islands (e.g. iPhone 15 Pro Max), the proximity sensor takes about 3 seconds to activate, is this normal?
The iPhone 13 responds almost instantly, but the iPhone 15 Pro Max seems to take a while.
class ProximitySensorManager {
// Shared instance for global access (optional)
static let shared = ProximitySensorManager()
// Proximity sensor activation flag
private(set) var isSensorEnabled: Bool = false
// Start observing proximity sensor changes
func enableProximitySensor(observer: Any) {
guard !isSensorEnabled else { return }
isSensorEnabled = true
UIDevice.current.isProximityMonitoringEnabled = true
NotificationCenter.default.addObserver(
observer,
selector: #selector(proximityStateChanged),
name: UIDevice.proximityStateDidChangeNotification,
object: nil
)
}
// Stop observing proximity sensor changes
func disableProximitySensor(observer: Any) {
guard isSensorEnabled else { return }
isSensorEnabled = false
UIDevice.current.isProximityMonitoringEnabled = false
NotificationCenter.default.removeObserver(
observer,
name: UIDevice.proximityStateDidChangeNotification,
object: nil
)
}
// Proximity sensor state change handler
@objc private func proximityStateChanged() {
if UIDevice.current.proximityState {
print("Proximity sensor detected close object")
// Additional functionality can be added here (e.g. lowering the screen brightness)
} else {
print("Proximity sensor detected no object")
}
}
deinit {
//disableProximitySensor() // Clean up observer on deinitialization
}
}
If an app with a Message Filter Extension is run on an iPhone with iOS 18 installed then there's no logging output to the console (using print or NSLog), however there is logging in all previous versions of OS.
Being able to view logging at run time for this component is essential as a debugging aid to see, for example, if the extension launches, if a text is handled locally or deferred to the network, to see if there's a network error, to examine the server response etc.
Is there a specific reason it was disabled or is it accidental?
Thank you