Coder Social home page Coder Social logo

segmentio / analytics-ios Goto Github PK

View Code? Open in Web Editor NEW
399.0 399.0 330.0 187.4 MB

The hassle-free way to integrate analytics into any iOS application.

Home Page: https://segment.com/libraries/ios

License: MIT License

Objective-C 75.12% Makefile 0.61% Ruby 0.29% Shell 0.31% Swift 23.40% C 0.27%

analytics-ios's People

Contributors

alanjcharles avatar allanca avatar amillet89 avatar andrewsb avatar arietis avatar bsneed avatar cspickert avatar danieljackins avatar djih avatar f2prateek avatar fathyb avatar humblehacker avatar johnryan avatar jonathannorris avatar marsepu avatar migs647 avatar mootpointer avatar nemo avatar philippec avatar pkamb avatar prayansh avatar reinpk avatar sharekris avatar sperand-io avatar teresanesteby avatar tonyxiao avatar travisjeffery avatar tyliaw avatar voidref avatar wcjohnson11 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

analytics-ios's Issues

Expose alias:to:context: on Analytics

We would like to have access to alias:to:context: method which is available segmentio, mixpanel and kissmetric apis, but not exposed through the Analytics.h public interface.

Mixpanel SDK: [NSConcreteMutableData mp_base64EncodedString]: unrecognized selector sent to instance

It looks like a JSON library conflict can cause mp_base64EncodedString to not be defined in this line:

https://github.com/segmentio/analytics-ios/blob/master/Analytics/Analytics/Providers/Mixpanel/Mixpanel/Mixpanel.m#L265

leading to this exception:

-[NSConcreteMutableData mp_base64EncodedString]: unrecognized selector sent to instance 0xaeae700 2013-06-27 00:54:44.066 Alan’s World 2[1195:1df03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMutableData mp_base64EncodedString]: unrecognized selector sent to instance 0xaeae700' *** First throw call stack: (0x339b012 0x30f9e7e 0x34264bd 0x338abbc 0x338a94e 0x1ea1f6 0x1ed378 0x1ecde6 0x2b422c0 0x335a376 0x3359e06 0x3341a82 0x3340f44 0x3340e1b 0x3e657e3 0x3e65668 0x203dffc 0x2bb2 0x2ae5) libc++abi.dylib: terminate called throwing an exception

Crash

Stack trace:

CoreFoundation
__exceptionPreprocess + 162

CoreFoundation
-[NSException initWithCoder:]

Foundation
_writeJSONValue + 648

Foundation
___writeJSONObject_block_invoke_0 + 234

CoreFoundation
__NSDictionaryEnumerate + 714

Foundation
_writeJSONObject + 512

Foundation
_writeJSONValue + 484

Foundation
___writeJSONObject_block_invoke_0 + 234

CoreFoundation
__NSDictionaryEnumerate + 714

Foundation
_writeJSONObject + 512

Foundation
_writeJSONValue + 484

Foundation
___writeJSONArray_block_invoke_0 + 106

CoreFoundation
__NSArrayEnumerate + 396

CoreFoundation
-[NSArray enumerateObjectsWithOptions:usingBlock:] + 62

Foundation
_writeJSONArray + 236

Foundation
_writeJSONValue + 536

Foundation
___writeJSONObject_block_invoke_0 + 234

CoreFoundation
__NSDictionaryEnumerate + 714

Foundation
_writeJSONObject + 512

Foundation
_writeJSONValue + 484

Foundation
-[_NSJSONWriter dataWithRootObject:options:error:] + 126

Foundation
+[NSJSONSerialization dataWithJSONObject:options:error:] + 336


Training

Segmentio.m line 234
__18-[Segmentio flush]_block_invoke

flush on app close

you really want to get the unsent events out before the app closes, otherwise you have to wait a couple days for your "real-time" analytics to get those pending events.

Can no longer manually install without CocoaPods

We've been using version 0.2.1, installed via git submodule (we weren't using CocoaPods on our project for a few very specific reasons). We went to upgrade to 0.3.2, but found that you guys added a whole bunch of external dependencies you're resolving via CocoaPods.

Right now, it seems like our main non-CocoaPods option is manually adding each of the dependencies as a submodule (or similar) by cross-referencing the version numbers specified in your Podspec — are you guys planning on reintroducing better support for folks who aren't using CocoaPods?

