You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My swift app with following page was rendered successfully. After trying to add stripe-ios-spm to Package Dependencies, my app crash in simulator/real device. But preview worked. I didn't even add any code related to stripe but installed the package. If I delete the stripe-ios-spm dependency, it worked again. I am wondering if there is any conflict between stripe ios sdk and the following code? Is stripe compatible with NavigationStack and nested navigation?
Code to reproduce
import SwiftUI
struct ListingExploreView: View {
var city: City
@ObservedObject var viewModel: ListingExploreViewModel
@State private var showListingSearchView = false
var body: some View {
if showListingSearchView {
ListingSearchView(showView: $showListingSearchView,
viewModel: viewModel)
.navigationBarHidden(true)
}
else {
SearchBarView(city: city, viewModel: viewModel)
.onTapGesture {
withAnimation(.snappy) {
showListingSearchView.toggle()
}
}
ScrollView(.vertical) {
// listings
LazyVStack(spacing: 32) {
ForEach(viewModel.listings) { listing in
NavigationLink(value: listing) {
ListingItemView(listing: listing)
}
}
}
}
.navigationDestination(for: Listing.self) { listing in
ListingDetailsView(listing: listing, search: viewModel.search)
.navigationBarBackButtonHidden()
}
}
}
}
#Preview {
ListingExploreView(city: Mock.cities[2], viewModel: ListingExploreViewModel(with: MockListingExploreServiceImpl()))
}
iOS version
Simulator: Iphone 16 pro
Installation method
1. In Xcode, select File > Add Packages… and enter https://github.com/stripe/stripe-ios-spm as the repository URL.
2. Select the latest version number from our [releases page](https://github.com/stripe/stripe-ios/releases).
3. Add the StripePaymentSheet product to the [target of your app](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app).
SDK version
24.0.0
Other information
The text was updated successfully, but these errors were encountered:
Hi @HaominZhao, thanks for filing this! If you're not even importing Stripe, the imported package should have no impact on the NavigationStack of your app. Can you share the crash log you received?
Summary
My swift app with following page was rendered successfully. After trying to add stripe-ios-spm to Package Dependencies, my app crash in simulator/real device. But preview worked. I didn't even add any code related to stripe but installed the package. If I delete the stripe-ios-spm dependency, it worked again. I am wondering if there is any conflict between stripe ios sdk and the following code? Is stripe compatible with NavigationStack and nested navigation?
Code to reproduce
iOS version
Simulator: Iphone 16 pro
Installation method
SDK version
24.0.0
Other information
The text was updated successfully, but these errors were encountered: