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

Support Swift 5.2 Compiler #91

Closed abhuzz closed 4 years ago

abhuzz commented 4 years ago

Pod not support swift 5.2 in XCode 11.4

IDE Specs

Xcode Version :- 11.4 Razorpay Package Version :- latest version

Retro Steps

Step 1: install Pod with:- pod 'razorpay-pod' Result: not support Step 2: install pod with:- pod 'razorpay-pod' , :git => 'https://github.com/razorpay/razorpay-pod.git', :branch => 'swift5.2' Result: 'Razorpay' is unavailable: cannot find Swift declaration for this class SO, I fond that this rezorpay-pod can't support to swift 5.2

Kindly request the developer team enable support for Swift5.2 Compiler.

Screenshots

image

image

kevintorch commented 4 years ago

I have the same issue.

kevintorch commented 4 years ago

@abhuzz Sir, did you find any solution related to this?

Nautiyalsachin commented 4 years ago

Hi Everyone, we are working on releasing an updated version of the pod in the next couple of days, the new changes are in testing right now.

I'll inform you guys As soon as the changes are live.

Nautiyalsachin commented 4 years ago

Can you guys use pod 'razorpay-pod', :git => 'https://github.com/razorpay/razorpay-pod.git', :branch => 'Swift_5.2'

abhuzz commented 4 years ago

@Nautiyalsachin Sir, Thank You for the kind response. Now, the problem is "Use of undeclared type 'Razorpay' " for the following sentence : - var razorpay: Razorpay!

Implemented with branch => 'swift_5.2' image

and having a swift version like => image

kevintorch commented 4 years ago

@abhuzz it's RazorpayCheckout Now not Razorpay from now on.

kevintorch commented 4 years ago

@abhuzz Change the type from Razorpay to RazorpayCheckout

abhuzz commented 4 years ago

@kevintorch Thanks.

Nautiyalsachin commented 4 years ago

Great! You guys have figured it out already. 🙂 Can you try to archive it and let me know that it's working fine for you or not? I'll then try to release it by today itself?

If you don't want to change anything in your code you can use below code -

For swift // typealias Razorpay = RazorpayCheckout For Objective C //- typedef RazorpayCheckout Razorpay;