GithubHelp home page GithubHelp logo

freshplanet / ane-crashlytics Goto Github PK

View Code? Open in Web Editor NEW
27.0 33.0 11.0 189.65 MB

Air Native Extension (iOS and Android) for Crashlytics

License: Apache License 2.0

ActionScript 2.48% Java 6.62% C 25.79% Objective-C 61.67% Ruby 0.13% C++ 3.30%

ane-crashlytics's Introduction

Air Native Extension for Crashlytics (iOS + Android)

This is an Air native extension for Crashlytics SDK on iOS and Android. It has been developed by FreshPlanet and is used in the game SongPop.

Installation

The ANE binary (AirCrashlytics.ane) is located in the bin folder. You should add it to your application project's Build Path and make sure to package it with your app (more information here).

Before you try to use this ANE, you should first complete the Crashlytics native workflow (iOS or Android) on a test project in order to get your API key. It is linked to your organization and is the same for all your apps, so you only need to do it once.

You will then need to add your API key in your application descriptor twice, once for iOS, once for Android:

  • iOS:
<iPhone>
    
    <InfoAdditions><![CDATA[

       <key>Fabric</key>
       <dict>
         <key>APIKey</key>
         <string>YOUR-API-KEY</string>
         <key>Kits</key>
         <array>
           <dict>
             <key>KitInfo</key>
             <dict/>
             <key>KitName</key>
             <string>Crashlytics</string>
           </dict>
         </array>
       </dict>

    ]]></InfoAdditions>

</iPhone>
  • On Android (note the INTERNET permission and the crashActivity declaration as well):
<android>
    <manifestAdditions><![CDATA[
        <manifest android:installLocation="auto">
            
            ...

            <uses-permission android:name="android.permission.INTERNET"/>
            
            ...

            <application>

                ...
                
                <meta-data android:name="io.fabric.ApiKey" android:value="YOUR_API_KEY"/>

                ...

                <activity android:name="com.freshplanet.ane.AirCrashlytics.activities.CrashActivity" />

            </application>

        </manifest>
    ]]></manifestAdditions>
</android>

Usage

// Start Crashlytics
AirCrashlytics.instance.start();

// Force a crash (iOS only)
AirCrashlytics.instance.crash();

// Set a user identifier
AirCrashlytics.instance.userIdentifier = "myUserIdentifier";

// Set some custom keys
AirCrashlytics.instance.setBool("myBoolKey", true);
AirCrashlytics.instance.setInt("myIntKey", 10);
AirCrashlytics.instance.setFloat("myFloatKey", 2.5);
AirCrashlytics.instance.setString("myStringKey", "myStringValue");

To receive symoblicated reports in your dashboard with iOS, you need to execute Fabric/upload-symbols after building your AIR application. You need to provide the path to your .dSYM file, so if you are compiling in release mode with Flash Builder be sure to check "Keep bin-release-temp folder" otherwise the .dSYM file will be deleted by Flash Builder:

cd /path/to/the/ane
.ios/Pods/Fabric/upload-symbols -a YOUR-API-KEY -p ios /path/to/your/dsym

Notes:

  • included binary has been compiled for 64-bit iOS support

Build from source

Should you need to edit the extension source code and/or recompile it, you will find an ant build script (build.xml) in the build folder:

cd /path/to/the/ane

# Setup build configuration
cd build
mv example.build.config build.config
# Edit build.config file to provide your machine-specific paths

# Build the ANE
ant

Authors

This ANE has been written by Alexis Taugeron and Mateo Kozomara. It belongs to FreshPlanet Inc. and is distributed under the Apache Licence, version 2.0.

Join the FreshPlanet team - GAME DEVELOPMENT in NYC

We are expanding our mobile engineering teams.

FreshPlanet is a NYC based mobile game development firm and we are looking for senior engineers to lead the development initiatives for one or more of our games/apps. We work in small teams (6-9) who have total product control. These teams consist of mobile engineers, UI/UX designers and product experts.

Please contact Tom Cassidy ([email protected]) or apply at http://freshplanet.com/jobs/

ane-crashlytics's People

Contributors

adamfp avatar ataugeron avatar dmytrooverchenko avatar freshtiti avatar louisannabi avatar mateo-kozomara avatar shinyamos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ane-crashlytics's Issues

Crash on startup (Android & iOS)

Hello,
Thank you for building and publishing this ANE,

However, it seems to just crash our android app on startup (even without calling start).
On iOS it seems to crash as soon as start() is called.

We're using it for a HaXe game using Flambe engine
Did anyone else experience it?
Is it currently working for anyone?

white screen after crashlyticsIpaModifier/run.sh

script result:
Crashlytics: dsymupload.dSYM uploaded statusCode 201
** BUILD SUCCEEDED **

after installation on device application not started and show only white screen.
no system log errors, no flash logs.

