segmentio / analytics-ios Goto Github PK
View Code? Open in Web Editor NEWThe hassle-free way to integrate analytics into any iOS application.
Home Page: https://segment.com/libraries/ios
License: MIT License
The hassle-free way to integrate analytics into any iOS application.
Home Page: https://segment.com/libraries/ios
License: MIT License
should avoid compilation conflicts with basic names like Provider
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)
error: ld: file is universal (2 slices) but does not contain a(n) armv7s slice
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)
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
otherwise the event may be lost
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.
pending Apple dev center being back up and running completely...
the logging is to verbose for normal debugging.
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
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
should improve data consistency for apps that nuke NSUserDefaults
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?
// Podfile
pod 'Analytics'
$ pod --version
0.22.1
$ pod update
Analyzing dependencies
[!] Unable to find a specification for `Analytics`.
Any ideas?
This declaration conflicts with other JSON libraries on build:
*** 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
@tonyxiao actually this might already be implemented on every background-ing?
It looks like a JSON library conflict can cause mp_base64EncodedString
to not be defined in this line:
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
Watch for NS/UI applicationWillTerminate notifications and save unsent analytics calls to disk. Upon next application start send the persisted calls.
A lot of people get confused that switching integrations doesn't immediately enable the integration. We should default the reset call, or have an option to turn on production caching rather than assuming it.
looks very interesting, different.
Instead of serialQueue, pass it the userId in to the enqueueAction method: https://github.com/segmentio/analytics-ios/blob/master/Analytics/Analytics/Source/Segmentio/Segmentio.m#L140-L142
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
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).
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
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.