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

Release/1.2.0 #481

Merged
merged 14 commits into from Jan 20, 2020
Merged

Release/1.2.0 #481

merged 14 commits into from Jan 20, 2020

Conversation

AlexBenny
Copy link
Contributor

Release 1.2.0

AlexBenny and others added 14 commits December 13, 2019 15:19
PR: #475

* Fix issue when Podfile without "use_frameworks!"

Using Podfile without "use_frameworks!" can generate issues.
In that case `#import <SnowplowTracker/SnowplowTracker-Swift.h>` raises the error "file not found".
Indeed the file doesn't exist and we have to use `#import "SnowplowTracker-Swift.h"`.
This is a temporary workaround in order to build the tracker with and without "use_frameworks!" directive on Podfile.

* Remove ReachabilitySwift dependency

We don't need ReachabilitySwift dependency because we don't want swift classes inside the objc tracker. It can cause issues on compilation when the tracker is in edge cases. Also the introduction of swift classes causes the requirement of bridging headers, particularly annoying when used on React Native.

* Check network status without use of ReachabilitySwift dependency

* Don't prevent events sending

We can never trust of Reachability code before to send events. Apple's Reachability is intended as diagnostic if a connection doesn't work but it can't be used to prevent a connection because it can report false negatives.

* Remove reference to isOnline as it has been removed

* Fix building issues on macOS target

* Update podspec with DEFINES_MODULE set to YES

This setting is needed by Cocoapods as they declared in the doc:
"you are able to opt into stricter header search paths (and module map generation for Objective-C pods). As a pod author, you can add 'DEFINES_MODULE' => 'YES' to your pod_target_xcconfig. Alternatively, in your Podfile you can add use_modular_headers! to enable the stricter search paths and module map generation for all of your pods, or you can add :modular_headers => true to a single pod declaration to enable for only that pod."

* Remove dependency of ReachabilitySwift from Cartfile

* Update demo apps

* Update travis script

- Added bash scripts in order to make it testable locally (without travis)
- Added multiple Podfiles in order to test different settings
PR: #477 

Adapted the code to the same behaviour of the Android tracker where the platform parameter `p` can be overwritten by the developer.
PR #478

* Adds WatchKit support via CocoaPods (#465)

* Fixes missing file for watchOS

* Change watchOS product name

* Adds modual map for watchos

* Adds carthage watch example

* Adds cocoapods watch example

* Update CocoaPods demo to include older watchOS version

I noticed that apps using this library could not launch on older watchOS version. This adds a demo project to reproduce this,

* Fix crash on < watchOS 6

This fixes the crash mentioned in the prev. commit. It removes the frameworks for watchOS from the Podspec.

* Changed button name

* Update podspec for watchOS target

Updated podspec excluding the new Reachability feature added when we got rid of the third part dependency Reachability.swift

* Update travis scripts

* Pod update

Co-authored-by: leoAsana <56038088+leoAsana@users.noreply.github.com>
(cherry picked from commit f355226)
Previously called: “Check responds to selector instead of throwing”
…lose #480)

PR #446 

The param type for `dict` is `NSDictionary` but the caller can pass in an immutable variety, like here:

https://github.com/snowplow/snowplow-objc-tracker/blob/4c28d7e8a3690cd5fd708b97e56db6dc14a7ee1f/Snowplow/SPTracker.m#L501-L502

Stop crashes like below that can occur via mutations of the passed in dictionary by ensuring we are enumerating over an immutable dictionary.

Crash report:
```
NSGenericException
SPPayload.m:59
*** Collection <__NSDictionaryM: 0x280c4db80> was mutated while being enumerated.
Sep 28th, 2019, 15:33:39 UTC

STACKTRACE

CrashReporter Key:  3d130da70c9c56af1526e9e41b6b0a11d319ce86
Hardware Model:     iPhone9,3
Process:            REDACTED
Identifier:         REDACTED
Version:            REDACTED
OS Version:         iOS 13.1.1

NSGenericException: *** Collection <__NSDictionaryM: 0x280c4db80> was mutated while being enumerated.

0  CoreFoundation          ___exceptionPreprocess
1  libobjc.A.dylib         _objc_exception_throw
2  CoreFoundation          ___NSFastEnumerationMutationHandler
3  Strava                  -[SPPayload addDictionaryToPayload:] (SPPayload.m:59:9)
4  Strava                  -[SPTracker getFinalPayloadWithPayload:andContext:andEventId:] (SPTracker.m:313:9)
5  Strava                  -[SPTracker addEventWithPayload:andContext:andEventId:] (SPTracker.m:305:34)
6  Strava                  -[SPTracker trackUnstructuredEvent:] (SPTracker.m:218:5)
7  Strava                  REDACTED
8  Strava                  REDACTED
9  Strava                  REDACTED
10 Strava                  REDACTED
11 Strava                  REDACTED
12 Strava                  REDACTED
13 Strava                  REDACTED
14 Strava                  REDACTED
15 Strava                  REDACTED
16 libdispatch.dylib       __dispatch_call_block_and_release
17 libdispatch.dylib       __dispatch_client_callout
18 libdispatch.dylib       __dispatch_lane_serial_drain$VARIANT$mp
19 libdispatch.dylib       __dispatch_lane_invoke$VARIANT$mp
20 libdispatch.dylib       __dispatch_workloop_worker_thread
21 libsystem_pthread.dylib __pthread_wqthread
22 libsystem_pthread.dylib _start_wqthread

THREADS

Thread 4
Error reported from this thread
0  CoreFoundation          ___exceptionPreprocess
1  libobjc.A.dylib         _objc_exception_throw
2  CoreFoundation          ___NSFastEnumerationMutationHandler
3  Strava                  -[SPPayload addDictionaryToPayload:] (SPPayload.m:59:9)
4  Strava                  -[SPTracker getFinalPayloadWithPayload:andContext:andEventId:] (SPTracker.m:313:9)
5  Strava                  -[SPTracker addEventWithPayload:andContext:andEventId:] (SPTracker.m:305:34)
6  Strava                  -[SPTracker trackUnstructuredEvent:] (SPTracker.m:218:5)
7  Strava                  REDACTED
8  Strava                  REDACTED
9  Strava                  REDACTED
10 Strava                  REDACTED
11 Strava                  REDACTED
12 Strava                  REDACTED
13 Strava                  REDACTED
14 Strava                  REDACTED
15 Strava                  REDACTED
16 libdispatch.dylib       __dispatch_call_block_and_release
17 libdispatch.dylib       __dispatch_client_callout
18 libdispatch.dylib       __dispatch_lane_serial_drain$VARIANT$mp
19 libdispatch.dylib       __dispatch_lane_invoke$VARIANT$mp
20 libdispatch.dylib       __dispatch_workloop_worker_thread
21 libsystem_pthread.dylib __pthread_wqthread
22 libsystem_pthread.dylib _start_wqthread
```
@AlexBenny AlexBenny merged commit 16d7352 into master Jan 20, 2020
@AlexBenny AlexBenny self-assigned this Jan 20, 2020
@AlexBenny AlexBenny deleted the release/1.2.0 branch July 10, 2020 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants