New to iOS development and I've been trying to make heads or tails of the documentation. I know there is a difference between the data fields returned from songs from the user library and from the category, but whenever I search on the apple site I can't find a list of each. For example, Im trying to get the releaseDate of a song in my library, but it seems I'll have to cross-query either the catalog entry for the using song.catalogID or the song.irsc but when I try to use them I can't find a cross reference between the two. I'm totally turned around.
Also trying to determine if a song in my library has been favorited or not? isFavorited (or something similar) doesn't seem to be a thing. Using this code and trying to find a way to display a solid star if the song has been favorited or an empty one if it's not. Seems like a basic request but I can't find anything on how to do it. I've searched docs, googled, tried.
Does apple want us to query the user's Favorited Songs playlist or something? How do I know which playlist that is?
I know isFavorited isn't a thing, just using it here so you can see what my intension is:
HStack(spacing: 10) {
Image(systemName: song.isFavorited ? "star.fill" : "star")
.foregroundColor(song.isFavorited ? .yellow : .gray)
Image(systemName: "magnifyingglass")
}
Posts under iOS tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi Guys,
I want to support my client for enable the developer mode, But they not accept to connect with any other devices(Mac Xcode) to enable developer mode.
They are nearly 10 people to enable developer mode. But I think without mac we can't enable developer mode in some of devices. So I need a clarification with IOS versions. That's only we are excepting to list out which IOS versions don't have developer mode option default. Please list out that IOS versions
Like below:
default developer mode available IOS 17.4.1
default developer mode not available IOS 17.5.1
Area: Software Update
Type of Feedback: Application Bug
Description
Device: iPhone 13 Pro running iOS 26
Build environment: Xcode 16.4
Problem description:
When a text field has secureTextEntry = YES and Password Autofill / Passkeys is active, the autofill panel is not included in the rect reported from the keyboard notifications (UIKeyboardFrameEndUserInfoKey or others).
As a result, when calculating the offset to move the screen up and reveal the hidden input field, the field is not displayed correctly because the reported keyboard height is smaller than the actual visible height.
Observed behavior:
This only occurs on devices running iOS 26 built with Xcode 16.4.
On previous versions of iOS, with the same settings (secureTextEntry and Autofill active), the rect correctly includes the autofill panel height, and the UI works as expected.
I tested with both UIKeyboardDidShowNotification and UIKeyboardWillChangeFrameNotification, and in both cases the behavior is the same: the height is incorrect (smaller than expected with the autofill panel).
What I expect / questions:
That UIKeyboardFrameEndUserInfoKey (or the related notification) correctly reports the total area covered by the keyboard, including any password autofill panel, when secureTextEntry is active.
That the new behavior in iOS 26 be documented if this omission is intentional, or otherwise considered a bug if it is not.
If there is any official workaround suggested by Apple for developers affected by this issue while a fix is provided.
Thank you for your support.
I'm developing an iOS application in Swift that performs API calls using URLSession.shared. The requests work correctly when the app is in the foreground. However, when the app transitions to the background (for example, when the user switches to another app), the ongoing API calls are either paused or do not complete as expected.
What I’ve tried:
Using URLSession.shared.dataTask(with:) to initiate the API requests
Observing application lifecycle events like applicationDidEnterBackground, but haven't found a reliable solution to allow requests to complete when backgrounded
Goal:
I want certain API requests to continue running or be allowed to complete even if the app enters the background.
Question:
What is the correct approach to allow API calls to continue running or complete when the app moves to the background?
Should I be using a background URLSessionConfiguration instead of URLSession.shared?
If so, how should it be properly configured and used in this scenario?
When a TextField is set to a rightToLeft layout, it gets strange and unnecessary padding on the left side. This pushes the text away from the edge. This issue doesn't occur in the leftToRight layout, where the text aligns correctly. Does anyone know how to get rid of this extra padding?
Environment:
Xcode version: 26.0.1
Device: iPhone 13
iOS version: 26.0
Code:
struct ContentView: View {
@State var textInput: String = ""
var body: some View {
VStack {
Text("rightToLeft")
TextField("placeholder", text: $textInput)
.background(Color.red)
.environment(\.layoutDirection, .rightToLeft)
Text("leftToRight")
TextField("placeholder", text: $textInput)
.background(Color.red)
.environment(\.layoutDirection, .leftToRight)
}
.padding()
}
}
Hi,
I am just wondering if there is any option to protect my endpoints that will be used by Message Filtering Extension?
According to the documentation our API has 2 endpoints:
/.well-known/apple-app-site-association
/[endpoint setup in the ILMessageFilterExtensionNetworkURL value of the Info.plist file] that the deferQueryRequestToNetwork will request on every message
Since all requests to these 2 endpoints are made by iOS itself (deferQueryRequestToNetwork), I don't understand how I can protect these endpoints on my side, like API key, or maybe mTLS.
The only way that I found is white list for Apple IP range.
Is there other methods for it?
I'm running the new iOS 26 SwiftUI Instruments and seeing a lot of red/hitches, even with Apple's own Backyard Birds sample project.
Is anyone else experiencing this? Not sure if it's a general iOS 26 issue or specific to my device (iPhone SE 2nd gen). Would appreciate hearing if others are seeing similar results.
Since iOS and tvOS 18, CMCD can now be automatically sent by AVPlayer (https://developer.apple.com/streaming/Whats-new-HLS.pdf).
However, after enabling CMCD, our streams occasionally fail with the following error: CoreMediaErrorDomain Error -17383
This issue appears to affect only DRM-protected (FairPlay) streams so far.
We activate CMCD via the resource loader of an AVURLAsset, before assigning the item to an AVPlayer.
Unfortunately, we haven’t found a reliable way to reproduce the issue, and we’ve been unable to gather any useful diagnostic information.
Has anyone else observed this behavior when enabling CMCD on FairPlay streams?
Topic:
Media Technologies
SubTopic:
Streaming
Tags:
FairPlay Streaming
iOS
HTTP Live Streaming
AVFoundation
Is there a way to constrain the AttributedTextFormattingDefinition of a TextEditor to only bold/italic/underline/strikethrough, without showing the full Font UI?
struct CustomFormattingDefinition: AttributedTextFormattingDefinition {
struct Scope: AttributeScope {
let font: AttributeScopes.SwiftUIAttributes.FontAttribute
let underlineStyle: AttributeScopes.SwiftUIAttributes.UnderlineStyleAttribute
let strikethroughStyle: AttributeScopes.SwiftUIAttributes.StrikethroughStyleAttribute
}
var body: some AttributedTextFormattingDefinition<Scope> {
ValueConstraint(for: \.font,
values: [MyStyle.defaultFont, MyStyle.boldFont, MyStyle.italicFont, MyStyle.boldItalicFont],
default: MyStyle.defaultFont)
ValueConstraint(for: \.underlineStyle,
values: [nil, .single],
default: .single)
ValueConstraint(for: \.strikethroughStyle,
values: [nil, .single],
default: .single)
}
}
If I remove the Font attribute from the scope, the Bold and Italic buttons disappear. And if the Font attribute is defined, even if it's restricted to one typeface in 4 different styles, the full typography UI is displayed.
The device UDID was registered to the developer account 40 hours ago, the STATUS column was "processing" in the first 24 hours, then turned to empty.
But I still can't run my app (with distribution method "development"), when I try to run it after download it through my OTA URL, it prompts “the app cannot be installed because its integrity could not be verified” but everything runs good on a iPhone which was registered a month ago.
What should I do now? keep waiting?
Hi Community!
I'm wrangling with this for a few days now and can't find a way to fix it, but I see it working in other apps.
I have a regular UIToolbar with buttons, assigning it as inputAccessoryView to a UITextView, so the toolbar appears above the keyboard (I can reproduce this also in SwiftUI).
The toolbar contains regular UIBarButtonItems, except one doesn't have an action, it has a UIMenu (using .menu = UIMenu...).
In the Apple Notes app, there is also one button that shows a menu like that. When you tap on the button, the toolbar disappears and the menu shows directly above the keyboard.
However, in my code it shows above the hidden toolbar, means there is a huge gap between keyboard and menu. It works if I attach the toolbar (in SwiftUI) to the navigation at the top or bottom, just with the keyboard it behaves differently.
Here is some sample code for the toolbar:
private lazy var accessoryToolbar: UIToolbar = {
let toolbar = UIToolbar()
let bold = UIBarButtonItem(image: UIImage(systemName: "bold"), style: .plain, target: self, action: #selector(didTapToolbarButton(_:)))
let italic = UIBarButtonItem(image: UIImage(systemName: "italic"), style: .plain, target: self, action: #selector(didTapToolbarButton(_:)))
let underline = UIBarButtonItem(image: UIImage(systemName: "underline"), style: .plain, target: self, action: #selector(didTapToolbarButton(_:)))
let todo = UIBarButtonItem(image: UIImage(systemName: "checklist"), style: .plain, target: self, action: #selector(didTapToolbarButton(_:)))
// Make the Bullet button open a menu of list options
let bullet = UIBarButtonItem(image: UIImage(systemName: "list.bullet"), style: .plain, target: self, action: nil)
let bulletMenu = UIMenu(title: "Insert List", children: [
UIAction(title: "Bulleted List", image: UIImage(systemName: "list.bullet")) { [weak self] _ in
self?.handleMenuSelection("Bulleted List")
},
UIAction(title: "Numbered List", image: UIImage(systemName: "list.number")) { [weak self] _ in
self?.handleMenuSelection("Numbered List")
},
])
bullet.menu = bulletMenu
toolbar.items = [bold, italic, underline, todo, bullet]
toolbar.sizeToFit()
return toolbar
}()
Somewhere else in the code assign it to the UITextView:
// Attach the toolbar above the keyboard
textView.inputAccessoryView = accessoryToolbar
Toolbar:
Menu open:
In Apple Notes:
I feel I miss something. In Apple notes I can also see a Liquid Glass style gradient between the toolbar and keyboard, dimming the content in this space.
Hi,
I've tried to find a solution for this problem for weeks now but it seems no one knows how to solve it and Apple doesn't seem to care.
I have a NavigationSplitView with two columns. In the detail column I have a button - or any other clickable control - which is placed in the very top where usually the safe area resides.
The button is NOT clickable when he is in the safe area and I have NO idea why. I know I can place buttons in safe areas of other views and they are clickable.
Please have a look at the code:
`struct NavTestView: View {
var body: some View {
GeometryReader { p in
VStack(spacing: 0) {
NavigationSplitView {
List(names) {
Text($0.name).frame(width: p.size.width)
.background(Color.green)
}.listRowSpacing(p.size.height * 0.15 / 100 )
.toolbar(.hidden, for: .navigationBar)
} detail: {
TestView().ignoresSafeArea()
}.frame(width: p.size.width, height: p.size.height, alignment: .topLeading)
.background(Color.yellow)
}
}
}
}
struct TestView: View {
var body: some View {
GeometryReader { p in
let plusButton = IconButton(imageName: "plus.circle.fill", color: Color(uiColor: ThemeColor.SeaFoam.color),
imageWidth: p.size.width * 5 / 100, buttonWidth: p.size.width * 5 / 100)
let regularAddButton = Button(action: { log.info("| Regular Add Button pressed") } ) {
plusButton
}
VStack {
regularAddButton
}.frame(width: p.size.width , height: p.size.height, alignment: .top)
.background(Color.yellow)
}
}
}
`
this code produces the following screen:
Any help would be really greatly appreciated!
Thank you!
Frank
I have tried everything and still I am getting this. Just for a test I created a new app (Master-Detail template Xcode 11.5) I have created an entry in the iTunes Connect to receive the app upon archiving and uploading. I regenerated all new certificates for iOS Development and Distribution. I created all new Provisioning profiles.
The Dev profile builds deploys and runs on my device
The Dist profile builds but when I select the distribution profile I get the "Profile doesn't include the com.apple.application-identifier entitlement." error.
When I download the profile within Xcode all looks good for the distribution profile:
App ID: matches correctly
Certificated: 1 Included includes the new signing certificate "iPhone Distribution...."
Capabilities: 3 Included Includes Game Center, In-App Purchase, and Keychain Sharing
Entitlements: 5 Included Includes application-identifier, keychain-access-groups, beta-reports-active, get-task-allow, and com.apple.developer.team-identifier.
Im not sure what is going on. This is a standard process I have performed for quite a while. As a matter of fact I just submitted 3 applications last Sunday.
Thank you for any suggestions.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
iOS
App Store
Entitlements
App Store Connect
Hello.
Is there a good SwiftUI approach on getting the TextEditor cursor position?
I have a TextEditor and sometimes when we have a longer text inside it, the cursor is not seen because the keyboard is above covering the bottom of the TextEditor.
I would like to somehow detect the position of the cursor, and if it's on the last line of the TextEditor, scroll to the bottom. I've already checked a bit and didn't find any good method of doing this in SwiftUI.
If you have any ideas on how to do this, or even a different method any help would be highly appreciated.
Thank you!
I encountered a bug with drag-and-drop sorting in ios 26.
I created a UITableView for dragging and dropping to adjust the order of the list. However, when I set the height of the cells to a custom height, some cells were not displayed during the dragging process.
The tools I use are the official version of Xcode16.1 and the ios 26 emulator
And I can also reproduce the same problem on the real device.
class ViewController: UIViewController {
private let tableView: UITableView = {
let tableView = UITableView.init(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.estimatedSectionHeaderHeight = 50
tableView.isEditing = true
tableView.showsVerticalScrollIndicator = false
tableView.allowsSelectionDuringEditing = true
return tableView
}()
var content: [Int] = []
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(FTWatchGroupPageCell.self, forCellReuseIdentifier: "FTWatchGroupPageCell")
tableView.delegate = self
tableView.dataSource = self
view.addSubview(tableView)
for i in 1...100 {
content.append(i)
}
tableView.reloadData()
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
var frame = view.bounds
frame.origin.y = 200
frame.size.height = frame.size.height - 200
tableView.frame = frame
}
}
extension ViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return content.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "FTWatchGroupPageCell", for: indexPath) as! FTWatchGroupPageCell
cell.label.text = "\(content[indexPath.row])"
cell.label.sizeToFit()
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 52.66
}
public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 0.01
}
public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
public func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return true
}
public func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle {
return .none
}
public func tableView(_ tableView: UITableView, shouldIndentWhileEditingRowAt indexPath: IndexPath) -> Bool {
return false
}
public func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
return true
}
public func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) {
let item = content.remove(at: sourceIndexPath.row)
content.insert(item, at: destinationIndexPath.row)
tableView.reloadData()
}
}
class FTWatchGroupPageCell: UITableViewCell {
private let contentBackView = UIView()
let label = UILabel()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
contentView.isHidden = true
addSubview(contentBackView)
contentBackView.backgroundColor = .red
contentBackView.addSubview(label)
label.textColor = .black
label.font = .systemFont(ofSize: 14)
contentBackView.frame = .init(x: 0, y: 0, width: 200, height: 30)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func layoutSubviews() {
super.layoutSubviews()
guard let reorderControlClass = NSClassFromString("UITableViewCellReorderControl"),
let reorderControl = subviews.first(where: { $0.isKind(of: reorderControlClass) }) else {
return
}
reorderControl.alpha = 0.02
reorderControl.subviews.forEach({ subView in
if let imageView = subView as? UIImageView {
imageView.image = UIImage()
imageView.contentMode = .scaleAspectFit
imageView.frame.size = CGSize(width: 20, height: 20)
}
})
}
}
I am working on an iOS app and I want to achieve on demand module download inside the app when the user clicks on the module icon which he wants to use.
The idea is that we have a super app consisting of multiple modules say four independent apps/features and I want to separate each one so that when the user selects a specific app/feature, it’s downloaded on demand and then opened directly within the same super app resulting in a lower app size initially
I want to upload all the code of all modules to app store connect but when the user downloads the app, then only one module's code should be available to the user, the rest of the module's code should be downloaded when the user wants to use that module. I know apple restricts downloading new code but in my case I want to upload all the code to app store for review but just give option to the user to get rest of the code when needed. Any guidance, architectural advice, or example implementations would be highly appreciated.
Topic:
Developer Tools & Services
SubTopic:
General
Tags:
App Clips
iOS
App Store Connect
On demand resources
Hello,
In production, a large number of users experience outgoing call reporting fails with the following error:
com.apple.CallKit.error.requesttransaction Code=2
The iOS version doesn't matter, errors are present in v15-26
Details
My CXProvider held as a global singleton, so it’s unlikely to be deinited.
There is no explicit call to CXProvider.invalidate() in the app.
If I manually invalidate the CXProvider, I observe the expected failure when trying to create an outgoing call (com.apple.CallKit.error.requesttransaction error 2).
However, If I recreate the CXProvider after the error, outgoing calls are reported correctly.
Many users trigger the providerDidReset delegate method (CXProviderDelegate) before this error.
According to the documentation, providerDidReset can be called by the system, and we are supposed to end all active calls, but the documentation doesn't suggest recreating the CXProvider.
Question
Should I recreate CXProvider after providerDidReset and forget about that, or could this error be caused by something else?
HiIm currently on iOS 11 Beta 2 (Build 15A5304i) With Update 1 Build 15A5304j just been released, will there be any difference since last weeks release?I can't update OTA to the new build released today.ThanksBarry
Hi everyone,
I’m running into an issue using Fastlane to upload my iOS app to TestFlight. When I run my ios beta lane, I get the following error:
[18:12:27]: Couldn't decrypt the repo, please make sure you enter the right password!
[18:12:27]: Invalid password passed via 'MATCH_PASSWORD'
[18:12:27]: Called from Fastfile at line 7
[18:12:27]: 5: desc "Build and upload to TestFlight"
[18:12:27]: 6: lane :beta do
[18:12:27]: => 7: match(
[18:12:27]: 8: type: "appstore",
[18:12:27]: 9: readonly: true,
[18:12:27]: ```
Fastlane summary:
Step Action Time (s)
1 default_platform 0
💥 match 4
The error indicates that the password provided via MATCH_PASSWORD is invalid. I’ve double-checked that the password I’m using is correct.
Has anyone else run into this issue, or can anyone suggest how to properly configure MATCH_PASSWORD so Fastlane can decrypt the repo successfully?
Thanks in advance!
I am having a rare crash when calling FileHandle(forWritingTo:) initializer with a file that does not exist.
In the documentation, I see that the expected behaviour is to return nil, but in my app, in rare cases I have a Crash.
My code that causes the crash is
if let handle = try? FileHandle(forWritingTo: logFile) {
Is it a known behaviour ? should I test if the file exist before calling FileHandle(forWritingTo:) ?
Shareable_2025-09-01_05-32-28.3051.crash