dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.74k stars 634 forks source link

Support for React Native Macos #2562

Open aniketgupta8960 opened 9 months ago

aniketgupta8960 commented 9 months ago

I am working on a react native macos wand I need to have in-app purchase in the macos Application but after adding macos platform in podspec file it is giving error. the podspec file change is : s.platforms = { :ios => "10.0" , :tvos => "10.0",:osx => "10.15"} and the error I am facing is

Screenshot 2023-09-28 at 8 01 35 PM
UsamaDaood commented 9 months ago

I'm facing the same issue that products are not fetching in macos app.

https://stackoverflow.com/questions/77246264/is-there-iap-in-app-purchases-for-react-native-macos?noredirect=1#comment136181072_77246264

aniketgupta8960 commented 9 months ago

@UsamaDaood what is the version of react-native-iap version you were using.

UsamaDaood commented 9 months ago

Hi @aniketgupta8960 . I'm using "react-native-iap": "^12.10.8". And I'm facing the issue unsupported platform.

I need to implement the Subscription in macos app.

aniketgupta8960 commented 9 months ago

Have you added platform support in the podspec file . s.platforms = { :ios => "10.0" , :tvos => "10.0",:osx => "10.15"}

UsamaDaood commented 9 months ago

Where I supposed to add these support?

UsamaDaood commented 9 months ago

Do I need to add it in pod file? @aniketgupta8960

UsamaDaood commented 9 months ago

Have you implemented it successfully and is it working fine ? @aniketgupta8960

UsamaDaood commented 9 months ago

Have you added platform support in the podspec file . s.platforms = { :ios => "10.0" , :tvos => "10.0",:osx => "10.15"}

@aniketgupta8960 My PodFile

require_relative '../node_modules/react-native-macos/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

prepare_react_native_project!

target 'ChatBee-macOS' do platform :macos, '10.15' use_native_modules!

Flags change depending on the env values.

flags = get_default_flags()

use_react_native!( :path => '../node_modules/react-native-macos', :hermes_enabled => false, :fabric_enabled => ENV['RCT_NEW_ARCH_ENABLED'] == '1',

Flipper is not compatible w/ macOS

:flipper_configuration => FlipperConfiguration.disabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."

)

post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) end end

aniketgupta8960 commented 9 months ago

Do I need to add it in pod file? @aniketgupta8960

I have added in podspec file inside node_module/react-native-iap/react-native-iap.podspec file the platform support then go the error shown above and It is not working at my end also

UsamaDaood commented 9 months ago

Okay I got it. By the way, are you successful to implement iap ? Let me check that.

Thanks you very much. @aniketgupta8960

aniketgupta8960 commented 8 months ago

@UsamaDaood Any update?

UsamaDaood commented 8 months ago

no Bro. @aniketgupta8960 . Have you any Luck Bro?

aniketgupta8960 commented 8 months ago

Hi @JJMoon, @andresesfm Any update

UsamaDaood commented 7 months ago

@JJMoon @andresesfm . Guys Any update on that.

aniketgupta8960 commented 7 months ago

@arthurgeron @hyochan Please help me as I need it to add in my macos application