Doesn't work on iOS x64

ANE works correctly on iOS x64 devices. But on iOS x32 devices I don't have crash reports (but the ANE starts, shows correct api key, crash method works).

Fabric support and uploading builds

Does this work with Fabric? I've been able to add the ANE to my project, start AirCrashlytics and cause a fake crash on iOS, get a successful run of tool.sh .. but don't see the app in my Fabric account.

I haven't been able to upload the Android build either. Tried dragging & dropping the apk on the Android Studio plugin, but it claims it cannot find the sdk bundled in the apk.

Not able to package iOS build

Hello all,

I'm not able to package the iOS build after using this ANE.
Error found is :
[java] ld: framework not found Crashlytics for architecture armv7
[java] ld: framework not found Crashlytics for architecture arm64
[java] Compilation failed while executing : ld64

I tried to re-package the ANE , after adding following libraries and frameworks :
libc++.dylib
libz.dylib
SystemConfiguration.framework
Security.framework

Unfortunately, that also didn't helped ; and the app got crashed when Fabrics was initiallized.

Is there any workaround to make this ANE compatible for iOS ?

Thanks in advance,
Prashant

Uploading ipa issue

Hi,

Are you still supporting this ANE? I am having trouble uploading the ipa to the crashlytics/fabric dashboard as I keep getting this error when running the bash script:

** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Run\ Script build/dsymupload.build/Release/dsymupload.build/Script-398BD51C1876C966003AAA43.sh

I've looked through it and found the run script is referencing the crashlytics framework path incorrectly:

export CRASHLYTICS_FRAMEWORK_PATH=$SCRIPT_DIR/../ios/Crashlytics.framework

where the crashyltics framework is actually found in /../ios/Frameworks/Crashlytics.framework

Editing this line has had no effect however so I was wondering if there was anywhere else where this location change may be having an effect? I can't seem to find any.

Thanks for you time.
Adam

ps. Some people have mentioned a bug where it crashes on bootup. I have fixed this for iOS by replacing the infoAdditions in your readme with:

<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>{API_KEY_HERE}</string>
<key>Kits</key>
<array>
<dict>
<key>KitName</key>
<string>Crashlytics</string>
<key>KitInfo</key>
<dict/>
</dict>
</array>
</dict>

Issue on the final step of the process.

Hi Alexis & FreshPlanet's team.

First of all, let me start by thanking you for sharing this ANE with the world, I really appreciate it. I've been trying to use it though and I found an issue I can't seem to find a solution to.

The issue is related to the final step of the whole process (running the script). My problem is that I can't seem to find any .dSYM file on my computer, I've tried with a Mac and a PC, and got no luck so far. I believe this issue is related to my Flash Builder version (4.6). That version doesn't have the "keep bin-release-temp" folder you say, so I can't manage to get that file from anywhere. I've even tried to uncompress manually the .ipa file (getting the Payload folder with the .app file inside), and even checking the contents of that app I couldn't find the file required for running the script. Is there anything I could do to get to that file?

Thank you again for the help!

Crashlytics

HI,

I'm trying to get crashlytics in my app and it fails. I've build my ipa with the dSYM and run the tools/run.sh
The script succeed but nothing happens in the dashboard of Fabric. It is asking me to give him my dSYM. So I don't know why it doesn't consider the dSYM that I gave him. Anyone has an idea ?

thanks

Variable AirCrashlytics is not defined

Thank you for building great ANE's.

I forced with the issue trying to add the extension to my app. I'm building it with Intellij Idea.

There's the log:

"/Applications/IntelliJ IDEA.app/Contents/jre/jdk/Contents/Home/jre/bin/java" -Dapplication.home=/Users/nick/master/sdk/AIRSDK_Compiler_22 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -classpath /Users/nick/master/sdk/AIRSDK_Compiler_22/lib/legacy/fdb.jar flex.tools.debugger.cli.DebugCLI -p 7936โ€ฆ
Adobe fdb (Flash Player Debugger) [build development]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
Trying to connect to Player
Player connected; session starting.
[trace] [Starling] Context ready. Display Driver: OpenGL (Baseline Extended)
java.lang.ArrayIndexOutOfBoundsException: -2
at flash.tools.debugger.concrete.ScriptText.getLine(ScriptText.java:38)
at flash.tools.debugger.concrete.DModule.getLine(DModule.java:135)
at flex.tools.debugger.cli.DebugCLI.dumpBreakLine(DebugCLI.java:2485)
at flex.tools.debugger.cli.DebugCLI.dumpHaltState(DebugCLI.java:2289)
at flex.tools.debugger.cli.DebugCLI.runningLoop(DebugCLI.java:2821)
at flex.tools.debugger.cli.DebugCLI.process(DebugCLI.java:817)
at flex.tools.debugger.cli.DebugCLI.execute(DebugCLI.java:669)
at flex.tools.debugger.cli.DebugCLI.main(DebugCLI.java:461)
[Fault] exception, information=ReferenceError: Error #1065: Variable com.freshplanet.ane.AirCrashlytics::AirCrashlytics is not defined.