(Your repo does include copies of all the dependency libraries in your test project, but it doesn't really seem like a viable long-term dependency management solution for us to rely on your test project).

cant find via cocoapods

// Podfile

pod 'Analytics'
$ pod --version
0.22.1
$ pod update
Analyzing dependencies
[!] Unable to find a specification for `Analytics`.

Any ideas?

Consider adding location via API

Flurry supports adding location from the location manager, like so:

CLLocationManager *locationManager = [[CLLocationManager alloc] init];
[locationManager startUpdatingLocation];

CLLocation *location = locationManager.location;
[Flurry setLatitude:location.coordinate.latitude
          longitude:location.coordinate.longitude
 horizontalAccuracy:location.horizontalAccuracy
   verticalAccuracy:location.verticalAccuracy];

After starting the location manager, you can set the location with Flurry. You can implement CLLocationManagerDelegate to be aware of when the location is updated. Below is an example of how to use this method, after you have recieved a location update from the locationManager.

This allows you to set the current GPS location of the user. Flurry will keep only the last location information. If your app does not use location services in a meaningful way, using CLLocationManager can result in Apple rejecting the app submission.

http://support.flurry.com/index.php?title=Analytics/GettingStarted/TechnicalQuickStart

We should consider adding support for this via the API

add support for apptimize

http://apptimize.com/

https://github.com/CocoaPods/Specs/blob/master/Apptimize/2.0.0/Apptimize.podspec

// The following constants and methods are deprecated and will be removed in a future release.

extern NSString *const ApptimizeDevicePairingOption __deprecated;
extern NSString *const ApptimizeGestureRecognizerOption __deprecated;
extern NSString *const ApptimizeLogLevelOption __deprecated;

@interface Apptimize (Deprecated)

+ (void)setUpWithApplicationKey:(NSString *)applicationKey __deprecated_msg("This method should be removed in favor of Zero-Line Installation. See http://apptimize.com/docs/getting-started-ios/step-1-installation-ios/ for more information.");
+ (void)setUpWithApplicationKey:(NSString *)applicationKey options:(NSDictionary *)options __deprecated_msg("This method should be removed in favor of Zero-Line Installation. See http://apptimize.com/docs/getting-started-ios/step-1-installation-ios/ for more information.");

+ (NSString *)version __deprecated_msg("libraryVersion should be used for all new code.");

@end

recording events fails when app is in background

silently? say you're doing push notifications... good question from a user. we should at least test the behavior here to see what happens. would be good to record events successfully even when not active?

HockeyApp users get conflict with CrittercismSDK

When using both CrittercismSDK and HockeySDK (if you install Analytics alongside HockeyApp for example)... it generates a duplicate symbol error:

duplicate symbol _OBJC_CLASS_$_PLCrashReport in:
    /Users/reinpk/dev/forex/Pods/CrittercismSDK/CrittercismSDK/libCrittercism_v3_5_1.a(libCrashReporter-iphonesimulator.a-i386-master.o)
    /Users/reinpk/dev/forex/Pods/HockeySDK/Vendor/CrashReporter.framework/CrashReporter(libCrashReporter-iphonesimulator.a-i386-master.o)

Same issue remain mp_base64EncodedString when active mixpanel

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMutableData mp_base64EncodedString]: unrecognized selector sent to instance 0xae93160'
*** First throw call stack:
(0x344d012 0x30f2e7e 0x34d84bd 0x343cbbc 0x343c94e 0x1e05e6 0x1e3768 0x1e31d6 0x2b3b2c0 0x340c376 0x340be06 0x33f3a82 0x33f2f44 0x33f2e1b 0x337c7e3 0x337c668 0x2036ffc 0x3172 0x30a5)
libc++abi.dylib: terminate called throwing an exception

KISSMetricsAPI: INFO - Failure bad gateway

Hi there,

I integrate Segment IO into our app, and when we launch, a bunch of error "KISSMetricsAPI: INFO - Failure bad gateway" shows up.

Furthermore, Segment IO seems to constantly send about 5 requests/sec.

Can help to check on this? Thanks

Appears to no longer support OS X

Does this project still support OS X targets? When we went to upgrade from 0.2.1 to 0.3.2, we found that we could no longer build for our OS X target because one of your dependencies required AdSupport.framework, an iOS 6-only framework.

820996c#L0L13 suggests this was a conscious choice on your part, but the documentation doesn't seem to have been updated to reflect this. Can you clarify?

Reachability Symbols Duplicated

duplicate symbol _OBJC_IVAR_$_Reachability.reachabilityRef in:
/Users/user/Library/Developer/Xcode/DerivedData/user-buepnzcguvlwvuajrccexspzvbac/Build/Intermediates/user.build/Debug-iphonesimulator/user.build/Objects-normal/i386/Reachability.o
/Users/user/Documents/git/userapp/user/user/Analytics.framework/Analytics(Reachability.o)
duplicate symbol _kReachabilityChangedNotification in:
/Users/user/Library/Developer/Xcode/DerivedData/user-buepnzcguvlwvuajrccexspzvbac/Build/Intermediates/user.build/Debug-iphonesimulator/user.build/Objects-normal/i386/Reachability.o
/Users/user/Documents/git/userapp/user/user/Analytics.framework/Analytics(Reachability.o)
duplicate symbol _OBJC_CLASS_$_Reachability in:
/Users/user/Library/Developer/Xcode/DerivedData/user-buepnzcguvlwvuajrccexspzvbac/Build/Intermediates/user.build/Debug-iphonesimulator/user.build/Objects-normal/i386/Reachability.o
/Users/user/Documents/git/userapp/user/user/Analytics.framework/Analytics(Reachability.o)
duplicate symbol _OBJC_METACLASS_$_Reachability in:
/Users/user/Library/Developer/Xcode/DerivedData/user-buepnzcguvlwvuajrccexspzvbac/Build/Intermediates/user.build/Debug-iphonesimulator/user.build/Objects-normal/i386/Reachability.o
/Users/user/Documents/git/userapp/user/user/Analytics.framework/Analytics(Reachability.o)
ld: 4 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Seeing a assertion failure in 0.6.2 library, SegmentioProvider.m line 104

I haven't had a chance to dig into the sources to see what's causing this, but this is the error I'm seeing, along with a stack trace.

Reason:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: self.flushTaskID == UIBackgroundTaskInvalid'

Stacktrace:
Class Method Location
SegmentioProvider beginBackgroundTask SegmentioProvider.m:104
SegmentioProvider applicationDidEnterBackground SegmentioProvider.m:314
Analytics forwardSelector:arguments:context: Analytics.m:87
Analytics callProvidersWithSelector:arguments:context: Analytics.m:110

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.