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

Xcode Documentation

Pinned Posts

Posts under Xcode tag

3,059 Posts
Sort by:
Post not yet marked as solved
21 Replies
3.0k Views
Hello, The Apple Watch's connectivity to Xcode has always been finicky. Sometimes it would start doing "transport errors" and you'd have to repair the watch/phone to xcode to resolve it. Now after the 10.4 upgrade, it seems that there are cases where the watch doesn't even show in the device list. Here's what I've observed: The watch will connect the first time you launch xcode(after 10.4 install or a new restore). If you unpair the watch, it will never show in the device list again. This is despite any remediation efforts, such as unpairing the phone from xcode, restarting the watch/phone, and clearing trusted devices. Erasing the watch and restoring it will allow it to connect again to xcode, but only if you never unpair it. If you unpair the watch, it will repeat the behavior of not showing in the device list again. So, the only solution is to erase/restore the watch to get it to show in the device list on xcode. Every single time. Again, this is new behavior for Watch OS 10.4
Posted Last updated
.
Post not yet marked as solved
0 Replies
85 Views
Hi, Recently noticed this issue on Xcode 15.2 When I select a Test Plan, disable a class, enable just 1 test within that class and refresh the test plan the entire class gets enabled again. steps to notice the issue: Select Test Plan 1 Disable a class Enable 1 test within the class Select Test Plan 2 Select Test Plan 1 Disabled class and all the tests inside the class are enabled. Note: For now the workaround for that is disabling each test of the class individually Does anyone have any idea why this is happening? If theres a way to disable a class instead of disabling each test inside the class?
Posted Last updated
.
Post not yet marked as solved
0 Replies
61 Views
We are facing issues since we shifted our react native iOS project from sdk 16 to sdk 17. While we are still able to build our app but there are some issues with our app’s functionality. Did any one else face similar challenges? We are on react-native version 0.71.8
Posted Last updated
.
Post marked as solved
6 Replies
1.5k Views
I get the following message when I try to run this app in Xcode. Could not launch AppName. Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. Interestingly, the destination Mac (Mac Catalyst) destination does launch. The funny thing is there is a companion app almost exactly like this one that launches fine. Any help with this would be greatly appreciated. Xcode helped me to file a feedback. The number is FB13206919.
Posted
by SpaceMan.
Last updated
.
Post not yet marked as solved
0 Replies
60 Views
Hi There, I have a strange problem: the Swift package cannot be added to my iOS project. The problem might be due to the project settings, but despite trying for a long time, I still haven't been able to figure it out. My project is a React Native project and uses CocoaPods. When I drop the Swift package into my React Native project, the package becomes a folder. When I drop the Swift package into other iOS projects, it works without any problems. If I try to use "Package Dependencies" to add the Swift package, it gets stuck on "Preparing to validate..." My project seems unable to add any Swift packages; it cannot add other Swift packages either. The Swift package is local. However, it works fine in other projects, even in newly created React Native projects. The problem might be with my project itself, but I have no idea where to check now. please guide me with any advice, I will appreciate it!
Posted Last updated
.
Post marked as solved
1 Replies
93 Views
I am trying to launch openImmersiveSpace, but seem like there is an issue with the openImmersiveSpace Task. Error: Static method 'buildExpression' requires that 'Task<OpenImmersiveSpaceAction.Result, Never>' conform to 'View' Here is the code and the error shows up on the "Task" line. import SwiftUI import RealityKit import RealityKitContent struct TestView: View { @Environment(\.openImmersiveSpace) var openImmersiveSpace @Environment(\.dismissImmersiveSpace) var dismissImmersiveSpace var body: some View { VStack{ Text("Open Full Immersive & switch to NextViewArea") NavigationLink { Task { await openImmersiveSpace(id: "ImmersiveSpace") } NextViewArea() } label:{ Label(" Enter Full Immersive Space") } } } } How can I move onto the next view area in the floating window while also launching full immersive space. Any help would be much appreciated.
Posted Last updated
.
Post not yet marked as solved
3 Replies
479 Views
I am on a fresh install of Xcode 15.3 on macOS 14.4 (23E214). I created an iMessage App template and signed it with my personal team's certificate. When I click the run button, it successfully builds and opens the simulator to the Messages app but does not open the compact extension view (or install the extension such that it shows up in the More messages extension list). This reproduces on my older laptop (same version of Xcode) as well as my friend's (also same version of Xcode). Of note: The IceCreamBuilder app installs and runs correctly with no modifications I have not provided any icons for the messages extension The iMessage App template comes with an empty main app that does not install on the home screen The only console output that seems to differ from when I run the IceCreamBuilder is this message, which appears after a couple seconds of running the project: unhandled process MobileSMS Type: Error | Timestamp: 2024-03-09 00:41:07.763631-05:00 | Process: MobileSMS | Library: CoreParsec | Subsystem: com.apple.parsec | Category: CoreParsec | TID: 0xff097
Posted
by noahbkim.
Last updated
.
Post not yet marked as solved
22 Replies
2.8k Views
I got a new MacBook and set it up as a new one, not transferring any data from the old one. But now the Apple Watch (Series 6) paired with my iPhone (14 Pro Max) ist not shown in Xcode. iPhone and Watch are using the latest RC and also Xcode is the latest RC. But in Xcode I ca only see my iPhone, not the paired Watch. See Screenshots. The first shows the new MacBook and the second the old one. I already tried a lot, but nothing helps: Unpair Watch from Phone and then pair it again Plug the iPhone to different USB ports Restart Watch, iPhone and Mac Delete the iPhone from Xcode Enable and disable Developer Mode on iPhone and Watch What else can I try to get the Watch back?
Posted
by Urkman.
Last updated
.
Post not yet marked as solved
1 Replies
157 Views
I got this SSML from w3. org. AVSpeechUtterance(ssmlRepresentation:) is not complying with the contour. It doesn't change hz. <?xml version="1.0"?> <speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis11/synthesis.xsd" xml:lang="en-US"> <prosody contour="(0%,+20Hz) (10%,+30%) (40%,+10Hz)"> good morning </prosody> </speak> override func viewDidLoad() { super.viewDidLoad() guard let localUtterance = AVSpeechUtterance(ssmlRepresentation: self.speechSML) else { print("SML did not work.") return } self.utterance = localUtterance self.utterance.voice = self.voiceNoelle } self.synthesizer.speak(self.utterance)
Posted Last updated
.
Post not yet marked as solved
2 Replies
100 Views
My App has beed rejected for not complying with the Criminal Activity Reporting Guideline 1.7. I have to provide a documentation showing partnership with local law enforcement (where ever the app is used). Here's the response i got: We noticed that your app allows users to report criminal activity, but we need additional information before continuing our review. Specifically, it is unclear if you have partnered with local law enforcement to respond to the reports of alleged criminal activity. To provide users a safe and reliable experience, apps may only be used to report criminal activity in locations where you have the active involvement of local law enforcement. Next Steps To ensure that your app is partnering with the appropriate institutions, you must provide documentation or evidence of your relationship with local law enforcement wherever your app is distributed. Please attach the documentation in the App Review Information section of App Store Connect. Once you have shared this documentation, we will proceed with our review and will let you know if there are any further issues. Resources Learn more about our requirements for ensuring user safety in App Review Guideline 1.0 - Safety. My App provied a list of police, ambulances, etc to use for emergency purposes only. Not allow users to report anywhere! Please help!
Posted
by Ash077.
Last updated
.
Post not yet marked as solved
1 Replies
74 Views
I need to use the Network Link Conditioner tool to test an issue with possibly dropped packets. However, all links on google say you need to download "Additional Tools for XCode" - but the links just go to the developer downloads home page, and the option isn't available anywhere on there. Likewise, "Xcode -> Open Developer Tool -> More Developer Tools..." just goes to the same location. It seems like the download has either been removed, or moved elsewhere - how do we get this tool now?
Posted
by CodaPT.
Last updated
.
Post marked as solved
22 Replies
20k Views
On Xcode 13.0, I can no longer pair with an Apple TV 4K (tvOS 15.0). Until now it has always worked but since the new update to tvOS 15.0 and Xcode 13.0 I can no longer connect. I have gone through the following steps to connect: Open remote app and devices settings on Apple TV 4K (tvOS 15.0). Open Devices and Simulators in Xcode 13.0. Select Apple TV in the list and press "Pair". Code appears on the Apple TV and I can enter it in an Xcode window. After the code input, there is a short loading sign that a connection is being established. After a few seconds, the whole thing stops without an error message and the "Pair" button is visible again. Does anyone have the same problem? I would like to optimize my apps for tvOS 15 and test them on a physical device.
Posted
by janapple.
Last updated
.
Post not yet marked as solved
0 Replies
71 Views
Hello, I am working on an AR application to visualize a life-size room. I am working with Unity 2023.3, Apple ARKIT XR Plugin 6.0.0-pre.8 and a 2021 5th gen iPad. First I scan a room with roomplan to get a usdz file. I open it with Blender to make sure I have the right data (I do) and I export it to fbx to use it in Unity. Then I import the fbx to Unity and I use it as a prefab to instantiate it when I click on a detected floor. I build my application in Unity, then in Xcode to use it on my iPad. But when the room is displayed, it is way too small. I tried adding a slider to scale up the room's gameobject and I added a plugin to visualize my Unity scene in my built application. The room is scalling up in the Unity scene but not in the application. Does anyone ever had this issue and if so how did you fix that? Best regards, Angel Garcia
Posted Last updated
.
Post not yet marked as solved
0 Replies
78 Views
Hi, guys. I am preparing to develop a Vision Pro app with Unity. The Play to Device, which connects Unity Engine and Vision Pro, worked well, and there was no problem with the connection with Vision Pro simulator. But when I tried to connect Xcode and Vision Pro, I couldn't see Vision Pro itself in the device list. (The iPhone 11, which was wired as a test, recognizes well.) I looked up the forum and it was simple to connect. The link to the post I found is below. https://forums.developer.apple.com/forums/thread/746464 I don't know why it's not working even though I look up YouTube. Leaving my work environment, I'd appreciate it if you could leave a helpful answer. MacBook : M2 MacBook Xcode Ver. : 15.3 VisionPro Ver. : 1.1.2 Developer accounts: All use the same Apple developer account
Posted Last updated
.
Post marked as solved
1 Replies
96 Views
In V 0.1 of my app, I went with a simple option for a piece of business logic in my app. I then changed something else that caused my simplified business logic to now crash the app at startup. Excellent, a chance to use Test. Driven Design to replace my flawed business logic. So I wrote my first test TDD test, but when I tried to run the test... It doesn't run because running the test target seems to start by actually running my full app (which as I described in chapter 1 is currently crashing) Have I configured something incorrectly? or is it normal that when I attempt to run a single test, step 1 is running the full app? (note: it is very easy for me to disable/avoid the business logic causing my crash. This question is more about my lack of understanding of what it means to run a test target.) thanks in advance for any and all responses. Mike
Posted Last updated
.
Post not yet marked as solved
1 Replies
517 Views
I m trying to create an xcode project with cpp-swift interoperability(introduced in xcode15) using cmake xcode generator. I m able to invoke cpp code in swift and vice-versa but when opening the project in xcode, the build setting for 'C++ and Objective-C Interoperability' is still set to 'C/Objective C' like in image below. I want to set it to 'C++/Objective-C++'. I m using the below cmake for this: . . add_library(cxx-support ./Sources/CxxSupport/Student1.cpp ./Sources/CxxSupport/Teacher.swift ) #include the directory to access modulemap content target_include_directories(cxx-support PUBLIC ${CMAKE_SOURCE_DIR}/Sources/CxxSupport) target_compile_options(cxx-support PUBLIC "$<$<COMPILE_LANGUAGE:Swift>:-cxx-interoperability-mode=default>" ) . . I Have also tried the below in cmake, but it didn't work. #set(SWIFT_OBJC_INTEROP_MODE "objcxx" CACHE STRING "") #target_compile_options(cxx-support PUBLIC #"SWIFT_OBJC_INTEROP_MODE=objcxx") Any help on how this can be achieved?
Posted Last updated
.
Post not yet marked as solved
0 Replies
93 Views
I am facing an issue in incrementing the build number automatically. All scripts are working fine but the script for auto-increment build number is not incrementing. id: increment_build run: | # Fetch current build number from your project CURRENT_BUILD_NUMBER=$(xcrun agvtool what-version -terse) # Output the current build number echo "Current build number is: $CURRENT_BUILD_NUMBER" # Increment build number NEW_BUILD_NUMBER=$((CURRENT_BUILD_NUMBER + 1)) # Output the new build number echo "::set-output name=new_build_number::$NEW_BUILD_NUMBER" - name: Set build number run: | INFO_PLIST="Info.plist" NEW_BUILD_NUMBER="${{ steps.increment_build.outputs.new_build_number }}" # Check if CFBundleVersion entry exists, create it if it doesn't if /usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "$INFO_PLIST" >/dev/null 2>&1; then /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $NEW_BUILD_NUMBER" "$INFO_PLIST" else /usr/libexec/PlistBuddy -c "Add :CFBundleVersion string $NEW_BUILD_NUMBER" "$INFO_PLIST" fi I have 3 env's in my project for which I have created 3 .xconfig files for keeping the config separately. In build setting, I have used $(APP_BUILD) for APP_Build under the User-Defined section.
Posted
by Rahul0103.
Last updated
.
Post not yet marked as solved
0 Replies
137 Views
Environment Apple Silicon M1 Pro macOS 14.4 Xcode 15.3 (15E204a) visionOS simulator 1.1 Step Create a new visionOS app project and compile it through xcodebuild: xcodebuild -destination "generic/platform=visionOS" It fails on RealityAssetsCompile with log : error: Failed to find newest available Simulator runtime But if I open the Xcode IDE and start building, it works fine. This error only occurs in xcodebuild. More I noticed that in xcrun simctl list the vision pro simulator is in unavailable state: -- visionOS 1.1 -- Apple Vision Pro (6FB1310A-393E-4E82-9F7E-7F6D0548D136) (Booted) (unavailable, device type profile not found) And i can't find the vision pro device type in xcrun simctl list devicetypes, does it matter? I have tried to completely reinstall Xcode and simulator runtime, but still the same error.
Posted
by LZephyr.
Last updated
.
Post marked as solved
1 Replies
112 Views
In order to test an iPhone app I am developing on my mac on an actual device, I connected my iPhone to my mac with a wired connection and installed the app, but got an error message saying “Uneble to verify app”. I went to Settings -> General -> VPN and Device Management -> the app in question in ENTERPRISE APP -> Verify App -> Verify, but no matter how many times I tap on it, the status of the app remains “Not verified”. If anyone has a solution to this problem, we would appreciate it if you could help us.
Posted
by Kyo_jp.
Last updated
.