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

Xcode 16 Previews: dyld Loader Crash
We have been seeing a dyld loader crash when trying out the new Previews engine in Xcode 16 beta 3. Feedback filed with reproducer + diagnostics: https://feedbackassistant.apple.com/feedback/14323960 Investigation: Running nm -a on the debug dylib reveals duplicate SO entries pointing to SomeStatic.swift. One entry originates from the LibAStatic module, while the other comes from the LibBStatic module. Local workaround - 1 Providing unique file names resolves the issue. However, these files are in different modules, so ideally, this shouldn't be necessary. Our codebase is extensive, and many code-generated modules have the same file names. Therefore, renaming files to ensure uniqueness is not a simple solution for us due to various complexities. Local workaround - 2 Making these dependencies dylibs instead of static libraries also resolves the issue. However, we can't pursue this direction because a significant portion of our pre-build setup, foundations, and vendor linkages are statically linked. Note: The same flow works with "Legacy Preview Engine in Xcode 16/15" but dynamic replacement has other issues, which we are super happy that the new engine doesn't make use of. This issue is currently a blocker for us in trying out the new Previews in our project, it would be highly beneficial if this problem could be resolved soon.
1
0
163
5d
Universal Frameworks and Requirements for Deployment
I got some beacons from a company who provides an SDK to connect to them. They provided two sets of framework files which the SDK is dependent on. The first set is built for Arm 64, and the second is built for x86. I am using them to build a framework for a company which says they require frameworks they integrate into their apps to work for both device and simulator. I think this is primarily for convenience during development. I've run into some walls trying to fulfill these requirements and have some questions about what is possible. The Beacon manufacturer claims the x86 framework files should work for both simulator and device during development, and that arm64 would be for deployment to the app store. I am unable to get x86 to work during development when my device is plugged in though. What does a framework need to work for both device and simulator? Is is possible, from strictly arm64 and strictly x86 framework files, to build universal framework files that supports both arm64 and x86? Then from those to build a new universal framework that leverages all of those? Can this resulting framework not only be used for development on simulator and device, but also be deployed to the app store? Thank you kindly, for your expertise.
2
0
117
5d
Developing and deploying iPhone test code in Windows environment
Hello, I am developing Java test code to test a web application on an Android and iPhone platforms using Selenium and Appium inside Eclipse IDE. Android device could be tested just fine. When it comes to instantiation of iOSDriver Object for running test script on an iPhone, the run time is complaining that it needs Xcode libraries, or Xcode tool on the class path. This makes it necessary to use a mac system for coding and install Xcode on it. Once I use a mac and develop the test code within my Eclipse, can I deploy the code on a Windows Server? Does the code would not need Xcode during run time or just the Selenium-java client libraries and Appium alone? Thanks a lot, -- Prasad Nutalapati
0
0
98
5d
No eligible profiles found for matching the iOS platform with bundle identifier
I can't find the required app identifier for the distributed app with the Bundle ID 'recoverlution-production' on my account on the page https://developer.apple.com/account/resources/identifiers/list. I am getting 'No profiles for recoverlution-production found.' when validating the app on Xcode after the build. Additionally, I am getting 'No eligible profiles found for recoverlution-ios-app matching the iOS platform with bundle identifier recoverlution-production.' when selecting the provisioning profile from Xcode. video of the error https://drive.google.com/file/d/1x0PaUcpJ8pBHShEEufE_zNlOQz0p8hUh/view?usp=drive_link Can a profile be deleted if it is currently in use on App Store Connect?
0
0
59
5d
XCode 16 beta 3 creating a folder instead of a group for all project initial content
When I new project is initiated in XCode 16 beta 3, an overall folder is created to contain all the generated content in the Navigator pane . In past XCode version, this main container (under the project name) has always been generated as a group. Is this change by design or a bug? The issue this creates is that the files and folders in this overall Folder can not be repositioned - they remain in ascending alphabetical order. I must convert this initial Folder into a Group by right clicking on the folder name and selecting "Convert to group" which converts the folder to a group. I am then able to reposition files, groups and folders within this group. I don't see anywhere in the XCode documentation where this change in behavior is mentioned. Anyone else having this same issue. I never have understood the difference or use cases for groups vs folders in the xcode Navigator pane.
5
1
211
5d
Empty dSYMs folder since Xcode 15
Since I updated to Xcode 15.3, my archives have an empty dSYMs folder. I have not changed any project settings since Xcode 14. My build settings have: Debug Information Format: DWARF with dSYM File Generate Debug Symbols: Yes From my archives, if I navigate to the .xcarchive, Show Package Contents, there is a dSYMs folder. For all my archives built in Xcode 15, this folder is empty. For previous archives (Xcode 14), this folder contains a .app.dSYM file. When I distribute my app via App Store Connect and receive crash reports from TestFlight, these are symbolicated. So I'm confused why I don't see a local .dSYM file. Can you explain this? What do I need to change to generate this? (And does it matter if I'm getting symbolicated crash reports??)
0
0
96
6d
Hardened Runtime is Not Enabled
Hello I´ve build a game in Unreal and try to get it for sale to a webshop (not Apple Store). For that, the game needs to be notarized etc. And to sell the outside of Apple Store you need to log in manually with Developer ID application in Xcode. Any idea why I get this error message: "Hardened Runtime is Not Enabled. "XXXXXXXX.app" must be rebuilt with support for the Hardened Runtime. Enable the Hardened Runtime capability in the project editor, test your app, rebuild your archive, and upload again. Any help appreciated, I´ve struggled with this for a week. All the best, Ramili
2
0
137
6d
MusicKit iOS17.5 and iOS18
Good morning, I'm trying to use MusicKit functionalities in order to get last played songs and put them into a local DB, to be played later. Following the guide on developer.apple.com, I created the required AppServices integration: Below is a minimal working version of what I'm doing: func requestMusicAuthorization() async { let status = await MusicAuthorization.request() switch status { case .authorized: isAuthorizedForMusicKit = true error = nil case .restricted: error = NSError(domain: "Music access is restricted", code: -10) case .notDetermined: break case .denied: error = NSError(domain: "Music access is denied", code: -10) @unknown default: break } } on the SwiftUI ContentView there's something like that: .onAppear { Task { await requestMusicAuthorization() if MusicManager.shared.isAuthorizedForMusicKit { let response = try await fetchLastSongs() do { let request = MusicRecentlyPlayedRequest<Song>() let response = try await request.response() var songs: [Song] = response.items.map { $0 } // do some CloudKit handling with songs... print("Recent songs: \(songs)") } catch { NSLog(error.localizedDescription) } } } } Everything seems to works fine, but my console log is full of garbage like that: MSVEntitlementUtilities - Process MyMusicApp PID[33633] - Group: (null) - Entitlement: com.apple.accounts.appleaccount.fullaccess - Entitled: NO - Error: (null) Attempted to register account monitor for types client is not authorized to access: {( "com.apple.account.iTunesStore" )} is there something I'm missing on? Should I ignore that and go forward with my implementation? Any help is really appreciated.
1
0
187
4d
Xcode Version 15.4 (15F31d) is consistently changing "class" and "struct" to "enum"
While coding, Xcode Version 15.4 (15F31d) is consistently breaking builds by changing both struct and class declarations in areas of code other than where I'm currently editing. Suddenly, code that was compiling a minute ago breaks with multiple "Type 'Xxxx' has no member 'getYyyy'. For example, I'm writing code in a subclass, and suddenly calls to the superclass's methods are unrecognized by the compiler (e.g., "Type 'MeetInfoSheetReader' has no member 'getDateValue'"). Command-click on the method name takes me to the method in the superclass, and nothing is wrong at that point: I have the correct method signature, yet the code doesn't compile. I scroll up to the class declaration only to find that Xcode has changed "class" to "enum". This can happen regardless of whether the superclass or the reference struct is in the same or a different file. Also, this happens frequently, and it's not because I have bouts of narcolepsy and changed class or struct to enum while out. My dog doesn't even get near the laptop while I'm away from it, and I don't have a cat who types let alone a cat. Because I cannot associate this aggravating Xcode behavior with any particular thing I'm doing (e.g., name refactoring a variable or class name, deleting commented sections of exploratory code, or anything else) I'm sure that if I file a bug with the Feedback Assistant (a really ****** bug reporting system), it will be marked closed without the slightest bit of interest in exploring the problem. Hopefully someone else has seen this behavior and has a solution. Because it's really counterproductive.
2
0
167
1w
PacketLogger not logging packets on a MacBook.
I am a developer working on macOS Sonoma version 14.5 using a MacBook Pro with an M3 Pro chip. I have been trying to utilize PacketLogger, included with Xcode 15.4 extensions, to monitor Bluetooth traffic between my MacBook and my Sony WH-1000XM4 headphones. Issue Description: Despite my device being correctly paired and connected, PacketLogger does not display any Bluetooth packet data. The expected Bluetooth packets are not shown in the PacketLogger interface, even when no filters are applied, and PacketLogger settings are configured to capture all traffic. Troubleshooting Steps Taken: • I have ensured all PacketLogger filters are deactivated to capture all types of Bluetooth traffic. • I have started the PacketLogger before connecting my Bluetooth devices to capture the initial exchanges. • Reinstallation of PacketLogger and verification of Bluetooth module functionality have been performed, with no resolution to the issue. Request for Assistance: Could you provide guidance or troubleshooting steps that might address this issue? Are there known compatibility issues with PacketLogger on macOS Sonoma or with the MacBook Pro M3 Pro model that might affect its functionality? Any specific settings or configurations that I might be overlooking would also be greatly appreciated. I can provide additional information, including screenshots of my PacketLogger settings and logs, upon request. Your assistance in resolving this issue would be invaluable.
2
1
128
1w
The developer disk image could not be mounted on this device.
Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.) Here is what the detailed error message shows: The developer disk image could not be mounted on this device. Domain: com.apple.dt.CoreDeviceError Code: 12040 Failure Reason: Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.) User Info: { DDIPath = "/Library/Developer/DeveloperDiskImages/iOS_DDI.dmg"; DVTErrorCreationDateKey = "2024-07-12 19:06:25 +0000"; DeviceIdentifier = "94430B68-BA12-4F63-9EE5-48EE865738D6"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; NSURL = "file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg"; Options = { MountedBundlePath = "file:///private/var/tmp/CoreDevice_DDI_Staging_501/94430B68-BA12-4F63-9EE5-48EE865738D6/"; UseCredentials = 0; }; "com.apple.dt.DVTCoreDevice.operationName" = enablePersonalizedDDI; } Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.) Domain: com.apple.mobiledevice Code: -402652923 User Info: { FunctionName = AMDeviceRemoteMountPersonalizedBundle; LineNumber = 2135; } AMAuthInstallRequestSendSync failed: 3194 (kAMAuthInstallTATSUDeclinedAuthorization) Domain: com.apple.mobiledevice Code: -402652923 User Info: { FunctionName = "-[PersonalizedImage mountImage:]"; LineNumber = 2032; } Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "00008027-000164500AE2402E"; "device_isCoreDevice" = 1; "device_model" = "iPad8,12"; "device_osBuild" = "18.0 (22A5307f)"; "device_platform" = "com.apple.platform.iphoneos"; "device_thinningType" = "iPad8,12"; "dvt_coredevice_version" = "397.3.5.2"; "dvt_coresimulator_version" = 980; "dvt_mobiledevice_version" = "1757.0.0.101.1"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 1332838; "operation_errorCode" = "-402652923"; "operation_errorDomain" = "com.apple.dt.CoreDeviceError.12040.com.apple.mobiledevice"; "operation_errorWorker" = IDEInstallCoreDeviceWorker; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_113575882_enable" = 0; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos18.0"; "sdk_osVersion" = "18.0"; "sdk_variant" = iphoneos; } System Information macOS Version 14.5 (Build 23F79) Xcode 16.0 (23037.4) (Build 16A5171r) Timestamp: 2024-07-12T12:06:25-07:00
0
0
135
1w
Using Older version of Xcode
Hi, I have a 2017 iMac that works perfectly, and I am trying to use it to make applications using Swift with Xcode. However, I cannot use Xcode because the last update my iMac supported was Ventura, and now, Xcode requires macOS Sonoma. Is there any way to get around this? Thanks
4
0
137
1w
How to handle “Try Again” alert in biometrics UI testing?
I’m writing UI tests for biometrics in iOS. For a failing case, I encounter an alert that needs to be dismissed by the user. How can I tap a button in this alert? XCTest has the addUIInterruptionMonitor method (https://developer.apple.com/documentation/xctest/xctestcase/1496273-adduiinterruptionmonitor). Is this what I need? If so, what description should I use? Or do I need some other functionality? For Touch ID, I can simply simulate a failure twice, and the alert will be dismissed. However, for Face ID and Optic ID, this approach is not suitable—the alert buttons need to be tapped. Additionally, there is an old method to handle the alert using the Springboard app (with the bundle ID “com.apple.springboard”). However, this only works for iOS and iPadOS, while VisionOS does not have this bundle ID.
0
1
100
1w
swift run on Xcode 16 beta 2 for Swift Package crashes with SIGKILL Guard
With connection of SSH via Jenkins 2.332.1 to the remote Macs, swift-package module crashes and leaves crash report on Console. Absolutely swift command itself fails. Filed https://feedbackassistant.apple.com/feedback/14285692 with the crash report created. Really hard to explain what happens exactly but seems like it is related to Xcode 16 beta (xcrun version 70) because the same problem never occurs on Xcode 15.4 (xcrun version 68).
0
0
137
1w
MacOS bundle's binary can't run
I made a project with MacOS/Bundle/Objective-C. I added main.m as like: #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { printf("Test\n"); } Built it and the generated bundle. I open the bundle with Finder and located the binary in the MacOS directory within the bundle. The file command returned as like: <path...>TestProject: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit bundle x86_64] [arm64:Mach-O 64-bit bundle arm64] <path...>TestProject (for architecture x86_64):Mach-O 64-bit bundle x86_64 <path...>TestProject (for architecture arm64): Mach-O 64-bit bundle arm64 It apparently generated the Universal binary. Of course, no error were reported on building. I tried to execute the binary with drag&drop the file into Terminal, but shell reported as like: zsh: exec format error: <path..>TestProject These are reproducing my trouble. My target project is so old but it can generate executable x86_64 only binary. I want to be universal binary. My Xcode is 15.4 on Sonoma.
1
0
149
1w
Need Objective-C translation of DispatchSource.makeFileSystemObjectSource
I came across a useful repo on GitHub: https://github.com/GianniCarlo/DirectoryWatcher/blob/master/Sources/DirectoryWatcher/DirectoryWatcher.swift self.queue = DispatchQueue.global() self.source = DispatchSource.makeFileSystemObjectSource(fileDescriptor: descriptor, eventMask: .write, queue: self.queue) self.source?.setEventHandler { [weak self] in self?.directoryDidChange() } self.source?.setCancelHandler() { close(descriptor) } self.source?.resume() How do I translate this to OC version? I have an app that was written in OC and I plan to incorporate this directory watcher into the project.
2
0
194
1w
64-bit Apple Watches with 64-bit pointer sizes?
I have a watchOS app written in C++, Swift and SwiftUI. This app is meant only for 64-bit architecture. I know Apple uses the arm architecture, so I thought arm64 will be the arch of latest AppleWatches. I tested my code in x64 simulator (Intel Mac) and arm64 simulator (silicon Mac) - no trouble. Next is to test on a device - AppleWatch Series 9, model: A2984. I set the arch to arm64 and my application failed to build, with Xcode showing a popup about arch mismatch... which is due to the app's arch begin different from device's arch. When I change Xcode arch setting to arm64_32, then I don't get this popup, but my builds fail. When I read about arm64_32, I realised that this is a version of arm64 with 32 bit pointers... not the arm64 with 64 bit pointers. Looking at the specification of AppleWatch Series 9, Apple has confirmed that it has 64 bit CPU, but the instruction set is unknown. This wiki page about different AppleWatch CPUs is marked TBC for AppleWatch Series 9. From Xcode, I got to know that this unconfirmed arch is arm64_32. This completely breaks my code. Are there any 64-bit watches with 64-bit pointer sizes? What is Apple's future in this area? Do they plan to release AppleWatches that support 64-bit pointers or it's always going to be 32?
1
0
304
1w
Thread 1: signal SIGABART when running on Physical iPhone 11 running iOS 17.5
I am currently running my Flutter app using macOS 15 beta (I accidentally upgraded and now I can't opt-out) and Xcode 15 beta on my iPhone 11 running iOS 17.5. While the app launches, it gets stuck on a black screen and I encounter the following error in Xcode: Thread 1: signal SIGABRT (lldb) bt • thread #1, stop reason = signal SIGABRT ▪ frame #0: 0x00000001ad9eecd8 dyld__abort_with_payload + 8 frame #1: 0x00000001ad9fa450 dyld_abort_with_payload_wrapper_internal + 104 frame #2: 0x00000001ad9fa484 dyld_abort_with_payload + 16 frame #3: 0x00000001ad987e00 dyld4::halt(char const*, dyld4::StructuredError const*) + 304 frame #4: 0x00000001ad99559c dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 4088 frame #5: 0x00000001ad9b9c48 dyld_start + 1724 Note: This app functions correctly when distributed through TestFlight.
0
0
84
1w