Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
[MOBFND-40] Update version to 3.9.0 (#5)
Browse files Browse the repository at this point in the history
* adding “name” field to payload;updated nimble to version 7.3.4

* Fix GCD mutual dependency (segmentio#785)

* Add iOS Backgrounded Event. (segmentio#831)

* Add iOS Backgrounded Event.

* Bump Xcode CI version

* Bump pods

* Updated properties

* Simplified App Backgrounded call

* Fixed test since we dropped the param.

* Reverted xcode CI version number

* LIB-1212: Promoting 3.7.0-beta.4 to release. (segmentio#834) (segmentio#836)

* Prepare for release 3.7.0

* Updated cartfile.

* Updated version in SEGAnalytics.m

* Updated version in readme instructions.

* Preparing 3.8.0-beta.0 release. (segmentio#837) (segmentio#838)

* Preparing 3.8.0-beta.0 release.

* `CoreTelephony` library is now only included on iOS targets. This was done so that tvOS targets could build without linker errors. (segmentio#842)

* Add support for SSL Pinning (segmentio#839)

* Support SSL pinning

Client integrations can optionally pass in a NSURLSessionDelegate in the SEGAnalyticsConfiguration object.
If set, NSURLSessionDelegate callbacks are forwarded to the client code where SSL pinning checks can be implemented

* test httpSessionDelegate configuration

* Fix for LIB-1416 & Github segmentio#846 (segmentio#853)

* Fix for LIB-1416 & Github segmentio#846

- Stops blindly passing dictionaries.
- Property dictionaries are checked for NSCoding conformance to ensure they can be serialized.
- Property dictionaries are deep copied so contents can’t change while the pipeline is in progress.
- Puts a try/catch arrangement as a temporary guard against crashes for serialization failures until the storage format can be changed.

* Fixed missing ;

* Added test for deepCopy/conformance additions.

* Swapped JSON in for the storage format instead of plists. (segmentio#854)

* Converted file storage to JSON from plist.

* Updated string storage to account for JSON vs plist differences.

* update podfile lock.

* Remove some NSNull hacks.

* Updated tests to validate null values.

* Fixed LIB-1462 (segmentio#855)

* Reload static context data when the app returns from background. (segmentio#856)

* Respond to changes regarding advertising ID.

* Removed unnecessary context.

* Remove extraneous NSNull handling causing tests to fail.

* Added weakify/strongify macros.

* Removed extraneous NSNull checking.

* Put locking around static context access.

* Prepare for release 3.8.0-beta.1

* Fix changelog for 3.8.0-beta.1

* Updated carthage versions.

* Update config.yml

* [tvOS] Move SEGQueue from UserDefaults to caches directory (segmentio#861)

* Stops using UserDefaults for queue on tvOS and uses NSCachesDirectory

Changes storage to fileStorage and userDefaultsStorage. Utilizes userDefaults on tvOS for information such as anonymousID and configuration, but moves tvOS's queue into the NSCachesDirectory. The reasoning is that tvOS has a 1mb limit for UserDefaults and the queue can grow rapidly in size, leading to app crashes when saving more than 1mb of data to UserDefaults.

* Adds a constant for key. Seperate cache dir and appSupport dir functions. Removes unused init.

* Adds functionality to remove old UserDefaults queue on tvOS.

Updates migrated removal block to account for tvOS now that the queue is no longer in UserDefaults. Adds back in a #else and #endif that was accidently removed.

* Adds tvOS unit test target

* Adds new AnalyticsTestsTVOS scheme
* Updates pods to include all test pods for AnalyticsTestsTVOS
* Fixes unit test import for QuickTVOS

* Add tvOS options for make file

* Enabled code coverage on tvOS tests

* Fix up unit test warning

"result of expect is never nil"

* Adds test to ensure that UserDefaults SEGQueue is cleared on initialization for tvOS & iOS

* Adds test to ensure SEGQueue is empty when missing form file storage

* Reverts unnecessary import for QuickTVOS

* Adds test for FileStorage caches directory helper

* Fix up: Adds SwiftTryCatch pod to tvOS test target

* Fix up makefile to have correct build target for build-ios & build-tvos

* Fix up: updates xcodebuild destination to match devices found on circleci

* Break up ios and tvos build/test steps

* Circleci: Cache pods

* Fix up: tvOS test build

* Fix up spacing

* Fix up flaky unit test

Co-authored-by: Connor Ricks <connor.ricks@gmail.com>

* Fix issues around plist->json conversion & nil values (segmentio#862)

* Fixing a crash from plist->json conversion where result is not actually a dictionary.

* Made code flow the same as non-conversion.

* Set compatibility to 10.0.

* Fixed issues around setting nil values even though they are expected.

* Address Issue segmentio#851; Expect dictionary as well for for integration enablement (segmentio#863)

* Address Issue segmentio#851; Expect dictionary as well for for integration enablement.

* Fixed broken test.

* Differences observed in how iOS/android pass userId/anonId; Corrected. (segmentio#864)

* Disabled tvOS tests temporarily.

* Updated podfile lock.

* Fixed LIB-1698; Differences observed in how ios/android pass userId/anonId in traits.

* Another podfile lock update.

* Fixed test.

* Set swift version for tests.

* Reverted podfile lock changes due to incompatibilities.

* Look at previously cached settings before blowing them away. (segmentio#866)

* Bsneed/timestamps (segmentio#876)

* LIB-1656: Added nanosecond timestamps

* Actually use the timestamp we’re carrying around.

* In case the context is modified, preserve the timestamp.

* Bump timestamp nanosecond precision to 9.

* Only carry over the timestamp during a modify if there was one to begin with.

* Added experimental options to configuration.

* Added a second version of 8601 date creation.

* Respect experimental value now present in config.

* Added nanosecond time test.

Co-authored-by: Brandon Sneed <brandon.sneed@segment.com>

* Prepare for release 3.8.0-beta.2.

* Fixed warning.

* Updated carthage files.

* Implement maximum batch request size (segmentio#874)

* Implement maximum request size

* Add test when batch exceeds the size

* Execute check before gzip

* Remove stub request

* Prepare for release 3.8.0.

* Updated carthage files.

* Misc Fixes (segmentio#884)

* Add name and properties to auto screen reporting

* Make seg_topViewController handle tab and custom container VCs

* Simplify SEGScreenReporting protocol

Inspired by comments from @f2prateek, simplify the the `SEGScreenReporting` protocol to replace the name and properties fields with a single method (`seg_trackScreen`) that can be implemented when screen tracking for a specific view controller that needs a custom name, properties, or options.

* Update Nimble to build with Xcode 10.2

* Add tests for seg_topViewController

* fixed a crash in file storage when trying to get a string stored using old SDK version (segmentio#880)

* Fixed issue where build/version were removed from Application Opened events from background state.

* Publish filenames used for data storage (segmentio#865)

* Remove tvos test from scheme setup.

* Fixed selector reference.

* Removed unused code.

Co-authored-by: David Whetstone <david@humblehacker.com>
Co-authored-by: Sergei Guselnikov <arietis@users.noreply.github.com>
Co-authored-by: Brandon Sneed <brandon.sneed@segment.com>
Co-authored-by: Błażej Biesiada <bejo@users.noreply.github.com>

* Add previouslyCachedSettings count (segmentio#889)

* Prepare for release 3.8.1

* Updated carthage files to 3.8.1

* Prepare for release 3.8.2.

* Updated carthage files for 3.8.2

* Add ability to set default settings is segment.com can't be reached.  Backported from segmentio#888 (segmentio#897)

Co-authored-by: Brandon Sneed <brandon.sneed@segment.com>

* change logic for naming conventions (segmentio#885)

* Prepare for release 3.9.0

* Updated carthage files for 3.9.0

Co-authored-by: Daniel Jackins <danieljackins@gmail.com>
Co-authored-by: dsjackins <daniel.jackins@segment.com>
Co-authored-by: Fathy Boundjadj <fathy.boundjadj@segment.com>
Co-authored-by: Carlos Kelly <me@carlos.dev>
Co-authored-by: Brandon Sneed <brandon@redf.net>
Co-authored-by: Dan Morrow <skydivedan@users.noreply.github.com>
Co-authored-by: Ujjawal Garg <47793370+ujjawalgarg@users.noreply.github.com>
Co-authored-by: Brandon Sneed <brandon.sneed@segment.com>
Co-authored-by: Ben Humphries <iMacHumphries@me.com>
Co-authored-by: Connor Ricks <connor.ricks@gmail.com>
Co-authored-by: Cristian Lupu <cristian.lupu@ellation.com>
Co-authored-by: David Whetstone <david@humblehacker.com>
Co-authored-by: Sergei Guselnikov <arietis@users.noreply.github.com>
Co-authored-by: Błażej Biesiada <bejo@users.noreply.github.com>
Co-authored-by: alanjcharles <50601149+alanjcharles@users.noreply.github.com>
Co-authored-by: Ko <kowongh@gmail.com>
  • Loading branch information
17 people authored Jun 10, 2020
1 parent 82f2d60 commit 8c87042
Show file tree
Hide file tree
Showing 53 changed files with 1,524 additions and 372 deletions.
23 changes: 17 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
jobs:
build_and_test:
macos:
xcode: "9.4.1"
xcode: "11.3.1"
steps:
- checkout
- run: xcrun simctl list
Expand All @@ -13,13 +13,24 @@ jobs:
sudo gem install xcpretty
sudo gem install cocoapods -v $(var=$(tail -1 Podfile.lock); echo ${var##COCOAPODS:})
- restore_cache:
key: 1-pods-{{ checksum "Podfile.lock" }}
- run:
name: Fetch Cocoapods specs
command: curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
name: Install CocoaPods
command: |
if [ ! -d "Pods" ]
then
make dependencies
fi
- save_cache:
key: 1-pods-{{ checksum "Podfile.lock" }}
paths:
- ./Pods

- run: make dependencies
- run: make build-pretty
- run: make test-pretty
- run: make build-ios
- run: make test-ios
- run: make build-tvos
- run: make test-tvos
- run: make lint
- run: make carthage

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ Carthage
# itself has no pod dependencies, only our tests do.
Pods/
.clang-format
.idea
5 changes: 3 additions & 2 deletions Analytics.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Analytics"
s.version = "3.7.0-beta.4"
s.version = "3.9.0"
s.summary = "The hassle-free way to add analytics to your iOS app."

s.description = <<-DESC
Expand All @@ -17,7 +17,8 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '7.0'
s.tvos.deployment_target = '9.0'

s.frameworks = 'CoreTelephony', 'Security', 'StoreKit', 'SystemConfiguration', 'UIKit'
s.ios.frameworks = 'CoreTelephony'
s.frameworks = 'Security', 'StoreKit', 'SystemConfiguration', 'UIKit'

s.source_files = [
'Analytics/Classes/**/*',
Expand Down
271 changes: 241 additions & 30 deletions Analytics.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

24 changes: 9 additions & 15 deletions Analytics.xcodeproj/xcshareddata/xcschemes/Analytics.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EADEB85A1DECD080005322DA"
BuildableName = "Analytics.framework"
BlueprintName = "Analytics"
ReferencedContainer = "container:Analytics.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -41,23 +49,11 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EADEB85A1DECD080005322DA"
BuildableName = "Analytics.framework"
BlueprintName = "Analytics"
ReferencedContainer = "container:Analytics.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -73,8 +69,6 @@
ReferencedContainer = "container:Analytics.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
30 changes: 12 additions & 18 deletions Analytics.xcodeproj/xcshareddata/xcschemes/AnalyticsTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "NO">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EADEB8691DECD0EF005322DA"
BuildableName = "AnalyticsTests.xctest"
BlueprintName = "AnalyticsTests"
ReferencedContainer = "container:Analytics.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -45,22 +32,29 @@
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EADEB8691DECD0EF005322DA"
BuildableName = "AnalyticsTests.xctest"
BlueprintName = "AnalyticsTests"
ReferencedContainer = "container:Analytics.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D8CE58B23EE014E00197D0C"
BuildableName = "AnalyticsTestsTVOS.xctest"
BlueprintName = "AnalyticsTestsTVOS"
ReferencedContainer = "container:Analytics.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
1 change: 1 addition & 0 deletions Analytics/Analytics.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ FOUNDATION_EXPORT const unsigned char AnalyticsVersionString[];
#import "SEGSegmentIntegrationFactory.h"
#import "SEGContext.h"
#import "SEGMiddleware.h"
#import "SEGScreenReporting.h"
3 changes: 3 additions & 0 deletions Analytics/Classes/Integrations/SEGIdentifyPayload.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#import "SEGIdentifyPayload.h"

@interface SEGIdentifyPayload ()
@property (nonatomic, readwrite, nullable) NSString *anonymousId;
@end

@implementation SEGIdentifyPayload

Expand Down
7 changes: 7 additions & 0 deletions Analytics/Classes/Integrations/SEGIntegrationsManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
#import <Foundation/Foundation.h>
#import "SEGMiddleware.h"

/**
* Filenames of "Application Support" files where essential data is stored.
*/
extern NSString *_Nonnull const kSEGAnonymousIdFilename;
extern NSString *_Nonnull const kSEGCachedSettingsFilename;

/**
* NSNotification name, that is posted after integrations are loaded.
*/
Expand All @@ -20,6 +26,7 @@ extern NSString *_Nonnull SEGAnalyticsIntegrationDidStart;
@interface SEGIntegrationsManager : NSObject

// Exposed for testing.
+ (BOOL)isIntegration:(NSString *_Nonnull)key enabledInOptions:(NSDictionary *_Nonnull)options;
+ (BOOL)isTrackEvent:(NSString *_Nonnull)event enabledForIntegration:(NSString *_Nonnull)key inPlan:(NSDictionary *_Nonnull)plan;

// @Deprecated - Exposing for backward API compat reasons only
Expand Down
Loading

0 comments on commit 8c87042

Please sign in to comment.