- Add the plugin to your project:
["plugin.bugsnag"] =
{
publisherId = "com.cabagomez"
}
- Add your bugsnag key to the build settings: For Android:
applicationChildElements =
{
[[
<meta-data android:name="com.bugsnag.android.API_KEY"
android:value="<your api key>"/>
]],
-- Other stuff you might already have.
}
For iOS and to your plist:
plist =
{
bugsnag = {
apiKey = "xxxxxxxxYourAPIKeyxxxxxxxx"
},
}
- Init plugin.
local bugsnag = require( "plugin.bugsnag")
bugsnag.init( <Listerner> ) -- Nothing gets returnd by listerner at this time, but please provide.
Optionally you can provide id, name and e-mail:
bugsnag.init (<Listerner>, {id = "<userId of user>",email = "<email of user>", name="playerName" }) -- Please provide all three even if one or 2 or empty space.
- Send breadcrumb (optional)
bugsnag.leaveBreadcrumb( "<stringofbreadcrumb>" ) -- A scene name, an ad shown.
- Create an exception (optional and please don't deploy with this implemented)
bugsnag.crash()
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.