missing package product

42,925 results found

Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Previews broken on local Swift Package with dependencies
I've been dealing with this problem for HOURS and your description has helped me come up with the 'solution'. TLDR: (temporarily) change the dynamic package to static during development, then switch back to dynamic before deploying. Obviously this only works if you control the client package. I'm not expert, but here's my explanation: Since the client package is dynamic, it's technically not supposed to be linked/accessed until runtime. And I don't think SwiftUI previews count as 'runtime'. So, when the SwiftUI preview tries to access code from a dynamic library, it's not available. This problem does NOT occur in an Xcode project because you have to embed the packages in the main target, which I guess solves the problem. Unfortunately, there's no option to embed (even temporarily) in a swift package. So there's no way to allow the SwiftUI preview to gain access to the third party dynamic libraries. When I commented out the dynamic declaration in the package.swift f
1w
Reply to XSLT 2.0 transformation with Swift or WKWebView
Sorry. I only looked at the other app. I missed that file. However, I looked at the file and, other than the version number, it looks like XSLT 1.0. I changed the version from 2.0 to 1.0 and ran it against some sample data posted by acmuller and it seems to work fine. I admit that I'm not familiar with XSLT 2.0. There may be some differences in behaviour even if the syntax is identical, but it seems like you can just change the version number back to 1.0. Unfortunately, after looking more closely at this project, it seems much more problematic than I originally assumed. I thought this would be a straightforward code-level question involving one of my favourite technologies. I was wrong. So, I don't know what to tell you. Symbol conflicts between your code and any private frameworks are easy to fix. Apple only officially supports the public APIs as documented on the Apple developer site. Internally, Apple may implement those APIs with various other 3rd party frameworks, but you can't use those. It's a
1w
onContinueUserActivity not working on first app launch
HI, I'm trying to deeplink from my widget to a view in my app. I'm using the SwiftUI app lifecycle. This the code I'm currently using: var body: some Scene { WindowGroup { RootView() .onContinueUserActivity(NextDeparturesWidgetConfigurationIntent) { userActivity in guard let configuration: NextDeparturesWidgetConfigurationIntent = userActivity .widgetConfigurationIntent(), let stationEntity = configuration.stationEntity else { return } NotificationCenter.default.post(name: .onOpenStation, object: stationEntity.id) } } } It is working fine when the app is already running (in the background). However when the app is cold starting (ie. not in memory) onContinueUserActivity is never called. I tried adding a UIApplicationDelegateAdaptor: func application( _ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions ) -> UISceneConfiguration { if let userActivity = options.userActivities.first { let configuration: NextDeparturesWidgetConfigur
0
0
101
1w
Content inside volume gets clipped
I am using the Xcode visionOS debugging tool to visualize the bounds of all the containers, but it shows my Entity is inside the Volume. Then why does it get clipped? Is there something wrong with the debugger, or am I missing something? import SwiftUI @main struct RealityViewAttachmentApp: App { var body: some Scene { WindowGroup { ContentView() } .windowStyle(.volumetric) .defaultSize(Size3D(width: 1, height: 1, depth: 1), in: .meters) } } import SwiftUI import RealityKit import RealityKitContent struct ContentView: View { var body: some View { RealityView { content, attachments in if let earth = try? await Entity(named: Scene, in: realityKitContentBundle) { content.add(earth) if let earthAttachment = attachments.entity(for: earth_label) { earthAttachment.position = [0, -0.15, 0] earth.addChild(earthAttachment) } if let textAttachment = attachments.entity(for: text_label) { textAttachment.position = [-0.5, 0, 0] earth.addChild(textAttachment) } } } attachments: { Attachment(id: earth_label) { Text(
1
0
101
1w
Reply to Collapsing NavigationStack When NavigationSplitView is Backgrounded on iPadOS 17.x
Thank you for the quick reply. I'm still seeing the buggy behavior on my side. Here are the steps I'm taking: Open sample project in Xcode 15.4. Run on simulator for iPad Pro 11-inch (M4) with iOS 17.5. Use sidebar to select color. Use detail view to select shape. Make note of detail view title (Color + Shape) and presence of < Shapes back button in top left of detail view. Put app into background (e.g., press ⇧⌘H, or use the simulator's Home button). Wait 2–5 seconds. Bring app back into foreground. Note that app detail view's title has changed (Shapes) and back button is missing. Let me know if those steps work for you. I appreciate your advice regarding NavigationSplitView and its (very helpful) automatic adaptation for compact screens. That was actually my first choice. I ran into trouble, however, when trying to add .searchable() with its own NavigationStack to the root-level sidebar section of NavigationSplitView. It seems that NavigationStack isn't something that SwiftUI wants in that part
1w
Reply to DisplayRepresentation.Image and custom SF Symbol
That seems worthy of a bug report. Can you take a moment to file a report, and include a small test project with your asset configuration and the code snippet you shared here? Once you open the bug report, please post the FB number here for my reference. If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why? As an alternative approach, you can either extract the image out to a standard image in your asset catalog (rather than a customized symbol asset in the asset catalog), or using the systemName: family of initializers on DisplayRepresentation.Image to get the symbol from the system, though you will lose the customizations by doing so. — Ed Ford,  DTS Engineer
1w
Debug View Hierarchy button missing
I've thought I've seen all, now the Debug View Hierarchy button has decided to take a hike. One of XCode's coolest features just upped and vanished on the latest project. Shows fine in the previous two. Can't find anything that looks like an on/off switch for the thing and have capabilities and debug settings matched to the ones that work. (and yes, I am in debug mode)
1
0
108
1w
Reply to iPhone 14 freezes and crashes
You haven't said which version of iOS you updated to. Besides, these are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual developers chat about product issues. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
1w
Reply to Apple pay web authentication failed (SSL connection)
Hi @rk25, You wrote: Now I am using this .p12 to create the ApplePaySession (paymentSession) using server side code in C# but getting error from apple side. Exception: The SSL connection could not be established Inner Exception: Authentication failed, The credentials supplied to the package were not recognized at System.Net.SSPIWrapper.AcquireCredentialsHandle This is not an Apple error, but is likely due to your C# environment not having access to either the public or private key for the certificate. I'd suggest researching how to resolve that inner exception on your system platform, then applying that knowledge to the Apple Pay certificates. Additionally, we have the following resources that may help you diagnose issues in your Apple Pay implementation: Apple Pay Merchant Integration Guide Configuring Your Environment Setting Up Your Server TN3173: Troubleshooting issues with your Apple Pay merchant identifier configuration TN3174: Diagnosing issues with the Apple Pay payment sheet on your website
1w
Reply to Subscription State Persistence with new StoreKit SwiftUI API
@Skylark this seems to be the case. I’ve spent almost a week trying dozens of variations to detect subscription cancel from AppStore or other device in order to manage subscription state persistence — without success. The challenge is due to the fact that StoreKit does not send a separate transaction when a subscription is cancelled but instead updates the subscription transaction record to expired. From my reading you are supposed to be able to detect this through the absence of a particular product in CurrentEntitlements, but I cannot figure out how to do this. This is such a common use case that I believe I might be over complicating something that is already handled by the StoreKit API. Any thoughts on how others are handling subscription cancels is appreciated.
1w
Reply to Apple pay - determine active card
Hi @Raj_Jayaraj23, The applePayCapabilities API is the preferred method. It has the beta flag because its implementation details are subject to change between now and the public release of iOS 18 and Safari 18. For more information on its expected usage during the beta period, please see Using the Apple Pay JS SDK for iOS 18. Because getting developer feedback during the beta period is crucial to resolve unexpected issues in the future, please consider the following: Use the beta URL to test the new methods and their implementation against your test environments. This also provides the benefit of testing against third-party web browsers as well. If you're content with your existing implementation in production, and want to support Apple Pay on third-party web browsers when iOS 18 is publicly released, use the new methods to your production environments, and use the production URL. This will continue to work only in Safari, but will support third-party web browsers at a later date. I
1w
Reply to SwiftData - error: Error: Persistent History (2) has to be truncated due to the following entities being removed: ( A )
If this error occurs, any saved data will be lost. For example, if you save data in A and open B, an error will occur and the data in A will be deleted. It doesn't seem to be a problem, but it would be a problem if the data disappeared. This is because it is used for data persistence purposes. Yeah, that's again because the container at step 3 doesn't know model A at all, given that you use only model B as the container schema. Is there any reason why you create a model container with only model A at step 1 and only model B at step 3? Given that you would retain the data, it seems to me that you'd create the container with both model A and B at both step 1 and 3: let container = try? ModelContainer(for: A.self, B.self) If you do need to change the schema at some point (by removing model A in this example), consider creating a migration plan (SchemaMigrationPlan) and using it to create a model container so that the existing data is migrated to the new schema. Best, —— Ziqiao Chen  Worldwide Developer
1w