CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 214
@orta => DSL subspec for analytics #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ARAnalytics.podspec
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks legit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
ARDSL.m
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the issue here is swizzling arbitrary selectors with arbitrary return types and parameter lists. Investigating further.
@orta Still some work to do on event properties, and I'm curious about this block to retrieve properties you mentioned earlier. I'm turning in, but I'd love to hear your thoughts on where this is so far. |
So I'd imagine to cover the 90% of use cases I'd start with the DSL:
( This was how we built the ARNavigationButtonsViewController ) |
ARDSL.m
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see where you're going with this but do you think this conflicts with monitorNavigationController
? ( It's nice as something that you can add when you don't use a nav stack though? )
For example, I don't think we would use this in any of our apps. ( If you disagree, would love to know 👍 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point. However, the monitorNavigationController:z is used exclusively with the view controller's
titleproperty. For our purposes, either we need to implement something like this or augment
monitorNavigationController:` to access some sort of analytics dictionary on the view controllers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the advantage here the way you've done is is that we can allow people to define their own "get event properties" & "should trigger" blocks consistently which is probably enough of an advantage that we might use it too TBH
I like this DSL a lot. Implementing now. |
Hrm. Can't store SEL pointers directly in dictionaries. Going to fall back to storing them in strings for now. |
OK I've got it to a place I feel happy with. Going to start integrating it into the Artsy app and see if I run into any problems. |
ARDSL.m
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-static (and even static, tbh) functions should be prefixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch!
OK, I have no idea what's going on here. Any ideas anyone? |
@ashfurrow try merging in (or rebasing off of) ARAnalytics/heapFix ... this looks to be the cause: https://travis-ci.org/orta/ARAnalytics/builds/24325829#L1199 |
I think @confidenceJuice's suggestion should do it, also, don't forget to add to the CHANGELOG & README |
Conflicts: Bootstrap/Podfile.lock
Righto – merged in and updating CHANGELOG & README. |
CI is still failing, despite working locally. |
rage. To be fair the fail on it: |
đź’Ą |
Super! I've created a new version in the CHANGELOG. Should I update the version number in the podspec before we merge? |
yeh why not, also in chagelog :
|
Haha – oops, sorry for the typo. I'll get it fixed. Say, this was just released and could replace our reliance on ReactiveCocoa and RSSwizzle. I'm going to investigate switching over. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything against making this a proper object? Dictionaries make this fragile and provide no compile time checks on data types. This would also allow to use a real selector instead of having to convert them into strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really have a preference. @orta ?
Alright, let's get this PR merged, we don't need to do a release yet ( I'd rather the @steipete stuff gets in before that ) but this gives people a chance to try it. @kylef dictionaries like this tends to be a pattern we use internally, would definitely be interested in adding some functions that returns a dictionary providing some stronger typing there 👍 |
@orta => DSL subspec for analytics
also, thanks for the massive contribution @ashfurrow |
Cool. The AOP stuff will change the public interface slightly ( |
Reference: https://albertodebortoli.github.io/blog/2014/03/25/an-aspect-oriented-approach-programming-to-ios-analytics/
Closes #73.