Bugly iOS SDK User Guide

Preparation before access

Please read carefully before accessing the sdk《 Developer Compliance Guide 》And《 Bugly SDK Personal Information Protection Rules

SDK integration

Bugly provides two integration methods for iOS developers to choose from:

  • Integration via CocoaPods
  • Manual integration

If you are from Bugly 2.0 The following versions are upgraded, please check IOS SDK Upgrade Guide

Bugly iOS SDK minimum compatible system version iOS 7.0

Integration via CocoaPods

In project Podfile Add the following codes:

 pod 'Bugly'

Save and Execute pod install , and then use the suffix .xcworkspace Open the project from the file.

be careful:

Execute on the command line pod search Bugly , as shown Bugly If the version is not the latest, execute it first pod repo update Operation updates the content of the local repo

about CocoaPods For more information CocoaPods official website

Manual integration

  • download Bugly iOS SDK
  • Drag Bugly.framework File to Xcode project (please check Copy items if needed Options)
  • Add dependent libraries
    • SystemConfiguration.framework
    • Security.framework
    • libz.dylib or libz.tbd
    • libc++.dylib or libc++.tbd

Initialize SDK

Import header file

In project AppDelegate.m File Import Header File

#import <Bugly/Bugly.h>

If it is Swift Project, please enter the corresponding bridging-header.h Import in

Initialize Bugly

Work in progress AppDelegate.m Of application:didFinishLaunchingWithOptions: Initialize in method:

  • Objective-C
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [Bugly startWithAppId: @ "Replace with your AppId here"]; return YES; }
  • Swift
 func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) ->  Bool { Bugly.startWithAppId ("Replace with your AppId here") return true }

If you need to report iOS Watch2 App or iOS App Extension Exception of, see Bugly iOS Extension SDK Access Guide