Manual integration of the buddybuild SDK

We highly recommend using the automatic buddybuild SDK integration right from the buddybuild dashboard. See the instructions for iOS or for Android.

However, if you wish to integrate the buddybuild SDK manually, follow the platform-specific steps on this page:

iOS integration steps

Note

Use CocoaPods?

Include the BuddyBuildSDK pod in your Podfile and move on to Step 4.

  1. Navigate to your repository root directory.

    cd myAwesomeApp
  2. Remove any previous version of the buddybuild SDK.

    rm -rf BuddyBuildSDK.framework*
  3. Download and unpack the buddybuild SDK.

    Download and unpack the BuddyBuildSDK.framework.zip file into your project’s root directory:

    wget https://s3-us-west-2.amazonaws.com/buddybuild-sdk-builds/master/BuddyBuildSDK.framework.zip
    unzip BuddyBuildSDK.framework.zip
    rm -f BuddyBuildSDK.framework.zip
  4. Add iOS frameworks

    1. Open your project in Xcode.

    2. Highlight your project in the Project Navigator.

    3. Select your target.

    4. Select the Build Phases tab.

    5. Open Link Binaries With Libraries expander.

    6. Repeat for each of the AssetsLibrary, BuddyBuildSDK, CoreTelephony, CoreText, CoreMedia, AVFoundation, CoreVideo, QuartzCore and SystemConfiguration frameworks:

      1. Click the + button.

      2. Select the required framework name.

      3. Click Add.

      The Project Navigator in Xcode

  5. Initialize the buddybuild SDK.

    1. Find the class that implements the UIApplicationDelegate. The class implementation should look something like this:

      Swift
      class AppDelegate: UIResponder, UIApplicationDelegate {
      Objective-C
      @interface AppDelegate : UIResponder <UIApplicationDelegate>
    2. Add this import to the top of the class implementation’s .m file:

      Swift
      import BuddyBuildSDK
      Objective-C
      #import <BuddyBuildSDK/BuddyBuildSDK.h>
    3. Initialize the BuddyBuildSDK in the class, by adding the following line to the didFinishLaunchingWithOptions method:

      Swift
      BuddyBuildSDK.setup()
      Objective-C
      [BuddyBuildSDK setup];
  6. Run your application in Xcode.

  7. Verify that the SDK is integrated and working.

    In the Xcode output pane you should see the following log line, which indicates that the buddybuild SDK has been successfully integrated.

    When running on a physical device
    2015-10-05 15:34:48.693 myAwesomeApp[25126:526527] BuddybuildSDK : Successfully integrated. Feedback tool, crash reporting and other features are disabled for local builds. Please build with https://dashboard.buddybuild.com to enable.
    When running in a simulator
    2015-10-05 15:33:24.562 myAwesomeApp[25126:526527] BuddybuildSDK : Disabled in the simulator
  8. Commit the changes and push to your repository.

    git add --all
    git commit -m 'Adding buddybuild SDK'
    git push

That’s it! The SDK is now integrated into your iOS app, and becomes active in subsequent builds, including the build started by your code push.

Android integration steps

Tip

As of November 2017, the buddybuild SDK for Android contains 279 methods.

  1. Add plugins to build.gradle

    In order to pull in the plugins needed to build the app with the SDK, add the following line to your build.gradle file:

    repositories {
        jcenter()
    
        maven {
          url 'https://dl.bintray.com/buddybuild/maven'
        }
    }
    
    dependencies {
        compile 'com.buddybuild:sdk:0.1.12@aar'
        compile 'com.squareup:seismic:1.0.2'
    }
    Tip

    Two things to note here:

    1. You can put the repositories section in the base build.gradle file, but you need to put it under the allprojects section.

    2. Note the @aar at the end of com.buddybuild:sdk:0.1.12@aar

  2. Add Permissions to AndroidManifest.xml

    The following permissions allow the SDK to send feedback, as well as to collect adb logs in case of app crash:

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.READ_LOGS"/>
  3. Setup the SDK in Application.onCreate()

    One last thing to do is to start up the SDK upon app start. All you need to do is to add BuddyBuild.setup(this) to your Application class.

    Warning

    This does not work properly when added to the main activity class.

    package buddybuild.com.helloworldandroid;
    
    import android.app.Application;
    import com.buddybuild.sdk.BuddyBuild;
    
    public class MainApplication extends Application {
        @Override
        public void onCreate() {
            super.onCreate();
    
            BuddyBuild.setup(this);
        }
    }
  4. Commit the changes and push to your repository.

    git add --all
    git commit -m 'Adding buddybuild SDK'
    git push

That’s it! The SDK is now integrated into your Android app, and becomes active in subsequent builds, including the build started by your code push.

results matching ""

    No results matching ""