Some of the features we’re covering are:
First of all let’s have a look at the design: https://www.figma.com/community/file/1217435722039388173
You can see the design is fully bravorized with containers and Bravo tags, the navigation is set up and the layers that will be bound to real data contain an asterisk (a little trick we do to speed up binding process later). Feel free to explore the design and learn how it’s been built.
For example, check out the Paywall screen. The CTA layer contains the tag [action:purchase:full] which allows the user to trigger the purchase action of the “full” subscription. Inside it, we have a text layer with [price:full] and {price} within the text, which shows the app user the corresponding price of the subscription.
Let’s duplicate the design and make it of your own.
For the database and API we are using Xano, one of the best no-code tools that you can connect to Bravo and launch a complete backend in minutes.
💡 Bravo users enjoy a 10% discount on any Xano's packages if you get in touch with us to claim your discount.
One of the coolest features of Xano are snippets. Snippets allow you to clone a complete backend to your own account with just a click, including database entities, data records and API endpoints. We have a complete backend already set up for this tutorial! Awesome, right?
The database consists of six tables:
These tables already contain data records for your convenience. For example, Fitness_workout contains the list of workouts with title, description, video url and other fields. This table is connected to Firtness_workout_category by category_id. Feel free to checkout the rest of tables and how they relate to each other.
💡 If you are not familiar with database relationships, you can learn the basics with this tutorial from Xano.
Now let’s take a look to the API endpoints.
You will see a bunch of API endpoints grouped by name. Some of them include custom filters and rules. For example, open /fitness_workout_featured. The endpoint queries all workouts where isFeatured is true and isPremium is false.
Please note that authentication is required for all endpoints (except /auth/signup and /auth/login), which means that the request must include the auth token in the headers for it to run successfully. We'll go over this later, but for now this will give you a sense of the power of Xano 🔥.
Now that we have our design connected to our Bravo app and the backend is ready, we can proceed with connecting both by configuring app authentication.
Bravo Studio supports different methods for authenticate users into your app: OAuth 2.0, Firebase login and Custom Authentication. The latter is the method we will use to configure Xano.
Since our Xano Snippet already has the necessary endpoints, we’ll go to Bravo and connect them to our app. If you want to set it up from scratch, learn how to set up Xano as your user authentication backend.
🎉 Congrats! You have imported the API endpoints to Bravo.
Now we’ll need to do some important tweaks to finalise the set up.
Now all of the requests sent on this screen are authenticated. If in the future the auth token expires, you’ll need to repeat the steps 5 to 10.
Let’s review how the login screen is bravorized. First of all, it has a [page:login] tag in the top-level frame and a [post-login:action] tag that we’ll cover later.
We also have two textfields with form tags: [component:input-email] and [component:input-password]. To submit the form we have a stateful component with two states: default and pressed. The first has the submit action for login forms: [action:login]. Learn more about forms and input fields.
So, now that we have the design ready it’s time to bind it to the backend.
We are going to set up authentication connecting the design elements with the auth API requests that we imported before.
Now both variables are bound to the input elements.
We’ll proceed to set the token returned by the login request to the accessToken variable:
You’re all set!
It’s time to test the login! Download Bravo Vision if you don’t have it already.
The home page has three elements bound to API requests:
Let’s connect the visual elements to the data!
Now go to Bravo Vision and refresh the homepage, you will see the elements returned by the database 🎉
💡 For this tutorial we are not covering the complete binding of the app. Feel free to explore the API requests and continue the process on the rest of the app screens. If you have any question feel free to ask it in the community.
You’ll have seen that we bound the premium content, although for the moment every user will see it, and that’s not what we want to happen. It’s time to configure In-app purchases!
To allow app users to purchase subscriptions, Bravo integrates RevenueCat, a platform that provide a subscription backend and wrapper around Apple's StoreKit and Google Play Billing. With RevenueCat you can make sure your users pay for accessing specific pages and content. Instead of having one set up for Android and another for iOS, Bravo connects to RevenueCat to have both platforms available in your app with just one connection.
Our app will be able to do the following:
💡 We are not covering the Android/Google Play set up. Check out the full in-app purchase documentation to learn more.
First off we need to create an app in App Store Connect and generate some codes:
Your app has been created! Now let’s generate the subscription.
💡 To keep things simple, we are going to create just one subscription for this tutorial. If you want to create more, check out RevenueCat’s documentation.
💡 The product Id is a unique alphanumeric ID that is used for accessing your product in development and syncing with RevenueCat. After you use a Product ID for one product in App Store Connect, it can’t be used again across any of your apps, even if the product is deleted. It helps to be a little organized here from the beginning - we recommend using a consistent naming scheme across all of your product identifiers such as:
<app><price><duration>_<intro duration><intro price>
Once your product is created, you'll be able to set the duration of the auto-renewable subscription. Use the duration dropdown to choose 1 month, and click Save.
This is the name and description of the in-app purchase that the user will see.
The Subscription Display Name and Description will be visible to the user on the App Store and in their subscription management settings
Since we are just testing the set up in Testflight, we will skip this step. You’ll need it once you want to get your app published.
When you configure products for the first time and just set up a subscription group, you may see a warning in App Store Connect:
Before you can submit your in-app purchase for review, you must add at least one localization to your subscription group. Add localizations
Clicking on the Add localizations link will take you to the Subscription Group configuration. Similar to how you added localizations to the product, you'll need to add localizations to the Subscription Group as well.
Don't forget to click Save before exiting. ****
Generate an App-Specific Shared Secret following this guide.
Generate an In-App Purchase Key following this guide.
Congratulations! The Apple Store Connect set up is ready 🎉
💡 Learn more about how to configure products in RevenueCat.
RevenueCat set up is done! 🎉
Let’s open the Figma file and take a look on how it’s been bravorized. For example, the Home page has a container that we want to show only to premium users. We use the [require:purchase:full] tag for that. Note that full is the offering identifier we set in RevenueCat.
Now check out the Paywall page. We are using several tags:
Feel free to explore the design to learn more. For example, Upgrade buttons have the tag [require:purchase:none] to be visible only to free users.
💡 If you want to learn all you can do with Bravo and RevenueCat’s integration, check out the In-app purchase documentation.
The final step is to connect your Bravo app with RevenueCat.
And we are done! 🎉
In order to test In-app purchase on iOS, we need to use TestFlight. TestFlight is a platform developed by Apple that allows developers to distribute and test pre-release versions of their apps to a limited group of external testers before releasing them to the general public. It also allows to receive feedback from the group of testers.
In 15-20min you'll receive your IPA ready to be uploaded to Apple Store Connect.
💡 Remember that for each IPA you generate, the Build Number on the Bravo publication form needs to be higher than the previous one.
It may take some time for the package to appear in App Store Connect (can be minutes or up to an hour). You can check the status in the Activity section on the App Store Connect page.
If you get an alert with the message that some tools are missing and you need Xcode, you will need to install Xcode from the Mac App Store.
The user will need to open the email and click on Accept invitation.
Users added to this group can access the app without needing Apple to do any review process. It's the quickest way to test your app with a bunch of users (up to 10.000).
The users will need to click on the View in TestFlight button from the email they received to see the app in TestFlight. Then accept and install the app.