Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Posts under Xcode tag

3,099 Posts
Sort by:
Post not yet marked as solved
3 Replies
37 Views
It worked fine yesterday, now after upgrade of Xcode, app won't run. It doesn't matter if I try to run the app in a simulator or on a real iOS device, it does the same thing. A window pops up with a title of "App installation failed: Unable to Install "app name" Then down below there is a huge paragraph that starts with this: Please try again later. Failed to load Info.plist from bundle at path /Users.... I have rebooted as well and also waited to make sure everything had time to load from the upgrade. I really have no clue how to resolve this issue. Hoping someone can shed some light on this for me. Thank you.
Posted
by bnetsvs.
Last updated
.
Post marked as solved
1 Replies
44 Views
Lately, I keep getting this warning when closing Xcode asking if I want to save the changes. Strangely enough, I have never received this before. I looked to see if I could disable and enable autosave. Unfortunately I have not found anything. Does anyone have any tips?
Posted
by iRIG.
Last updated
.
Post not yet marked as solved
1 Replies
26 Views
I have somehow managed to switch off the error messages that come up as you are typing co9de in, I don't know how I did it, and I can't switch them back on, as they are very useful, please could someone tell me how to switch them back on.
Posted
by jamesm46.
Last updated
.
Post not yet marked as solved
4 Replies
1.3k Views
Hey! I noticed a difference between Xcode 15.2 and 15.3 which causes our production build to fail verification with Apple. This happens with one Swift Package which has xcframeworks as binary targets. There is no issue when exporting the app using Xcode 15.2, as the frameworks are not exported into the Frameworks folder within the app package when inspecting the exported archive. With Xcode 15.3 it is exported which then causes the following error: 2024-03-11 13:53:03.520 *** Error: ERROR: [ContentDelivery.Uploader] Asset validation failed (90208) Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist. (ID: 9e47cf5c-dc23-4cdf-8490-f9befc9e2aa1) 2024-03-11 13:53:03.521 *** Error: ERROR: [ContentDelivery.Uploader] Asset validation failed (90208) Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist. (ID: 619289b3-c102-4161-8b63-73d42292a3cf) 2024-03-11 13:53:03.522 *** Error: ERROR: [ContentDelivery.Uploader] Asset validation failed (90208) Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist. (ID: ac590192-a99b-4aec-ad08-b21afadd10d0) 2024-03-11 13:53:03.522 *** Error: ERROR: [ContentDelivery.Uploader] Asset validation failed (90208) Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist. (ID: 69e0e8a6-11a7-46e5-9e5a-cf85c8fc15be) 2024-03-11 13:53:21.546 INFO: [ContentDelivery.Uploader] ============= VERIFY FAILED with 4 errors. ============= 2024-03-11 13:53:21.548 *** Error: Validation failed for 'OEBB.ipa'. 2024-03-11 13:53:21.548 *** Error: Asset validation failed Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist. (ID: 9e47cf5c-dc23-4cdf-8490-f9befc9e2aa1) (90208) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist. (ID: 9e47cf5c-dc23-4cdf-8490-f9befc9e2aa1)"; NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Asset validation failed\" UserInfo={status=409, detail=Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist., id=9e47cf5c-dc23-4cdf-8490-f9befc9e2aa1, code=STATE_ERROR.VALIDATION_ERROR.90208, title=Asset validation failed, NSLocalizedFailureReason=Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist., NSLocalizedDescription=Asset validation failed}"; "iris-code" = "STATE_ERROR.VALIDATION_ERROR.90208"; } 2024-03-11 13:53:21.548 *** Error: Asset validation failed Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist. (ID: 619289b3-c102-4161-8b63-73d42292a3cf) (90208) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist. (ID: 619289b3-c102-4161-8b63-73d42292a3cf)"; NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Asset validation failed\" UserInfo={status=409, detail=Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist., id=619289b3-c102-4161-8b63-73d42292a3cf, code=STATE_ERROR.VALIDATION_ERROR.90208, title=Asset validation failed, NSLocalizedFailureReason=Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist., NSLocalizedDescription=Asset validation failed}"; "iris-code" = "STATE_ERROR.VALIDATION_ERROR.90208"; } 2024-03-11 13:53:21.548 *** Error: Asset validation failed Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist. (ID: ac590192-a99b-4aec-ad08-b21afadd10d0) (90208) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist. (ID: ac590192-a99b-4aec-ad08-b21afadd10d0)"; NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Asset validation failed\" UserInfo={status=409, detail=Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist., id=ac590192-a99b-4aec-ad08-b21afadd10d0, code=STATE_ERROR.VALIDATION_ERROR.90208, title=Asset validation failed, NSLocalizedFailureReason=Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist., NSLocalizedDescription=Asset validation failed}"; "iris-code" = "STATE_ERROR.VALIDATION_ERROR.90208"; } 2024-03-11 13:53:21.548 *** Error: Asset validation failed Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist. (ID: 69e0e8a6-11a7-46e5-9e5a-cf85c8fc15be) (90208) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist. (ID: 69e0e8a6-11a7-46e5-9e5a-cf85c8fc15be)"; NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Asset validation failed\" UserInfo={status=409, detail=Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist., id=69e0e8a6-11a7-46e5-9e5a-cf85c8fc15be, code=STATE_ERROR.VALIDATION_ERROR.90208, title=Asset validation failed, NSLocalizedFailureReason=Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist., NSLocalizedDescription=Asset validation failed}"; "iris-code" = "STATE_ERROR.VALIDATION_ERROR.90208"; } The package used is the following: https://github.com/ilendemli/appcenter-sdk-apple-spm (package by me, using binary packages to avoid building AppCenter every time) Comparison image: Left exported using Xcode 15.2 (works), right exported using 15.3 (fails)
Posted
by ilendemli.
Last updated
.
Post not yet marked as solved
0 Replies
67 Views
Older version of xcode 14.3.1 is uploading build with notice to update xcode version but newer version of xcode 15.3.1 and beta giving the error below. Please correct the following issues and upload a new binary to App Store Connect. ITMS-90338: Non-public API usage - The app references non-public symbols in Frameworks/Shared.framework/Shared: _SSL_CTX_free, _SSL_CTX_new, _SSL_CTX_set_alpn_protos, _SSL_CTX_set_options, _SSL_do_handshake, _SSL_free, _SSL_get0_alpn_selected, _SSL_get_error, _SSL_get_session, _SSL_new, _SSL_read, _SSL_set_alpn_protos, _SSL_set_bio, _SSL_set_connect_state, _SSL_write. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/ Apple Developer Relations
Posted Last updated
.
Post not yet marked as solved
0 Replies
33 Views
・Xcode 15.1 ・The app is also compatible with Watch. In the privacy manifest, we defined NSPrivacyTracking to YES and NSPrivacyTrackingDomains to specific domains. Furthermore, to avoid warnings when uploading to Testflight, we have implemented a privacy manifest file in the app with the following configuration. ・Place the .xcprivacy files for the app itself and WatchExtension under their respective Target directories. ・Settings related to tracking domains are listed in .xcprivacy of the app itself. ・In .xcprivacy of WatchExtension, only describe the reason for UserDefault of NSPrivacyAccessedAPIType However, these implementations do not block network connections, "Fault" still occurs on "Point of Intereset instruments". Is there something wrong with my implementation?
Posted
by Orihime.
Last updated
.
Post not yet marked as solved
2 Replies
180 Views
I have a CI setup where one job builds xctestrun files for tests and another job that uses tem to actually run tests. The setup worked fine with XCode 14 on macOS 13. Now after switching to macOS 14 and XCode 15.0.1 xcodebuild doesn't want to run tests anymore: xcodebuild -destination 'generic/platform=iOS' -derivedDataPath DerivedData_Temporary/ -resultBundlePath './fastlane/test_output/APPName-iOS.xcresult' -testPlan 'APPName-Unit-All' -xctestrun 'DerivedData_Temporary/Build/Products/APPName_APPName-Unit-All_iphonesimulator17.0-arm64-x86_64.xctestrun' test-without-building throws an error xcodebuild: error: Failed to build workspace iOS with scheme APPName-iOS.: Scheme “APPName-iOS” does not have an associated test plan named “APPName-iOS-Unit-All” Almost the same command for macOS works perfectly fine. What does this error even mean? And how to fix it?
Posted Last updated
.
Post not yet marked as solved
1 Replies
32 Views
Hi Everyone, This is my first post here. I am a student looking for answers, and I would like to know how to use libraries such as the ones mentioned in the title. How do I link them? I have tried every method under the sun, but I cannot get Xcode to find the file I am trying to include.
Posted
by Ccervera.
Last updated
.
Post not yet marked as solved
1 Replies
63 Views
Hello everyone, So I will start off by saying I am a very amateur developer with some experience in C++ mostly. Over the summer I want to build an app similar to a board game and launch it on the App Store for me and my friends to play when we don't have the game's physical board. Basically, there would be one person who hosts a "game" while everyone else joins through a code or something like that (maybe there's an easier way if you know everyone would be playing in person with each other). Once a game begins I want cards to show up on peoples's screens and that's it, no fancy graphics or anything like that. So, to the root of my issue. I am brand new to Swift and Xcode. I began googling and tinkering with it and made a little app where a user can add names and then pick letters from the names to display (very very basic stuff). I also figured out how to import and manipulate images a little bit. My question is about the process of making a game, connecting it to GameKit/Game Center, and then how to actually launch it on the App Store so my friends can also download it. If anyone has any resources they particularly found useful when starting out using Swift, please let me know. I really really don't like reading straight from the documentation (although who does honestly). Anything helps!! Thank you!
Posted
by dgswag.
Last updated
.
Post not yet marked as solved
1 Replies
50 Views
When using the right mouse button to click on a file, there will be an option for a bookmark file. After adding a bookmark, there will be a purple mark, but no method to remove the mark has been found
Posted
by zyh.
Last updated
.
Post not yet marked as solved
9 Replies
2.6k Views
I just upgraded to XCode15.3 and now all my projects with Assets are getting this compile error. I have tried removing DerivedData caches and rebooting but still get this error. Anyone else hit this problem with XCode 15.3? I was only Building for IOS 16.4 and 17.0.1 and Xcode 14.0 and 15.0 Build Error: Command CompileAssetCatalog failed with a nonzero exit code *** Terminating app due to uncaught exception 'IBPlatformToolFailureException', reason: 'The tool closed the connection (AssetCatalogSimulatorAgent) Execution Context: <IBSimulatorToolCoreSimulatorCLIExecutionContext: 0x600003d5d260 busyCount=0, Idle for 0.0 secs, lifeTime=26.3 secs>, device=IBSimDeviceTypeiPad3x (865E7291-E467-4E8D-B535-D64F43A57F15, iOS 17.4, Shutdown), idiom=<IBIPhoneIdiom: 0x6000028b8000>
Posted
by Scorpius.
Last updated
.
Post not yet marked as solved
0 Replies
50 Views
I'm working on a large SDK of UI frameworks. We have hundreds of strings and an older implementation that resolves them by looking up the key in the main, then current (module) bundles. This allows clients to tailor strings and provide localisation for locales that we don't support. I want to move to String Catalogs and have a way of doing that with a similar solution using LocalizedStringResource. But this seems pointless as I would like to have client String Catalogs show all strings from dependencies (our UI frameworks). Stepping back a bit, the default API for LocalizedResources and Keys uses the main bundle and has bundle as a property but String Catalogs does not and cannot respect that (highlighted in this post). A possible Apple solution could be storing the module with the string in the String Catalog for that framework then the executable can correctly assess what strings it should include based on its dependencies String Catalogs. I am looking for a way around this? Or any suggestions? I believe it might be possible using a build tool plugin to generate the String Catalog for the clients from its dependency catalogs and this way I wouldn't need any trickery / can use the LocalizedResource API as is (main bundle).
Posted
by JoshyMW.
Last updated
.
Post not yet marked as solved
0 Replies
26 Views
I'm using VScode to run flutter app on ios and macos. It showed this error. How can I solve this. I've been working on this with many ways but nothing can solve this.
Posted Last updated
.
Post not yet marked as solved
27 Replies
7.6k Views
None of my existing apps (both in-AppStore and in-development) nor even a brand new WatchOS app can be installed to my Apple Watch. While using Xcode to build and deploy to my Watch, I get this: ”Waiting to reconnect to Apple Watch Xcode will continue when the operation completes.” However, this dialog persists and never completes. I’m running all of the latest: MacOS 14 beta 4, Xcode 15 beta 5, Watch OS 10 beta 4, iOS 17 beta 4. I’ve tried resetting my Watch (with “Erase All” option) and restarting the Mac, the phone and the watch. Any help?
Posted
by CryptoKoa.
Last updated
.
Post not yet marked as solved
0 Replies
58 Views
Hello, I'm working with Mac Book Pro M3 Sonoma 14.4.1 and I have an issue with compilation, sometimes after compilation of the project the symlink files inside Xcode.app are updated, and further compilation will do full recompilation. According to the build log, the issue is pthread.h : Module.NiagaraEditor.9.cpp: Dependency /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h is newer than the last execution of the action: 04/23/2024 14:33:55 vs 04/23/2024 00:20:32 I tried to trace the reason for the symlink update with the fs_usage utility like this: sudo fs_usage -w | grep pthread.h and according to the output the only things that coincide with the file modification time: 13:55:37.157163 lstat64 [ 2] -B918-ED122786C40E.activeSandbox/Root//Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread/pthread.h 0.000034 installd.1747894 13:55:37.159691 link ED122786C40E.activeSandbox/Root//Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/pthread/pthread.h 0.000753 installd.1747894 13:55:37.176355 fsgetpath -ED122786C40E.activeSandbox/Root/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/pthread/pthread.h 0.000039 mds.1764823 13:55:37.176612 fsgetpath activeSandbox/Root/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/pthread/pthread.h 0.000026 mds.1764823 13:55:37.176641 fsgetpath 18-ED122786C40E.activeSandbox/Root/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/pthread/pthread.h 0.000016 mds.1764823 13:55:37.176666 fsgetpath E.activeSandbox/Root/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/pthread/pthread.h 0.000014 mds.1764823 13:55:37.176689 fsgetpath 8-B918-ED122786C40E.activeSandbox/Root/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread/pthread.h 0.000014 mds.1764823 13:55:37.186224 lstat64 [ 2] A13-4108-B918-ED122786C40E.activeSandbox/Root//Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h 0.000022 installd.1747894 13:55:37.186717 unlink [ 2] A13-4108-B918-ED122786C40E.activeSandbox/Root//Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h 0.000010 installd.1747894 There are link and unlink caused by installd process, which makes me think that it could be related to the system software update, but disabling it did not help.
Posted
by HyPNOTIQ.
Last updated
.
Post not yet marked as solved
0 Replies
57 Views
I am starting a new Xcode Project for macOS app. During the initial development I found that some part of the app should be shared between different targets like macOS App, Quick Look etc. The goal was to user Framework. By selecting Project in Project navigator and using the plus icon, I have created a new Framework target and called it Shared. Next, in my App Project I have added it into the project and checked if it is correctly linked. The framework was Embedded and Signed. Both targets have the same Signing & Capabilities settings. After I move a code into Shared framework it was time for first run. Unfortunately, the app is crashing instantly, and I am getting the error: dyld[65044]: Library not loaded: @rpath/Shared.framework/Versions/A/Shared Referenced from: <2B03FB61-86B3-31E5-A2A4-F18F43AEC875> /Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName e.app/Contents/MacOS/AppName Reason: tried: '/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/Shared.framework/Versions/A/Shared' (code signature in <DD201FE7-57E2-33B1-AD7C-E61BA1345673> '/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/Shared.framework/Versions/A/Shared' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName.app/Contents/Frameworks/Shared.framework/Versions/A/Shared' (code signature in <DD201FE7-57E2-33B1-AD7C-E61BA1345673> '/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName.app/Contents/Frameworks/Shared.framework/Versions/A/Shared' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName.app/Contents/Frameworks/Shared.framework/Versions/A/Shared' (code signature in <DD201FE7-57E2-33B1-AD7C-E61BA1345673> '/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName.app/Contents/Frameworks/Shared.framework/Versions/A/Shared' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs) The Team ID is set properly in Build Settings for both targets. The Bundle Identifier is different and the rest of the settings seems to be correct. I tried changing and juggling the settings related to signing the framework, but it didn't help. I am totally lost without any other idea to fix it... I will be glad for some help.
Posted
by pio11.
Last updated
.
Post not yet marked as solved
2 Replies
110 Views
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) }
Posted
by KittyCat.
Last updated
.
Post not yet marked as solved
3 Replies
2.1k Views
Hi, I use Xcode Instruments to Profile my app, but I don't know why Instruments can not find the right source code path, like the screensh ot shows, the path is wrong, what is ? it looks like a placeholder, is xcode forgetting to replace this placeholder with real file name? anyone know how to fix this? thank you in advance
Posted Last updated
.
Post not yet marked as solved
0 Replies
79 Views
Generating Pods project [!] An error occurred while processing the post-install hook of the Podfile. [Xcodeproj] Consistency issue: build setting `IPHONEOS_DEPLOYMENT_TARGET` has multiple values: `{"Release"=>"9.0", "Debug"=>"9.0", "Profile"=>"9.0", "Debug-production"=>"14.0", "Debug-internal"=>"14.0", "Release-production"=>"14.0", "Release-internal"=>"14.0"}` I am on CocoaPods 1.15.2 and Xcode 15.3. I've looked through all of the build settings in Xcode, etc, and cannot find any references with the version numbers in the error message. All versions are the same across build types. Has anyone ran into this issue running pod install?
Posted Last updated
.
Post not yet marked as solved
1 Replies
61 Views
Hi! imagine this guard let foo = bar.baz else { print("\(foo.value)") return foo.value } I get Xcode error String interpolation produces a debug description for an optional value; did you mean to make this explicit? with the fixing option: Use 'String(describing:)' to silence this warning When I click Fix button I got: guard let foo = bar.baz else { print("\(foString(describing: o.value)")) return foo.value } The automatic completion is broken. Is it a known bug or there is something wrong with me? ;) Xcode version 15.3 (15E204a) macOS Sonoma 14.4.1 (23E224) Apple M1 Pro
Posted
by pacholak.
Last updated
.