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

Xcode Documentation

Posts under Xcode tag

3,095 Posts
Sort by:
Post not yet marked as solved
0 Replies
35 Views
I have a package stored on iCloud Drive and want to list it as a dependency in another package. This worked fine when the package was stored on the Mac hard drive, but moving it to iCloud seems to cause a problem. dependencies: [ .package(url: "file:///Users/bill/Library/Mobile Documents/com~apple~CloudDocs/Projects/Matrix", from: "0.0.1") ], This results in an Xcode error message: x-xcode-log://812C74F5-B7CA-4E15-A87C-E6C9586B0926 /Users/bill/Library/Mobile%20Documents/com~apple~CloudDocs/Projects/Matrix: The source control operation failed because the specified URL cannot be used. Make sure the URL is valid and try again. Can anyone advise how to make the URL valid, or is storing the package on iCloud Drive not yet possible?
Posted
by
Post not yet marked as solved
0 Replies
18 Views
hello. I want to set the Products Path to a visible location of my choice, rather than the Derived Data path that Xcode sets by default (a.k.a ~/Library/Developer/Xcode/DerivedData). I specified the 'Build Products Path' in each project target, but Xcode ignores this and creates the Product in the Derived Data path. I found that if I specify Workspace Settings - Advanced - Legacy, it will create a Product in the specified 'Build Products Path'. This works very well for me. But since the Workspace Settings - Advanced - Legacy setting is a per-user setting, I'll have to ask other colleagues to do this as well. I want people who share my project to have the same Product path without any additional settings. (Of course, it is a project-relative path) Workspace Settings - Advanced - Legacy Is there a way to save and share the settings as shared rather than per-user?
Posted
by
Post not yet marked as solved
1 Replies
78 Views
Hi there, Since Apple keeps force updating macOS and Xcode versions, and iOS versions, whats the point in keeping support for Storyboards? SwiftUI is the new standard. Storyboards can be used in older versions of mac and Xcode. I would like to see Apple focusing on performance more than features. Thanks
Posted
by
Post not yet marked as solved
3 Replies
92 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
Post not yet marked as solved
3 Replies
74 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
Post marked as solved
1 Replies
77 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
Post not yet marked as solved
0 Replies
86 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
by
Post not yet marked as solved
0 Replies
58 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
Post marked as solved
1 Replies
61 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
Post not yet marked as solved
1 Replies
73 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
Post not yet marked as solved
0 Replies
65 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
Post not yet marked as solved
2 Replies
101 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
Post not yet marked as solved
0 Replies
69 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
Post not yet marked as solved
1 Replies
40 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
Post not yet marked as solved
0 Replies
90 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
by
Post not yet marked as solved
2 Replies
120 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
Post not yet marked as solved
1 Replies
66 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
Post not yet marked as solved
0 Replies
73 Views
I got this SSML from w3. org. AVSpeechUtterance(ssmlRepresentation:) is not complying with the contour. It doesn't change hz. <?xml version="1.0"?> <speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis11/synthesis.xsd" xml:lang="en-US"> <prosody contour="(0%,+20Hz) (10%,+30%) (40%,+10Hz)"> good morning </prosody> </speak> override func viewDidLoad() { super.viewDidLoad() guard let localUtterance = AVSpeechUtterance(ssmlRepresentation: self.speechSML) else { print("SML did not work.") return } self.utterance = localUtterance self.utterance.voice = self.voiceNoelle } self.synthesizer.speak(self.utterance)
Posted
by