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

Xcode Documentation

Pinned Posts

Posts under Xcode tag

3,071 Posts
Sort by:
Post not yet marked as solved
0 Replies
4 Views
I am developing a suite of apps/helpers that get built into an installer package for deployment (outside The App Store). We have that release process ±?working, except that most of the development team members are not admins/privileged on the team. They don't really need to publish on behalf of the team, and so we don't want to have debug builds also depend on being signed as "Developer ID Application". But that is running into problems… If I select instead "Sign to Run Locally" this results in an error for some of the build products along the lines of: [Build Target] requires a provisioning profile. Enable development signing and select a provisioning profile in the Signing & Capabilities editor. If I select "Apple Development" as the Code Signing Identity it leaves me with basically the same error as "Developer ID Application" does: Provisioning profile [Name of App/Helper] doesn't include signing certificate "Apple Development: [Name of Developer] ([TEAMID])" And finally, if simply set the Debug value for Provisioning Profile to "None" for the problematic products I get errors like: "[Name of app]" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. I believe perhaps because some of the targets have an entitlements file granting access to various things (their own XPC services, their own shared preferences, as well as Outgoing Network Connections and com.apple.security.smartcard access…). In older versions of Xcode and/or macOS we didn't have trouble like this, local development could be done by basically any team member. Now it seems like maybe all developers need to have release-signing privileges to test/debug even on their own machines? Or is there a combination I'm missing, that would allow anyone on the team (or perhaps not even on the team) to build and debug the code locally, while still limiting who is able to actually sign notarized release builds on behalf of the team?
Posted
by natevw .
Last updated
.
Post not yet marked as solved
0 Replies
19 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 marked as solved
2 Replies
456 Views
I tried to read an Object : -(NSMutableDictionary*) readMyObject:(NSData*)data; { NSError * error; Class class = [NSMutableDictionary class]; NSMutableDictionary * dict; dict = [NSKeyedUnarchiver unarchivedObjectOfClass:class fromData:data error:&error]; return dict; the result was nil. I searched by Developer for a solution and found one : { // NSKeyedUnarchiver * unarchiver = [[NSKeyedUnarchiver alloc] init]; [unarchiver decodeObjectOfClasses: [[NSSet alloc]initWithArray: @[[NSDictionary class], [NSMutableDictionary class], [NSArray class], [NSMutableArray class], [NSString class], [NSNumber class]]] forKey:NSKeyedArchiveRootObjectKey]; [unarchiver finishDecoding]; } The first line was from me and it crashed the project. I assume there is an easy answer, not for me.?? Uwe
Posted Last updated
.
Post not yet marked as solved
0 Replies
26 Views
Hi, we recently noticed an issue when exporting the localization files from one of our projects. So in the exported .xliff file, there is a string that has been varied into the plural forms of zero, one and other. We had translated them into Japanese. But in the .xliff file, the source element of this string in plural ONE is missing, while the target as well as the others plural strings are showing correct. We've also checked in Xcode (15.3), the content of whether the source or target are there for all the plural forms, as you can see below. The same issue (same string) also exists in Korean and Russian, but not in other languages we support (like German, French, Chinese), which is a bit weird to us. Does anyone have any idea why this is happening and how can we fix it?
Posted
by Yijie-W .
Last updated
.
Post not yet marked as solved
0 Replies
13 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
15 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 not yet marked as solved
1 Replies
53 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
455 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
21 Replies
2.7k 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
137 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
65 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
48 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
103 Views
We are facing an issue on Catalyst when building our app using Xcode 15.4. The issue is related to precompiled frameworks and seems to be widespread as it happens with multiple vendors (like Firebase or Braze). We are using SPM to add these dependencies, for instance: .package(url: "https://github.com/braze-inc/braze-swift-sdk", from: "8.2.1"), When building, we get the following error: clang:1:1: invalid version number in '-target arm64-apple-ios10.15-macabi' Our macOS deployment target is 12.3. Our iOS deployment target is 15.4. I will try to create a reproducer I can share but I wanted to share this in case there's a known workaround. Thanks in advance!
Posted
by 0xpablo .
Last updated
.
Post not yet marked as solved
0 Replies
41 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
43 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 not yet marked as solved
1 Replies
70 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
504 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
.