Product Hunt badge for iOS

What's New

Add SwiftUI implementation



Product Hunt badge for iOS.

Product Hunt surfaces the best new products, every day. It's a place for product-loving enthusiasts to share and geek out about the latest mobile apps, websites, hardware projects, and tech creations.

[...] Product Hunt has become a must-read site in Silicon Valley.

[...] Product Hunt is an online community that caters to the tech product fanatics.

[Product Hunt] ballooned in popularity since its humble beginnings and has since become a destination site where folks could submit and vote on their favorite tech products.

[...] Product Hunt has evolved from a small email list into a must-read for those in the tech and startup space to discover the next great product.


  • Dark mode support
  • Data persistence
  • Auto refresh every 5 minutes


  • Swift 5.0
  • Xcode 11.x

Implement Product Hunt - UIKit

  1. Import the ProductHunt framework in your UIApplicationDelegate:
import ProductHunt
  1. Configure the PHManager shared instance in your app's application:didFinishLaunchingWithOptions: method with:
PHManager.shared.configure(forPost: .slug("timizer"), token: "<YOUR_PRODUCT_HUNT_TOKEN>")
  1. In the view controller, override the viewDidLoad method to set the presenting view controller of the PHManager object.
PHManager.shared.presentingViewController = self
  1. Add a PHButton to your storyboard, XIB file, or instantiate it programmatically. To add the button to your storyboard or XIB file, add a View and set its custom class to PHButton.

Implement Product Hunt - SwiftUI

  1. Import the ProductHunt framework in your view struct:
import ProductHunt
  1. Add the ProductHuntButton to your view with:
ProductHuntButton(post: .slug("<YOUR_SLUG>"), token: "<YOUR_PRODUCT_HUNT_TOKEN>")
  .frame(width: 260.0, height: 60.0, alignment: .center)



You want to add pod 'ProductHunt', '~> 1.0' similar to the following to your Podfile:

target 'MyApp' do
  pod 'ProductHunt', '~> 1.0'

Then run a pod install inside your terminal, or from

Swift Package Manager

  1. Using Xcode 11 or above go to File > Swift Packages > Add Package Dependency
  2. Paste the project URL:
  3. Click on next and select the project target


Name GitHub Twitter
François Boulais frboulais @frboulais
Julien Lacroix JulienLacr0ix @JulienLacr0ix

Product Hunt badge for iOS - Swift framework to add Product Hunt badge in your iOS apps! | Product Hunt Embed

Buy Me A Coffee

Copyright © 2020 App Craft Studio. All rights reserved.


  • Swift Tools 5.3.0
View More Packages from this Author


  • None
Last updated: Wed Dec 07 2022 03:42:07 GMT-0500 (GMT-05:00)