Build, 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

XMLHttpRequest cannot load https://demo2.artios.cz/app37g/v105/php/endpoint.php due to access control checks
Hi, we are experiencing a strange issue with our Web App. Our web app runs entirely on the same domain , and we are making several AJAX requests to the same server. The Error occurs only on Iphones, the app works completely fine on androids and computers. Most of the requests work fine, but suddenly, one specific request always fails with the following error: XMLHttpRequest cannot load https://demo2.artios.cz/app37g/v105/php/endpoint.php due to access control checks What we have checked so far: ✅ CORS headers seem correct. Also we operate entirely on the same domain, client and server. ✅ The same request works fine in computer and android devices. ✅ The issue occurs only on iPhone (tested on Chrome and Safari). ✅ Some requests to the same endpoint pass, but suddenly, this specific request always fails. ✅ There is no OPTIONS preflight request logged in the network tab, but we use only simple requests. ✅ We are making a POST request with multipart/form-data. What is Your advice, or where I can find more info about this error? We do not think the CORS is the problem. We have tried to inspect with WebInspector but with no relevant answers. Thank You very much!
0
1
496
Feb ’25
Xcode Metal geometry inspector uses wrong NDC space?
When inspecting the geometry in Xcode's metal debugger, I noticed that the shown "frustrum box" didn't make sense. Since Metal uses depth range 0,1 in NDC space, I would expect a vertex that is projected to z:0 to be on the front clipping plane of the frustrum shown in the geometry inspector. This is however not the case. A vertex with ndc z:0 is shown halfway inside the frustrum. Vertices with ndc z less than 0 are correctly culled during rendering, while the geometry inspector's frustrum shows that the vertex is stil inside the frustrum. The image shows vertices that are visually in the middle of the frustrum on z axis, but at the same time the out position shows that they are projected to z:0. How is this possible, unless there's a bug in the geometry inspector?
1
0
487
Feb ’25
Command line name "app-store" is deprecated. Use "app-store-connect" instead.
Hi, I've noticed a warning during export archive phase (xcrun xcodebuild -exportArchive) in our iOS CI/CD pipelines. Updating the export options info plist file to use <key>method</key> <string>app-store-connect</string> helps, but I am not sure if we should update it or not since I cannot find any references about this change in the docs. It'd be very helpful to get some guidelines. Thank you
1
0
1.2k
Feb ’25
Xcode quit working
When I try to open Xcode, it tries to open the previous windows and load up the project I was last working on, but I can’t create a new project without opening Xcode, and I can’t do that; it just quits and gives me an Xcode quit unexpectedly, and it still happens when I download earlier versions of Xcode from the Apple developer website and the latest from the App Store, and I even when in Finder and tried to open my project that way, and it just does the same thing. I have tried everything, and I mean everything. I even reinstalled macOS, and it worked for a minute until it tried to open my project and then quit again and is doing the same thing.
1
0
255
Feb ’25
Swift playgrounds and display orientation swift student challenge submission
I was developing my app on Xcode and I saw in requirements it says “your submission must be an app playground (.swiftpm) I reckon I can develop in Xcode and then copy those files in playgrounds app, make some changes, for it to work. also I made my project in landscape mode in Xcode, in playgrounds can I lock display orientation through package.swift file or I should continue making me app in landscape mode and ask players to change their viewing orientation via a popup?
2
1
355
Feb ’25
Xcode 16.2 cannot sign developer app (AppKit) after upgraded to macOS 15.3
After I upgraded to macOS 15.3, all of my current Xcode project have the signing issue, I spent half day and I didn't make any progress, I tried two projects, one is Swift AppKit App calling one C++ dylib, another one is a pure Swift AppKit app, when I build, there will be error: Warning: unable to build chain to self-signed root for signer "Apple Development: Steven Tang (XXXXX)" /Volumes/TwoTSSD/steventang/Library/Developer/Xcode/DerivedData/ImageEnhancement-ddbilgyraofrdyfeljyuknusunza/Build/Products/Release/ImageEnhancement.app: errSecInternalComponent I tried remove account, add account back in Xcode, none of it worked, also tried ChatGPT's WWDR updating and it won't help.
7
1
1.1k
Feb ’25
Xcode asset validation failed
Hi all, First time trying to upload a game to the App Store, having some trouble with it. I have managed to build my Unity Project and get it onto Xcode, but when I click "distribute app" it is giving me this error. Asset validation failed, Invalid Bundle. The bundle at (app name).app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'. Xcode version 16.2 Unity editor version 2022.3.30f1 Anyone know how to get past this? Many thanks!
1
0
294
Feb ’25
There is no longer a Frameworks and Libraries section for App Extensions with Xcode 16
I've got an existing app which is using some 3rd party xcframeworks within its app extensions (for example within a Notification Service Extension). Within the target for the app extensions there is a Frameworks and Libraries section where the xcframework was dragged and dropped into. However now I want to create a new project and do a similar thing, within the app's target there is a Frameworks and Libraries section, but when an app extension target is created, Xcode is not adding a Frameworks and Libraries section. There is a Link Library with Binary section, however this doesn't have an embed section (where you can select to embed, don't embed, embed without signing etc.) and I get build error trying to drag and drop the xcframework in here. Where id the Framewoks and Libraries section go for app extensions for projects created with Xcode 16? How can this section be added?
1
0
267
Feb ’25
About Xcode and GitHub
So I started a project in Xcode but without GitHub. Now I have prepared Xcode for GitHub and kind of made it work. I have also made a folder where I have cloned my project from GitHub. So is there any way to connect Xcode and the new folder. If I save my project it doesn't know about my new folder I presume: I could continue to use GitHub via Xcode but I'm afraid I will forget about commands in Git if I only use Xcode. If I should work on another project without Git.
1
0
223
Feb ’25
Building visionOS app with Firebase Source Distribution in Xcode Cloud
I have a working Xcode Cloud setup for my iOS and macOS targets, and I'm trying to add visionOS support. The issue is that Firebase requires using their source distribution for visionOS (instead of their default binary distribution). Locally, this works by launching Xcode with: open -a Xcode --env FIREBASE_SOURCE_FIRESTORE project.xcodeproj For Xcode Cloud, I've added a ci_post_clone.sh script that sets this environment variable for visionOS builds: #!/bin/bash if [[ $CI_PRODUCT_PLATFORM == "xrOS" ]]; then echo "Running setup for visionOS..." export FIREBASE_SOURCE_FIRESTORE=1 fi However, I'm getting the following error during build: an out-of-date resolved file was detected at /.../project.xcworkspace/xcshareddata/swiftpm/Package.resolved, which is not allowed when automatic dependency resolution is disabled So since setting FIREBASE_SOURCE_FIRESTORE=1 changes which SPM dependencies are required: Normal setup uses: abseil-cpp-binary, grpc-binary Source distribution needs: abseil-cpp-swiftpm, grpc-ios, boringssl-swiftpm What's the recommended way to handle this in Xcode Cloud when maintaining builds for all platforms? Should I be using separate workflows with different branches for different platforms? Or is there a better approach? System: Xcode 16.2 Using SPM for dependency management Firebase iOS SDK 10.29.0 Building for iOS, macOS, and visionOS Thanks in advance for any guidance!
0
1
440
Feb ’25
Swift UI Missing argument for parameter in @main app call in List View
Hello, I am building an app that records a list view of projects in contentView. I am in Xcode 16.2. I am having trouble when calling contentView in my @main app file and on the ContentView() line shown in the App file shows that ther is a "Missing argument for parameter 'project' in call". It prompts me to fix it with "Insert', project: ,#Project#.>". However when I do this like the following: ContentView(project: Project) It says "Cannot convert value of type 'Project.Type' to expected argument type 'Project'" These are my Code below //Model import Foundation import SwiftUI struct Project: Identifiable { var name: String var icon: String var isFavorite: Bool var color: Color let id = UUID() var compoundscore : Float static func CurrentProjects() -> [Project] { return [Project(name: "Test Project", icon: "🍎", isFavorite: true, color: .red, compoundscore: 4.5), Project(name: "Swimming", icon: "🏊", isFavorite: false, color: .orange, compoundscore: 12.5), Project(name: "Archery", icon: "🏹", isFavorite: false, color: .yellow, compoundscore: 37.5) ] } } // App view where the error is import SwiftUI @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView(project: Project) } } } // Content View struct ProjectRow: View { let project: Project var body: some View { HStack { Text(project.icon) .font(.title) Text(project.name) Spacer() Image(systemName: project.isFavorite ? "heart.fill" : "heart") } } } struct ContentView: View { var CurrentProjectlist = Project.CurrentProjects() var project: Project var body: some View { NavigationView { List { Section { if #available(iOS 17.0, *) { ForEach(CurrentProjectlist) { project in ProjectRow(project: project) } .listRowBackground( Capsule() .fill(Color(project.color)) .padding(.vertical, 2).padding(.horizontal, 20) ) .listRowSeparator(.hidden) .foregroundColor(.indigo) } else { // Fallback on earlier versions } } header: { Text("CI Projects") } .listRowBackground(Color.blue) .foregroundColor(.black) .listRowInsets(.init(top: 0, leading: 40, bottom: 0, trailing: 40)) .listRowBackground(Color.black) .listSectionSeparatorTint(.yellow) .headerProminence(.increased) .listRowInsets(EdgeInsets.init(top: 0, leading: 50, bottom: 0, trailing: 50)) } .scrollContentBackground(.hidden) .background( Image("cool background") .resizable() .scaledToFill() .clipped() .edgesIgnoringSafeArea(.all) .blur(radius: 3) .overlay(Color.red.opacity(0.2)) ) .environment(\.defaultMinListHeaderHeight, 20) .environment(\.defaultMinListRowHeight, 70) .navigationTitle("Navigator") } } }
1
0
459
Feb ’25
About compiling code on another Apple Silicon Mac.
Hello everyone, I currently have a M1 Pro MacBook Pro (16gb) and a M1 Mac Mini (8gb), and I was searching a way to use the computing power of the Mac Mini to build my projects, even being a less powered machine, I think it can help since it will be doing just one thing. I wanted to normally write code on the MacBook, but instead of building it locally (including the previews), it will be done on the Mac Mini via network connection or even Thunderbolt Bridge (if possible). On a past Apple event (Oct. 30, 2018), was said that it was possible (31:00), but I was not able to find any kind of documentation or guidance on that. Event Video: https://youtu.be/bfHEnw6Rm-4?si=6wyoCLnWyyqG3Qm6
1
1
180
Feb ’25
"Wait for executable to be launched" not installing app
When I debug in Xcode, there is a launch flag that is normally set to "Automatically", and after building, Xcode installs & runs the app in the simulator or device. The other setting is "Wait for executable to be launched". I don't use this feature too much, but I thought what it would do in build & install the app, but not launch. So, the idea would be that you could install the app, then take over - as a user - and tap the icon to launch the app. At this point, the Debugger would take over again, and you could debug the app from a very early spot. When I set that flag now, the app never gets installed, so I can't do this. Xcode just has this in its status bar, and it never changes: Waiting to attach on I swore that it used to install the app in the sim for this setting. I don't know how many versions ago it was, but I really thought it did this. Does it not anymore, or should I file a bug?
2
0
513
Feb ’25
Xcode: Unknown Name
I wanted to see if anyone else is having this issue. We are trying to update our app, but on XCode, there is this error message showing: Team: Unknown Name (Code). There is a check in "Automatically Manage Signing". Normally, Apple provides this information to XCode automatically but this time it seems like it's either not sending it or not receiving it. If anyone knows what is happening here, any suggestion/advice would be greatly appreciated! Thank you!
1
0
328
Feb ’25
Is debugging with App Data broken?
Trying to use App Data on Xcode 16.2, and failing I'm running the app with the debugger. When I run the app, I need to do a handful of things, which affects my app's cache files, and UserDefaults. What I'd like to do is store all of these settings, then have them loaded in when the app launches, so I don't need to do same, tedious work of changing settings by hand in the UI. So, I discovered that I can provide an xcappdata directory in the Run options. This seems like exactly what I'm looking for. But I can't seem to get it to work. Like, when the app runs, it looks like none of those settings are brought in. I ran the app on a device, and pulled down the application data, and then put that in the project. And you can see in the screenshot, that the value is set. So, either I'm missing something (which is totally possible) or this feature is broken. Documentation on this is not great, so maybe I'm doing something wrong. If the feature is known to be broken, I'll give up on this. But if it should work, it would be great to get some tips here.
0
0
192
Jan ’25
Xcode 16 having issue on macOS 14 arm-64 and 15 arm-64 images
Issue description: Using Xcodebuild command to build a project using Xcode 16.1 and 16.2, getting multiple device simulator warnings with same os and same model. Please see issue: https://github.com/actions/runner-images/issues/11036 Repro steps: create a Xcode project, build it using below command with Xcode 16 version. run: | echo "Building project manually..." xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.2' build | xcbeautify --renderer github-actions
1
1
495
Feb ’25