Post not yet marked as solved
So like the title says, when I start up Xcode the preview won;t work till I run a debug session using the simulator.
Sometimes the debug session is unable to start the simulator, which I can start manually then run a debug session.
Once all the above is done, preview works.
Any idea what is causing this behavior?
Post not yet marked as solved
SwiftUI Preview Don't work.
Progress Preparing iPhone Simulator for Previews.
SwiftUI
Xcode version 13.0
macOS Big Sur version 11.6
Post not yet marked as solved
To resume the rotation/dragGesture is working only on défaut xyz point
I tried to add a custom anchor and apply the same code but cannot be dragged
My guess is that the red line is causing the issue (see screenshot)
Post not yet marked as solved
Hi everyone,
I'm encountering an issue with my iOS device not connecting to Xcode after updating to iOS 17.4. Even after trying various troubleshooting steps, including downloading Xcode 15.4 Beta, the problem persists.
Troubleshooting Steps Taken:
Restarted my Mac.
Untrusted and re-trusted the iOS device.
Restarted the iOS device.
Ran the command defaults write com.apple.dt.Xcode DVTEnableCoreDevice enabled in Terminal and restarted Xcode.
Additional Information:
I've checked for any available updates for both Xcode and my iOS device, but none are available.
There haven't been any recent changes or updates to my development environment prior to encountering this issue.
My iOS device version is 17.4, and my MacOS version is Sonoma 14.4.1.
Error Messages:
There are no specific error messages displayed. The devices simply do not recognize each other when attempting to connect via Xcode.
I would greatly appreciate any assistance or suggestions on how to resolve this issue. Thank you in advance for your help!
Xcode: Version 15.0 beta 2 (15A5161b)
iPhone: iOS 17.0 (21A5268h)
Run from Xcode to Simulator or my iPhone, build successfully, install failed with the same error:
My widget extension target info.plist file looks like the image below, and it worked find with all the previous Xcode version.
After adding the key NSExtensionPrincipalClass like this:
I can install my app to simaltor and my device, however, when archive and upload to the App Store (for TestFlight testing), i got another error (the first one is related to this issue, the second i could not figure out what it is):
Post not yet marked as solved
How can we cast video, Images, Screen Mirroring from iOS to Smart TV Device(Apple, Android or etc.) i am using GoogleCast SDK iOS but it's cast only server URL video.
Is there any SDK or code for cast video and Images.
On my shop and content views of my app, I have a shopping cart SF symbol that I've modified with a conditional to show the number of items in the cart if the number of items is above zero. However, whenever I change tabs and back again, that icon disappears even though there should be an item in the cart.
I have a video of the error, but I have no idea how to post it. Here is some of the code, let me know if you need to see more of it:
CartManager.swift
import Foundation
import SwiftUI
@Observable class CartManager {
/*private(set)*/ var products: [Product] = []
private(set) var total: Int = 0
private(set) var numberofproducts: Int = 0
func count() -> Int {
numberofproducts = products.count
return numberofproducts
}
func addToCart(product: Product) {
products.append(product)
total += product.price
numberofproducts = products.count
}
func removeFromCart(product: Product) {
products = products.filter { $0.id != product.id }
total -= product.price
numberofproducts = products.count
}
}
ShopPage.swift
import SwiftUI
struct ShopPage: View {
@Environment(CartManager.self) private var cartManager
var columns = [GridItem(.adaptive(minimum: 135), spacing: 0)]
@State private var searchText = ""
let items = ["LazyHeadphoneBean", "ProperBean", "BabyBean", "RoyalBean", "SpringBean", "beanbunny", "CapBean"]
var filteredItems: [Bean] {
guard searchText.isEmpty else { return beans }
return beans.filter { $0.imageName.localizedCaseInsensitiveContains(searchText) }
}
var body: some View {
NavigationStack {
ZStack(alignment: .top) {
Color.white
.ignoresSafeArea(edges: .all)
VStack {
AppBar()
.environment(cartManager)
ScrollView() {
LazyVGrid(columns: columns, spacing: 20) {
ForEach(productList, id: \.id) { product in
NavigationLink {
beanDetail(product: product)
.environment(cartManager)
} label: {
ProductCardView(product: product)
.environment(cartManager)
}
}
}
}
}
.navigationBarDrawer(displayMode: .always))
}
}
.environment(cartManager)
}
var searchResults: [String] {
if searchText.isEmpty {
return items
} else {
return items.filter { $0.contains(searchText)}
}
}
}
#Preview {
ShopPage()
.environment(CartManager())
}
struct AppBar: View {
@Environment(CartManager.self) private var cartManager
var body: some View {
NavigationStack {
VStack (alignment: .leading){
HStack {
Spacer()
NavigationLink(destination: CartView()
.environment(cartManager)
) {
CartButton(numberOfProducts: cartManager.products.count)
}
}
Text("Shop for Beans")
.font(.largeTitle .bold())
}
}
.padding()
.environment(CartManager())
}
}
CartButton.swift
import SwiftUI
struct CartButton: View {
var numberOfProducts: Int
var body: some View {
ZStack(alignment: .topTrailing) {
Image(systemName: "cart.fill")
.foregroundStyle(.black)
.padding(5)
if numberOfProducts > 0 {
Text("\(numberOfProducts)")
.font(.caption2).bold()
.foregroundStyle(.white)
.frame(width: 15, height: 15)
.background(Color(hue: 1.0, saturation: 0.89, brightness: 0.835))
.clipShape(RoundedRectangle(cornerRadius: 50))
}
}
}
}
#Preview {
CartButton(/*numberOfProducts: 1*/numberOfProducts: 1)
}
Post not yet marked as solved
Since I started using XCode Cloud, my builds regularly failed due to networking issues, which is really just embarrassing. How can a company like Apple, which praises itself with a high-quality standard, ***** this up so badly?
However, since two months ago literally every single build started failing for "connection reset by peer"
My ci_post_clone.sh runs this code and surprisingly enough that step succeeds most of the time.
#!/usr/bin/env bash
set -e
brew install cocoapods
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 20.0.1-tem
# cd into actual project root
cd ../../../
./gradlew app:ios:podinstall
However in the archive task the errors start rolling in
2023-08-30T22:27:24.108163427Z Could not resolve com.google.devtools.ksp:symbol-processing-api:1.9.0-1.0.11.
2023-08-30T22:27:24.108168428Z > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'.
2023-08-30T22:27:24.108173676Z > Could not GET 'https://repo.maven.apache.org/maven2/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'.
2023-08-30T22:27:24.108181057Z > Got socket exception during request. It might be caused by SSL misconfiguration
2023-08-30T22:27:24.108186894Z > Connection reset by peer
2023-08-30T22:27:24.108206745Z Could not resolve com.google.devtools.ksp:symbol-processing-api:1.9.0-1.0.11.
2023-08-30T22:27:24.108213605Z >
2023-08-30T22:27:24.108219500Z Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'.
2023-08-30T22:27:24.108234940Z >
2023-08-30T22:27:24.108239423Z Could not GET 'https://dl.google.com/dl/android/maven2/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'.
2023-08-30T22:27:24.108662595Z Got socket exception during request. It might be caused by SSL misconfiguration
2023-08-30T22:27:24.108669328Z
2023-08-30T22:27:24.108716268Z
2023-08-30T22:27:24.108725059Z >
2023-08-30T22:27:24.108732903Z Connection reset by peer
2023-08-30T22:27:24.108740596Z
2023-08-30T22:27:24.108748688Z >
2023-08-30T22:27:24.108759002Z Could not resolve com.google.devtools.ksp:symbol-processing-api:1.9.0-1.0.11.
2023-08-30T22:27:24.108820147Z >
2023-08-30T22:27:24.108829571Z Could not get resource 'https://maven.pkg.jetbrains.space/public/p/compose/dev/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'.
2023-08-30T22:27:24.108837310Z >
2023-08-30T22:27:24.108844471Z Could not GET 'https://maven.pkg.jetbrains.space/public/p/compose/dev/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'.
2023-08-30T22:27:24.108860417Z
2023-08-30T22:27:24.108866956Z > Got socket exception during request. It might be caused by SSL misconfiguration
So because it is highly unlikely or actually statistically impossible that repo.maven.apache.org, dl.google.com and maven.pkg.jetbrains.space all always decide to crash simultaneously whenever I run an XCode build for the past 3 months, this has to be an issue on their part. Did they suddenly stop allowing internet connections in the archive step?
Apple Support was just useless and aksed for irrelevant and impossible information like:
my browser
my ipa file (of a failing build?!)
Does anyone have any idea what causes this or has contacts to someone at apple which can fix this?
Post not yet marked as solved
Simulators will not install. Run destinations all empty. Can't even run on device.
XCode 15.4 beta
Sonoma 14.4.1
Intel Mac 16" MBP
Attached screenshot of error. iOS 17.5 beta 2 (21F5058d) "Not compatible with XCode 15.4 beta"
No run destinations appear. Not even 17.4 device that is plugged in.
This all worked yesterday after initial XCode upgrade to 15.4 beta. Now all destinations are missing, even though they appear as installed in the 'Platforms' window.
(yes I have rebooted and restarted XCode).
Post not yet marked as solved
Since Xcode 15.3 it has become impossible to build our project more twice in a row without encountering a batch of "internal inconsistency error: never received target ended message for target ID …".
This issues appeared a few months ago (15.0 i think, but i'm not sure), but xcode 15.3 makes it almost unusable. We're a team of 3 iOS devs, and we're all having the problem.
Our project involves a lot of SPM packages, a few cocoa pods, a few iOS Frameworks, and a bit of swiftgen. Nothing particularly special for a large project, and no custom build steps that does anything fancy.
It is now to the point where we're looking for alternative to xcode, because we can't decently kill xcode and restart every time we have to build our code...
Post not yet marked as solved
The std::sort function, which was not problematic until version 15.2, causes a crash, perhaps because of a modified [The performance of std::sort and std::ranges::sort was improved by up to 50% for arithmetic types (120908845)] entry in xcode 15.3.
For your information, std::vector contained instances of the class I had written, and I was comparing them through a custom Comp function.
However, items that should not be null are recognized as null and crash as a null reference.
Please check it and return it.
Hello,
I am trying out Xcode Cloud for the first time. I could connect to Github in the initial setup and had a few failed builds (package resolution error), which I resolved fairly quickly.
Now whenever I am trying to build, I get the following error:
Xcode Cloud is unable to connect to the repository “<respository-name>”. Reconnect the repository to resume builds.
I am unable to remove the connection from settings as well because it's stuck in a loading state. Is there a way to fix this?
Post not yet marked as solved
for me, I can not install ios 17.4 Sumilator
https://developer.apple.com/documentation/xcodekit/creating_a_source_editor_extension
I created new MacOS project and added a Xcode Source Editor Extension target to the project.
I run the extension in debug mode with extension target, but the extension is not show up in Editor menu debug mode Xcode.
Xcode version is 15.3(released)
MacOS version is 14.4.1 Sonoma
Post not yet marked as solved
Hi guys, I've just installed the newest Xcode Version 15.0 (15A240d) and I can see that the Reality Composer is missing. It is not appearing in Xcode -> Open Developer Tool menu. Where/how I can find it? My old reality compose project now opens like a text file, and I have no option to open it in Reality Composer like it was in old Xcode.
I'm kinda stuck with my project, so any help could be useful.
Thanks,
J
I have a Swift project with some C code in it. The C code creates a byte array with about 600K elements. Compiling under Xcode, the compilation takes a really long time. When I try to run the code, it fails immediately upon startup. When I cut this large array out of the build, everything else works fine. Does anyone know what's going on here, and what I might do about it?
error: unable to read property list from file:
/Users/jayengineer/Workspace/react_projects/Breached/ios/Breached/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 2.) (in target 'Breached' from project 'Breached')
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Breached</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0.4/string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>com.jay754.Breached</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>SplashScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<false/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDefault</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
Post not yet marked as solved
Dears, I need XCode13 for my iMac (Monterey OS 12.7.4). Where can I find it.
Thx and best regards
Roman
Post not yet marked as solved
I am trying to add capabilities in my Vision OS application but ending up in failure it doesn't add any with out any error or notifications is Apple disabled this feature or potentially a BUG
Post not yet marked as solved
Running on a Core i9 MacBook Pro with macOS 13.4 (22F66) and the Xcode 15 beta. Running "Export Localizations" seems to work fine with smaller projects, but in my larger project, it's not working unless I do a "Clean" first.
The way my project is set up is that the main project depends on a few dynamic frameworks built from other Xcode projects which are incorporated into the main project and set as dependencies.
What happens is that I'm getting the error "Unable to build project for localization string extraction. See the build logs for failure description." In the logs, I see that the Link (x86_64) step succeeds, but the Link (arm64) step fails, with a Could not find or use auto-linked framework 'MyFramework' message for each framework dependency that's in another Xcode project. This would suggest that the dependencies are being built only for x86_64. If I clean the project, the "Export Localizations" will then succeed, but if I do a regular build again, "Export Localizations" goes back to being broken.
What I think is happening is that the "Export Localizations" workflow is using the same binaries as Debug builds, and leveraging any existing Debug builds that happen to exist instead of rebuilding them, but it's also trying to build for all supported architectures whereas a Debug build usually only builds the current one. This, of course, causes a failure to link to dependent libraries/frameworks, since they don't have binaries for the non-active architecture.
Is there any way to turn off building for all architectures for the "Export Localizations" workflow? I don't think it's necessary just for localizations TBH.