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

2 Errors when archiving
when I try to archive the project to distribute it to test flight I get these 2 errors the first one is 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/
 .... which for some reason asks me add a device when it shouldn't be needed ... also the second issue is No profiles for 'com.Name.AppName’ were found Xcode couldn't find any iOS App Development provisioning profiles matching 'com.Name.AppName’. I have an app in App Store Connect and I have an identifier with the same bundle ID on my apple developer account the app runs smoothly on the simulator but the problem mis with the archive....and yes I have the apple developer program Things I tried: Tried to refresh the certificate in Xcode Removed my Apple ID and login in again Removed the app from App Store Connect and creating a new one with different bundleID Searched around multiple site (Apple fourms, Reddit, discord Swift Servers and other websites about this issue) Restarted my Mac Restarted Xcode Cleaned the build non of these did any thing to the errors
3
0
562
Oct ’24
Help with SKTestSession Setup - ASDErrorDomain Code 505 Error
Hello everyone, I’m having trouble configuring SKTestSession for StoreKit testing in my UI tests. Specifically, I’m encountering the ASDErrorDomain Code 505 error when trying to set the storefront and locale in my test configuration. Despite following the setup steps, I keep getting errors indicating that the storefront and locale cannot be set, and the transactions are not being processed correctly. Here are the error messages I’m seeing: [SKTestSession] Error saving configuration file: Error Domain=ASDErrorDomain Code=505 "(null)" [SKTestSession] Error setting storefront to JPN for com.company.product: Error Domain=ASDErrorDomain Code=505 "(null)" [SKTestSession] Error fetching the current storefront: Error Domain=ASDErrorDomain Code=505 "(null)" [SKTestSession] Error setting value to ja for identifier 4 for com.company.product: Error Domain=ASDErrorDomain Code=505 "(null)" [SKTestSession] Error fetching value for identifier 4 for com.company.product: Error Domain=ASDErrorDomain Code=505 "(null)" These errors suggest that SKTestSession is unable to save or apply the configuration properly, but I’m not sure why. I’ve tried various storefronts and locales, but the issue persists. I’m running this on Xcode 16.0 (16A242d) on macOS 14.7 and 15. Below is the code for the setUpSession function I’m using to configure the session: func setUpSession(configuration: String = "Configuration", storefront: String? = nil, localeIdentifier: String? = nil) throws -> SKTestSession { var session: SKTestSession! try XCTContext.runActivity(named: "Set up subscriptions for \"\(configuration)\" storefront: \"\(storefront ?? "")\" and locale: \"\(localeIdentifier ?? "")\"") { activity in session = try SKTestSession(configurationFileNamed: configuration) if let storefront { session.storefront = storefront } if let localeIdentifier { session.locale = Locale(identifier: localeIdentifier) } session.disableDialogs = true let info = XCTAttachment(string: "storefront: \(session.storefront)\nlocale: \(session.locale.identifier)\ntransactions: \(session.allTransactions().count)") info.name = "Session configuration" activity.add(info) XCTAssertEqual(session.storefront, storefront, "Failed to set storefront") XCTAssertEqual(session.locale.identifier, localeIdentifier, "Failed to set locale") } return session } What I’ve Tried: Ensuring that storefront and locale values are valid. Resetting StoreKit configuration in Xcode’s scheme settings. Deleting derived data and restarting Xcode. Testing with different values for storefront and locale. Has anyone encountered similar issues with ASDErrorDomain Code 505, or can anyone point out what might be causing this? Any help would be greatly appreciated! Thank you!
0
3
827
Oct ’24
XCode Cloud Error with IXGuard
Hi Guys, I was wondering if anyone here experienced an error with XCode Cloud when running pipelines, specifically Error is: "An internal error was detected which caused this stage to error. The error has been logged, and you can re-run this build again." Upon checking the logs, there is no specific error other than the above and "The pipeline action could not complete due to an error. The error may not occur on rebuild." Note that in the pipeline, there is an obfuscation step using IXGuard. However, the IXGuard steps show successful on the logs.
1
0
439
Oct ’24
Why doesn't XCode AVX2 setting set -mf16c and -mfma
There's nowhere to add -mf16c and -mfma that doesn't cause a uinversal build to spew warnings about those settings when it builds arm64. I'd rather not have to add a xcconfig file across every project with an x64 specific setting. So why doesn't the AVX2 setting (-mavx2) also set these flags? -mhaswell does, and so does -mx86-64-...-v3, but those seem to only be supported by clang-cli on Windows.
0
1
326
Oct ’24
App not showing on simulator when "wait for executable to be launched" is selected
I am trying to launch my app manually during debug process. To achieve this, I selected "wait for executable to be launched" from Edit Scheme -> Info tab. I remember a few years ago, this process would install the fresh app on simulator/device and xcode waits it to be launched manually. Now Xcode is still waiting to be launched, but I dont see the app installed on simulator anywhere. I am stuck
1
0
367
Oct ’24
Xcode not generating code coverage.
No coverage is generated for private xxxx.framework, but tests are running under this framework. This was perfectly working before and started giving this error after updating to Xcode 16. Failed to generate coverage for target xxxx.framework at paths ( "/Users/xxxxxx/Desktop/xcode/Debug-iphonesimulator/Common/xxxxxx.framework/xxxx" ): No object file for requested architecture The operation couldn’t be completed. (XCTHCoverageReportGenerationErrorDomain error 2.). (Underlying Error: No object file for requested architecture)
2
1
917
Nov ’24
Xcode not copying frameworks Swift package with binary target if only included from app extension
I have a Swift Package that includes XCFrameworks which are exported as binary targets. If I include any of the product in Frameworks and Libraries section of a notification service extension target, build succeeds while the extension crashes with dynamic linker error: Library not loaded: @rpath/MoEngageRichNotification.framework/MoEngageRichNotification My workaround is to include the same product in app target's Frameworks and Libraries section and add @executable_path/../../Frameworks to LD_RUNPATH_SEARCH_PATHS settings for extension target. Is this a known limitation of XCode when using SPM?
1
0
465
Oct ’24
Xcode 16 doesn't open file with warning/error (C++)
Xcode 16 breaks fundamental feature of error/warning clickthrough to a given header or .cpp file. The issues list will jump to the point of include, instead of the actual error/warning. There's not even a highlighted line since these files aren't the source of the error. Not really sure how this one got through QA since Apple uses Xcode internally. Now I'm constantly having to scour the report navigator, open the items, and then manually jump to file/line.
1
1
456
Oct ’24
Cannot using real device has iOS 17.7 on Xcode 15.4 and Xcode 16.0
Dear Apple Developer Teams, we cannot find device support for iOS 17.7 on Xcode 15.4 and Xcode 16.0. We couldn't find any information about iOS 17.7 support on the Xcode release notes. We're really worried and we're thinking, do you guys lack support for iOS 17.7 on your Xcode versions? Please tell us how to use real device has iOS 17.7 on Xcode 15.4 and 16.0
1
1
472
Oct ’24
Release Build Fails to Communicate with BLE 4.2 Device After Upgrading to Xcode 16.0
Hello everyone, I recently upgraded from Xcode 15.4 to Xcode 16.0. While the build generated using Xcode 15.4 worked perfectly, I encountered an issue with the release build after the upgrade. Specifically, the release build fails to communicate with a BLE 4.2-based device. I’ve compared the ‘Project Properties’ between Xcode 15.4 and 16.0 but couldn’t identify any differences that might be causing this issue. Could anyone provide insights into what might be causing this problem? Is a specific library used in my project incompatible with Xcode 16.0, or is this an issue with Xcode 16.0 itself? No warning or exception is visible when debugging an Xcode 16.0-based release mode application. Any help or suggestions would be greatly appreciated! Thank you!
0
0
230
Oct ’24
Can't Install Predictive Code Completion Model in Xcode
I saw another thread on this topic but that poster's problem seemed to resolve itself. I've been waiting a while hoping for the same but sadly haven't had the same luck. Here's the error I get: Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 User Info: { DVTErrorCreationDateKey = "2024-10-05 20:46:15 +0000"; } -- Failed to find asset: com.apple.gm.safety_deny.input.code_intelligence.base - no asset Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 -- System Information macOS Version 15.0.1 (Build 24A348) Xcode 16.0 (23051) (Build 16A242d) Timestamp: 2024-10-05T15:46:15-05:00 I've also submitted this error as FB15398248. Thanks for any help!
3
0
505
Oct ’24
Issues with iOS Simulators and Debugging after Xcode 16 Upgrade
Hi everyone, I recently upgraded my Xcode to version 16, and since then, I’ve encountered some issues with Visual Studio 2022 for Mac. The iOS simulators have disappeared, except for the generic simulator. When I connect my iPhone via USB, Visual Studio recognizes it, but when I attempt to run my project in debug mode, I receive a status message saying "waiting for debugger to connect to iPhone on port 10000 via USB." After a few minutes, this process fails. Additionally, when I try to run the project in release mode, I encounter the following error: dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution, 0x0001): Library not loaded: @rpath/AppThinning.framework/Versions/A/AppThinning Referenced from: <33FF2F3B-A96F-37B4-BA4E-887BD882BF9D> /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution Reason: tried: '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/MonoBundle/AppThinning.framework/Versions/A/AppThinning' (no such file) I suspect that the new version of Xcode may not be fully compatible with Visual Studio 2022. Unfortunately, I cannot roll back to an older version of Xcode because I have updated my macOS to Sequoia (15.0.1), which appears to be incompatible with previous Xcode versions. It is quite frustrating as I can't debug my projects and my works are stalled. Does anyone have any suggestions or solutions to this problem? Thank you in advance for your assistance!
2
2
1.4k
Dec ’24
After upgrading to XCode 16 app stopped working
Building an app, which worked fine until I updated to XCode 16. The app parses data and saves it to SwiftData, and later that store is used for filtering in data. If I create the store on iOS 18, the store created has issues with relationships, so filtering is not working (I hope that will be fixed in iOS 18.1), so I need to create the store on iOS 17.5. But before saving the parsed objects to the SwiftData (store), I do the checking for dupes. And after Xcode 16 update that is not working anymore on iOS 17.5, (but this part is working fine under iOS 18): Here is my object: import Foundation import SwiftData @Model class CaliberData: Identifiable { var id: UUID = UUID() var sizeHeights: [SizeObject] var featuresABCDIds: [Int] init( id: UUID, sizeHeights: [SizeObject], featuresABCDIds: [Int], ) { self.id = id self.sizeHeights = sizeHeights self.featuresABCDIds = featuresABCDIds } extension CaliberData: Equatable { static func == (lhs: CaliberData, rhs: CaliberData) -> Bool { lhs.featuresABCDIds == rhs.featuresABCDIds && lhs.sizeHeights == rhs.sizeHeights } } SizeObject if needed: @Model class SizeObject: Identifiable, Equatable { @Attribute(.unique) var id: Float @Relationship(inverse: \CaliberData.sizeHeights) private(set) var caliberDataSizesX: [CaliberData]? init(_ size: Float) { self.id = size } } When I am doing the caliberData1 == CaliberData2 comparison to remove dupes before inserting to the SwifData modelContext I am getting exception, and Xcode shows it inside getter part of this expanded section under sizeHeights definition: @storageRestrictions(accesses: _$backingData, initializes: _sizeHeights) init(initialValue) { _$backingData.setValue(forKey: \.sizeHeights, to: initialValue) _sizeHeights = _SwiftDataNoType() } get { _$observationRegistrar.access(self, keyPath: \.sizeHeights) return self.getValue(forKey: \.sizeHeights) } set { _$observationRegistrar.withMutation(of: self, keyPath: \.sizeHeights) { self.setValue(forKey: \.sizeHeights, to: newValue) } } } Following is the stacktrace: #1 0x00000001cc168928 in ___lldb_unnamed_symbol4385 () #2 0x00000001cc163f34 in ___lldb_unnamed_symbol4354 () #3 0x00000001cc165fc4 in ___lldb_unnamed_symbol4369 () #4 0x00000001cc169dd4 in ___lldb_unnamed_symbol4403 () #5 0x00000001cc123854 in SwiftData.PersistentModel.getValue<τ_0_0, τ_0_1 where τ_1_0: SwiftData.RelationshipCollection, τ_1_1 == τ_1_0.PersistentElement>(forKey: Swift.KeyPath<τ_0_0, τ_1_0>) -> τ_1_0 () #6 0x0000000105eda3b0 in CaliberData.sizeHeights.getter at /var/folders/5y/vv3v98ms7jj3z4kj0f3d6f9h0000gq/T/swift-generated-sources/@__swiftmacro_11CaliberDataC11sizeHeights18_PersistedPropertyfMa_.swift:9 #7 0x0000000105ef1a84 in static CaliberData.== infix(_:_:) at ... My assumption is that "it" thinks that object is already inside the modelContext, when it's actually not yet inserted there and should act like regular class (by regular, I mean - like not marked with @Model macro). How can I do objects comparison on iOS 17.5 with Xcode 16 (before they are inserted in modelContext)? Any other options?
3
0
515
Oct ’24
could someone or an apple dev help me get data on an tableview in objective c?
I understand the mvc thing kinda, theres an array as a model, a tableview as a control, and the interface as a control (right?) so like, I drag an array controller on to the form display thing, assign a delegate to it the view and app module/header, add data to it and the tableview updates after I add a function to it? in vs the events are in the event browser, do I just copy and paste the code from the tutorial? how do I add controls and do all the advanced stuff? the documentation on developer.apple.com isnt that detailed, and most books are outdated or n/a since its objective c tutorials would be nice, some home grown method would be cool too thank you unidef warrell yashizzo
2
0
489
Oct ’24
Downloading Xcode 16.0 related runtimes on CI
I'm trying to get our CI working to build our own machine image AMI descriptions. Part of that is to download the correct runtime versions so that we can pre-create the simulators we use for testing on these machine image descriptions. When running the code like xcodebuild -downloadPlatform <platform> -exportPath "$<temp_folder_path>" Locally I get a result and download a runtime, but on CI I just get All available platforms are downloaded. Why is this message happening and how can I specify specific platforms to download over CI to configure our machine setup?
0
0
301
Oct ’24
App Transfer Issue: Upgrade's application-identifier entitlement string ({new_team_id}.{bundle_id}) does not match installed application's application-identifier string ({old_team_id}.{bundle_id}); rejecting upgrade.
Starting Point I recently transferred an app from an old to a new developer account. The transfer itself went smoothly with the app using the following capabilities: CoreData, CloudKit, Push Notifications, In-App Purchases Keychain is not used After completing the app transfer, I worked on a new update. For this, I set the new developer account as the development team of the project in Xcode. However, as soon as I try to install the new version locally on my physical test device, I get the following error message: application-identifier entitlement string ({new_team_id}.{bundle_id}) does not match installed application's application-identifier string ({old_team_id}.{bundle_id}); rejecting upgrade.` (Note: The test device has the latest production version installed, which was still published by the old developer account. The update can be installed without any problems if no previous version is installed. {new_team_id}, {old_team_id} and {bundle_id} are a substitute for the original content.) What I've tried so far I found a Technical Note on this topic and followed the steps suggested. However, the Apple Support wasn't able to provide me with the required Special Provisioning Profile. That's why I tested a different approach with a dummy application: I have completed an update as described above (new developer account selected as development team). Next, I uploaded it to App Store Connect and published it as a new version. I received the following warning during the upload process, but ignored it since I don't use the keychain: At first glance, the publication process appears to have gone smoothly. While the update caused the above error during local testing, the update via the App Store went smoothly. As the latest production version has now also been published from the new Apple Developer Account, further updates can now also be tested locally on a physical device without any problems. Questions Why is it that the update causes an error when tested locally, but works without problems via the App Store? Can this approach also be used without concern for an app with a large active user base, which also uses the capabilities described above (in particular CoreData & CloudKit) without causing problems? Thanks a lot for your support in advance!
0
1
817
Oct ’24