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

Team membership not appearing in Xcode
I have a major problem with team membership and Xcode. I work in a company, where my apple account was added to the development team with app manager role. I can see that on the apple portal, everything seems fine there. I have been also provided with the provisioning profile for the project and signing certificate of the company. However, when I log into Xcode the team does not show up anywhere. I am able to build the app, but cannot distribute to TestFlight (or anywhere else). When I use manual signing to choose the signing certificate it shows the "unknown team" message next to it. When I check my account in xcode it also only shows my personal team and does not allow to pick any other one (doesn't show any other one). When I click the "+" button on my xcode account to add a certificate an error pops up: "You already have active certificate or a pending request". I do have a pending request to enroll into apple developers program, but everyone says you don't need one if you are added to the team, you can just operate as a team member. Finally, when trying to upload to TestFlight, the following error is displayed: "No team for account ***" I have tried deleting and re-adding all the certificates. I have tried logging in and out of Xcode, I have tried deleting and re-adding my account in Xcode. I have tried reloading everything. My account was deleted and re-added to developers team. Nothing worked. I don't know the source of the issue, nor does my employer. I am new to ios development and this is my first project. Please help!
1
0
488
Oct ’24
App will build and run once; then crashes on phantom AVPlayerView reference every time
My application suddenly started crashing on launch when I target "My Mac - designed for iPad." But only after the first build from scratch, which runs once. All subsequent runs crash with: dyld[90869]: Symbol not found: _OBJC_CLASS_$_AVPlayerView Referenced from: <D566512D-CAB4-3EA6-9B87-DBD15C6E71B3> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Debugger/libViewDebuggerSupport.dylib Expected in: <4C34313C-03AD-32EB-8722-8A77C64AB959> /System/iOSSupport/System/Library/Frameworks/AVKit.framework/Versions/A/AVKit I don't use AVPlayerView anywhere in my application. A file-contents search of the entire source tree doesn't turn it up either. The application doesn't even get to the point of instantiating the app object, so none of my code is involved. If I switch the target to my iPhone, it will build and run repeatedly. If I then switch back to "My Mac," it will build and run once... and then crash every time. Further research shows that this only happens in Debug builds. This is a major issue right now because iOS 18 broke authentication certificates (thus HTTPS), so anyone writing or debugging an app that needs network functionality must use HTTP on localhost. In my case, I'm dead in the water because I can't debug on my local machine. Has anyone seen something like this before? I can find no reference to anything like it.
3
0
691
Oct ’24
Best Practices: Dependency management for local packages
I have a project which contains local packages. One of the packages has an explicit dependency on package A, but the main project also has the same dependency. Both of them are pinned to the exact version at all times. Should I manage "shared" dependencies at the project level for local packages? This seems counter intuitive at first, but this question is originating from me fighting with a "Build service could not create build operation: unable to load transferred PIF: The workspace contains multiple references with the same GUID" error in Xcode 16 (all versions). It happens when I switch branches. Closing and reopening Xcode does resolve the issue, but it's a real flow killer. The guide below doesn't mention dependency graph best practice. https://developer.apple.com/documentation/xcode/organizing-your-code-with-local-packages Thank in advance.
1
8
2k
Apr ’25
.sheet is displayed wrong
Hi, unfortunately I discovered that the following code: .sheet(isPresented: $showSheetMapView) { VStack(alignment: .leading, spacing: 10, content: { SheetMapView( isShowingAddressMap: $isShowingAddressMap, showSheetMapView: $showSheetMapView, isLoading: $isLoading, filteredRegistrations: filteredRegistrations, selectedTransporteurId: $selectedTransporteurId, ComeFromRecipient: $ComeFromRecipient, ComeFromRetour: $ComeFromRetour, selectedDate: $selectedDate, selectedQuantityXL: $selectedQuantityXL, selectedQuantityL: $selectedQuantityL, selectedQuantityM: $selectedQuantityM, selectedQuantityS: $selectedQuantityS, XLQuantityAdd: $XLQuantityAdd, XLQuantityAdd2: $XLQuantityAdd2, XLQuantityAdd3: $XLQuantityAdd3, XLQuantityAdd4: $XLQuantityAdd4, LQuantityAdd: $LQuantityAdd, LQuantityAdd2: $LQuantityAdd2, LQuantityAdd3: $LQuantityAdd3, LQuantityAdd4: $LQuantityAdd4, MQuantityAdd: $MQuantityAdd, MQuantityAdd2: $MQuantityAdd2, MQuantityAdd3: $MQuantityAdd3, MQuantityAdd4: $MQuantityAdd4, SQuantityAdd: $SQuantityAdd, SQuantityAdd2: $SQuantityAdd2, SQuantityAdd3: $SQuantityAdd3, SQuantityAdd4: $SQuantityAdd4, RecipientSelectedXL: $RecipientSelectedXL, RecipientSelectedL: $RecipientSelectedL, RecipientSelectedM: $RecipientSelectedM, RecipientSelectedS: $RecipientSelectedS, ComesfromAtoB: $ComesfromAtoB, AtoBSelectedXL: $AtoBSelectedXL, AtoBSelectedL: $AtoBSelectedL, AtoBSelectedM: $AtoBSelectedM, AtoBSelectedS: $AtoBSelectedS ) .id(filteredRegistrations) .overlay( //Bezahl Button VStack{ if !filteredRegistrations.isEmpty{ Spacer() HStack { ApplePayButton() .frame(width: 350, height: 70) .onTapGesture { isLoading = true AssignmentButtonTapped = true if addressViewModel.selectedAddress != nil && selectedTransporteurId != nil && addressViewModel.isAddressValid == true { // Zahlungsvorgang starten if ComeFromRetour { initiatePaymentRetour() } else if ComeFromRecipient { initiatePaymentForRecipient() } else if ComesfromAtoB { initiatePaymentForAtoB() } } else { print("Fehler bei der Auswahl.") isLoading = false } } } } } ) }) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top) .presentationDetents([.medium]) .presentationCornerRadius(30) .presentationDragIndicator(.hidden) .presentationBackgroundInteraction(.enabled(upThrough: .medium)) .presentationBackground(.white) .interactiveDismissDisabled() } is not displayed as it should be. simulating this on iOS 17.5 or under it is displayed fine. iOS 18 is ignoring .presentationDetents([.medium]). In every case it automatically change the sheet to .large. Why? it completely destroys the function of this view. Please help me. Thank you.
2
0
230
Oct ’24
Xcode unable to create open panel
I cannot create any new projects in XCode (reliably). I can MABE do it when restarting my M2 Macbook Air (macOS Sequoia) or when I plug in a monitor. Steps to create it: After restarting the mac, create a "macOS, command line tool, C++" project in Xcode (assuming the I can create it), quit Xcode. Create another project of the same type in Xcode (again), Xcode will freeze for a few minutes with the beach ball. After that, there is a window popup with the title: “Unable to create an open panel”, its content: “Try your operation again. If that fails, quit and relaunch the application and try again.” This bug makes Xcode unable to create a new project, or create a new C++ file in an existing project.
0
1
336
Oct ’24
Can't connect device to Xcode after updating to iOS 18.1 beta 7
Ever since updating both my iPhone and iPad to iOS 18.1 beta 7, they simply won't connect to Xcode 16.1 beta 3. When connecting via cable, Xcode gets stuck on preparing for 5 to 10 mins and then outputs the below error: The developer disk image could not be mounted on this device. Domain: com.apple.dt.CoreDeviceError Code: 12040 Failure Reason: The caller does not have permission to perform the specified operation. User Info: { DDIPath = "/Library/Developer/DeveloperDiskImages/iOS_DDI.dmg"; DVTErrorCreationDateKey = "2024-10-15 9:06:17\U202fpm +0000"; DeviceIdentifier = "63EC7037-121B-4E79-9553-952A09720DAC"; NSURL = "file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg"; Options = { MountedBundlePath = "file:///private/var/tmp/CoreDevice_DDI_Staging_501/63EC7037-121B-4E79-9553-952A09720DAC/"; UseCredentials = 0; }; "com.apple.dt.DVTCoreDevice.operationName" = enablePersonalizedDDI; } -- The caller does not have permission to perform the specified operation. Domain: com.apple.dt.CoreDeviceError Code: 2 -- Error mounting image: 0xe8000109 (kAMDMobileImageMounterNetworkForbiddenError: A network error occurred (forbidden).) Domain: com.apple.mobiledevice Code: -402652919 User Info: { FunctionName = AMDeviceRemoteMountPersonalizedBundle; LineNumber = 2145; } -- AMAuthInstallRequestSendSync failed: 3503 (kAMAuthInstallErrorHTTPForbidden) Domain: com.apple.mobiledevice Code: -402652919 User Info: { FunctionName = "-[PersonalizedImage mountImage:]"; LineNumber = 2042; } -- System Information macOS Version 15.0.1 (Build 24A348) Xcode 16.1 (23502) (Build 16B5029d) Timestamp: 2024-10-15T22:06:17+01:00 Any solution for this issue?
1
0
765
Oct ’24
Unable to upload the iOS APP to Test Flight
We are trying to upload iOS app in Test Flight. The iOS SDK version we are using is 18 and Xcode Version is 16. While uploading the app (we are using Jenkins & Fastlane), we are getting an error saying the app is built with iOS SDK 16.4. Due to that we the upload is failing. The error text says An error occurred during the build: Error uploading ipa file: [Application Loader Error Output]: [ContentDelivery.UploadError c0000171810C] Asset validation failed (90725) SDK version issue. This app was built with the iOS 16.4 SDK. All iOS and iPadOS apps must be built with the iOS 17 SDK or later, included in Xcode 15 or later, in order to be uploaded to App Store Connect or submitted for distribution. (ID: 671ae668-d311-43de-b85c-1d142f6a8fbd) [Application Loader Error Output]: Error uploading '/var/folders/qq/2qkbtw5s7657 5cmd3kq0kmwh80gm7/T/73c3d853-ddb3-48b6-a78f- bfbb979afbb.ipa'. [Application Loader Error Output]: Asset validation failed SDK version issue. This app was built with the iOS 16.4 SDK. All iOS and iPadOS apps must be built with the iOS 17 SDK or later, included in Xcode 15 or later, in order to be uploaded to App Store Connect or submitted for distribution. (ID: 671ae668-d311-43de-b85c-1d142f6a8fbd) (90725) [Application Loader Error Output]: The call to the altool completed with a non-zero exit status: 1. This indicates a failure."
1
0
756
Oct ’24
async let combination crashes on XCode 16 with iOS 15 as minimum deployment
We started building our project in XCode 16 only to find a super weird crash that was 100% reproducible. I couldn't really understand why it was crashing, so I tried to trim down the problematic piece of code to something that I could provide in a side project. The actual piece of code crashing for us is significantly different, but this small example showcases the crash as well. https://github.com/Elih96/XCode16CrashReproducer our observation is, that this combination of async let usage + struct structure leads to a SIGABRT crash in the concurrency library. In both the main project and the example project, moving away from async let and using any other concurrency mechanism fixes the crash. This was reproducible only on Xcode 16 with iOS 15 set as minimum deployment for the target. It works fine on Xcode 15, and if we bump the min deployment to 16 on Xcode 16, it also runs fine. I've attached a small project that reproduces the error. I'm sure I didn't provide the ideal reproduction scenario, but that's what I managed to trim it down to. Making random changes such as removing some properties from the B struct or remove the: let _ = A().arrayItems.map { _ in "123" } will stop the crash from happening, so I just stopped making changes. The stack trace from the crash: frame #0: 0x00000001036d1008 libsystem_kernel.dylib`__pthread_kill + 8 frame #1: 0x0000000102ecf408 libsystem_pthread.dylib`pthread_kill + 256 frame #2: 0x00000001801655c0 libsystem_c.dylib`abort + 104 frame #3: 0x000000020a8b7de0 libswift_Concurrency.dylib`swift::swift_Concurrency_fatalErrorv(unsigned int, char const*, char*) + 28 frame #4: 0x000000020a8b7dfc libswift_Concurrency.dylib`swift::swift_Concurrency_fatalError(unsigned int, char const*, ...) + 28 frame #5: 0x000000020a8baf54 libswift_Concurrency.dylib`swift_task_dealloc + 124 frame #6: 0x000000020a8b72c8 libswift_Concurrency.dylib`asyncLet_finish_after_task_completion(swift::AsyncContext*, swift::AsyncLet*, void (swift::AsyncContext* swift_async_context) swiftasynccall*, swift::AsyncContext*, void*) + 72 * frame #7: 0x000000010344e6e4 CrashReproducer.debug.dylib`closure #1 in closure #1 in CrashReproducerApp.body.getter at CrashReproducerApp.swift:17:46 frame #8: 0x00000001cca0a560 SwiftUI`___lldb_unnamed_symbol158883 frame #9: 0x00000001cca09fc0 SwiftUI`___lldb_unnamed_symbol158825 frame #10: 0x00000001cca063a0 SwiftUI`___lldb_unnamed_symbol158636 frame #11: 0x00000001cca09268 SwiftUI`___lldb_unnamed_symbol158726
5
4
1.3k
Oct ’24
The compiler is unable to type-check this expression in reasonable time
This is one of the worst errors you can encounter while developing with Xcode. It looks like it's related to a problem inside the compiler itself: when there are lot of lines of code, it becomes unable to identify them all and start asking you to break down the code in smaller pieces. Sometimes you can, sometimes not. First of all, in your code there is FOR SURE an error, so in case of the second option, begin commenting entires sections of your code: this can lead to two options: You commented a section that contains the error: Xcode give you the preview and you check the commented section to find the error You commented enough code to let the compiler do its job, and you'll have the normal error reported in your code: again, fix it! Once errors have been fixed, normally you can uncomment what you excluded and all will go up and ok again. The most common errors that can lead to this behavior (but it's just a hint) are those involving parameters got or passed to other SwiftUI objects: parameters label (mistyped, missing, exceeding) parameters values (not $/& present, $/& present but not required) parameters types (you passed a wrong type) Well, I hope that this post could be useful to others that, like I did, are struggling a lot to understand the exact nature of this peculiar error. Code well and Prosper!
0
1
576
Oct ’24
Xcode "Build For Testing" always returning x86_64 architecture for code coverage purposes
When using Xcode's "Build for Testing", I have noticed the resulting MyApp.xctestrun file has an array of CodeCoverageBuildableInfos. This array has all of our built targets. They all have an Architectures array property. For all of our targets this is set to x86_64 when we build for Any iOS Simulator. This is irrespective of what we have "ARCHS" and "ONLY_ACTIVE_ARCH" set to (in our case we only want arm64). We do have a number of local swift packages defined, each with their own test targets. We are using a test plan for these tests. This is causing issues when processing the resulting xcresult file since it is complaining that it can't find objects for the correct architecture when calculating code coverage. No object file for requested architecture No coverage data found. (Underlying Error: No object file for requested architecture)
0
0
532
Oct ’24
Using image instead of circles in particle system
Hi all, I'm working on a particle system. Got it to work using drawn circles. Now I want to replace the circle with an image. Trying to do so in Draw section, but not sure if that's the right place. Any suggestions for coding to: connect the image from BIN to Xcode to replace particles with the image(s). Kindly ty
1
0
330
Oct ’24
dispatch/block.h not found
This is definitely a weird one -- the laptop is running macOS 12, but it's trying to build using macOS 13 SDK? (The machine cannot run anything later than macOS 12, btw.) In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/dispatch/dispatch.h:69:10: fatal error: 'dispatch/block.h' file not found #include <dispatch/block.h> ^~~~~~~~~~~~~~~~~~ 1 error generated. I'm trying xcode-select --install but has anyone run into this before?
1
0
318
Oct ’24
Xcode 16 used in CI gets littered with empty user accounts
We have a Mac mini running our CI with Xcode 16, and empty accounts seem to appear in it as time goes by. I haven't yet isolated which job(s) are triggering this, it slows builds down considerably, especially because any code-signing related task yields a ton of error messages like IDEDistribution: Failed to log in with account "(null)" while checking for an App Store Connect account (Error Domain=DVTServicesAccountBasedSessionErrorDomain Code=0 "Unable to log in with account 'mobile-devs@sightcall.com'." UserInfo={NSLocalizedFailureReason=Unable to log in with account 'mobile-devs@sightcall.com'., NSLocalizedRecoverySuggestion=The login details for account 'mobile-devs@sightcall.com' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount: 0x60000169c900; username='mobile-devs@sightcall.com'>, NSUnderlyingError=0x600001e71f50 This is obviously an Xcode bug, but has anyone found a work-around somehow ?
3
0
504
Oct ’24
xcodebuild linking error fille cannot be open()ed, errno=2
I very recently migrated our project on Swift 6. After fixing every issues, mostly due to Swift Concurrency, I’m getting the following error when compiling with Xcode 16.0, which doesn’t make any sense to me : Multiple errors: file cannot be open()ed, errno=2 path=/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/Router.o in '/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/Router.o'; file cannot be open()ed, errno=2 path=/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AccountRouter.o in '/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AccountRouter.o'; file cannot be open()ed, errno=2 path=/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AlertRouter.o in '/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AlertRouter.o'; file cannot be open()ed, errno=2 path=/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AlarmRouter.o in '/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AlarmRouter.o' (The '…’ is just me obfuscating the real name) I’ve checked the paths. The file are here and I can open them. I tried cleaning the project, removing every derived data. I removed every dependencies (cocoapods &amp; SPM). I’m using Tuist, so I fully cleaned the project and recreated it from scratch. Then I thought it might be an issue with my Xcode installation, so I tried running the project on another machine, I still get the same error every time. Anyone has a clue on what’s happening?
12
0
1.5k
Oct ’24