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

Module compiled with Swift 5.0 cannot be imported by the Swift 5.2.4 compiler #99

Closed nitin-agam closed 3 years ago

nitin-agam commented 4 years ago

I'm getting this error while compiling the code:

Module compiled with Swift 5.0 cannot be imported by the Swift 5.2.4 compiler

Using Xcode: 11.5 Swift Version: 5

I've tried using pod with these versions pod 'razorpay-pod', '~> 1.1.5' pod 'razorpay-pod', '~> 1.1.1'

Please help me.

ambujap94 commented 4 years ago

Please use as if Swift 5.1+

pod 'razorpay-pod', '~> 1.1.5'

if Swift 5.0

pod 'razorpay-pod', '~> 1.1.1'

You can refer our integration document for further clarification CocoaPods document for reference.

nitin-agam commented 4 years ago

I have already tried both the version. But still facing the same issue.

Mahesh160393 commented 4 years ago

Xcode Version : 11.6 Swift Version : 5

Tried this :

pod 'razorpay-pod', '1.1.1'

pod 'razorpay-pod', :git => 'https://github.com/razorpay/razorpay-pod.git', :branch => '0x72613c21'

pod 'razorpay-pod', :git => 'https://github.com/razorpay/razorpay-pod.git', :branch => 'swift5.0'

pod 'razorpay-pod'

Same issue. Please help @Nautiyalsachin

Nautiyalsachin commented 4 years ago

@Mahesh160393, Can you open podfile.lock and check the current razorpay-pod version and paste it here. It should be more than 1.1.4. If it's not then please use pod update razorpay-pod. This will only update the razorpay-pod to the latest version.

Mahesh160393 commented 4 years ago

Thank you for your response @Nautiyalsachin

Here is my pod lock version :

In PODS : - razorpay-pod (1.1.5) In DEPENDENCIES: - razorpay-pod

After pod update razorpay-pod -

In PODS : - razorpay-pod (1.1.6) In DEPENDENCIES: - razorpay-pod

Now : Use of undeclared type 'Razorpay'

Nautiyalsachin commented 3 years ago

@Mahesh160393, try using RazorpayCheckout instead of Razorpay. Hope you've already have fixed this issue.

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