|
1 |
| -Instabug iOS SDK |
2 |
| ----------------- |
3 |
| -Instant bug reporting for iOS apps. |
4 |
| -<br/> |
5 |
| -For integration steps check http://instabug.com/sdk-integration |
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | +Bug Reporting and In-App Chat for Mobile Apps |
| 5 | + |
| 6 | +For more info, visit [Instabug.com](https://www.instabug.com). |
| 7 | + |
| 8 | +## Installation |
| 9 | + |
| 10 | +### CocoaPods |
| 11 | + |
| 12 | +To integrate Instabug into your Xcode project using [CocoaPods](https://cocoapods.org), add it to your `Podfile`: |
| 13 | + |
| 14 | +```ruby |
| 15 | +pod 'Instabug' |
| 16 | +``` |
| 17 | + |
| 18 | +Then, run the following command: |
| 19 | + |
| 20 | +```bash |
| 21 | +$ pod install |
| 22 | +``` |
| 23 | + |
| 24 | +### Manually |
| 25 | + |
| 26 | +1. [Download the Instabug SDK](https://s3.amazonaws.com/instabug-pro/sdk_releases/Instabug.zip) |
| 27 | + |
| 28 | +2. Extract it then drag & drop the Instabug.framework and Instabug.bundle files to your project, and make sure that the "Copy items if needed" checkbox is checked. |
| 29 | + |
| 30 | +3. Make sure your project links to the following system frameworks. You can add these under your project's Build Phases tab, under Link Binary With Libraries. |
| 31 | + * AVFoundation.framework |
| 32 | + * CoreGraphics.framework |
| 33 | + * CoreMotion.framework |
| 34 | + * CoreTelephony.framework |
| 35 | + * SystemConfiguration.framework |
| 36 | + * UIKit.framework |
| 37 | + |
| 38 | +## Usage |
| 39 | + |
| 40 | +1. Import Instabug framework header |
| 41 | + |
| 42 | + ```swift |
| 43 | + // Swift: In your bridging header |
| 44 | + #import <Instabug/Instabug.h> |
| 45 | + ``` |
| 46 | + |
| 47 | + ```objective-c |
| 48 | + // Objective-C: In your app delegate |
| 49 | + #import <Instabug/Instabug.h> |
| 50 | + ``` |
| 51 | + |
| 52 | +2. Add the following to your app delegate's application:didFinishLaunchingWithOptions: method. |
| 53 | + |
| 54 | + ```swift |
| 55 | + // Swift |
| 56 | + Instabug.startWithToken("{{app_token}}", invocationEvent: IBGInvocationEvent.Shake) |
| 57 | + ``` |
| 58 | + ```objective-c |
| 59 | + // Objective-C |
| 60 | + [Instabug startWithToken:@"{{app_token}}" invocationEvent:IBGInvocationEventShake]; |
| 61 | + ``` |
| 62 | + Make sure to replace `{{app_token}}` with your application token. Find it [here](https://instabug.com/app/sdk/). |
| 63 | + |
| 64 | +## More |
| 65 | + |
| 66 | +You can also check out our [API Reference](https://instabug.com/public/ios-api-reference/Classes/Instabug.html) for more detailed information about our SDK. |
0 commit comments