Skip to content
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

[DSL] Don’t dispatch blocks if view controller has been deallocated. #301

Merged
merged 9 commits into from
Jul 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#XCode stuff
build/*
DerivedData
*.pbxuser
!default.pbxuser
*.mode1v3
Expand Down
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
language: objective-c
osx_image: xcode7.1
osx_image: xcode9
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
before_script:
- echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- gem install cocoapods --no-document --pre --quiet
- bundle exec danger
- cd Example; pod update ; cd ..

xcode_workspace: Example/ARAnalyticsTests.xcworkspace
xcode_scheme: ARAnalyticsBootstrapiOS
xcode_sdk: iphonesimulator
- cd Example; pod install; cd ..

script:
- set -o pipefail && xcodebuild -workspace Example/ARAnalyticsTests.xcworkspace -scheme ARAnalyticsBootstrapiOS -configuration Debug test -sdk iphonesimulator -destination platform='iOS Simulator',OS='9.0',name='iPhone 6' CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty
3 changes: 3 additions & 0 deletions ARDSL.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ + (void)addScreenMonitoringAnalyticsHook:(NSDictionary *)screenDictionary {
__weak __typeof(instance) weakInstance = instance;
[[instance rac_signalForSelector:selector] subscribeNext:^(RACTuple *parameters) {
id instance = weakInstance;
if (instance == nil) {
return;
}

BOOL shouldFire = ar_shouldFireForInstance(object, instance, parameters);

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Allows AdjustProvider to be set up with an AdjustDelegate
* Support custom event tracking for HockeyApp provider (@wzs)
* Don’t dispatch DSL blocks if view controller has been deallocated in the mean time (@alloy)

## Version 4.0.1

Expand Down
10 changes: 5 additions & 5 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Sometimes it's a README fix, or something like that - which isn't relevant for
# including in a project's CHANGELOG for example
declared_trivial = (pr_title + pr_body).include?("#trivial")
declared_trivial = (github.pr_title + github.pr_body).include?("#trivial")

# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
warn("PR is classed as Work in Progress") if pr_title.include? "[WIP]"
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"

# Warn when there is a big PR
warn("Big PR") if lines_of_code > 500
warn("Big PR") if git.lines_of_code > 500

if !modified_files.include?("CHANGELOG.md") && !declared_trivial
if !git.modified_files.include?("CHANGELOG.md") && !declared_trivial
fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/orta/ARAnalytics/blob/master/CHANGELOG.md).")
end
end
150 changes: 0 additions & 150 deletions Example/ARAnalytics.podspec

This file was deleted.

Loading