Overview

Post

Replies

Boosts

Views

Activity

Combining render encoders
When I take a frame capture of my application in Xcode, it shows a warning that reads "Your application created separate command encoders which can be combined into a single encoder. By combining these encoders you may reduce your application's load/store bandwidth usage." In the minimal reproduction case I've identified for this warning, I have two render pipeline states: The first writes to the current drawable, the depth buffer, and a secondary color buffer. The second writes only to the current drawable. Because these are writing to a different set of outputs, I was initially creating two separate render command encoders to handle the draws under each of these states. My understanding is that Xcode is telling me I could only create one, however when I try to do that, I get runtime asserts when attempting to apply the second render pipeline state since it doesn't have a matching attachment configured for the second color buffer or for the depth buffer, so I can't just combine the encoders. Is the only solution here to detect and propagate forward the color/depth attachments from the first state into the creation of the second state? Is there any way to suppress this specific warning in Xcode?
1
0
262
3d
iPhone 13 Pro not charging or recognized via USB-C after iOS 26 update (works in DFU mode)
Hi everyone, Since updating my iPhone 13 Pro to iOS 26, the device stopped charging and is not recognized by my Mac when connected via USB-C to Lightning cable. I’ve run extensive diagnostics: • Tried multiple USB-C cables and ports on the Mac — all work with other iPhones and devices. • The iPhone charges fine using a wall charger. • It also works perfectly with USB-A to Lightning cables — charges and appears in Finder. • I performed a full DFU restore and downgrade to iOS 18, without restoring from backup — the issue persists. • Interestingly, the iPhone is detected by the Mac in DFU mode via USB-C, which suggests the USB-C port is physically fine. This leads me to believe the issue is with the USB-C stack in normal iOS runtime, possibly triggered or corrupted by the iOS 26 update. It’s not hardware-related, as data and power lines work in DFU, and USB-A connections work normally. Has anyone else experienced this? Is there any way to fully reset or reflash the USB-C firmware at a lower level than DFU? Or does this require AST2-level diagnostics from Apple? Thanks in advance!
1
0
125
3d
Can't fix "Provisioning profile doesn't include com.apple.InAppPurchase entitlement" even after resetting everything
Hi everyone, I’ve been struggling for days with a recurring issue in my iOS app build. The build fails with the following error: Provisioning profile "iOS Team Provisioning Profile: com.myapp.bundleid" doesn't include the com.apple.InAppPurchase entitlement. Here’s what I’ve already tried: Created a new Bundle ID with correct capabilities (In-App Purchase, Push Notifications, Sign in with Apple). Created a new provisioning profile manually from Apple Developer Console. Used EAS CLI (Expo) and Xcode to regenerate all certificates and provisioning profiles. Ensured that the In-App Purchase capability is enabled in the App ID (it's greyed out but enabled). Made sure all subscriptions and products in App Store Connect are “Ready to Submit”. Followed all steps from RevenueCat and Apple documentation. Cleaned entitlements in .entitlements file and tried both and variations. Tried building both locally and with EAS – same error every time. Sent multiple tickets to Apple Developer Support, but no helpful reply yet. Extra Notes: I'm using react-native-purchases and RevenueCat, already integrated and working before this started. The error began randomly; before that, I was able to build successfully with in-app purchases. Even creating a completely fresh app from scratch results in the same entitlement missing error. Has anyone faced this exact problem where the provisioning profile fails to include com.apple.InAppPurchase, even though everything is correctly set up? Any help or insights would be greatly appreciated. Thanks in advance!
3
0
286
3d
I don't want black background in presented sheet
I want a different color, one from my asset catalog, as the background of my first ever swift UI view (and, well, swift, the rest of the app is still obj.c) I've tried putting the color everywhere, but it does't take. I tried with just .red, too to make sure it wasn't me. Does anyone know where I can put a color call that will actually run? Black looks very out of place in my happy app. I spent a lot of time making a custom dark palette. TIA KT @State private var viewModel = ViewModel() @State private var showAddSheet = false var body: some View { ZStack { Color.myCuteBg .ignoresSafeArea(.all) NavigationStack { content .navigationBarTitleDisplayMode(.inline) .toolbar { ToolbarItem(placement: .principal) { Image("cute.image") .font(.system(size: 30)) .foregroundColor(.beigeTitle) } } } .background(Color.myCuteBg) .presentationBackground(.myCuteBg) .sheet(isPresented: $showAddSheet) { AddView() } .environment(viewModel) .onAppear { viewModel.fetchStuff() } } .tint(.cuteColor) } @ViewBuilder var content: some View { if viewModel.list.isEmpty && viewModel.anotherlist.isEmpty { ContentUnavailableView( "No Content", image: "stop", description: Text("Add something here by tapping the + button.") ) } else { contentList } } var contentList: some View { blah blah blah } } First I tried the background, then the presentation background, and finally the Zstack. I hope this is fixed because it's actually fun to build scrollable content and text with swiftUI and I'd been avoiding it for years.
3
0
170
3d
FileManager.contentsEqual(atPath:andPath:) very slow
Until now I was using FileManager.contentsEqual(atPath:andPath:) to compare file contents in my App Store app, but then a user reported that this operation is way slower than just copying the files (which I made faster a while ago, as explained in Making filecopy faster by changing block size). I thought that maybe the FileManager implementation reads the two files with a small block size, so I implemented a custom comparison with the same block size I use for filecopy (as explained in the linked post), and it runs much faster. When using the code for testing repeatedly also found on that other post, this new implementation is about the same speed as FileManager for 1KB files, but runs 10-20x faster for 1MB files or bigger. Feel free to comment on my implementation below. extension FileManager { func fastContentsEqual(atPath path1: String, andPath path2: String, progress: (_ delta: Int) -> Bool) -> Bool { do { let bufferSize = 16_777_216 let sourceDescriptor = open(path1, O_RDONLY | O_NOFOLLOW, 0) if sourceDescriptor < 0 { throw NSError(domain: NSPOSIXErrorDomain, code: Int(errno)) } let sourceFile = FileHandle(fileDescriptor: sourceDescriptor) let destinationDescriptor = open(path2, O_RDONLY | O_NOFOLLOW, 0) if destinationDescriptor < 0 { throw NSError(domain: NSPOSIXErrorDomain, code: Int(errno)) } let destinationFile = FileHandle(fileDescriptor: destinationDescriptor) var equal = true while autoreleasepool(invoking: { let sourceData = sourceFile.readData(ofLength: bufferSize) let destinationData = destinationFile.readData(ofLength: bufferSize) equal = sourceData == destinationData return sourceData.count > 0 && progress(sourceData.count) && equal }) { } if close(sourceDescriptor) < 0 { throw NSError(domain: NSPOSIXErrorDomain, code: Int(errno)) } if close(destinationDescriptor) < 0 { throw NSError(domain: NSPOSIXErrorDomain, code: Int(errno)) } return equal } catch { return contentsEqual(atPath: path1, andPath: path2) // use this as a fallback for unsupported files (like symbolic links) } } }
2
0
143
3d
Using Picture-in-Picture for Background Audio Calls on iOS
I’m developing an app with audio calling functionality, and I’d like to take advantage of Picture-in-Picture (PiP) so that when the user moves the app to the background, the ongoing call can remain minimized on the Home screen. Based on my research, it seems possible to display a view in PiP mode and have it play, and I haven’t found any documentation stating that this is prohibited. Could you please confirm if this is allowed?
0
0
249
3d
Issue syntax “AND” conditions to trigger automation
I’m looking into activating my gate (has a dedicated app to it) while getting near home. i thought that a combination of Car bluetooth connection/Carplay connection as well as a 50 meter radius from home location would be nice to trigger the gate app. However, I find it hard to set these 2 parallel conditions in Shortcuts. I managed to set connection to car’s Bluetooth, but next screen would suggest the “do” action rather than offer additional conditions. i couldn‘t handle the “if” option. would like some help.
0
0
73
3d
iOS: Dictation case change with custom keyboard
I implement a custom keyboard extension. On modern iPhones the dictation button will display in the lower right even when a custom keyboard is active. If you are in an empty text field with the sentence capitalization trait turned on (e.g., Messages), press the Mic button, and dictate something, it will appear with the first word capitalized. As it should. But when you hit the Mic button again to accept the result, the first word is suddenly changed to uncapitalized. With the system keyboard this final case change does not occur. Why? How to prevent this? More technical detail: I receive UITextInputDelegate-textWillChange and UITextInputDelegate-textDidChange events during dictation (always with the textInput parameter set to nil) and then a final textDidChange with the lowercased text when accepting at the end.
1
0
172
3d
Tuple Comparision
I was trying to evaulate let myTuple = ("blue", false) let otherTuple = ("blue", true) if myTuple &lt; otherTuple { print("yes it evaluates") } Ans I got /tmp/S9jAk7P7KW/main.swift:5:12: error: binary operator '&lt;' cannot be applied to two '(String, Bool)' operands if myTuple &lt; otherTuple { My question is why there is no compile time issue in first place where the declaration is let myTuple = ("blue", false) ~~~~~~ something like above
2
0
396
3d
Hang on retrieving StoreKit2 data in c++
I've been implementing in app purchases into an existing C++ app. I'm using the latest Swift StoreKit since the old ObjC interface is deprecated . There is a really weird problem where the swift/C++ bridging seems to get into a loop. After the Product structure is retrieved I have the following structure which I use to bridge to C++ public struct storeData { public var id : String public var displayName : String public var description : String public var price : String public var purchased : Bool = false public var level : Int = 0 } and this is passed back to the caller as follows public func getProducts (bridge : StoreBridge) -> [storeData] { bridge.products.sort { $0.price > $1.price } var productList : [storeData] = [] for product in bridge.products { let data : storeData = storeData(id: product.id, displayName: product.displayName, description: product.description, price: product.displayPrice, purchased: bridge.purchasedProductIds.contains(product.id) ) productList.append(data) } return productList } the "bridge" variable is a bridging class where the guts of the bridge resides, and contains the "products" array as a publishable variable. In the C++ code the data is retrieved by outProd->id = String(inProd.getId()); outProd->displayName = String(inProd.getDisplayName()); outProd->description = String(inProd.getDescription()); outProd->price = String(String(inProd.getPrice())); outProd->purchased = inProd.getPurchased(); The "String" is actually a JUCE string but that's not part of the problem. Testing this with a local StoreKit config file works fine but when I test with a sandbox AppStore the app hangs. Very specifically it hangs somewhere in the Swift thunk when retrieving the price. When I remove the line to retrieve the price everything works. And - and this is the weird bit - when I pad the price out with some random text, it now starts working (so I have a workaround). This is, however, slightly worrying behaviour. Ideas?
0
0
236
3d
What's the best way to load adapters to try?
I'm new to Swift and was hoping the Playground would support loading adaptors. When I tried, I got a permissions error - thinking it's because it's not in the project and Playgrounds don't like going outside the project? A tutorial and some sample code would be helpful. Also some benchmarks on how long it's expected to take. Selfishly I'm on an M2 Mac Mini.
1
0
229
4d
ExtensionKit & ExtensionFoundation process lifecycle
An XPC service’s process has a system-managed lifecycle: the process is launched on-demand when another process tries to connect to it, and the system can decide to kill it when system resources are low. XPC services can tell the system when they shouldn’t be killed using xpc_transaction_begin/end. Do extensions created with ExtensionFoundation and/or ExtensionKit have the same behavior?
1
0
95
4d
iOS Team Provisioning Profile” Missing UIBackgroundModes Entitlement
I’m trying to enable Background Modes (specifically for audio, background fetch, remote notifications) in my iOS SwiftUI app, but I’m getting this error: Provisioning profile “iOS Team Provisioning Profile: [my app]” doesn’t include the UIBackgroundModes entitlement. On the developer website when I make the provision profile It doesnt give me the option to allow background modes. I added it to the sign in capabilities seccion in X code and matched the bundle ID to the provision profile and certificate etc but it still runs this error because the provision profile doesnt have the entitlements..
3
0
125
4d
App Store Rejection Due to Syrian Sanctions Despite OFAC Update (July 2025) – Need Clarification
Hello Apple Team, We're reaching out as part of a wider group of developers and businesses who have seen repeated App Store rejections under Guideline 5.0 - Legal, specifically related to U.S. sanctions on Syria. However, as of July 1, 2025, the U.S. Department of the Treasury (OFAC) has officially lifted those sanctions for commercial activities. This is clearly stated in the latest OFAC FAQ. Also visiting the link that we get from apple reviewers https://www.treasury.gov/resource-center/sanctions/Programs/pages/syria.aspx is not any more there and dose not include Syria at all. Despite this, rejections continue for those apps :( . Question: Has the App Review system been updated to reflect the July 1 OFAC decision? If not, is there a timeline for when Apple will begin processing these changes in the review flow? Our community is trying hard to work and build apps for middle east zones and Syria is part, this rejections brin heavy burdens on our community and makes unable to bring great apps for those markets. Thank you for your support.
1
6
348
4d