Posts under Developer Tools & Services topic

Post

Replies

Boosts

Views

Activity

Predictive Code Completion Model - failed to find asset
The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.) Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 User Info: { DVTErrorCreationDateKey = "2024-06-11 11:01:58 +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 (Build 24A5264n) Xcode 16.0 (23037.4) (Build 16A5171c) Timestamp: 2024-06-11T14:01:58+03:00
26
24
4.8k
Nov ’24
Does 'swift build' execute Test Code on macOS even for iOS Only Apps?
Hi, I have a library for my iOS Apps. It uses among other things the Combine framework, Core Location and OSLog. I manage the library using the Swift Package Manager (SPM) and usually build via XCode, which works fine. However for CI I would like to build everything from the terminal. So I do call 'swift build' on the terminal. This produces errors such as: 'PassthroughSubject' is only available in macOS 10.15 or newer 'os_log(:dso:log::_:)' is only available in macOS 10.14 or newer 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer 'authorizedWhenInUse' is unavailable in macOS 'AnyPublisher' is only available in macOS 10.15 or newer 'showsBackgroundLocationIndicator' is unavailable in macOS ... These are all from the used frameworks. However, I do not care on which version of macOS, for example, PassthroughSubject is only available at, since the library is iOS only. Too make sure of that I added "platforms: [.iOS(.v14)]" to my Package.swift and thought this would be sufficient, so the project does not get build for macOS. Can anyone please tell me or give me a hint on what I am getting wrong here?
0
0
263
Nov ’24
Xcode fails to compile visionOS app that has a Front layer in AppIcon asset
I'm trying to create the app icon for my visionOS app. The Assets catalog already contains AppIcon for iOS and I've added another AppIcon for visionOS. If I only add the Back layer of the visionOS icon, compiling succeeds despite there being an error The visionOS App Icon "AppIcon" must have at least 2 layers with applicable content. Although it has 3 layers, only 1 has applicable content. As soon as I add one of the other two layers, say the Front layer, compiling fails, but this time Xcode only shows a generic compiler error Command CompileAssetCatalogVariant emitted errors but did not return a nonzero exit code to indicate failure If I click that message, a long build log opens containing among other things: 2024-10-31 11:28:15.258 AssetCatalogSimulatorAgent[66919:1456355] -[TDTextureRawRenditionSpec _createImageRefWithURL:andDocument:format:] Texture image asset file:///~/Documents/apps/myApp/xcode/iOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/icon_layer3.heic not in one of supported formats ... libc++abi: terminating due to uncaught exception of type NSException Command CompileAssetCatalogVariant failed with a nonzero exit code What is the problem? I filed FB15642844.
1
0
460
Nov ’24
Creating "type-safe" CIFilter fails
I'm getting consistent errors in Xcode 16.1 while trying to implement type-safe CIFilter instances as documented on the page at https://developer.apple.com/documentation/coreimage/cifilter. After pasting in the example code on that page for a "FalseColor" filter into a simple test project's ContentView, I get an error explaining that: "Type 'CIFilter' has no member 'falseColor'". Same thing with pasting in the example code at https://developer.apple.com/documentation/coreimage/cifilter/3228278-boxblur, and other examples. I have imported CoreImage, so that shouldn't be the issue. Am I doing something wrong, or is this functionality just broken? I have had success creating filters with the string-based API, but access to a type-safe API would obviously be preferable, so any suggestions are greatly appreciated.
2
0
533
Nov ’24
How to run Catalyst xctest bundle with xcrun
I'm trying to run an xctest bundle, built for catalyst, with xcrun. i.e. xcrun xctest path_to_my_test.xctest It fails, complaining that: The bundle "MyBundle" couldn't be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.....but incompatible platform (have 'MacCatalyst', need 'macOS') So it seems like because I'm not executing it in a sim it wants the bundle to be a macOS bundle. But I would have thought it would be possible to run a Mac Catalyst target directly on a macOS host the same as a native macOS test target. Is this not possible?
0
0
403
Nov ’24
Seeking Assistance: 500 UNEXPECTED_ERROR Encountered
Issue faced on : 25 november 9:23AM when trying to reply to customer-reviews through this endpoint : https://api.appstoreconnect.apple.com/v1/customerReviewResponses getting error as 500 Unexpected -error . API Response : { "status": "500", "code": "UNEXPECTED_ERROR", "title": "An unexpected error occurred.", "detail": "An unexpected error occurred on the server side. If this issue continues, contact us at https://developer.apple.com/contact/." } API Requestbody : { "data": { "type": "customerReviewResponses", "attributes": { "responseBody": "Hi, thank you so much for your kind words and for sharing your positive experience! We're thrilled that you love the redeem points and their instant use. Keep exploring Tata Neu! _Meghal" }, "relationships": { "review": { "data": { "type": "customerReviews", "id":"here is id of comment" } } } } } API Headers : Authorization: Bearer {Token} Content-Type: application/json API URL : https://api.appstoreconnect.apple.com/v1/customerReviewResponses
0
0
215
Nov ’24
Provisioning profile doesn't match the entitlements file's values for the com.apple.developer.team-identifier and application-identifier entitlements.
Hi all. I have encountered an issue in which I failed to build the app on Xcode. It says "Provisioning profile doesn't match the entitlements file's values for the com.apple.developer.team-identifier and application-identifier entitlements". But I have checked these two values, they are exactly the same as expected.
1
0
1.5k
Nov ’24
How to retrieve overall memory peak in C++
I'm trying to retrieve the overall memory peak of a process. I've looked into retrieving it through task_vm_info struct defined in task_info.h By logging the members of the struct, it seems neither resident_size_peak, internal_peak or ledger_phys_footprint_peak is matching what the peak memory value that's being detected by xcode instrument. Can anyone point me to the correct way to retrieve that peak value? Is it the summation of some of the fields in task_vm_info` or is there a more complicated algorithm involved in deriving that value?
0
0
325
Nov ’24
Different optimization level for package dependencies
I am using DuckDB as an external dependency in my project. The package is basically a Swift wrapper around C++ code. If I run my app in Debug mode, then the performance of the library is an order of magnitude slower than when I run it in Release mode. In Release mode it is really fast, but compilation times are too slow. I am a complete beginner to Xcode's build system and was wondering if there was any way to have the best of both worlds? For example, by compiling my SwiftUI code without optimizations but having it linked to a static and optimized version of the library.
0
0
418
Nov ’24
Dialog Save password not showing in simulator iOS 18.0 rosetta
Dialog: "Would you to save this password in your Keychain to use with apps and websites" Xcode 15.4 Simulator iOS 16.4 Rosetta Macbook M2 pro => dialog save password showing and work normal. When updating to xcode 16, it is not showing and makes the app unable to do anything else. xCode 16.0 Simulator iOS 18.0 Rosetta Macbook M2 pro => dialog save password not showing However, if you use Non-rosetta, the dialog will not show but you can still operate the app.
1
0
274
Nov ’24
How to start and automatically update/end a local live activity?
I'm implementing a timer feature and facing the issue that the live activity I'm starting just continues showing after the timer is complete. The body of the live activity widget is more or less: ActivityConfiguration(for: WhendyWidgetAttributes.self) { context in VStack { Text( context.state.timerEndDate, style: .timer ) // if Date.now < timerEndTime { Text("Done") } self.expandedView(state: context.state) } } … Ideally I could get the activity to show something else when it is done but I don't know how to get it to re-evaluate it's body once the end time is reached. I create the activity with let activity = try ActivityKit.Activity.request( attributes: attributes, content: .init( state: .init(timerEndDate: timerEndDate), staleDate: timerEndDate ), pushType: nil ) Can I schedule the activity to do a refresh it's body (and reevaluating Date.now) once the timerEndDate is reached? Considered Approaches trying staleDate However, the activity never shows that it has become stale. Would it be expected that it shows the stale-ness? scheduling dismissal I also thought about starting and immediately stopping the activity with a delayed dismissal, but unfortunately it seems this is limited to a 4 hour window, and I'd like longer timers too. remote updates I understand I could use remote notifications to update the live activity, but I'd really like to keep things local as all the functionality is locally plannable. Background Tasks I understand these don't run reliably or at a predictable time. A Timer in the app that updates the content I think this would only update the activity while the app is in foreground.
0
0
535
Nov ’24
Mapping between opaque review IDs and old numeric IDs
I have an existing system that fetches reviews for an app from the following URL: https://itunes.apple.com/en/rss/customerreviews/?id=[numeric app ID] The response from this URL gives review IDs in numeric format, for example 11990822406. I'd like to use the new API described here to fetch any review response, but the new API only accepts an opaque review ID, for example 00000037-1653-fg99-8224-821b00000000. Is there any way to map from the numeric review ID to the opaque ID?
0
0
233
Nov ’24
Running local package's tests in main app's test plan
Hi, I work on a iOS application which includes several local swift packages containing modularised code. Each of those local swift packages has a test target defined in their respective Package.swift, and when opening a local package folder standalone in Xcode, then the tests run without issues. However I would like in the main app's test plan to add the local package test targets and have them all run together when the main app's default test plan is run. Xcode allows me to select local package test targets within the main app's test plan (also within Test portion of the main app's scheme), however attempting to build for testing throws a "Module '…' was not compiled for testing". Any ideas on how to achieve this goal (run local package tests in conjunction with main app's tests) and avoid that error? Thanks Peter
2
5
927
Nov ’24