I don't know when/why my assistant editor opened on bottom. I don't have any idea how to get it back to its original position (on right side). It's annoying.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Posts under Xcode tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I have a custom localisation function in my project that enforces the inclusion of the bundle parameter (specifically so that Swift packages are forced to include the Bundle.module value).
While migrating to String Catalogs, I noticed that my custom localisation function wasn't being recognised by the automatic extraction that the Swift compiler is doing, but only in my Swift package targets.
Is there a way to set something like LOCALIZED_STRING_MACRO_NAMES in Swift Packages?
I'm currently using Expo for a React Native project, and I am integrating Apple Pay, so I needed to use Xcode for the setup. Whenever I open Xcode and try to open my project, I get:
My Mac OS is up-to-date. I'm using Xcode version 15.3 because 15.4 from the Mac App Store won't install properly. I've used Xcode before to open projects, and for some reason it's not working. I can open individual files in my project folder but whenever I try to open a directory it gives me the error. I've been using VS code for everything so far so the permissions for the file should be all good. I've also pulled from the repo and created a new folder and still the same thing happens.
Wondering if there are any requirements that I don't know about for the development environment or something.
Hi,
If anyone can please advise -- If signing a framework inside a XCFramework is recommended/mandatory?
Hi,
I am creating an app that would be able to share information between iPhone, iPad, etc.
I created a new target and went to the Target Membership area and noticed the attachment instead of the list of files that the app can share between the current target and a new one. Is there another way to do it?
Thanks,
Dan Uff
I am unable to add my app for review. I am using Xcode 16 beta 2. I tried downloading Xcode 15.4 and submitting a build using it but got a similar error after submitting for build The status of your app has changed to Invalid Binary.
I have a multi-platform app with the SwiftUI code a separate Swift Package. Any Views with SwiftUI Previews break the compilation of the app. Here's the error message I get in Xcode:
Showing All Messages
ld: warning: Could not parse or use implicit file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore.tbd': cannot link directly with 'SwiftUICore' because product being built is not an allowed client of it
Undefined symbols for architecture arm64_32:
"(extension in SwiftUI):DeveloperToolsSupport.Preview.init(_: Swift.String?, traits: DeveloperToolsSupport.PreviewTrait<DeveloperToolsSupport.Preview.ViewTraits>..., body: @Swift.MainActor @Sendable () -> SwiftUI.View) -> DeveloperToolsSupport.Preview", referenced from:
static BitnessViews.$s12BitnessViews33_ABDBADF565C741E50A2A5746CE94FCD9Ll7PreviewfMf_15PreviewRegistryfMu_.makePreview() throws -> DeveloperToolsSupport.Preview in BitnessViews.o
ld: symbol(s) not found for architecture arm64_32
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Could not parse or use implicit file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore.tbd': cannot link directly with 'SwiftUICore' because product being built is not an allowed client of it
Undefined symbol: (extension in SwiftUI):DeveloperToolsSupport.Preview.init(_: Swift.String?, traits: DeveloperToolsSupport.PreviewTrait<DeveloperToolsSupport.Preview.ViewTraits>..., body: @Swift.MainActor @Sendable () -> SwiftUI.View) -> DeveloperToolsSupport.Preview
Linker command failed with exit code 1 (use -v to see invocation)
Any thoughts as to what might be going on here?
Hello colleagues, this is the first time this has happened to me, and I don't know what to do, I have done research and I have not found a solution for this, I am compiling my application only for iPhone, and when it is up to send it for review, it tells me that it is also for iPhone/iPad, and I'm frustrated, because my application has never been uploaded for iPad.
In my xcode, I put in the Target Device, iPhone only, and it uploads as if it were compatible with iPad. Did it happen to someone else?
Xcode > Target > Signing & Capabilities
Automaticaly manage signing
Mac OS Signing Certificate: Development
--> Provisioning Profile None Required
General Identity
App Category Productivity
Transporter
Asset validation failed (90242)
--> "Cannot be used with TestFlight because the bundle at “LargeNumberCalculator.app” is missing a provisioning profile.
Main bundles are expected to have provisioning profiles in order to be eligible for TestFlight." (90889).
What is wrong: "Provisioning Profile None Required" vs "missing a provisioning profile" ?
I try to use the new VNCalculateImageAestheticsScoresRequest API.
Code is compiling and running but delivers the same result for every image
Xcode 16 Beta 2 Simulator
Did I missing anything ?
Hello,
I‘ve started developing an App not to long ago on Xcode and I have noticed that I can’t see any progress or like preview of what I have coded so far and it’s starting to concern me. I have Xcode version 15.5 and I am coding with swift, everything works fine there is no error or anything preventing it to run but when I try to preview the only thing I see when I launch the Simulator and I open my app the only thing I see is a white page.
Can someone please help me.
Hi!
It seems that Xcode 16 beta 2 thinks that EnvironmentResource.generate(fromEquirectangular:) is unavailable even when the minimum target remains set to visionOS 1.0 (it is deprecated but Xcode reports a build error). The only way I was able to keep this in place for visionOS 1.x while compiling with Xcode 16 was the following:
var environment: EnvironmentResource?
if #available(visionOS 2.0, *) {
environment = try? await EnvironmentResource(equirectangular: skyBoxWithSun())
} else {
fatalError("EnvironmentResource.generate(fromEquirectangular:) does not compile with Xcode 16.0 beta 2.")
}
#else
let environment = try? await EnvironmentResource.generate(fromEquirectangular: skyBoxWithSun())
#endif
This will build with both Xcode 15.4 and 16 beta 2, but obviously crash when built with Xcode 16 and run on visionOS 1.x Do I have any better options? I would like to add some visionOS 2.0 features (e.g. try to replace my custom skybox with the new dynamic lighting) but prefer to maintain backward compatibility for now.
Be warned! When developing your app in Xcode 16 be careful!!! The new SDK has changes that cause builds on Xcode Cloud and other non-beta Xcode to have bugs (EVEN WITH IOS TARGET SET LOWER).
This wasted 2 days of development time, but in WKNavigationDelegate, the webView(_:decidePolicyFor:decisionHandler:) method has a new type signature that will ONLY work in the latest SDK. The change was that the decisionHandler now has a @MainActor attribute. This causes Swift to recognize that it "almost" meets an optional requirement and suggests that you change it. If you change it, it will cause builds to not include the optional method.
Hi,
I am trying to achieve biometric authentication in iOS 18 Simulator but getting the below error. The same things works in iOS 17.2 simulator in the same Xcode version that is Xcode 16 Beta 2.
- some : Error Domain=com.apple.LocalAuthentication Code=-1000 "UI service connection invalidated." UserInfo={NSDebugDescription=UI service connection invalidated., NSLocalizedDescription=Authentication failure.}
HI, I have a app with Swift Programming language. It is built successfully on my Monterey Intel by using Xcode 14.
I am trying to built same app on Sonoma Silicon arm64 by using Xcode 15.4. But app is failing to build with below errors. Can anyone suggest reason for this?
Copy /Users/testuser/git/agent/out/Darwin/Release/TESTFileProvider.appex/Contents/Resources/swift-nio__NIOFileSystem.bundle /Users/testuser/git/agent/out/Darwin/Release/swift-nio__NIOFileSystem.bundle (in target 'TESTFileProvider' from project 'TEST')
cd /Users/testuser/git/agent/dgagent/agent/macosx/dgc/TEST
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/testuser/git/agent/out/Darwin/Release/swift-nio__NIOFileSystem.bundle /Users/testuser/git/agent/out/Darwin/Release/TESTFileProvider.appex/Contents/Resources
error: /Users/testuser/git/agent/out/Darwin/Release/swift-nio__NIOFileSystem.bundle: No such file or directory (in target 'TESTFileProvider' from project 'TEST')
Copy /Users/testuser/git/agent/out/Darwin/Release/TESTFileProvider.appex/Contents/Resources/swift-nio_NIOPosix.bundle /Users/testuser/git/agent/out/Darwin/Release/swift-nio_NIOPosix.bundle (in target 'TESTFileProvider' from project 'TEST')
cd /Users/testuser/git/agent/dgagent/agent/macosx/dgc/TEST
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/testuser/git/agent/out/Darwin/Release/swift-nio_NIOPosix.bundle /Users/testuser/git/agent/out/Darwin/Release/TESTFileProvider.appex/Contents/Resources
error: /Users/testuser/git/agent/out/Darwin/Release/swift-nio_NIOPosix.bundle: No such file or directory (in target 'TESTFileProvider' from project 'TEST')
I recently installed the Swift OpenAPI Generator on my Xcode project. I used it for a little bit but then decided that it would not work how I wanted it to, so I uninstalled it. I uninstalled all the packages related to the OpenAPI generator, and removed the generator from my projects build phases.
However, when I try to build and run my project now, I get an error saying that my application could not find the OpenAPI generator script. I did delete this script, but I also removed it as a run build tool plug-in, so it should not be trying to execute in the first place. I used the instructions found in this WWDC23 video (at around the 9:00 minute mark).
I am wondering how to completely remove this plug-in. I have tried searching my XCOde project, but I cannot find any indication of this plug-in still existing within my project. I have tried cleaning the build folder as well, but to no avail.
What can I do to resolve this issue?
here is my case:
i add the AppIntent to both your app and widget extension targets. the intent will run my app process when app is running.
it works perfectly on iOS 17. but iOS 18, my app process never called.
i download app's demo, https://developer.apple.com/documentation/widgetkit/emoji-rangers-supporting-live-activities-interactivity-and-animations
it looks like the same issue. it runs well because even it runs in the widget extension target, it still can present expected UI. but in real case, we need to run the app process to do some work. by debugging, i found the app process never called(set breakpoint).
i add openAppWhenRun, it works well on iOS 18. but it will open the app when the widget is running. it is not what i want.
Xcode simulator does not show on my MacBook pro M1. I go to Applications, Xcode, right click, contents, Developer, Applications, and then double click on Simulator.
It opens the app, it appears in the dock as open, but it does not show the phone I want to.
We currently try to run tests on 4 physically attached iPhones all on ios 17. When tests are concurrently running we occasionally get failures that look like this:
Testing failed:
Failed to install the app on the device.
SwiftUITests-Runner encountered an error (Failed to install or launch the test runner. (Underlying Error: Failed to install the app on the device. (Underlying Error: Connection with the remote side was unexpectedly closed : { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => { length = 22, contents = "Connection interrupted" }
}. Unhandled error domain IXRemoteErrorDomain, code 6))
I noticed that when relying on xcodebuild to install the target app and test runner it cannot install concurrently/parallel on all 4 devices but instead does each device sequentially causing the test to hang. The same behavior can be exhibited when trying to install an app concurrently on 4 different phones with xcrun devicectl as well.
STEPS TO REPRODUCE
Trigger a test with xcodebuild on 4 different phones at the same time where xcodebuild also needs to install the target apps.
Currently using Xcode15.2 and iOS 17.5.1
Building with below imports returns an error. What could I do to mitigate this? I did clean the build cache and delete the derived data folder.
import SwiftData
import SwiftUI
The error:
Command SwiftCompile failed with a nonzero exit code
/Users/thomas/Documents/Projects/SwiftUI/workouts/Workouts/Workouts/Views/Workout/WorkoutView.swift:9:8 No such module '_SwiftData_SwiftUI'
This feedback has also been submitted under: FB14182548