Category: Docs

  • Register for OneSignal | vendrux Docs

    Register for OneSignal | vendrux Docs

    OneSignal is the world’s leading Mobile and Web Push Notification service, we use it to deliver push notifications to your app users.

    You will be required to register for your own OneSignal account, but our team will take care of everything else for you.

    You can easily register from the link: https://dashboard.onesignal.com/signup

    1 – Create your account

    Fill in all the details:

    Notion Image

    2 – Select your plan

    Note that for basic usage of push notifications in your app, the Free plan should be enough. If you have any specific requirements such as DPA and more sophisticated analytics data you might want to choose one of their paid plans.

    Notion Image

    3 – Activate your email

    You will then receive a confirmation link in your email, make sure to check it and start the activation process.

    Notion Image

    4 – Answer questions

    After clicking the activation email OneSignal will require you to answer a few quick questions:

    Notion Image

    5 – Create your first app

    You will now be required to create your first OneSignal app, by choosing a name. Make sure to use the same name that you will use for your mobile app, this will avoid a lot of confusion.

    Notion Image

    6 – Skip the quick start guide

    This is not a required step, as our team will configure everything for you. Make sure to skip this step:

    Notion Image

    That’s it! You now have your OneSignal account, make sure to check our guide on how to invite users to your account:

    • How to invite users to OneSignal
  • Register for Firebase | vendrux Docs

    Register for Firebase | vendrux Docs

    Google’s Firebase is an app development platform that gives you control over several parts of your app, with it you will be able to track analytics data, crashes, user behavior, ads, and much more.

    Create your Firebase account

    Just like other Google services, in order to have a Firebase account, you will need to sign in with your own Google Account login details here: https://firebase.google.com/

    Notion Image

    In case you don’t have a Google Account yet, you can register one here: https://accounts.google.com/signup

    Create your Firebase project

    Now that you have your Firebase account, you will need to create a Firebase project. You can do so by following these steps:

    1 – Open your Firebase Console

    You can open your Firebase Console using this link: https://console.firebase.google.com/

    2 – Create a new project

    Click the “Create new project” button:

    Notion Image

    3 – Choose the project name

    Make sure to use the same name that you will use in your mobile app, to avoid confusion.

    Notion Image

    4 – Setup Google Analytics (optional)

    If you’d like to be able to track your app data via Google Analytics, later on, make sure to enable Google Analytics:

    Notion Image

    That’s it, your project is now created and you can now invite our team to it:

    • How to invite users to Firebase
  • Register for an Apple Developer account

    Register for an Apple Developer account

    To publish your app on the App Store for iOS devices, you must have an Apple Developer Account. Below are the steps required to register for your own Apple Developer Account.

    Requirements

    Before enrolling, ensure you have the following:

    1. Apple Account

    If you use an iOS device, you likely already have an Apple Account. If not, you can create one quickly here: Create an Apple Account

    2. Enable Two-Factor Authentication

    Apple requires two-factor authentication (2FA) to be enabled on your Apple Account for security purposes. You can find instructions on enabling 2FA here.

    3. DUNS Number (For Organizations)

    If you are enrolling as a company, Apple requires a DUNS number. You can check if you have one or request a free DUNS number here: DUNS Number Lookup

    Why Should I Enroll as a Company?

    You must enroll as an organization if your company is a registered business entity such as:

    • Corporation (Corp., Inc.)
    • Limited Liability Company (LLC, LC, Ltd. Co.)
    • Legal entity (GmbH, AG, KG, oHg, etc.)

    If you are a sole proprietor, you must register as an individual. Apple does not accept DBAs, fictitious businesses, trade names, or branches for company enrollment.

    Benefits of an Organization Account:

    • Invite developers to collaborate on your account.
    • Display your company name as the Developer on the App Store (e.g., Business Inc. instead of an individual name).
    • Apple recognizes you as an authorized representative, avoiding brand or content disputes.

    Next Steps: Registering for an Apple Developer Account

    Once you have your Apple Account and (if applicable) your DUNS Number, go to https://developer.apple.com/programs/enroll/ and click the “Start your enrollment” button.

    Fill out the required forms with accurate information. Once completed, you should receive an email confirming your enrollment. Apple will then review your submission, which may take up to 3 business days.

    The Apple Developer Program costs $99 per year and must remain active to keep your app available on the App Store. At the end of the enrollment process, you will be prompted to complete the payment—be sure to finalize the payment to complete your registration.

    If necessary you can follow-up with Apple about your enrollment from this page: https://developer.apple.com/contact/

    Final Step: Inviting Our Team

    Once Apple approves your account, you can invite our team to your App Store Connect account so we can begin working on your iOS app.

    How to Invite Users to App Store Connect

  • App Download Redirect Guide | vendrux Docs

    App Download Redirect Guide | vendrux Docs

    App Download Redirect Guide | Vendrux Docs

  • Record device screen on iOS

    Record device screen on iOS

    Recording your screen can be useful when you want to be able to capture a specific behavior on an app.

    Recording your screen 🎥

    The screen recording feature can be found in your control center, you can follow these steps to use it:

    1. Open the “Control Center” by swiping down from the top-right corner of your screen
    1. Tap the gray Record button 🔘, then wait for the three-second countdown
    1. Once you are done, just press the red button to stop recording

    You will find your screen recording stored in your “Gallery”.

    Notion Image

    Enabling screen recording ⚙️

    More recent versions of iOS will come with this feature already enabled on your control center.

    But in case you are unable to find the “Record” button, follow these steps to enable it:

    1. Go to “Settings > Control Center”
    1. Find “Screen recording” in the options
    1. Tap the “+” icon next to it
    Notion Image
    Notion Image

  • Record device screen on Android

    Record device screen on Android

    Record your phone screen

    1. Swipe down from the top of your screen.2. Tap the “Screen record” icon    ◦ You might need to swipe right to find it    ◦ If it’s not there, tap Edit and drag Screen record to your Quick Settings3. Choose what you want to record and tap Start. The recording begins after the countdown4. To stop recording, swipe down from the top of the screen and tap the Screen recorder notification

    Notion Image

  • QR Widget | vendrux Docs

    QR Widget | vendrux Docs

    The QR Code Widget allows you to promote app-specific features, and discounts, followed by a QR code that can be scanned to open your app install page on mobile devices.

    What Are QR Widgets?

    QR widgets are modals/popups that show up when someone lands on your desktop website, prompting them to get your app.

    Here’s an example:

    Features ✨

    ML QR Widget features:

    • Configuration options:
      • Widget position
      • Widget delay
      • Texts fonts
      • Texts color
      • Widget BG
      • QR colors
      • QR with images
      • Text content
      • Entering animation
      • Display options: On load or when user scrolls up/down
    • Fallback options –> If the provided icon link is invalid / or image can not be displayed, an icon is generated using the App Name Param and Button colors
    • Default options set (if not texts, images or colors provided, it shows placeholder info, useful for catching errors or for testing while implementing the widgets)
    • Widget can be used as a module or used directly in an html / script tag
    • The library uses QuickChart’s QR Library, methods from their API are available to use within the widget
    • Code written in Typescript and minified/bundled with Vite

    How to use 📖

    QR Widget can be used importing the JS code via CDN or as a module using NPM

    With CDN 🚀

    In order to install the QR Code Widget you will want to add the following piece of code into your website, before closing   tags:

      script type="module" src="https://cdn.jsdelivr.net/npm/@vendrux/ml-qr-widget@latest/dist/ml-qr-widget.min.js">script>
      script>
        function addQrWidget() {
          new QrWidget().init();
        }
        window.addEventListener('load', addQrWidget);
      script>

    NPM 📦

    @vendrux/ml-qr-widget

    npm i @vendrux/ml-qr-widget

    Configuration options ⚙️

    To learn options available within qrOptions param, reference this: QuickChart’s QR Library,

    const options = {
       fontFamily: `"Source Sans Pro", "Arial", sans-serif`, // (string) Font family for widgets texts, defaults to system safe fonts
          textColor: '#222', // (string) Widget texts color (any color property value)
          textHeading: 'Get 10% OFF using Vendrux app', // (string) Heading Text
          textDescription: 'Scan our QR to download the app on your device and unlock the discount', // (string) Description text
          widgetsColor: '#fff', // (string) Widget BG color
          backDrop: true,// (boolean) if true, adds a backdop in front of the page
          backDropZIndex: 888888, // (number) z-index of the backdrop, should be lower than widgets z-index
          qrOptions: { // Params for the QR Generation, uses params from this docs: https://quickchart.io/documentation/qr-codes/
            text: "https://redirect.vendrux.com/?ios=https://itunes.apple.com/",
            size: 150,
            margin: 0
          },     
          position: 'center', // (string) Position of the widgets, default 'center'. 'center' | 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right'
          animation: 'fadeIn', // (string) Widget animation, default 'fadeIn'. 'fadeIn' | 'scaleUp' | 'slideBottom' | 'slideTop' | 'slideLeft' | 'slideRight' | null,
          display: 'onLoad', // (string) Display options, default 'onLoad'. 'onLoad' | 'onScrollDown' | 'onScrollUp'
          radius: '10px', // (string) Widget radius with CSS units
          delay: 0, // (number) defines how much time to wait until the element shows up
          shadow: true, // (boolean) If true applies soft shadow, true | false
          useSession: false, // (boolean) If true, after widgets is closed, it creates a session registry to hide widgets on page reloads until the end of user's session
          zindex: 999999, // (number) Widget z-index
          maxWidth: "400px", // (string) Max Width of the widgets with CSS units
          sessionExpire: 1440 // (number) time for banner to show again in minutes starting from the time the banner is shown, defualt: 1440 (1 day)
       
        };
    
    
    const qrWidget = new QrWidget(options);

    Methods 💡

    deviceData.os // returns current os "android" | "ios" | "windows" | "desktop"
    deviceData.isCanvas // returns true or false
    deviceData.isMobile // returns true or false

    Recipes 🍳

    This are useful ways to implement the widget. We always recommend using an Event Listener to trigger the code when the document is loaded window.addEventListener('load', fnName)

    Insert QR Banner on desktop only

    function addQrWidget() {
    	if(deviceData.isMobile || deviceData.isCanvas ){
    		return
    	}
        new QrWidget(options).init();
      }
      window.addEventListener('load', addQrWidget);

    Using deviceData method to filter devices

    const options = {
      // Set params here
    }
    
    // Insert widgets only in our Canvas platform
    if(deviceData.isCanvas) {
    	const qrWidget = new QrWidget(options);
    }
    
    // Apply specific configs based on OS
    if(deviceData.os === "android" || deviceData.os === "windows") {
      const qrWidget = new QrWidget(options1); // different options sets can be passed for different platforms
    } 
    if(deviceData.os === "desktop" || deviceData.os === "ios") {
      const qrWidget = new QrWidget(options2);
    }
    
    // Insert widgets only in Mobile userAgent
    if(deviceData.isMobile) {
    	const qrWidget = new QrWidget(options3);
    }

    How Banner Session works

    When ‘useSession’ parameter is set to true, the banners appears once until the banner is closed, after closed, the banner won’t appear until the next day (default) or until the time configured in the ‘sessionExpire’ parameter, this parameter should have the time in minutes.

    1. If user closes the modal, it creates a LocalStorage key called “widgetClosed” with a date value (for example if we set up the sessionExpire value to 1440 (minutes), it would hide until tomorrow)

    2. On widget init(), the library checks if the param exists and if the date is bigger than current date

    3. If the expiration date already passed, the key is removed from storage and widget is shown again

    Redirect URL 🔗

    We provide a custom redirect URL that sends users to the correct app store using a single link.

    To use it, simply format the URL like this:

    https://redirect.vendrux.com/?ios=IOS_URL&android=ANDROID_URL

    Parameters:

    • ios: URL for iOS devices (e.g., App Store link)
    • android: URL for Android devices (e.g., Google Play link)
    • redirect: this performs a redirect to a new URL for every platform
    • buttonColor: this accepts an hex value (without the ‘#’)

    when the user open the redirect link on their phone, it will take them to the correct store like so:

    [Example] ios & android redirect:

    These parameters are used for automatically redirecting users to the correct store depending on their device.

    https://redirect.vendrux.com/?android=https://linkToPlaystore.com&ios=https://linkToAppStore.com

    [Example] redirect & button color:

    When a redirect to a new page is needed for every platform, the ?redirect parameter can be used along with ?buttonColor.

    https://redirect.vendrux.com/?redirect=https://shorturl.at/OWKx&buttonColor=00376e

    Testing Widgets 🧪

    www.vendrux.com/docs/testing-widgets
  • Can I Publish My App on My Own App Store or Google Play Accounts?

    Yes! Note Apple’s and Google’s fees are not included in our pricing. The Apple App Store charges a US$99 annual developer fee and Google Play charges a one-time fee of US$25.

    Apple Developer Programhttps://developer.apple.com/programs/ios/ ($99 a year)

    Google Play Developer registrationhttps://support.google.com/googleplay/android-developer/answer/113468?hl=en ($25 one-time fee)

    Will you publish the apps for me?

    Yes, Vendrux can take care of the submission process for you.

    Can I publish the apps on my own using the binaries?

    Yes, we can send you binaries for your app and have you publish it, if you know what you’re doing. Just request so when completing Vendrux’s submission form.

    You will still need to provide us with your Apple’s account credentials or add us as an Admin team member to your team (for Organisation accounts only). This is because we’ll need your account to sign the app for publishing.

  • Promotions Banner | vendrux Docs

    Promotions Banner | vendrux Docs

    Our Promotions Banner widget will allow you to display a message when your website gets displayed inside the apps, so you can provide exclusive app offers to your users.

    Here’s an example:

    Features ✨

    ML Promotions Banner features:

    • Configuration options:
      • Banner position
      • Banner delay
      • Texts fonts
      • Texts color
      • Banner BG
      • Text content
      • Entering animation
      • Display options: On load or when user scrolls up/down
      • Android and iOS links
    • Button Link applies automatically depending on user agent: If Android, it uses the provided android link if iOS, uses the provided ios link.
    • deviceData method available: its a function that can be called to get the current browser OS, useful for triggering external functions’. It returns a string containing “android” | “ios” | “windows”
    • Default options set (if not texts, images or colors provided, it shows placeholder info, useful for catching errors or for testing while implementing the banner)
    • Banner can be used as a module or used directly in an html / script tag
    • Code written in Typescript and minified/bundled with Vite

    How to use 📖

    Promotions Banner can be used importing the JS code via CDN or as a module using NPM

    With CDN 🚀

    script type="module" src="https://cdn.jsdelivr.net/npm/@vendrux/ml-promotions-banner@latest/dist/ml-promotions-banner.min.js">script>
    script>
      function addPromotionsBanner() {
        new PromotionsBanner().init();
      }
      window.addEventListener('load', addPromotionsBanner);
    script>

    NPM 📦

    @vendrux/ml-promotions-banner

    npm i @vendrux/ml-promotions-banner

    Configuration options ⚙️

    const options = {
          fontFamily: `"Source Sans Pro", "Arial", sans-serif`, // Font family for banner texts, defaults to system safe fonts
          textColor: '#222', // Banner texts color (any color property value),
          textHeading: 'Get a discount on your first purchase', // Heading Text
          textDescription: 'Use coupon 10OFF', // Description text
          bannerColor: 'white', // Banner BG color
          link: '#', // Link for button
          position: 'top', // Position of the banner, default 'top'. 'top' | 'bottom'
          animation: 'fadeIn', // Banner animation, default 'fadeIn'. 'fadeIn' | 'scaleUp' | 'slideBottom' | 'slideTop' | 'slideLeft' | 'slideRight' | null,
          display: 'onLoad', // Display options, default 'onLoad'. 'onLoad' | 'onScrollDown' | 'onScrollUp'
          radius: '0', // Banner radius with units
          delay: 0, // defines how much time to wait until the element shows up in ms
          shadow: true, // If true applies soft shadow, true | false
          useSession: false,
          zindex: 9999999
    }
    
    const promotionsBanner = new PromotionsBanner(options);

    Methods 💡

    deviceData.os // returns current os "android" | "ios" | "windows" | "desktop"
    deviceData.isCanvas // returns true or false
    deviceData.isMobile // returns true or false

    Recipes 🍳

    This are useful ways to implement the widget

    const options = {
          fontFamily: `"Source Sans Pro", "Arial", sans-serif`, // Font family for banner texts, defaults to system safe fonts
          textColor: '#222', // Banner texts color (any color property value),
          textHeading: 'Get a discount on your first purchase', // Heading Text
          textDescription: 'Use coupon 10OFF', // Description text
          bannerColor: 'white', // Banner BG color
          link: '#', // Link for button
          position: 'top', // Position of the banner, default 'top'. 'top' | 'bottom'
          animation: 'fadeIn', // Banner animation, default 'fadeIn'. 'fadeIn' | 'scaleUp' | 'slideBottom' | 'slideTop' | 'slideLeft' | 'slideRight' | null,
          display: 'onLoad', // Display options, default 'onLoad'. 'onLoad' | 'onScrollDown' | 'onScrollUp'
          radius: '0', // Banner radius with units
          delay: 0, // defines how much time to wait until the element shows up in ms
          shadow: true, // If true applies soft shadow, true | false
          useSession: false,
          zindex: 9999999
    }
    
    // Insert banner only in our Canvas platform
    if(deviceData.isCanvas) {
    	const promotionsBanner = new PromotionsBanner(options);
    }
    
    // Apply specific configs based on OS
    if(deviceData.os === "android" || deviceData.os === "windows") {
      const promotionsBanner = new PromotionsBanner({link: 'https://linkOne.com'});
    } 
    if(deviceData.os === "desktop" || deviceData.os === "ios") {
      const promotionsBanner = new PromotionsBanner({link: 'https://linkTwo.com'});
    }
    
    // Insert banner only in Mobile userAgent
    if(deviceData.isMobile) {
    	const promotionsBanner = new PromotionsBanner(options);
    }

    Using a “copy text” function for coupons

    
    // Set banner text with an onclick function in it
    const options = {
          textDescription: `Please use code 10OFF for 10% off in your next order!`
    }
    
    // Create the copyBannerText function that is linked to the description text, it copies the text, displays a "Copied!" message in that place and then shows the passed text again	
    function copyBannerText(e, text){
    	navigator.clipboard.writeText(text);
    	e.textContent = "Copied!"
    	setTimeout( function() {
          e.textContent = text
        }, 3000);
    }
    
    
      function addPromotionsBanner() {
    // Here we can use the deviceData method to display the banner only on desired devices
    		new PromotionsBanner(options).init();
      }
    
      window.addEventListener('load', addPromotionsBanner);

    Testing Widgets 🧪

    www.vendrux.com/docs/testing-widgets
  • Print pages in the app

    In order to enable the print functionality in your app you will need to add the following parameters to your advanced configuration:

    "Printing": {
        "Enable_Printing": true,
        "Regex": ".*print.*"
      }

    The “Regex” parameter determines which URLs will trigger the printing. You will need to make sure that the URLs that should trigger the print feature match the regex code used.

    If your URL looks like this: https://website.com/document?print=true

    You can use the value displayed in our example, it will be a match because the URL contains “print” in it.