This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if __has_include("SwiftUIStoreView/SwiftUIStoreView-Swift.h") | |
| #import "SwiftUIStoreView/SwiftUIStoreView-Swift.h" | |
| #else | |
| #import "SwiftUIStoreView-Swift.h" | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| import React | |
| import SwiftUI | |
| @objc public class StoreViewProvider: UIView { | |
| private var props = Props() | |
| private var hostingController: UIHostingController<SwiftUIStoreView>? | |
| public override func layoutSubviews() { | |
| super.layoutSubviews() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| import StoreKit | |
| class Props: ObservableObject { | |
| @Published var productIDs: [String] = [] | |
| } | |
| struct SwiftUIStoreView: View { | |
| @ObservedObject var props: Props | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef __cplusplus | |
| #import <React/RCTViewComponentView.h> | |
| #import <UIKit/UIKit.h> | |
| #ifndef SwiftUIStoreViewViewNativeComponent_h | |
| #define SwiftUIStoreViewViewNativeComponent_h | |
| NS_ASSUME_NONNULL_BEGIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| s.source_files = "ios/**/*.{h,m,mm,cpp,swift}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| s.source_files = "ios/**/*.{h,m,mm,cpp,swift}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npx create-react-native-library@latest SwiftUIStoreView |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugin 'cocoapods-swift-modular-headers' | |
| pre_install do |installer| | |
| apply_modular_headers_for_swift_dependencies(installer) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugin 'cocoapods-swift-modular-headers' | |
| # Above target declarations | |
| apply_modular_headers_for_swift_dependencies() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target 'MyApp' do | |
| config = use_native_modules! | |
| use_react_native!( | |
| :path => config[:reactNativePath], | |
| # An absolute path to your application root. | |
| :app_path => "#{Pod::Config.instance.installation_root}/.." | |
| ) | |
| # ... |