SDK Integration

MicroBrew's lightwieght SDKs are compatible iOS by having a universal framework. We wanted to give an easy way to access our API with a SDK that you can place in any App or Library you create. file_download Github


iOS Native Integration

free_breakfast Before you start: MicroBrew supports iOS version 9.0 and above.

1: Import MicroBrew iOS Framework file, "MicroBrew.xcframework", to your project

To import the framework file go to File -> Add Files to "project" and select the file needed, "MicroBrew.xcframework".

Make sure to drag the framework to your Targets "Frameworks, Libraries, and Embedded Content" in the General tab, then set the Embed to "Embed & Sign".

priority_highImportant: Initialize MicroBrew. MicroBrew SDK does not support offline event caching.

2: Go to your MicroBrew Dashboard

Go to your profile on the MicroBrew dashboard and find your API Key listed on the dashboard.

3: Input user email & API key

Inside your code, start initializing MicroBrew have your email and API Key on hand.

4: Manually initialize MicroBrew

Whenever using the ByteBrew Library make sure to import the "MicroBrew" framework.


@import MicroBrew;
...

// Initialize MicroBrew
[MicroAPI InitWithAPIKeyAndEmail:@"API_KEY" Email:@"EMAIL"];

//Track when a initialization or authentication state changes
[MicroAPI InitializationStateChanged:^(BOOL initialized) {
  if(initialized) {
      [self GetData];
  }
}];


                  

App Data API Calls

Call the MicroBrew API to gather App Store Metadata


  // Call to get app data with its Bundle ID, this uses the default platform(iOS) and country(US), 
  [MicroAPI GetAppInfoWithBundleID:@"com.company.exampleapp" completionBlock:^(NSMutableDictionary *data) {
    //Utilize the data here
  }];

  // Call to get app data with its Apple App ID
  [MicroAPI GetAppInfoWithAppID:@"12345678" completionBlock:^(NSMutableDictionary *data) {
    //Utilize the data here
  }];

  // Call to get app data with its Bundle ID from a seperate platform, available platforms are Google and iOS
  [MicroAPI GetAppInfoWithBundleID:@"com.company.exampleapp" Platform:@"google" completionBlock:^(NSMutableDictionary *data) {
    //Utilize the data here
  }];

  // Call to get app data with its Bundle ID from a seperate platform and a different country
  [MicroAPI GetAppInfoWithBundleID:@"com.company.exampleapp" Platform:@"google" Country:@"us" completionBlock:^(NSMutableDictionary *data) {
    //Utilize the data here
  }];

  // Call the same for AppIDs 
  [MicroAPI GetAppInfoWithAppID:@"12345678" Country:@"us" completionBlock:^(NSMutableDictionary *data) {
    //Utilize the data here
  }];

                  

Data Returned in Dictionary

Check out the API docs to see differences in responses for each platform and MicroBrew User types.


  {
    "timestamp": "2021-09-12T04:19:52.849Z",
    "apps_requested": [
        "com.companyname.exampleapp",
        "com.secondcompany.exampleapp"
    ],
    "data": [
        {
            "bundle_id": "com.companyname.exampleapp",
            "country": "us",
            "platform": "google",
            "app_privacy_policy": "",
            "app_size": "154M",
            "app_version": "1.1.1",
            "avg_rating": 4.32,
            "contains_ads": true,
            "contains_iap": true,
            "content_ratings": [
                "Teen",
                "Violence, Blood, Rabits"
            ],
            "description": "He who is valient and pure of spirit may find the holy grail in the castle of AAAUUUUGGGGHHHH.....",
            "developer_address": "Camelot Castle, Britain",
            "developer_email": "arthur@knight-o-table.com",
            "developer_name": "Knights Who Say NI!,
            "developer_website": "EKKI-EKKI-EKKI-PIANG.ZOOM-BOING",
            "genres": [
                "Action"
            ],
            "key_words": [
                "candies",
                "craving",
                "purchases",
                "crush",
                "going",
                "tasty",
                "candy",
                "combos",
                "king",
                "game",
                "boosters"
                ...
            ]
            "icon": "icon-url.somewhere",
            "installs_amount": "50001-100000",
            "ios_app_id": "",
            "last_update_message": "Bug fixes - added coconuts",
            "last_updated": "April 13, 2021",
            "rating_count": 0,
            "screenshots": [
                "some-url.to_the_appstores",
                ...
            ],
            "store_name": "Journey for the Holy Grail",
            "app_state": "available",
            "pricing": "free"
        },
        {
            "bundle_id": "com.companyname.exampleapp",
            "country": "us",
            "platform": "google",
            ...
        }
    ]
}