ios package error

we get duplicate symbol error when building ipa

duplicate symbol l002 in:
    C:\\Users\\TESTMAN\\AppData\\Local\\Temp\\005bc40e-36b3-45cf-866e-69aee97bb9
dc/Fabric.framework/Fabric(FABNetworkClient.o)
    C:\\Users\\TESTMAN\\AppData\\Local\\Temp\\005bc40e-36b3-45cf-866e-69aee97bb9
dc/Crashlytics.framework/Crashlytics(ANSSettings.o)
duplicate symbol l002 in:
    C:\\Users\\TESTMAN\\AppData\\Local\\Temp\\005bc40e-36b3-45cf-866e-69aee97bb9
dc/Fabric.framework/Fabric(FABNetworkClient.o)
    C:\\Users\\TESTMAN\\AppData\\Local\\Temp\\005bc40e-36b3-45cf-866e-69aee97bb9
dc/Crashlytics.framework/Crashlytics(ANSBackoffTimer.o)
ld: 506 duplicate symbols for architecture arm64
Compilation failed while executing : ld64

make info additions as you have described

<key>Fabric</key>
			  <dict>
				<key>APIKey</key>
				<string>***************************</string>
				<key>Kits</key>
				<array>
				  <dict>
					<key>KitInfo</key>
					<dict/>
					<key>KitName</key>
					<string>Crashlytics</string>
				  </dict>
				</array>
			  </dict>

Add AIR project in Crashlytics dashboard

How can I add my AIR project in crashlytics dashboard? I include ANE Crashlytics in my project and build *.apk file. When I run my application, I don't see its in my dashboard, because its don't added.

Not seeing information in Android

Hi,

We have an android app and are trying to use crashlytics.
We already have an android crashlytics linked app in our org (not written in flash) so we have an API key. We used that one in the android manifest. It is getting read correctly, but we are not seeing any data in the crashlytics / fabric dashboard.

This is what I see in the logcat:

03-15 11:18:48.386 12314 12314 D Fabric : Build ID is: 964B963A-E397-44CE-BEDD-207C42AB1D6C
03-15 11:18:48.389 12314 12314 I CrashlyticsCore: Initializing Crashlytics 2.5.0.20
03-15 11:18:48.393 12314 12314 D CrashlyticsCore: Installer package name is: null
03-15 11:18:48.430 12314 12314 D CrashlyticsCore: Exception handling initialization successful
03-15 11:18:48.431 12314 12314 D Fabric : Initializing io.fabric.sdk.android:fabric [Version: 1.4.1.19], with the following kits:
03-15 11:18:48.431 12314 12314 D Fabric : com.crashlytics.sdk.android:answers [Version: 1.4.1.19]
03-15 11:18:48.431 12314 12314 D Fabric : com.crashlytics.sdk.android:beta [Version: 1.2.7.19]
03-15 11:18:48.431 12314 12314 D Fabric : com.crashlytics.sdk.android:crashlytics [Version: 2.8.0.20]
03-15 11:18:48.431 12314 12314 D Fabric : com.crashlytics.sdk.android.crashlytics-core [Version: 2.5.0.20]
03-15 11:18:48.431 12314 12314 D Fabric :
03-15 11:18:48.433 12314 12314 I air.com.supermechs.superapp: [Crashlytics] Crashlytics 2.8.0.20 initialized with API key e370xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The line that worries me is
03-15 11:18:48.393 12314 12314 D CrashlyticsCore: Installer package name is: null

Does that mean anything? What's wrong?

Crash reporting on Android

Trying to get crash reporting working on Android. I add activity for CrashActivity and everything else according to documentation. Also I created a empty native project, generate all stuff and run application once with "crash button", I succeed with getting error. But still no luck from Air application.

AIR 20 cannot find ANE.

I always appreciate your endeavor toward developing native extension. Recently I tried to build with the latest Crashlytics ANE and saw an error stating the native extension is not found. Could you please check the issue? Thank you.

Crashlytics SDK update.

I have successfully integrated ANE but then It says the SDK is outdated.
Could you update it to the latest one, please?
By doing it, I think this would enable the use of "Answers,"
the new analytics tools which Fabric has released. Regards,

Crashlytics with APK

Hello,

I use your ANE for app cross platform (iOS/Android). I have a good result in Crashlytics for the version iOS, but with the version Android I don't see log and crash in Crashlytics.

I have created an app Android for declared in Crashlytics, it's ok I see the app, and after I use your ANE with the good key in app Air, but in crashlytics nothing...

You have an idea?

Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.