Build, test, and submit your app using Xcode, Apple's integrated development environment.

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

Need Help Updating a Custom WireGuard SPM for Xcode 16 & Swift 6
Hey iOS Dev's, I’m currently working on a Swift Package Manager (SPM) for WireGuard, originally developed by a previous team member. It was working fine in Xcode 15.2, but after upgrading to Xcode 16 and Swift 6, I need to update the SPM to ensure compatibility with my base projects and other projects relying on it. With Apple making Xcode 16 mandatory for app submissions starting April 24, this has become an urgent issue. I’ve searched extensively but haven’t found a working solution yet. Has anyone faced similar challenges with Swift 6 migration and SPM updates? Any insights, best practices, or debugging tips would be greatly appreciated! Let’s connect and collaborate—I’d love to discuss possible solutions! 😊 #iOSDevelopment #Swift6 #Xcode16 #SPM #WireGuard #iOS #Swift #SoftwareEngineering #AppStore
0
0
96
Apr ’25
The Source Editor Contextual Menu Is Missing Copy Submenu
I updated to Xcode Version 16.3 (16E140) on macOS Sequoia 15.3.2 (24D81). I noticed the contextual menu is missing the Copy submenu. This submenu is accessible from the Main Menu under Edit menu. You can see that the contextual menu is missing the Copy submenu, it was there prior to Xcode Version 16.3 (16E140). Why was it removed? Could this Copy submenu be restored in future updates, please?
1
0
83
Apr ’25
What is the proper way to integrate a CoreML app into Xcode
Hi, I have been trying to integrate a CoreML model into Xcode. The model was made using tensorflow layers. I have included both the model info and a link to the app repository. I am mainly just really confused on why its not working. It seems to only be printing the result for case 1 (there are 4 cases labled, case 0, case 1, case 2, and case 3). If someone could help work me through this error that would be great! here is the link to the repository: https://github.com/ShivenKhurana1/Detect-to-Protect-App this file with the model code is called SecondView.swift and here is the model info: Input: conv2d_input-> image (color 224x224) Output: Identity -> MultiArray (Float32 1x4)
1
1
180
Apr ’25
Xcode fails to attach to process when building to the Simulator
When trying to build and run our iOS app on the simulator we're hitting the following error: Could not attach to pid: "XXXXX" failed to get reply to handshake packet within timeout of 6.0 seconds I've included some more details on our project/setup below: We're working on a large project with multiple schemes / app targets. The error only affects one of our targets - however the dependencies between the problematic target and the others are very similar. The issue only affects building to the simulator; building to a physical device works fine. Scheme configuration is the same across all targets. We've faced this issue on multiple versions of Xcode, from 15.x through to the latest 16.3 RC. We've tried a number of workarounds, some of which work intermittently for some colleagues - but none of which have provided a durable solution. These include varying combinations of: Setting the IDEPreferLogStreaming=YES environment variable Unchecking Debug Executable under Edit Scheme -> Run Manually launching the app on the Simulator and then attaching the debugger using Debug -> Attach in Xcode Erasing all contents and settings on the simulator (this sometimes fixes things for a single build, but we run into the same issue again for all subsequent builds, and it doesn't work for all developers). Clearing out Derived Data and running a clean build (this doesn't seem to help). We'd really appreciate any input on how we can diagnose what's causing this issue or any suggested steps to help resolve it.
4
1
263
Apr ’25
How to request several models simultaneously
I am using HelloPhotogrammetry in Xcode I can make one model with something like HelloPhotogrammetry.main([path_to_folder_of images, path_to_output/model.usdz, "-d", "medium", "-o", "unordered", "-f", "high" ]) But how would I request several models simultaneously? I only want to vary the detail. [ ("/Users/you/Desktop/model_medium.usdz", detail: .medium), ("/Users/you/Desktop/model_full.usdz", detail: .full), ("/Users/you/Desktop/model_raw.usdz", detail: .raw ]
0
0
73
Apr ’25
Updated Deeplink is not working
Hello, We are facing deeplink related issue for our production app. In our finding, we got to know that issue is related to apple CDN caching, We have did the changes at our server level but still it is navigating to previous URL. Earlier deeplink was "https://bobcard.bobfinancial.com/dl" now it is changed to "https://linkdeep.bobcard.co.in/mapp". Please check and update this new one in apple cdn cache. For the new link it is redirecting to App store instead of App. Below are the link through which we have tested deeplink scenario: "https://app-site-association.cdn-apple.com/a/v1/bobcard.bobfinancial.com" working fine. "https://app-site-association.cdn-apple.com/a/v1/linkdeep.bobcard.co.in" it is throwing not found error.
1
0
76
Apr ’25
Need guidance for creating the xcprivacy file WITHOUT A MAC when coding on flutter, especially when third party sdks are there.
When you have a mac, creating xcprivacy is pretty straightforward for your app, you simply use xcode, then select the sdks and target them and your privacy manifest is ready. In the other hand, when you are using CI/CD solutions you might not use xcode direclty. In that instance and if you are coding in flutter, you need to create your privacy manifest by hand. I would like guidance how to write that file, I would it for a given third party SDK and where to put that file in the flutter project (just to be sure) For example we choose the most important third party SDK manifest: FUTTER framework. I keep getting errors about it for my app, got alot of builds get the INVALID BINARY error because of that, and my mails indicating me a problem with the manifest. Please show me the source code of the manifest privacy for a project where a third party SDK is present (in particular: flutter sdk) Thanks
3
0
153
Mar ’25
The developer disk image could not be mounted on this device. IPhone 16e Xcode 16.2
I'm having trouble with Xcode 16.2 when trying to pair or upload apps to my iPhone 16e running iOS 18.3. Interestingly, it works perfectly with older models like the iPhone 15 and 14, even though they’re on the same iOS version. When I attempt to install an app on my iPhone 16e via Xcode, I encounter this error: The developer disk image could not be mounted on this device. (com.apple.dt. CoreDeviceError error 12040 (0x2F08)) DDIPath = /Library/Developer/DeveloperDiskImages/iOS_DDI. dmg DeviceIdentifier = 42E4BEC2-3B1E -4903-9A29-CC5C6363F677 Options = { MountedBundlePath = "file:///private/var/tmp/CoreDevice_DDI_Staging_501/42E4BEC2-3B1-4903-9A29-CC5C6363F677/*; UseCredentials = 0; } NSURL = file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg ERROR: Error mounting image: 0x800010f (kAMDMobileImageMounterPersonalizedBundleMissingVariantError: The bundle image is missing the requested variant for this device.) (com. apple,mobiledevice error -402652913 (OxE800010F)) FunctionName = AMDeviceRemoteMountPersonalizedBundle LineNumber = 2145 ERROR: Failed to initialize image properties: 0x800010f (kAMDMobileImageMounterPersonalizedBundleMissingVariantError: The bundle image is missing the requested variant for this device.) (com. apple.mobiledevice error -402652913 (0x800010F)) FunctionName = -[PersonalizedImage mountImage:] LineNumber = 1816 ERROR: Failed to find image for variant/identity: (variant: DeveloperDiskImage | boardID: 4 | chipID: 33088 | securityDomain: 1). (com.apple.mobiledevice error -402652913 (0xE800010F)) FunctionName = -[PersonalizedImage initializeImageProperties:] LineNumber = 1063
2
0
324
Mar ’25
Xcode 15 console logging of system messages
Background I have a SwiftUI app that uses OSLog and the new Logger framework. In my SwiftUI views, I would like to use something like Self._logChanges() to help debug issues. After some trial and error, I can see the messages appear in the System console log for the app I am debugging using the com.apple.SwiftUI subsystem. Problem I'd like to see those same messages directly in Xcode's console window so I can filter them as needed. How do I do that? Thanks! -Patrick
4
1
2.4k
Mar ’25
Watch: WCSession is NOT reachable
** Facing issue for watch unreachable, I have tried for real device as well simulator** if let controller = window?.rootViewController as? FlutterViewController { let channel = FlutterMethodChannel( name: "watchconnectivity", binaryMessenger: controller.binaryMessenger) channel.setMethodCallHandler({ [weak self] (call, result) in switch call.method { case "sendToWatch": guard let watchSession = self?.session else { print("❌ Watch session not initialized") result(false) return } guard watchSession.isPaired else { print("❌ Watch not paired") result(false) return } guard watchSession.isReachable else { print("❌") print("isPaired: \(watchSession.isPaired)") print("isWatchAppInstalled: \(watchSession.isWatchAppInstalled)") print("isComplicationEnabled: \(watchSession.isComplicationEnabled)") result(false) return } guard let arguments = call.arguments as? [String: Any] else { print("❌ Invalid arguments format") result(false) return } if watchSession.isWatchAppInstalled { try? watchSession.updateApplicationContext(["forceLaunch": true]) } print("📤 Sending message to Watch: \(arguments)") watchSession.sendMessage(arguments, replyHandler: { response in print("✅ Message sent successfully") result(true) }, errorHandler: nil ) default: result(FlutterMethodNotImplemented) } }) }
1
0
245
Mar ’25
Active Compilation Conditions in Packages
The flags like #if DEBUG ... endif are dependent on the Active Compilation Conditions. So if they say DEBUG the enclosed code block will be executed, otherwise not. Now I have the phenomenon that a #DEBUG block in a Package does not evaluate these conditions. It rather depends on the name of the configuration used to build. So if I build my app with Active Compilation Condition set to DEBUG, but the configuration name is something like App-Release, the DEBUG block in my Package is not added/executed. The ones which are directly in the project are added. Vice versa if the Compilation Condition say RELEASE but the configuration is called App-Debug the blocks in the Package are added to the compilation, but the ones in the project itself are not It suffices that the config name contains the word Debug for this to happen. E.g. the configuration App-Release-Debug (I know that this would be stupid, but it is for demonstrating purposes) will cause the Packages to include the DEBUG blocks. This happens no matter what you set in the Build Settings of the project and/or target. The Packages are added via GitHub/GitLab Source Control with SPM. Any ideas why this behaves like it does? It doesn't seem like it should...
0
1
102
Mar ’25
The iPad software keyboard becomes impossible to show programmatically when an external keyboard is connected.
When an external keyboard is connected to the iPad, the software keyboard often becomes hidden and cannot be made to show again programmatically. Help! Is there a way to programmatically get the software keyboard to re-appear when an external keyboard is connected without clicking 'Show Keyboard' from the Keyboard Shortcuts menu-item button? Its corner-casey for sure, (with our own keyboard extension) we have a sub-view that is added to the software keyboard view under a certain use case. When the user has an external keyboard connected, everything is fine until the app is backgrounded. When the app is re-foregrounded the software keyboard often becomes hidden (what the user now sees is a keyboard shortcut menu-item group w/a keyboard button and a mic button.) This makes it impossible for the user to interact with the subview we added (because it is hidden), unless the user manually shows the software keyboard again by clicking "Show Keyboard" from the keyboard shortcut. The software keyboard view is still the 'firstResponder' (accepting key strokes, etc), we just cannot find a way to programmatically make it visible again. Sigh.
1
0
130
Mar ’25
TestFlight group selection disabled for 'Ready to Test' build — Tried 3 builds, same issue
Hello, I uploaded a new iOS build (1.0.1 - Build 180) to App Store Connect for my app "Benimle Konus". The build has been processed successfully and is marked as "Ready to Test". However, when I try to assign this build to any internal TestFlight group, the group checkboxes are greyed out and cannot be selected. I’ve made sure that: All required metadata is filled out. What’s New and compliance information is complete. Previous builds worked with the same TestFlight groups. To fix this, I have uploaded 3 separate builds, but the issue still persists with all of them. There are no error messages, but I can't continue testing because I can't assign the build to testers. App ID: 6742759002 Bundle ID: com.benimlekonus.app Build Version: 1.0.1 (180) Is this a known issue or something I'm missing? Any help would be appreciated.
16
13
1.5k
Mar ’25
Invalid binary for tvOS app which integrates an xcframework
We're building an SDK (let's call it MyFramework) which is distributed as an .xcframework for developers to integrate it into their own apps. Recently, we've added tvOS support by adding it as a supported destination for the SDK. Essentially, the SDK became a cross-platform framework and easy to be adopted in both iOS and tvOS apps. The .xcframework is generated fine, all builds correctly. We've tested the SDK integrated in test apps. We've also submitted an iOS archive app to the AppStore connect, just to make sure all is well with the AppStore submission. However, when I tried submitting a tvOS archive app (that integrates the same SDK) to the AppStore connect, the build was marked as invalid binary and we've got the following error message: ITMS-90562: Invalid Bundle - One of the nested bundles is built for a platform which is different from the main bundle platform. Please make sure that all bundles have correct platform specification. First, I thought that any of the modules of the framework was not correctly configured for tvOS but that was not the case. Everything compiles ok and it runs in debug as expected. It only fails when trying to submit the tvOS app that integrates the SDK. After a lot of investigating, we realised that the reason for the AppStore submission error is because we codesign the framework. We use codesign to distribute it as cryptographically signed xcframework. codesign --timestamp -v --sign "Apple Distribution: Company (xxxxxxxxxx)" "MyFramework.xcframework" As soon as we remove the above line from our CI/CD pipeline that generates the xcframework, and submit a tvOS archive app that integrates the unsigned framework, the AppStore submission error goes away and the TestFlight build can be tested. I've also tried to just strip the _CodeSignature folder from the .xcframework package but it still fails. So the only solution currently is to not codesign the xcframework to be able to upload tvOS archive apps that integrate the SDK to the AppStore connect. However, we're still puzzled as to why only the tvOS archive app gets the invalid binary error when it integrates a signed SDK. I feel like the error message is quite misleading if we have to stop signing the SDK xcframework for it to be accepted during the AppStore submission. Anyone has any idea? Or has anyone encountered a similar issue? Thanks!
0
0
173
Mar ’25
Xcode cloud: xcode build archive error
Hello! I'm trying to build my flutter app through xcode cloud, but im getting following error: Command exited with non-zero exit-code: 65 Run command: 'xcodebuild archive -workspace /Volumes/workspace/repository/ios/Runner.xcworkspace -scheme Runner -destination generic/platform=iOS -archivePath /Volumes/workspace/build.xcarchive -derivedDataPath /Volumes/workspace/DerivedData -resultBundleVersion 3 -resultBundlePath /Volumes/workspace/resultbundle.xcresult -resultStreamPath /Volumes/workspace/tmp/resultBundleStream97053cd8-9db9-41c6-9dc8-a9fc142bacb6.json -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM={development_team_here} COMPILER_INDEX_STORE_ENABLE=NO -hideShellScriptEnvironment' When i build locally, it works fine, tried both debug/release modes, but in the cloud archive fails. Also have following message in xcode cloud: `'Flutter/Flutter.h' file not found GeneratedPluginRegistrant.h:10` failed to emit precompiled header '/Volumes/workspace/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/Runner/PrecompiledHeaders/Runner-Bridging-Header-swift_2QGFV1FVTQX2Z-clang_IX5TH88559CY.pch' for bridging header '/Volumes/workspace/repository/ios/Runner/Runner-Bridging-Header.h'
1
0
183
Mar ’25