razorpay / razorpay-pod

:iphone: CocoaPod implementation of Razorpay's Payment SDK. Refer for instructions:
https://docs.razorpay.com/v1/page/ios-integration
MIT License
21 stars 18 forks source link

'Razorpay' is unavailable: cannot find Swift declaration for this class (Xcode 11.6) #103

Closed MuthurajMuthulingam closed 3 years ago

MuthurajMuthulingam commented 4 years ago

IDE Specs

Retro Steps

Screenshots

MuthurajMuthulingam commented 4 years ago

Unable to run the RazerPay in Xcode 11.6

AYAN249 commented 4 years ago

@MuthurajMuthulingam

It has been finally allowed in Swift 5.3. See Contextual Where Clauses in the official Language Guide. Citing from there: You can write a generic where clause as part of a declaration that doesn’t have its own generic type constraints when you’re already working in the context of generic types. For example, you can write a generic where clause on a subscript of a generic type or on a method in an extension to a generic type. ... extension Container { func average() -> Double where Item == Int { var sum = 0.0 for index in 0..<count { sum += Double(self[index]) } return sum / Double(count) }

That compiles just fine in Xcode 12 beta 4, but won't work in Xcode 11.6 that is shipped with Swift 5.2.4. See Contextual Where Clauses in the official Language Guide: https://docs.swift.org/swift-book/LanguageGuide/Generics.html#ID628

Nautiyalsachin commented 3 years ago

Please change Razorpay to RazorpayCheckout, this will fix this issue,

Closing this issue now, feel free to either re-open or create a new issue if you have any additional queries.