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

Resolving a "Simulator runtime is not available" error
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
0
0
942
May ’24
Widgets & Live activities debug install dosen't work
Hi everyone, Like so many before me, i tried to install my app to test widgets, live activities & dynamic island implementation on a real device or on the simulator (neither works). The problem is that when I try to run the project I get this message : "SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'fr.example.LiveActivities.LiveWidget' error: Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace). [......]". The first thing I tried was looking on Apple's forum and StackOverflow for a solution but after 1hour trying almost eveyrthing, nothing seemed to resolve my problem. Does anyone has an idea of how I could try to fix it ? I would love to show this project in my portfolio in order to find an apprenticeship, but I can't until I find a way to fix this. Thanks a lot!
1
0
102
9h
iOS 18 @AssistantIntent's marked with @available crashing on older OS's
Is anyone else seeing their apps crash on iOS/macOS 17.4/14.4 and newer when building a project that simply just includes the iOS 18 @AssistantIntent Macro? The beta 4 releases still have this problem. There are no notes about this that I have seen in the beta release notes. Crash message shown in console when trying to run on 17.4, 17.5, 17.5.1, etc: dyld[21935]: Symbol not found: _$s10AppIntents15AssistantSchemaV06IntentD0VAC0E0AAWP Referenced from: <F7A1FEF0-F3B0-379C-A914-D1FB0BA7C693> /Users/jonathan/Library/Developer/CoreSimulator/Devices/CA308F47-BCA8-4429-8599-1BB1CCEAB5B6/data/Containers/Bundle/Application/D7DC8E16-90DB-406A-A521-20F18326E4A7/IntentDemo.app/IntentDemo.debug.dylib Expected in: <88E18E38-24EC-364E-94A1-E7922AD247AF> /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AppIntents.framework/AppIntents Obviously, the new Apple Intelligence AssistantIntents only work on the 2024 OS releases. However, even when these new App Intents are marked with @available(iOS 18, macOS 15, *), the app crashes on any earlier OS version. But it runs just fine on iOS 18 and macOS 15... I would love for me to just have done something wrong but I don’t think I have… Here is the sample project: https://github.com/JTostitos/FB14323923 Maybe it's a compiler issue thats failing to strip out the macro when building for older OS's or an Xcode issue - I have no idea. I just would like to know why its not working and how to resolve it. Thanks in advance for anyones help...
0
0
66
16h
ViewController Not Displayed for 8th Tab in Elevated Tab Bar with More Than 7 Tabs
ViewControllers for the 8th and higher tabs are not displayed in the elevated Tab Bar. However, I am able to select these tabs both in the Tab Bar and the side bar. func setTabs(){ let colors = [UIColor.red,.systemGray6,.green,.systemMint,.cyan,.yellow,.blue,.magenta] var tabs = [UITab]() let range = 0...10 for index in range { if #available(iOS 18.0, *) { let tab = UITab(title: "Tab_\(index)", image: UIImage(systemName: "globe"), identifier: "tab__\(index)", viewControllerProvider: {tab in let vc = UIViewController() vc.view.backgroundColor = colors[index%colors.count] return vc }) tabs.append(tab) } } tabbarController.setTabs(tabs, animated: true) }
1
0
42
14h
Xcode test coverage data missing for external swift source package library dependency
In writing swift packages, I'd like to put demos, tests, docs into a separate package from my library package (to simplify how the library is consumed). But in Xcode (15.4 or 16 beta 4) after opening the package, I don't see any test code coverage information for the external package - only for package targets. When using the scheme editor I didn't see anything on point in panels for Run/Diagnostics, or Profile. Same result when targeting local packages (using path: ../{package}). When configuring a workspace with both packages, I could not run or configure tests. Is it possible to get coverage for an external library module used by the test (assuming they are sources locally built)? Is there a (online) recipe? Many thanks!
0
0
76
1d
How to resolve "ITMS-90129: The bundle uses a bundle name or display name that is already taken" for new builds of the same app
This error is reaction on new build created and uploaded to AppStore with new project but same bundleId/displayName/signingInfo. Here is the scenario with symbolic values to explain it better: Build #1 (Version 1.0) project: P1 Bundle id: com.some.app Display name: My App Signing info: TeamX, CertificateX (automatic signing) I had to move the app to new project with completely new targets/configs/sources but same app metadata. Build #2 (Version 1.0) project: P2 (new) Bundle id: com.some.app Display name: My App Signing info: TeamX, CertificateX (automatic signing) So you can see that all is changed but the important app metadata (BundleId, DisplayName, Signing info) remained the same. Yet the upload of build 2 results with: ITMS-90129: The bundle uses a bundle name or display name that is already taken Note that the Build #2 showed in "AppStoreConnect / TestFlight / iOS Builds / Version 1.0" for a few seconds as "Processing" but than disapeared with the error. Thus Apple tries to add the new build #2 it to proper application version but than for some reason it thinks that Build #1 and #2 comes from different applications. Any thoughts why?
0
0
79
1d
Xcode 16.0 beta 4 build error "Could not build module"
Xcode Version: Xcode 16.0 beta 4 (16A5211f) Build Error: Could not build module "xxxx" I encountered an issue where the keyword module is causing a build error in my project. The error message states "Could not build module," and it seems that the identifier module is being recognized as a keyword, which leads to a conflict. + (void)logWithLevel:(SCLogLevel)level fileName:(const char *)fileName lineNum:(int)lineNum module:(NSString *)module content:(NSString *)format, ...
1
0
47
1d
Linker errors when building with Xcode 15 and CocoaPods — building for iOS
** BUILD FAILED ** The following build commands failed: Ld /Users/siddesh/Library/Developer/Xcode/DerivedData/App-ddpkkzvberburtewkcvoihnirgjh/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/Logging.build/Objects-normal/x86_64/Binary/Logging normal x86_64 (in target 'Logging' from project 'Pods') (1 failure) Testing with xcodebuild. -> mySDK_Staging (8.8.0) - WARN | attributes: Missing required attribute license. - WARN | license: Missing license type. - WARN | source: Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred. - WARN | [iOS] license: Unable to find a license file - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. - NOTE | xcodebuild: note: Using codesigning identity override: - - NOTE | [iOS] xcodebuild: note: Building targets in dependency order - NOTE | [iOS] xcodebuild: note: Target dependency graph (20 targets)
0
0
37
1d
Linker errors when building with Xcode 12 and CocoaPods — building for iOS
** BUILD FAILED ** The following build commands failed: Ld /Users/siddesh/Library/Developer/Xcode/DerivedData/App-ddpkkzvberburtewkcvoihnirgjh/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/Logging.build/Objects-normal/x86_64/Binary/Logging normal x86_64 (in target 'Logging' from project 'Pods') (1 failure) Testing with xcodebuild. -> mySDK_Staging (8.8.0) - WARN | attributes: Missing required attribute license. - WARN | license: Missing license type. - WARN | source: Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred. - WARN | [iOS] license: Unable to find a license file - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. - NOTE | xcodebuild: note: Using codesigning identity override: - - NOTE | [iOS] xcodebuild: note: Building targets in dependency order - NOTE | [iOS] xcodebuild: note: Target dependency graph (20 targets)
0
0
34
1d
Predictive Code Completion
In Xcode16Beta4, it contains Predictive Code Completion, and Predictive Code Completion is also with other SDKs in the page opened by Xcode for the first time. Waiting for download. However, I want to know: 1. What is Predictive Code Completion? 2. I didn't download Predictive Code Completion on the SDK download page when I first opened Xcode. Where should I download it later?
1
0
111
1d
UIRequiredDeviceCapabilities key issue in App Review
I am getting rejection from apple review team for UIRequiredDeviceCapabilities. Here is the rejection message -- The UIRequiredDeviceCapabilities key in the Info.plist is set in such a way that the app will not install on iPad or iPhone . Next Steps To resolve this issue, check the UIRequiredDeviceCapabilities key to verify that it contains only the attributes required for the app features or the attributes that must not be present on the device. Attributes specified by a dictionary should be set to true if they are required and false if they must not be present on the device. In our case we don't have UIRequiredDeviceCapabilities key in info.plist. Even if you create new project in Xcode 15.4 then it doesn't have this key. I tried to add that key forcefully with armv7 or camera details. But app is keep getting rejected. Anyone faced the issue for this?
0
0
40
1d
"This app cannot be installed because its integrity could not be verified"
Hi, We developed a app for iPhone and Apple Watch. The app has been tested and it worked well on iPhone SE and Apple Watch Series 6 running earlier OS. We recently upgraded the Apple Watches to Series 9 & watchOS 10.5, and the iOS on the same iPhone is upgraded to 17.4.1. The app can still be built on the iPhone but when I tried to install the app on the new Apple Watch, it won't work and shows "This app cannot be installed because its integrity could not be verified." To make sure it's not a OS issue, I also upgraded the watchOS on the old Apple Watch Series 6 to 10.5 and the app worked. I wonder what cause the app fail on the newer Apple Watch running the same watchOS. Thank you
1
0
139
2d
App not compatible with iPad model, but it is?
I’m having an issue with my published iPad app on the App Store where a selection of users (but not all) are finding they are unable to download my app on their iPad. The app recently was updated to support only devices Running iOS/iPadOS 17 and also added iPad support as HealthKit is available there now. The App Store listing correctly shows it as compatible but for some reasons user still see incompatibility messages. This makes no sense as the app has been full built and tested on iPad and a lot of users are using it fine. All the iPads in question are running ipadOS 17 too. I can only assume this is a bug but I thought I’d post here in case maybe I had an Xcode build setting wrong or something. Thank You
0
0
70
2d
Error accessing shared defaults controller under Sonoma 14.5
I have an application that has worked fine for years, however on a latest build on Sonoma and the most recent version of Xcode when I run the app I receive errors trying to access a plist file via a shared defaults controller which contains preferences. This used to work but now generates errors that I am trying to access a file outside of the container I'd appreciate any help understanding what has changed and how I can resolve it. I have heard about a setting allowing read/write access to preferences but cannot find it in Xcode
0
0
60
2d
"No bundle url present", xcode with phsyical IPad
I am patching dependencies on a a published React native application. I want to test the updated app before republishing it, by running it on the company IPad via xcode as I always do. The issue I am facing since upgrading to xcode 15: When I run my app via xcode, it builds successfully, then installs and launches on my Ipad, at this point it shows the red error "No bundle url present". Things I have tried already: made sure nothing is running port 8018 running the app on a different port (8028) deleted the ios/build file configured the info.plist correctly verified the metro bundler is working by launching it and visiting localhost in my macs browser. cleaned the build folder in xcode deleted the xcode derived data and restarted xcode. generating a main.jsbundle file via terminal (works in part but I believe it's a workaround not the correct solution) as previously I haven't had to do this and it was handled by xcode. Thank you for reading.
1
0
77
2d
Waiting to reconnect to [DEVICE NAME]
Hi, the 'Waiting to reconnect to [DEVICE NAME]' error is repeatedly occurring. Previous preparation error: Developer Mode disabled. To use[DEVICE NAME] for development, enable Developer Mode in Settings → Privacy & Security. Of course, the developer mode is already turned on and I've used the connection between my devices via XCode until yesterday. But it suddenly happened. I have several devices(iOS/iPadOS) so I've tried them all, but they are all having the same situations. What I've tried: Re-install XCode Rebooting mac and iPhone Safe boot my mac Disable and enable developer mode
5
2
192
2d
Is ObservableObject implicitly a MainActor in iOS 16 and later?
This is a question regarding the specification of ObservalObject. The following code does not cause a compilation error when the deployment target is set to iOS 16, but it does cause the following error when set to iOS 15: class Model: ObservableObject { let player: AVPlayer @Published var isPlaying = false var playerObserver: NSKeyValueObservation? init() { self.player = AVPlayer() self.playerObserver = self.player.observe(\.rate, options: [.new, .old]) { player, change in NSLog("changed rate: \(String(describing: change.newValue))") } } func setup() { let name = "sample" let url = Bundle.main.url(forResource: name, withExtension: "m4a")! let playerItem = AVPlayerItem(url: url) self.player.replaceCurrentItem(with: playerItem) } func play() { self.player.play() self.isPlaying = true } } The following error occurs in iOS 15: Cannot form key path to main actor-isolated property 'rate' Call to main actor-isolated instance method 'play()' in a synchronous nonisolated context Additionally, if the code is modified as follows, the error does not occur even in iOS 15. Specifically, adding @MainActor to the Model resolves the issue. @MainActor class Model: ObservableObject { ... } From this behavior, I guessed that ObservableObject is implicitly a MainActor in iOS 16 and later. Is this understanding correct?
1
0
124
4d