Code Monkey home page Code Monkey logo

ios-raw-events-notification's Introduction

App Store In-App Purchase Event Notification Sender ๐Ÿ””

This repo monitors App Store Server to Server Version 2 events for in-app purchases and notifies you on Slack or Discord in a convenient format. Ideal for individual developers with low purchase requests.

If you liked it, don't forget to star it. โญ๏ธ

Integration

  1. Get Incoming Webhook URL ๐Ÿ”— from Slack or Discord
  2. Create a new Google Cloud Function (2 Million request monthly free usage)
  3. Change WEBHOOK_URL constant in code
  4. Upload this code to Cloud Function
  5. Copy Cloud Function URL ๐Ÿ”— and paste to Adapty / RevenuCat Panel
  6. Done โœ…

1. Get Incoming Webhook URL from Slack or Discord

2. Create a Google Cloud Function and getting the required URL

  1. Open a Google Cloud project or use existing one
  2. Search and open Cloud Functions
  1. Create a Cloud Function

    Enter a name (1), choose HTTPS (2), select Allow unauthenticated invocations (3)

  2. Copy and paste the index.js and package.json with from this repo.

  1. Please modify the specified line of code as follows: Replace const WEBHOOK_URL = "https://hooks.slack.com/services/xxxxxxxxxxx/xxxxxx"; with the Slack or Discord Webhook URL obtained (Section 1), within the Cloud Function.

  2. Deploy ๐Ÿš€

  3. Copy Cloud Function HTTP URL

3. Forwarding Apple S2S events

1. Using Adapty.io

image
  1. Open Adapty.io
  2. Navigate to App settings > Apps in the Adapty dashboard.
  3. Click to the iOS SDK section, scroll to App Store server notifications.
  4. Enter your the Cloud Function URL (Section 2.7) to URL for forwarding raw Apple events
  5. Click Save in the bottom left corner.

image

๐Ÿ”— Adapty documentation link


image
  1. Open RevenueCat
  2. Navigate to your iOS app under Project settings > Apps in the RevenueCat dashboard.
  3. Scroll to the Apple Server to Server notification settings section, and enter your the Cloud Function URL (Section 2.7) in Apple Server Notification Forwarding URL.
  4. Click Save Changes in the top right corner.

image

๐Ÿ”— RevenueCat documentation link


3. Using an internal solution

If you are using an internal solution, your own backend url is probably added here. Therefore, you can prepare an endpoint for your own backend and give it to the Google Cloud function we prepared as the raw event arrives.

App Store Connect -> General -> App Information -> App Store Server Notifications

image

Why Google Cloud Function ?

Because it has 2 Million request monthly free usage rights. This may be sufficient, especially for individual developers. https://cloud.google.com/functions/pricing

ios-raw-events-notification's People

Contributors

ramazanarslan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.