Swiftpack.co - Package - Tealium/tealium-swift

Tealium Swift Library

License Platform Language

Documentation

For full documentation, please see the Tealium Developer Docs:

https://docs.tealium.com/platforms/ios-swift/

License

Use of this software is subject to the terms and conditions of the license agreement contained in the file titled "LICENSE.txt". Please read the license before downloading or using any of the files contained in this repository. By downloading or using any of these files, you are agreeing to be bound by and comply with the license agreement.


Copyright (C) 2012-2019, Tealium Inc.

Github

link
Stars: 12

Dependencies

Used By

Total: 0

Releases

1.9.1 - 2020-02-17 11:08:18

No functional changes. This release addresses an issue with Carthage due to incorrect release references.

1.9.0 - 2020-02-13 18:06:13

New Features

  • Remote Publish Settings support ⚠️_Note: Remote Publish Settings are enabled by default, and must be disabled (TealiumConfig.shouldUseRemotePublishSettings = false. Read more: https://docs.tealium.com/platforms/ios-swift/api/tealium-config/, https://docs.tealium.com/platforms/ios-swift/install/) if you don’t wish to use them. This adds the ability to remotely change certain configuration options, such as event batch size, from the Tealium iQ Publish Settings interface. This matches the functionality already present in Tealium iOS (Objective-C) and Tealium Android libraries. Learn More_⚠️

  • Swift Package Manager (SPM) support. Learn More

  • Swift 5 support Note: Support for older Swift versions has been removed. If you are unable to use Swift 5, then use Tealium Swift 1.8.2. It is no longer required to bundle the Swift runtime with your app if you are using Swift 5+. This significantly reduces the size of your app bundle by approximately 40MB.

  • Mac Catalyst support - Supports iOS apps that are enabled to run on macOS Catalina (10.15+)

  • Lifecycle tracking methods are now available as part of the public API. Learn More

  • Optional location tracking module. Learn More

  • List of enabled modules now added to each track request. For example, enabled_modules=["attribution","tagmanagement"].

High Impact Changes

  • Setters and getters on the TealiumConfig class have been deprecated in favor of properties. For example, config.setBatchingEnabled(true) -> config.batchingEnabled = true. Setters and getters continue to function as expected, but we recommend switching to properties to avoid compiler warnings.
  • Added "wifi only sending" option, which is controllable through remote publish settings. If enabled, hits are queued unless wifi is available.
  • Added "battery saver" option, which is controllable through remote publish settings. If enabled, hits are queued if low power mode is enabled, or if the device has less than 20% battery remaining

Low Impact Changes

  • Bug fix: Attempt to fix an un-reproducible bug in the Lifecycle module that occasionally causes crashes in low memory scenarios. https://github.com/Tealium/tealium-swift/issues/120
  • Lifecycle auto-tracking may now be disabled. This option suppresses the automatically-generated app lifecycle events. Learn More
  • Removed dependency on Objective-C NSError for the Coremodule. Required for SPM support. Also fixes https://github.com/Tealium/tealium-swift/issues/125
  • Optimized Tealium.update method. Modules are no longer deinitialized and reinitialized when the update method is called to change the TealiumConfig settings

Known Issues

There is currently a WebKit bug, which results in spurious error messages in the LLDB console when you are debugging your app. The error is similar to the following example:

2020-01-23 11:48:37.219410+0000 TestApp[853:82765] [Process] kill() returned unexpected error 1

This error appears if you are using the Tag Management module until Apple fixes the issue in the WebKit library. Learn More

1.8.2 - 2019-12-17 12:04:19

  • Fixed thread-related Remote Commands crashes 121
  • Reduced stored lifecycle sessions to 20 sessions to resolve low-memory related crashes 120
  • Fixed some retain cycles that would in some cases prevent a total deinit of the Tealium class
  • Added a removeInstance method to the TealiumInstanceManager to allow total deinit of Tealium
  • Added config option to not use the cookie observer for WKWebView 117 (config.shouldAddCookieObserver = false)
  • Optimized module initialization so that init is only called on modules that are present in the modules list.
  • Fixed an issue where the Tag Management completion did not receive expected details (errors/info). Related to: 118

Thanks to @Enricoza for the detailed bug reports, enabling us to quickly identify and fix the issues. 🙏

1.8.1 - 2019-11-29 20:39:44

  • Fixes an occasional crash in the TagManagement webview. Thanks to @Enricoza for the detailed bug report.

1.8.0 - 2019-11-20 10:07:54

Release 1.8.0.

This is a major release. Please see full release notes here: https://docs.tealium.com/platforms/ios-swift/release-notes/

1.8.0-beta3 - 2019-11-08 16:54:04

Fixes:

  • https://github.com/Tealium/tealium-swift/issues/112.
  • Added sorting to queued events, to ensure events are always de-queued in timestamp order, oldest first.

Additions/updates:

  • Added remote_api call for future Remote Command compatibility. This triggers an additional call to the Tag Management webview (if module enabled). Disabled by default. Config option to enable: config.setIsRemoteAPIEnbled(true)

1.7.3 - 2019-11-05 16:37:59

Fix for PLCrashReporter dependency with Xcode 11. Now uses a pre-built framework instead of building from source.

This issue only affected Carthage, so no release has been pushed to CocoaPods for this minor version.

Update: Fixed signing settings for Lifecycle and FileStorage

1.8.0-beta2 - 2019-11-05 10:25:28

Fixes:

  • https://github.com/Tealium/tealium-swift/issues/108
  • Fixed a possible crash on iOS 12.0 devices in the DeviceData module, which was due to a known bug in the iOS 12.0 network subscriber information API. Bumped version check to iOS 12.1 where the bug was fixed, and fall back to older API for iOS 12.0
  • Added some additional hints for the compiler inside complex closures to allow the project to be built on Xcode 10.3.
  • Event batching now disabled by default (must be explicitly enabled if required).

Additions/updates:

  • New variable "device_type" that captures the internal device identifier (e.g. iPhone8,4).
  • Additional header docs for Visitor Service and Event Batching (DispatchQueue module).
  • Added ability to override both the URL and profile for the Visitor Service module

1.8.0-beta1 - 2019-10-31 20:59:52

Beta release of v.1.8.0.

Why beta?

This is our first ever beta release. There have been many improvements under the hood, as well as new features, and we wanted to give people an opportunity to try these out before pushing out a formal release. All code is designed to be production-ready, and no further changes are anticipated prior to a full release, but please be extra vigilant when upgrading, to be sure you don't experience any unexpected behavior in your app.

If you find any problems, please file a Github issue.

Installation

If using Carthage, you can upgrade by manually specifying the branch name in your Cartfile:

github "tealium/tealium-swift" "1.8.0"

For CocoaPods, you can specify the version number, as described here: https://guides.cocoapods.org/syntax/podfile.html#pod

Podfile reference:

pod 'tealium-swift', '1.8.0-beta1'

Release Notes

New Features

  • Event batching
    • Send up to 10 events in a single hit to the Tealium UDH
      • For tag management, events are dispatched to the WKWebView instance in a batch, but will be processed individually by JavaScript tags in your profile.
      • For EventStream/AudienceStream/Event Data Framework products, events are dispatched in a single HTTP request when using the Collect module. Requests are Gzipped. Once the event limit is reached (max 10 events), these will be dispatched immediately, if a connection is available.
    • To disable event batching, set the batch size to 1
  • Optional Visitor Service module (requires AudienceStream CDP). Retrieve visitor profiles in real-time as soon as the profile changes.

High Impact Changes

  • Persistent Storage has now moved from UserDefaults to JSON-based file storage. Data is stored by default in the caches directory on the device, but this is overridable through config.
  • Where possible, all processing is now performed on a background queue. If you are using the Tag Management module, a limited amount of processing will be performed on the main thread, as this is a requirement for WKWebView.
  • The following modules have been removed:
    • FileStorage (superseded by DiskStorage, which is part of Core)
    • DefaultsStorage (superseded by DiskStorage, which is part of Core)
    • DataSource (incorporated into VolatileData module)
  • Tag Management Optimizations (Webview)
  • UIWebView has been removed. Default is now WKWebView (only if using the Tag Management module). Due to bugs in the WKWebView API for iOS versions <11, cookies may not be persisted on these devices when upgrading to 1.8.0 from earlier tealium-swift versions.
  • vdata dispatcher removed. All Collect module requests are now sent as POST requests to the /event endpoint, or /bulk-event in the case of batched requests
  • Connectivity checks improved.
  • Connectivity crash fixed (TealiumRepeatingTimer deinit)
  • Updated project to work with Xcode11
  • Crash reporter dependency fixed (currently using a binary build of PLCrashReporter until a fix is available)

Low Impact Changes

  • Attribution module updated to include additional data points provided by the Apple Search Ads API
  • DeviceData module device names updated to include latest Apple devices
  • Logging improvements
  • Swiftdoc improvements; all public methods now have quick help available in Xcode

1.7.2 - 2019-08-08 21:27:46

Added support for writing remote command tests from external libraries.

1.7.1 - 2019-07-30 10:35:19

WKWebView UIView detection optimizations.

1.7.0 - 2019-06-19 09:10:32

  • Webview for Tag Management module now defaults to WKWebView. See https://docs.tealium.com/platforms/swift/release-notes/ for full release notes.

1.6.7 - 2018-12-19 12:01:54

  • Reintroduced init completion with module responses. Tealium is guaranteed to be initialized, along with all modules, when the completion block is called.
  • Completion will only be called once.
  • Subsequent reloads of the Tag Management webview (if enabled) will no longer cause remote commands to be re-enabled.
  • VolatileData getData() method with no arguments has been reintroduced.

1.6.6 - 2018-12-03 17:16:19

Fix to enable usage of DeviceData module in app extensions (extension-safe access to UIApplication.shared)

1.6.5 - 2018-11-30 20:31:46

1.6.5 (November 2018)

High Impact Changes

  • Full modularization of library components; import only the modules you require
  • CocoaPods module import changed from tealium_swift to TealiumSwift
  • Minimum supported Swift version is now 4.0 due to Swift 3.X deprecation in Xcode 10
  • Core: Module responses removed from completion closure for simplicity
  • TealiumConfig: TealiumModulesList is no longer required if you are only importing the specific modules you require. It will, however, continue to function as expected if present.
  • Tag Management Module: With iOS 12, a memory leak has been introduced into the UIWebView API. This is out of Tealium's control and has been logged with Apple. Rest assured, this is a small leak, and will not impact your app in any significant way, but it will show up when profiling your app with the "Leaks" instrument. The leak should dispppear with a future iOS update, once Apple has fixed the issue. See: https://stackoverflow.com/questions/53187305/ios-12-memory-leak-wkwebview-and-uiwebview/53187306 for details. If you do not need the Tag Management feature, you may remove the Tag Management module from your build, and you will not experience this leak.
  • Remote Commands: Remote Commands should now be added via the TealiumConfig instance, rather than the public API method exposed on the Tealium instance. For more information, see: https://community.tealiumiq.com/t5/Tealium-for-Swift/Swift-Module-Remote-Commands/ta-p/17523

Low Impact Changes

  • Core: Improved library startup time
  • CrashReporter Module: Reintroduced the Crash Reporter module following Xcode 10 fixes
  • VolatileData Module: Fixed bug causing timestamps from queued hits to be overwritten
  • VolatileData Module: Added event_timestamp_unix, which is a second-precise 1970-epoch timestamp
  • TagManagement Module: Nested objects now supported
  • TagManagement Module: Memory leak fixes
  • RemoteCommands Module: Fixed a bug causing the Remote HTTP command to occasionally not be called when invoked
  • PersistentData Module: Bug fix for potential memory leak
  • Lifecycle Module: Fixed a bug that occasionally caused crash data to persist across more than 1 event, potentially causing inflated crash metrics in analytics reports. Crashes are now only sent on "launch"
  • DeviceData Module: network_connection_type now moved to Connectivity module to remove unnecessary dependency
  • DeviceData Module: Add app_orientation and app_orientation_extended to indicate the orientation of the app, as well as existing device_orientation and device_orientation_extended
  • Delegate Module: Tealium completion handler moved to TealiumCore framework.
  • Connectivity Module: Set a default time to flush the queue of 30 seconds while the device is known to be offline.
  • Connectivity Module: Added protection around timer code for connectivity check.
  • Attribution Module: Removed unnecessary code for Swift versions <4.0 (no longer supported due to Xcode deprecation of Swift 3).

1.6.4 - 2018-10-12 15:53:35

Minor update to make TealiumRemoteCommand class "open"

1.6.3 - 2018-10-11 15:14:18

1.6.3 Fixes for Connectivity and LogLevel values.

1.6.2 - 2018-09-19 16:49:57

1.6.2

  • Fixed crash reporter issue with Xcode 10
  • Removed "always embed swift binaries" from targets

1.6.1 - 2018-09-05 19:06:39

Tealium Session Id set to expire after 30 minutes. This value is configurable.

1.6.0 - 2018-07-18 20:39:24

Consent Manager

1.5.0 - 2018-04-18 18:02:28

  • Crash Reporter
  • More permissive access control settings on some classes (bugfix)

1.4.0 - 2017-12-22 14:30:03

See here for full change log: https://community.tealiumiq.com/t5/Tealium-for-Swift/Swift-Library-Change-Log/ta-p/20568

1.3.3 - 2017-10-09 14:06:18

Minor bug fix

- 2017-08-10 21:07:05

- 2017-08-10 18:20:36

- 2017-08-10 16:00:38

- 2017-08-08 16:23:50

- 2017-08-08 00:34:56

- 2017-08-08 00:18:52

- 2017-08-07 23:14:25