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

xattr -c not removing com.apple.FinderInfo attribute
Hi all, reposting from here: https://unix.stackexchange.com/questions/789849/xattr-c-not-removing-com-apple-finderinfo-attribute I was trying to build my Xcode project, but ran into the error "resource fork, Finder information, or similar detritus not allowed." I was following the solutions from this stack exchange post, but xattr seems to not be working as expected. Basically, running xattr -cr . on my project directory successfully removes all xattrs except for com.apple.FinderInfo, which persists on all .xcodeproj and .xcworkspace files. I've tried everything under the sun, from xattr -d to sudo to dot_clean to tar to rsync and nothing can remove it. Is this just some kind of immortal attribute? It's preventing me from building my project. I'm at a loss here, this is my senior thesis project.
2
0
176
6d
xattr -c not removing com.apple.FinderInfo attribute from Xcode files
Hi all, reposting this from here: https://unix.stackexchange.com/questions/789849/xattr-c-not-removing-com-apple-finderinfo-attribute I came to this problem because my Xcode project was failing to build due to the error "resource fork, Finder information, or similar detritus not allowed" (was trying the solutions on this post). Basically, running xattr -cr . in the terminal on my project directory removes all extended attributes except com.apple.FinderInfo, which stays on all .xcodeproj and .xcworkspace files. I've tried everything under the sun, from sudo to xattr -d to dot_clean to tar to rsync and nothing works. Is this just an immortal attribute that can never be removed? I'm truly at a loss here, this is for my senior thesis project.
3
0
184
5d
Core database relationship are only partially updating.
I created a data structure based on a dictionary of words. The purpose is to link each word to all other words made up of the same letters plus one. Example: table -> ablate, cablet, tabled, gablet, albeit, albite, etc. For this I built a data model made of three entities: Word, Draw, Link. A Draw is a set of letters corresponding to a Word and sorted in alphabetic order, like : HOUSE -> EHOSU. A Link is a letter that you add to a Draw to get another Draw. So my data model looks like this: And here is how I implemented it in Xcode: Entity Word (let's forget the attribute optComp that plays no role here) Entity Draw Entity Link I am populating the data in two steps: first I read a list of words from a .txt source and I populate the Word entity and at the same time the Draw entity with the corresponding relationship (function loadDic()) This first step apparently works fine. I can easily find all anagrams of any word with something like word.sort.word.spelling I read through the Draw entity. For each draw I seek all existing +1 draws considering each letter of the alphabet. If there are, I create a Link and add the relationships (function createLinks()) Here is where something goes wrong. If the Link's and the relationship Draw.plus seem to be correctly created, the other relationship Link.gives is only partially populated, say 50%. Moreover, I tried to apply an additional routine (updateLinks()) , focusing only on Link's with an empty Link.gives relationship and updating them. But again, only 50% of the nil relationships appear to be populated. I could not find out why those relationships are not properly populated. If someone can help me out I would be grateful. Here is the code: LoadDic() function (OK) : func loadDic() { print("Loading dictionary...") dataAlreadyLoaded.toggle() guard let url = Bundle.main.url(forResource: INPUT_FILE, withExtension: "txt") else { fatalError("\(INPUT_FILE).txt not found") } if let dico = try? String(contentsOf: url, encoding: String.Encoding.utf8 ) { let lines = dico.split(separator: "\r\n") for line in lines { let lineArray = line.split(separator: " ") print("\(lineArray[0])") // word let wordSorted = String(lineArray[0].sorted()) let draw = getDraw(drawLetters: wordSorted) ?? addDraw(drawLetters: wordSorted) // look if draw already exists, otherwise create new one. let wordItem = Word(context: viewContext) // create word entry with to-one-relationship to draw wordItem.spelling = String(lineArray[0]) wordItem.optComp = (Int(String(lineArray[1])) == 1) wordItem.sort = draw do { try viewContext.save() } catch { print("Errort saving ods9: \(error)") } } } print("Ods Chargé") } func addDraw(drawLetters: String) -> Draw { let newDraw = Draw(context: viewContext) newDraw.draw = drawLetters return(newDraw) } func getDraw(drawLetters: String) -> Draw? { let request: NSFetchRequest<Draw> = Draw.fetchRequest() request.entity = Draw.entity() request.predicate = NSPredicate(format: "draw == %@", drawLetters) do { let drw = try viewContext.fetch(request) return drw.isEmpty ? nil : drw[0] } catch { print("Erreur recherche Tirage") return nil } } createLinks() function (NOK): func createLinks() { var erreur = " fetch request <Draw>" let request: NSFetchRequest<Draw> = Draw.fetchRequest() request.entity = Draw.entity() request.predicate = NSPredicate(value: true) print("Building relationships...") do { let draws = try viewContext.fetch(request) count = draws.count for draw in draws { print("\(count) - \(draw.draw!)") linkTable.removeAll() for letter in ALPHABET { print(letter) let drawLettersPlus = String((draw.draw! + String(letter)).sorted()) // draw with one more letter if let drawPlus = draws.first(where: { $0.draw == drawLettersPlus }) { // look for Draw entity that matches augmented draw let linkItem = Link(context: viewContext) // if found, create new link based on letter with relationship to augmented draw linkItem.letter = String(letter) linkItem.gives = drawPlus erreur = " saving \(draw.draw!) + \(letter)" try viewContext.save() linkTable.append(linkItem) // saves link to populate the one-to-many relationship of the initial draw, once the alphabet is through } } let drawUpdate = draw as NSManagedObject // populate the one-to-many relationship of the initial draw let linkSet = Set(linkTable) as NSSet drawUpdate.setValue(linkSet, forKey: "plus") erreur = " saving \(draw.draw!) links plus" try viewContext.save() count -= 1 // next draw } } catch { print("Error " + erreur) } print("Graph completed") } updateLinks function (NOK): func updateLinks() { var erreur = "fetch request <Link>" let request: NSFetchRequest<Link> = Link.fetchRequest() request.entity = Link.entity() print("Running patch...") do { request.predicate = NSPredicate(format: "gives == nil") let links = try viewContext.fetch(request) for link in links { let baseDraw = link.back!.draw! print("\(baseDraw) \(link.letter!)") let augmDrawLetters = String((baseDraw + link.letter!).sorted()) if let augmDraw = getDraw(drawLetters: augmDrawLetters) { viewContext.perform { let updateLink = link as NSManagedObject updateLink.setValue(augmDraw, forKey: "gives") erreur = " saving \(augmDraw.draw!) \(link.letter!)" do { try viewContext.save() } catch { print("Erreur mise à jour lien") } } } } } catch { print("Error " + erreur) } } RESULT And this is the output showing the content of the Draw entity with relationships after createLinks() is applied: And here after updateLinks() is applied :
2
0
368
4d
Initial Setup of Xcode Cloud won't grant Github access
I'm trying to set up Xcode Cloud for the first time. When I go through the "Get Started" flow and get to "Grant Access to Your Source Code" step, when I click the "Grant Access" button, I get "This Operation Could Not Be Completed." It has the correct URL to my Github repo. Github is working fine in Xcode itself: I can push and pull changes and view repo history. I've tried: restarting Xcode rebooting the Mac Removing the Github account from Xcode and adding it back Creating a new Github personal token and removing the Github account from Xcode and using the new token to add it back I've looked through my Github settings and don't see anything that might cause an issue. I filed FB16511549 to report this. The error dialog in Xcode automatically filled the feedback fields, and says: "API Invalid status code: 500. XcodeCloudCombineAPI.XCCResponseError:1" I'm running Xcode 16.2 (16C5032a) on an M4 MacBook Pro running Sequoia 15.3.1 (24D70). Does anyone have any insights or ideas of other things to try? Thanks.
4
3
337
4d
Xcode: Skipping Duplicate Build File in Compile Sources in a .swiftpm Project – How to Fix?
I'm trying to add Assets.xcassets to a .swiftpm project, but I'm getting the warning: ⚠️ Ignoring duplicate build file in build source build phase (Just to know, that is about developing in XCODE, in Swift Playgrounds does not appear it, even in this second being harder to setting up) The problem is that there are no “Build Phases” in XCODE to remove duplicate files manually. I've already tried adding the path of Assets.xcassets in the resources property of Package.swift, like: .executableTarget( name: "AppModule", path: ".", resources: [ .process("Assets.xcassets") ] ) Even so, the warning persists. Does anyone know how to solve this? Is there any way to remove duplicate references or force a cleanup of the Swift Package Manager cache to fix it? I appreciate any tips! 🙏🚀
1
1
249
1w
Xcode Cloud won't load from Xcode or App Store Connect
I am setting up a new app and am having problems with Xcode Cloud. From Xcode if I click on the "Cloud" button under the Report Navigator I get a spinner for a long time then get the message "Could not load Xcode Cloud data". I also visited the "Xcode Cloud" tab under my app in App Store Connect and I get a spinner and nothing loads. This is a recent account and I'm setting up Xcode Cloud for the first time. Below is what I've tried and I'm out of ideas on how to get this working. In Xcode, I signed out and back in as the Account Holder Closed Xcode and reopened This occurred yesterday and today and have not seen a problem under the Apple System Status page On the latest Xcode 16.2 Checked the Signing & Capabilities tab in Xcode and my team a bundle Id is correct and it's happy with signing. At this time on my machine I am using the distribution profile.
11
2
369
5d
Mismatch of teamID while creating development certificate
Hi Team, I have created multiple certificates for macOS application. Below are the certificates created- Apple Development Certificate DeveloperID Installer Certificate Apple Distribution Certificate others certificates Later, I have imported the all these above certificates in keychain-access. Now, I tried to compile the code through Xcode. I am getting error for code signing certificate. Warning: unable to build chain to self-signed root for signer "Apple Development: Amit (M2WMF2YERI)” .... Command CodeSign failed with a nonzero exit code When I checked the TeamID of User(Amit) I can see that his current TeamID is [P8ZW3W9R2Q]. There is mismatch of teamID in apple development certificate generation. Note- All certificates are generated with current TeamID[P8ZW3W9R2Q] of user (Amit) except Apple Development certificate which has been generated with TeamID [M2WMF2YERI] which is generated with old TeamID of user (Amit). I attempted to generate the apple development certificate multiple times but it is getting generated with old TeamID TeamID[M2WMF2YERI] of user(Amit)
 Summary- While creating a developer certificate using apple developer account and mapping it in keychain, the certificate is being generated with old apple account details (Inactive) instead of the current one. This is causing issues when using the certificate in keychain. If anyone has encountered this issue, how it was resolved?
 Thanks
1
0
194
1w
Hide the TabBar while navigating between screens in Xcode Swift for iOS 16 or later.
Hey, I am developing my app in Swift using Xcode for iOS 16 or later. I want to implement the navigation behavior found in apps like WhatsApp or Instagram, where navigating from the feed to a user's profile keeps the tab bar visible. Then, when opening a chat from the profile, a new view appears, leaving the profile view behind along with the tab bar. I have this code as a base to achieve this, but when navigating from View 1 to View 2, it applies the effect that should only happen in View 3. I haven't been able to prevent View 2 from using this effect and limit it only to View 3. Can anyone help me??? import SwiftUI struct ContentView: View { @State private var path: [String] = [] // Controls the navigation stack in View1 var body: some View { NavigationStack(path: $path) { TabView { View1(path: $path) .tabItem { Label("View 1", systemImage: "1.circle") } View4() .tabItem { Label("View 4", systemImage: "4.circle") } } .navigationDestination(for: String.self) { value in if value == "View3" { View3(path: $path) // View3 outside the TabView } } } } } struct View1: View { @Binding var path: [String] var body: some View { VStack { Text("View 1 with TabBar") Button("Go to View 2") { path.append("View2") // Adds View2 to the stack } } .navigationDestination(for: String.self) { value in if value == "View2" { View2(path: $path) } } } } struct View2: View { @Binding var path: [String] var body: some View { VStack { Text("View 2 with TabBar") Button("Go to View 3 (Without TabBar)") { path.append("View3") // Adds View3 to the stack } } } } struct View3: View { @Binding var path: [String] var body: some View { VStack { Text("View 3 without TabBar") .font(.largeTitle) .padding() Button("Go Back") { path.removeLast() // Returns to View2 } } } } struct View4: View { var body: some View { Text("View 4 with TabBar") } }
2
0
134
1w
Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier
I had a standalone python application (created with pyinstaller) which was working perfectly alone. This macOS application was created in VS. I later decided to improve the application by implementing some Swift features (Subscription Manager). This required me to write a brief Swift file (Subscription Management) in XCode which the Python file called on. Python Standalone Application Calling Swift : # Function to check if the user has a valid subscription def check_subscription(): subscription_manager_path = "/Users/isseyyohannes/Library/Developer/Xcode/DerivedData/SubscriptionManager2-ezwjnnjruizvamaesqighyoxljmy/Build/Products/Debug/SubscriptionManager2" # Adjust path try: result = subprocess.run([subscription_manager_path], capture_output=True, text=True, check=True) return "VALID_SUBSCRIPTION" in result.stdout # Return True if valid, False otherwise except subprocess.CalledProcessError as e: print(f"Error checking subscription: {e}") return False # Return False if there's an issue However, when I try to run xcrun altool --validate-app ... I get the following error message. The error reads as follows Running altool at path '/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Frameworks/AppStoreService.framework/Support/altool'... 2025-02-16 11:02:21.089 *** Error: Validation failed for '/Users/isseyyohannes/Desktop/ALGORA Performance.app'. 2025-02-16 11:02:21.089 *** Error: Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in ‘/Users/isseyyohannes/Desktop/ALGORA Performance.app’. Unable to validate your application. (-21017) { NSLocalizedDescription = "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in \U2018/Users/isseyyohannes/Desktop/ALGORA Performance.app\U2019."; NSLocalizedFailureReason = "Unable to validate your application."; I located the Info.plist file which had everything correct (my Bundle ID, etc.) for the python file. I am successfully able to notarize the application, just having issues submitting it. **It is worth noting I currently have a python executable calling on a file written in swift code and created in xcode. I created the python application with the following command on VS. pyinstaller --onefile --noconsole \ --icon="/Users/isseyyohannes/Downloads/E0BWowfbDkzEiEAckjsHAsYMzpdjjttT.icns" \ --codesign-identity "Developer ID Application: Issey Yohannes (GL5BCCW69X)" \ --add-binary="/Users/isseyyohannes/Library/Developer/Xcode/DerivedData/SubscriptionManager2-ezwjnnjruizvamaesqighyoxljmy/Build/Products/Debug/SubscriptionManager2:." \ --osx-bundle-identifier com.algora1 \ /Users/isseyyohannes/Desktop/ALGORA\ Performance.py Note : All steps on Apple Developer site are done (ex. Creating identifier, secret password etc)
1
0
160
1w
Different Build Schemes -> Error: -Onone Swift optimization level to use previews
I have a sample SwiftUI iOS app. As shown in the screenshot below, my project has three configurations: Debug, MyDebug, Release. If I select the Debug or MyDebug scheme, I get a preview. But if I select the Release scheme, I get an error that says the following. ”***.app” needs -Onone Swift optimization level to use previews (current setting is -O) , where *** is the app name. It probably has nothing to do with the Preview error, but the Info.plist has a dictionary such that the key name is devMode, and the value is $(DEVMODE). And I have a user-defined setting as shown below. My ContentView has the following. import SwiftUI struct ContentView: View { @State private var state: String = "" var body: some View { VStack { Text("Hello, world!: \(state)") } .onAppear { if let devMode = Bundle.main.object(forInfoDictionaryKey: "devMode") as? String { print("Development mode: \(devMode)") state = devMode } if let path = Bundle.main.path(forResource: "Info", ofType: "plist") { if let dict = NSDictionary(contentsOfFile: path) { print("**** \(dict)") } } #if DEBUG print("Debug") #elseif MYDEBUG print("MyDebug") #else print("Que?") #endif } } } #Preview { ContentView() } So my question is how I get the preview for all three build schemes? Muchos thankos.
2
0
164
3d
App terminated at launch exported on Xcode 16.2
when upgrading Xcode from 15.4 to 16.2, my apps crash at launch. device: iphone 14 pro max, iOS version 18.2.1 Termination Reason: DYLD 4 Symbol missing Symbol not found: _$s10Foundation4DateV4GRDB24DatabaseValueConvertibleA2dEP08databaseE0AD0dE0VvgTW Full Report Below: Full Report {"app_name":"myapp","timestamp":"2025-02-15 20:58:55.00 +0800","app_version":"5.25.0","slice_uuid":"dc349d86-392d-39fa-9cd3-daccab1db019","build_version":"0","platform":2,"bundleID":"com.xxxx.myapp","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"iPhone OS 18.2.1 (22C161)","roots_installed":0,"name":"myapp","incident_id":"99A2D5C2-3A04-47A7-9521-408E2287D0B4"} { "uptime" : 200000, "procRole" : "Foreground", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "iPhone15,3", "coalitionID" : 601, "osVersion" : { "isEmbedded" : true, "train" : "iPhone OS 18.2.1", "releaseType" : "User", "build" : "22C161" }, "captureTime" : "2025-02-15 20:58:55.5603 +0800", "codeSigningMonitor" : 2, "incident" : "99A2D5C2-3A04-47A7-9521-408E2287D0B4", "pid" : 8783, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2025-02-15 20:58:55.5448 +0800", "procStartAbsTime" : 5031986462126, "procExitAbsTime" : 5031986824477, "procName" : "myapp", "procPath" : "/private/var/containers/Bundle/Application/E0327E15-3AA9-42CA-8BEF-99076C11C04D/myapp.app/myapp", "bundleInfo" : {"CFBundleShortVersionString":"5.25.0","CFBundleVersion":"0","CFBundleIdentifier":"com.xxxx.myapp"}, "storeInfo" : {"deviceIdentifierForVendor":"D9AFB1A6-DDA6-462D-A27D-36E143C7ACF6","thirdParty":true}, "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "com.xxxx.myapp", "crashReporterKey" : "ded93d2da6d19b1e84aff2c00001f6ee1f7b0aca", "appleIntelligenceStatus" : {"state":"unavailable","reasons":["accessNotGranted","assetIsNotReady","siriAssetIsNotReady","notOptedIn","deviceNotCapable"]}, "wasUnlockedSinceBoot" : 1, "isLocked" : 0, "codeSigningID" : "com.xxxx.myapp", "codeSigningTeamID" : "8VGP475R33", "codeSigningFlags" : 570434305, "codeSigningValidationCategory" : 5, "codeSigningTrustLevel" : 4, "instructionByteStream" : {"beforePC":"5AAAACABAAAoAQAAMAEAADgBAABAAQAASAEAAGQBAAAwQYDSARAA1A==","atPC":"AwEAVH8jA9X9e7+p/QMAkcL0/pe/AwCR/XvBqP8PX9bAA1/WEC2A0g=="}, "bootSessionUUID" : "BF78EBB1-E385-4636-987E-B4388D80EBF3", "basebandVersion" : "3.20.05", "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"}, "termination" : {"code":4,"flags":518,"namespace":"DYLD","indicator":"Symbol missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["Symbol not found: _$s10Foundation4DateV4GRDB24DatabaseValueConvertibleA2dEP08databaseE0AD0dE0VvgTW","Referenced from: /Volumes/VOLUME//myapp.app/myapp","Expected in: /Volumes/VOLUME//myapp.app/myapp"]}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":2563160,"threadState":{"x":[{"value":6},{"value":4},{"value":6091179776},{"value":301},{"value":6091178752},{"value":0},{"value":6091174168},{"value":3776},{"value":32},{"value":6091178631},{"value":10},{"value":0},{"value":56},{"value":0},{"value":4439450793},{"value":6091174968},{"value":521},{"value":7593716520,"symbolLocation":420,"symbol":"__simple_bprintf"},{"value":0},{"value":0},{"value":6091178752},{"value":301},{"value":6091179776},{"value":4},{"value":6},{"value":9288},{"value":6091191552},{"value":8701512496,"symbolLocation":19168,"symbol":"dyld4::preallocator"},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":7594015840},"cpsr":{"value":2147487744},"fp":{"value":6091178704},"sp":{"value":6091178640},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":7593988164,"matchesCrashFrame":1},"far":{"value":0}},"frames":[{"imageOffset":442436,"symbol":"__abort_with_payload","symbolLocation":8,"imageIndex":1},{"imageOffset":470112,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":104,"imageIndex":1},{"imageOffset":470164,"symbol":"abort_with_payload","symbolLocation":16,"imageIndex":1},{"imageOffset":22704,"symbol":"dyld4::halt(char const*, dyld4::StructuredError const*)","symbolLocation":300,"imageIndex":1},{"imageOffset":30132,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":4124,"imageIndex":1},{"imageOffset":198252,"symbol":"dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const","symbolLocation":544,"imageIndex":1},{"imageOffset":195536,"symbol":"start","symbolLocation":2188,"imageIndex":1}]}], "usedImages" : [ { "source" : "P", "arch" : "arm64", "base" : 4375625728, "size" : 55197696, "uuid" : "dc349d86-392d-39fa-9cd3-daccab1db019", "path" : "/private/var/containers/Bundle/Application/E0327E15-3AA9-42CA-8BEF-99076C11C04D/myapp.app/myapp", "name" : "myapp" }, { "source" : "P", "arch" : "arm64e", "base" : 7593545728, "size" : 536896, "uuid" : "4eb7459f-e237-38ce-8240-3f3e2e1ce5ab", "path" : "/usr/lib/dyld", "name" : "dyld" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } ], "sharedCache" : { "base" : 6907789312, "size" : 4393861120, "uuid" : "16cc07dd-eea7-3049-9ee6-335fc7c37edf" }, "vmSummary" : "ReadOnly portion of Libraries: Total=259.2M resident=0K(0%) swapped_out_or_unallocated=259.2M(100%)\nWritable regions: Total=4240K written=144K(3%) resident=144K(3%) swapped_out=0K(0%) unallocated=4096K(97%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 16K 1 \nStack 1008K 1 \nVM_ALLOCATE 16K 1 \nVM_ALLOCATE (reserved) 672K 4 reserved VM address space (unallocated)\n__DATA 4868K 3 \n__DATA_CONST 1638K 2 \n__DATA_DIRTY 12K 1 \n__LINKEDIT 206.1M 2 \n__TEXT 53.2M 2 \n__TPRO_CONST 272K 1 \ndyld private memory 1024K 1 \nmapped file 61.3M 23 \npage table in kernel 144K 1 \n=========== ======= ======= \nTOTAL 330.0M 43 \nTOTAL, minus reserved VM space 329.3M 43 \n", "legacyInfo" : { "threadTriggered" : { } }, "logWritingSignature" : "c92c68c5c0a3817283c893ee8456b996f585f803", "trialInfo" : { "rollouts" : [ { "rolloutId" : "63f9578e238e7b23a1f3030a", "factorPackIds" : { "SMART_REPLY_ACTIONS_EN" : "64af1347f38420572631a103" }, "deploymentId" : 240000005 }, { "rolloutId" : "6761d0c9df60af01adb250fb", "factorPackIds" : { }, "deploymentId" : 240000001 } ], "experiments" : [ ] } }
1
0
186
3d
Does CLANG_CXX_LANGUAGE_STANDARD affect my Swift app and why is it not set to Compiler Default?
I was just comparing the build settings of two of my apps to try to understand why they behave differently (one of them uses the full screen on iPad, and the other one has small top and bottom black borders, although that's not the issue I want to discuss now). I saw that the option CLANG_CXX_LANGUAGE_STANDARD is set to gnu++0x for the older project, while it's set to gnu++17 for the newer one. The documentation lists different possible values and also a default one: Compiler Default: Tells the compiler to use its default C++ language dialect. This is normally the best choice unless you have specific needs. (Currently equivalent to GNU++98.) If it really is the best choice (normally), why is it not used when creating a new default Xcode project? Or is it better to select a newer compiler version (GNU++98 sounds quite old compared to GNU++17)? Also, does this affect Swift code?
2
0
156
1w
Xcode16 support
I don't see a timeline for Xcode16 adoption yet. However, based on past experience, Apple usually provide a deadline by the end of April. Do we have a tentative timeline for Xcode 16 (Apps uploaded to App Store Connect must be built with Xcode 16)? This will help us plan our delivery.
1
0
236
1w
Implementing RawRepresentable for a DictionaryType has broken my Test target build. Not sure how to fix things...
For my app I've created a Dictionary that I want to persist using AppStorage In order to be able to do this, I added RawRepresentable conformance for my specific type of Dictionary. (see code below) typealias ScriptPickers = [Language: Bool] extension ScriptPickers: @retroactive RawRepresentable where Key == Language, Value == Bool { public init?(rawValue: String) { guard let data = rawValue.data(using: .utf8), let result = try? JSONDecoder().decode(ScriptPickers.self, from: data) else { return nil } self = result } public var rawValue: String { guard let data = try? JSONEncoder().encode(self), // data is Data type let result = String(data: data, encoding: .utf8) // coerce NSData to String else { return "{}" // empty Dictionary represented as String } return result } } public enum Language: String, Codable, { case en = "en" case fr = "fr" case ja = "ja" case ko = "ko" case hr = "hr" case de = "de" } This all works fine in my app, however trying to run any tests, the build fails with the following: Conflicting conformance of 'Dictionary<Key, Value>' to protocol 'RawRepresentable'; there cannot be more than one conformance, even with different conditional bounds But then when I comment out my RawRepresentable implementation, I get the following error when attempting to run tests: Value of type 'ScriptPickers' (aka 'Dictionary<Language, Bool>') has no member 'rawValue' I hope Joseph Heller is out there somewhere chuckling at my predicament any/all ideas greatly appreciated
1
0
223
5d
Apple developer
in xcode i have select the developer team. but show some error that is here, "Communication with Apple failed Your team has no devices from which to generate a provisioning profile. Connect a device to use or manually add device IDs in Certificates, Identifiers & Profiles. https://developer.apple.com/account/" and show this error also "No profiles for 'com.kuntaldoshi.homeautomation' were found Xcode couldn't find any iOS App Development provisioning profiles matching 'com.kuntaldoshi.homeautomation'."
0
0
151
1w
Compiling old code with XCode give the error [XSym <- Unknown type name ‘Xsym’]
When I try to compile with XCode an app that is about 10 years old gives me the following compiler errors in JSONModel.h header file. There are only 4 lines in that file. Content of file with the error messages. XSym <- Uknown type name ‘Xsym’ 0075 <- Expected identifier or ‘(’ a7b090c047283ff76fc7f1def7ba7425 ../../../JSONModel/JSONModel/JSONModel/JSONModel.h The app was originally compiled wit XCode 3.2, targeting iPhone 7 Now I am using XCode 16, targeting iPhone 12. Original coder is unaccessible. I am very new to this environment and any guidance / assistance is greatly appreciated. Please let me know if it is more appropriate to post this somewhere else.
1
0
116
2w