diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8f9c848 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,391 @@ +#### Version 6.0.0 +* [BREAKING] The Thunderhead SDK is now distributed as an XCFramework bundle. The binary contains architecture slices for `arm64`, `armv7` for iOS and `arm64`, `i386, x86_64` for the simulator. For further details on this [see our migration guide](https://github.com/thunderheadone/one-sdk-ios/blob/master/migration-guides/THUNDERHEAD-6.0.0-MIGRATION-GUIDE.md#xcframework-integration). +* [BREAKING] Updated minimum deployment target to iOS 9.0. +* [BREAKING] Added support for using the Thunderhead SDK with Xcode 12.3. The Thunderhead SDK now requires Xcode 12+ (iOS 14). For further details on this [see our readme](https://github.com/thunderheadone/one-sdk-ios#requirements). +* [BREAKING] Removed the push notification functionality from the Thunderhead SDK. For further details on this [see our migration guide](https://github.com/thunderheadone/one-sdk-ios/blob/master/migration-guides/THUNDERHEAD-6.0.0-MIGRATION-GUIDE.md#push-notifications). +* [NEW] Added support for integrating the Thunderhead SDK via Swift Package Manager. For further details on this [see our readme](https://github.com/thunderheadone/one-sdk-ios#swift-package-manager). +* [NEW] Added support for Interaction tracking for iOS 13+ Modals. +* [UPDATE] Added more granular debug logging to facilitate better customer support when SDKs are migrated from an older to a newer version. +* [BUGFIX] Fixed an issue where the app name was not pulled correctly from the bundle identifier. +* [BUGFIX] Fixed an issue where mini notifications were not always displayed on iOS 13+ Modals. + +#### Version 5.3.3 +* [BUGFIX] Fixed an issue where tapping on cells could stop navigation to target view, in apps that use RxSwift. + +#### Version 5.3.2 +* [UPDATE] Xcode 11.3.1 compatible SDK. + +#### Version 5.3.1 +* [UPDATE] Xcode 11.4.1 compatible SDK. + +#### Version 5.3.0 +* [NEW] Added ability to send `one-appInstall` and `one-appReinstall` Interactions in Preview mode. +* [NEW] Added ability to control Data Adapter location sharing. +* [NEW] Added ability to control the TID keychain storage. +* [NEW] Added ability to control the TID pasteboard storage. +* [NEW] Added the prefix [Thunderhead] to all SDK console logs. +* [NEW] Added a new Debug log level which will display granular console logs around how we interact with your app's delegates. +* [BUGFIX] Fixed an issue where configuring the SDK in Admin mode was overriding an app's status bar color. +* [BUGFIX] Updated the developer documentation to remove build time warnings. + +#### Version 5.2.1 +* [UPDATE] Xcode 11.3.1 compatible SDK. + +#### Version 5.2.0 +* [NEW] Added ability to disable in-list mini optimizations. + +#### Version 5.1.1 +* [BUGFIX] Fixed a crash related to scrolling observed in some apps. + +#### Version 5.1.0 +* [NEW] Thunderhead SDK can now be integrated directly via [Cocoapods](https://cocoapods.org/pods/Thunderhead). For further details on this [see our readme](https://github.com/thunderheadone/one-sdk-ios#cocoapods). +* [BUGFIX] Fixed a crash that was occuring when Thunderhead SDK is integrated into a RxSwift app using `UIScrollViewDelegate` [RxSwift](https://github.com/ReactiveX/RxSwift). + +#### Version 5.0.0 +* [NEW] Added ability to initialize the SDK and set the parameters later for different regions and spaces. For further details on this [see our sample app on how to initialize the SDK and set the parameters later](https://github.com/thunderheadone/one-sdk-ios/tree/master/examples/dynamic-initialization-example#thunderhead-sdk-late-initialization). +* [NEW] Added ability to change the SDK initialization parameters on the fly. For further details on this [see our sample app on how to reconfigure the SDK](https://github.com/thunderheadone/one-sdk-ios/tree/master/examples/dynamic-initialization-example#reconfiguring-the-thunderhead-sdk). +* [BUGFIX] Fixed an issue where multiple 401s were sent when the token expires on an interaction with multiple regions. + +#### Version 4.0.2 +* [BUGFIX] Fixed a crash that was occurring when libraries with multiple `UIWindow`s are used in an application. + +#### Version 4.0.1 +* [BUGFIX] Fixed an issue where the `UNUserNotificationCenter.delegate` was incorrectly set to nil by the SDK when calling `UIApplication.shared.registerForRemoteNotifications()`. + +#### Version 4.0.0 +* [BREAKING] iOS 13 ready SDK, built with Xcode 11.0. If you are using a lower version of Xcode, 10.2 or 10.3, you will only be able to archive your app with bitcode disabled. +* [NEW] Added support for `UIWindowScene` to support integrations with apps built with Xcode 11.0 and iOS 13. +* [NEW] Added support for the status bar view changes introduced in iOS 13. +* [NEW] Added support for segmented control changes introduced in iOS 13. +* [UPDATE] Updated the Admin mode views to be displayed correctly in iOS 13. +* [UPDATE] Updated the Admin mode region highlighting to support View Controller presentation changes introduced in iOS 13. +* [UPDATE] Updated the table view accessory view to support changes introduced in iOS 13. +* [UPDATE] Improved the Admin mode login credentials storage to save these by site key. This allows business user to use Admin mode easily when multiple site keys are used by an app. +* [UPDATE] Moved the properties caching under the same database as the offline interaction caching. All requests made via send properties and all interactions calls will be stored offline when the server is down or an internet connection cannot be established. This will help ensure you have a complete picture of the user profile regardless connectivity state. +* [UPDATE] Removed use of redirects when opening an optimization url. Previously url redirects were used to pass the response codes between the app and external channel. Response codes are now sent automatically by the SDK and the target url is opened as normal without a redirect being used. +* [BUGFIX] Fixed an issue where a customer attribute name was not updated in the SDK when edited in ONE. +* [BUGFIX] Fixed an issue where mini inline notifications were not displayed correctly in table cells which reside inside a `UIControl`. + +#### Version 3.0.2 +* [UPDATE] Removed `UIWebView` references and use from our SDK, in line with Apple’s ITMS-90809 -deprecated API Usage notification. See https://developer.apple.com/documentation/uikit/uiwebview for more information. + +#### Version 3.0.1 +* [BUGFIX] Improved the `UNUserNotificationCenter` implementation to handle situations where the `bundleProxy` might be null. + +#### Version 3.0.0 +* [BREAKING] Updated minimum deployment target to iOS 8.0. + +#### Version 2.24.1 +* [BUGFIX] Rebuilt the SDK to support Xcode 10.1. + +#### Version 2.24.0 +* [NEW] Added iPhone XR and XS Max support. +* [NEW] Added the ability to use Face ID at login. +* [NEW] Added support to capture group and single elements of a `UICollectionView` that resides inside a `UITableView`. +* [BUGFIX] Fixed an issue where a mini inline notification text size was not getting changed when editing an asset in ONE. +* [BUGFIX] Fixed an issue where a list of child propositions was getting duplicated while filtering. +* [BUGFIX] Fixed an issue where error messages were not being displayed properly on iPhone X series, when running the SDK in Admin mode. +* [BUGFIX] Fixed an issue where Admin mode was becoming unresponsive when tapping the Poker Chip. +* [BUGFIX] Fixed an issue where a push notification was not shown when the app was running in the foreground. +* [BUGFIX] Fixed a crash that was occurring when attempting to inject an inline mini optimization in a `UITableView`. +* [BUGFIX] Fixed a crash that was occurring when scrolling a `UITableView` where an inline mini notification was injected. +* [BUGFIX] Fixed a crash that was occurring when cancelling deletion of a capture point on iOS 8. + +#### Version 2.23.1 +* [BUGFIX] Fixed an issue where a 'Missing Push Notification Entitlement' warning was shown when the app didn't have push notifications enabled. + +#### Version 2.23.0 +* [NEW] Added support for Interaction Studio Theme. +* [NEW] Updated Admin mode Entity Names to match the naming in the web application. +* [BUGFIX] Fixed an issue with iToolbar path mismatch between iOS versions. +* [BUGFIX] Fixed an issue where pressing the poker chip in airplane mode resulted in unresponsive behaviour. +* [BUGFIX] Fixed an issue where one-appInstall interaction and follow-up interaction were using different tids. + +#### Version 2.22.2 +* [BUGFIX] Resolved an issue where existing deeplinks do not work after integrating ONE SDK. + +#### Version 2.22.1 +* [BUGFIX] Resolved an issue where the push token was not being sent programmatically when enable push was not switched on. + +#### Version 2.22.0 +* [NEW] Switched from a cookie based login in Admin mode to OAuth 2. +* [NEW] Ability to opt an end-user out of tracking, if the end-user does not give permission to be tracked in the client app. +* [BUGFIX] Fixed an issue where the preview panel in Admin mode would blink when switching snapshot versions. +* [BUGFIX] Fixed an issue where implementing `tableView:performAction:forIndexPath:sender` caused exceptions to be thrown. + +#### Version 2.21.1 +* [BUGFIX] Fixed an issue where a stack overflow would occur when navigating to a view that contains multiple view controllers. + +#### Version 2.21.0 +* [NEW] Ability to codelessly optimize table view cells using mini notifications. +* [BUGFIX] Fixed an issue where the `UIToolbar` path was different between iOS 11.2 and iOS versions < iOS 11.2. +* [BUGFIX] Resolved an issue where optimizations were not always presented and capture points are not always sent in Preview mode. +* [BUGFIX] Fixed an issue where the Admin popover was not moving to its correct position after the keyboard is appeared in iOS 11. + +#### Version 2.20.1 +* [BUGFIX] Resolved an issue where the SDK was interfering with implementations of `UILabel`. + +#### Version 2.20.0 +* [NEW] Added iPhone X support for Admin mode and User mode notifications. +* [NEW] Added the ability to display a mini notification from the top. +* [UPDATE] Updated the codeless identity transfer implementation to only use initWithURL:entersReaderIfAvailable prior to iOS 11. +* [UPDATE] Reviewed and updated the implementation to ensure integrations with Xcode 8.3 are still supported. +* [BUGFIX] Resolved an issue where duplicate properties were sent in some of the send properties requests sent by the SDK. +* [BUGFIX] Resolved an issue where response codes were sent repeatably in some circumstances where a network error would occur. +* [BUGFIX] Resolved an issue where the list items were not presented under the proposition screen when trying to link a proposition to an attribute. + +#### Version 2.19.2 +* [BUGFIX] Fixed an issue where URL query string encoding is removed when recreating the URL. + +#### Version 2.19.1 +* [UPDATE] Updated the FMDB implementation to avoid possible App Store rejections (see:https://github.com/ccgus/fmdb/issues/610). +* [BUGFIX] Resolved an issue where the SDK removed url query parameters without a value when adding a one-tid. +* [BUGFIX] Fixed an issue where one-click interactions were being sent twice. + +#### Version 2.19.0 +* [NEW] Ability to store interactions when a connection cannot be establish or ONE is down, and send these interactions when the service has been restored. +* [UPDATE] Added the SDK version to every request header. +* [UPDATE] Added support for the Cordova plugin and React module to be able to send the SDK version with every request header. +* [UPDATE] Added a close button to the search field in Admin mode. +* [BUGFIX] Fixed an issue where requests were sent continuously to ONE if a 404 response was received. +* [BUGFIX] Fixed an issue where Main Thread exception was thrown when enabling push notifications. +* [BUGFIX] Fixed a bug where users were unable select a capture point cell after deleting the point. +* [BUGFIX] Improved the proposition screen to avoid UI freezes when searching long lists. +* [BUGFIX] Resolved an issue where an app would crash when tapping the push notification if the app was terminated prior to the push being received. + +#### Version 2.18.0 +* [NEW] Added ability to send interaction paths which contain UTF8 characters. +* [UPDATE] Improved touchpoint uri validation. +* [UPDATE] Updated the identity transfer logic to support the SFSafariViewController initWithURL method in iOS 11. +* [BUGFIX] Resolved an issue where the SDK was sending multiple PUT requests instead of sending them one by one. +* [BUGFIX] Resolved an issue where the back buttons were not functioning correctly in Admin mode when running the SDK on iOS 11. +* [BUGFIX] Resolved various UI issues related to running the SDK in Admin mode on iOS 11. +* [BUGFIX] Resolved a crash that was occurring when navigating back from a WKWebView. +* [BUGFIX] Resolved an issue where identity sync was not being performed in apps built with Swift. + +#### Version 2.17.0 +* [NEW] Ability to codelessly sync identity with a web touchpoint on any interaction using an identity sync asset. +* [UPDATE] Updated our Runtime APIs logic to cache tids received after the 5 seconds timeout and link them with requests as they are sent. +* [UPDATE] Improved our codeless tracking API to only track delegates and objects that ONE is interested in. +* [UPDATE] Updated our framework to now be distributed without symlinks. +* [UPDATE] Updated our push notifications neutral response code logic to not send these response codes when push notification have been disabled via the application settings. +* [BUGFIX] Resolved an issue where a dynamic proposition name would change its length when being selection in the Admin mode interface. +* [BUGFIX] Added the UserNotifications framework to our framework module.modulemap to ensure users don't experience compile errors when integrating the SDK in their app. + +#### Version 2.16.0 +* [NEW] Ability to capture text from a Button. +* [NEW] Ability to track list items where the label matches the list item width and height. +* [NEW] Add ability paste username and password when logging in to Admin mode. +* [UPDATE] We have updated how we store unsent response codes to ensure all response codes are sent to ONE. +* [UPDATE] Updated the oauth library implementation to reduce the SDK package size. +* [UPDATE] Improved the mini notification implementation to support across all screen orientations and avoid a crash which was occurring on device rotation. +* [UPDATE] Updated the one install and one reinstall implementations to not send interactions for apps that already have been installed and use an older version of the SDK. +* [BUGFIX] Resolved an issue where an empty region name would sometimes be shown against interactions when running the SDK in Admin mode. +* [BUGFIX] Resolved an issue where PUT requests were being sent twice when running the SDK in iOS 7. + +#### Version 2.15.0 +* [NEW] Improve install/identity tracking to allow identity sync with web touchpoints programmatically. +* [BUGFIX] Resolved an issues where sometimes requests were sent twice when tapping a collection or table view cell which was tracked. +* [BUGFIX] Resolved an issue where a runtime request sometimes was sent twice when in Preview mode. +* [BUGFIX] Resolved an issue where identity sync occurred when launching the app in Admin mode. +* [BUGFIX] Resolved an issue where the username was sometimes cleared in Admin mode. +* [BUGFIX] Resolved an issue where the one-tid was not always appended to requests. + +#### Version 2.14.0 +* [NEW] Install tracking capability when using the Redirect Tracking API. +* [UPDATE] Updated the login email text field to use an email input. +* [BUGFIX] Resolved an issue where the full screen optimization is presented incorrectly on top of a UIAlertController. +* [BUGFIX] Resolved an issue where the neutral code was resent once the app was terminated and reopened by tapping on the notification. + +#### Version 2.13.0 +* [NEW] Improved the push notification support to use alert base push in combination with background push. +* [NEW] Ability to whitelist links eligible for identity transfer. +* [NEW] Ability to blacklist links not eligible for identity transfer. +* [UPDATE] Updated the properties caching logic to stop re-sending invalid properties after 2 failed attempts. +* [BUGFIX] Fixed an issue where UIControl tracking points were not sent to ONE in User mode. +* [BUGFIX] Fixed an issue where the SDK was incorrectly displaying an 'no regions found' alert in Admin mode for certain type of view controllers. +* [BUGFIX] Fixed an issue where the navigation bar was not being recognised by the SDK when highlighting elements in Admin mode. +* [BUGFIX] Resolved an issue where the full screen notification was interfering with action sheets. +* [BUGFIX] Resolved an issue where the UIAlertController element mapping was causing multiple elements to be mapped with the same id. +* [BUGFIX] Resolved an issue where the Admin popover UX was not behaving correctly when adding group tracking or capture points. +* [BUGFIX] Fixed an issue where the Admin popover was reappearing on screen once an error occurred. + +#### Version 2.12.0 +* [NEW] Ability to programmatically retrieve a push token. +* [NEW] Ability to open a url received in a ONE push notification message. +* [NEW] Ability to automatically send response codes for a push message received from ONE. +* [BUGFIX] Resolved an issue where business users were unable to select some elements using the Admin mode interface. + +#### Version 2.11.0 +* [NEW] Ability to enable push notifications and codelessly receive a push message from ONE. +* [BUGFIX] Resolved attributes list incompatibility with the new design time api. +* [BUGFIX] Fixed an Admin mode crash which was occurring when refreshing proposition lists. +* [BUGFIX] Fixed an issue where a user was able to navigate in Admin mode when the SDK was retrieving the design time context. +* [BUGFIX] Resolved an Admin mode issue where a user was not able to dismiss an alert when the poker chip was present on screen. +* [BUGFIX] Resolved an issue where interaction requests were not triggered automatically in some apps. +* [BUGFIX] Added support for StackViews as part of the elements path, to ensure that 2 elements don’t end up having the same path. +* [BUGFIX] Resolved an issue where tracking points were not sent to ONE in some apps. +* [BUGFIX] Resolved an issue where the Apply button in one of the Admin mode views was not presented correctly once an error has occurred. +* [BUGFIX] Resolved an issue where tracking and capture points were only triggered every second time in certain apps. + +#### Version 2.10.0 +* [NEW] Given that you declare a specific app group as part of your app the SDK can now share the anonymous identifier between apps in the same app group. +* [UPDATE] The SDK now stores the thunderhead anonymous identifier depending on the space to which an app belongs to. +* [UPDATE] Added descriptive logs after every return statement. These are controlled using the SDK log levels. +* [BUGFIX] Resolved an issue where the SDK could not automatically recognise SafariViewControllers as an interaction. +* [BUGFIX] Resolved a crash which was occurring whilst propositions where refreshed in Admin mode. +* [BUGFIX] Resolved an issue where the SDK would get into an incorrect state if the user was to tap the screen whilst preview was in a loading state. + +#### Version 2.9.0 +* [NEW] Cross-channel and install tracking using SafariViewController in apps running on iOS 9+. +* [NEW] Ability to automatically share the tid between apps from the same vendor on apps running on iOS 7, 8 and 9. +* [NEW] The SDK will also now track non-https/http links opened in an app automatically using the 'one-click' interaction. +* [UPDATE] Removed the mapViews public method from the SDK. +* [UPDATE] Updated the Swift method names to match the Objective C method names using the NS_SWIFT_NAME macro. +* [UPDATE] Improved the ability to retrieve a response from an automatically triggered interaction call to allow registration of delegate on a "per-interaction basis”. Please see the latest integration document for further details. +* [UPDATE] Preview mode usability improvements. +* [UPDATE] Update the SDK to better handle UIControls which are used as touch callbacks. +* [UPDATE] iOS 10: Added support for 'openURL:options:completionHandler:' in order for the SDK to automatically pass incoming properties to ONE. +* [UPDATE] Updated the CollectionView delegation protocol. +* [BUGFIX] Resolved an issue where Admin users were unable to track and capture web views which were added as subviews. +* [BUGFIX] Resolved an issue where the full screen notifications would stop from being shown on screen. +* [BUGFIX] Fixed an issue where our collection view capture point data gathering algorithm was not sending data correctly for certain edge cases. +* [BUGFIX] Fixed an issue where interaction were not always sent when going to Preview mode in some apps. +* [BUGFIX] Resolved an issue where the Poker chip would not be shown on screen in certain apps when running in Admin mode. +* [BUGFIX] Resolved an issue where the Admin mode popover wasn’t functioning as expected. +* [BUGFIX] Added a fix to allow Admin users to select the last footer in a table view. +* [BUGFIX] Resolved an issue where the navigation buttons in Admin mode would change depending on the app the SDK was integrated with. +* [BUGFIX] Fixed an issue where regions were not always fully highlighted when inside UITabBarController. +* [BUGFIX] Fixed an issue where the element path wasn’t properly built for image views with gesture recognizer that sat within a cell. +* [BUGFIX] Resolved an issue where tracking points inside cells were not always correctly sent to ONE in Preview and User mode. +* [BUGFIX] Resolved an issue where WKWebView tracking points were not correctly triggered in some apps. +* [BUGFIX] Updated the interaction recognition algorithm to recognise MFMailComposeViewController, MFMessageComposeViewController and SLComposeViewController again. + +#### Version 2.8.4 +* [NEW] Ability to send a push token to ONE. This feature simply exposes the ability to programmatically pass the push token to ONE and will become available as an engagement feature in future ONE releases. +* [UPDATE] Support for identifying interactions across windows. +* [UPDATE] Added an update which allows Admin users to select any elements visible on screen and interactions if no element is found on tap. +* [UPDATE] Updated the interaction recognition algorithms to ignore interactions which don't have trackable elements inside them and interactions which are not currently visible (hidden or alpha less than 0.1). +* [UPDATE] Removed support for Safari View Controller’s 'initWithURL with configuration' to automatically send a 'one-click' interaction to ONE for all outbound links opened from an app. This was due to the method being removed by Apple from the last beta release. +* [UPDATE] Removed support for Safari View Controller’s 'initWithURL with configuration' to automatically add one-tid parameter for identity transfer on all links opened using this method. This was due to the method being removed by Apple from the last beta release. +* [UPDATE] Updated the ONE SDK public method documentation. +* [BUGFIX] Resolved an issue where the SDK could not handle subclassed split view controllers using a similar name to the UISplitViewController. + +#### Version 2.8.3 +* [UPDATE] Removed the need to pass error by reference when calling getURLWithOneTid. +* [BUGFIX] Resolved an issue where the tid was not shown, in preview mode, even though a response was received. + +#### Version 2.8.2 +* [NEW] Ability to automatically send a 'one-click' interaction to ONE for all outbound links opened from an app. +* [UPDATE] Contained iOS 10 update - Added support for Safari View Controller’s 'initWithURL with configuration' to automatically send a 'one-click' interaction to ONE for all outbound links opened from an app. +* [UPDATE] Contained iOS 10: Added support for Safari View Controller’s 'initWithURL with configuration' to automatically add one-tid parameter for identity transfer on all links opened using this method. +* [UPDATE] Updated the ONE SDK public method documentation. + +#### Version 2.8.1 +* [BUGFIX] Resolved an issue where poker chip was not correctly displayed in apps which create their window programmatically. +* [BUGFIX] Resolved an issue where the Admin mode highlighting disappeared after an alert was shown on screen. + +#### Version 2.8.0 +* [NEW] Ability to filter attribute list in Admin mode. +* [NEW] Support outgoing one tid parameter for identity transfer in WKWebViews. +* [UPDATE] Improve the send interaction with properties method to fall back on the send interaction method if no properties are passed. +* [BUGFIX] Fixed a UI bug in preview mode where releases were incorrectly aligned on the screen. + +#### Version 2.7.1 +* [UPDATE] Reverted the algorithm which places the Thunderhead Admin mode window above other application windows automatically. + +#### Version 2.7.0 +* [NEW] Add support for CSRF headers to all design time APIs. +* [NEW] Ability to enter username and password when using touch ID. +* [NEW] Ability to enter preview mode on long press. +* [NEW] Ability to store username and passwords in device keychain. +* [NEW] Ability to see the TID in preview mode. +* [NEW] Ability to share monitor URL. +* [NEW] Ability to track and capture a WKWebView. +* [UPDATE] Added an algorithm which places the Thunderhead Admin mode window above other application windows automatically should these want to sit above it. +* [BUGFIX] Resolved an Admin mode crash which was occurring when editing a capture point. +* [BUGFIX] Resolved a crash which was occurring when searching for dynamic propositions and using the pull to refresh feature. +* [BUGIFX] Resolved a crash which was occurring if the response delegate object was removed in callback method of an automatically triggered interaction. + +#### Version 2.6.0 +* [NEW] Removed single customer key and added support for capturing into key attributes. +* [NEW] Added support for UTF-8 in mobile assets. +* [NEW] Added ability to distribute the SDK as an embedded framework. +* [UPDATE] Updated the point count APIs to align with PC12 API changes. +* [UPDATE] The SDK is now storing the reachability object weakly. +* [UPDATE] Improved automatic text capturing support for text fields, text views and search bars. +* [UPDATE] Updated the ability to retrieve a response from an automatically triggered interaction call using delegate pattern implementation. + +#### Version 2.5.2 +* [BUGFIX] Resolved issue with html encoded characters not being displayed properly in the SDK. + +#### Version 2.5.1 +* [BUGFIX] Added CFBundleSupportedPlatforms to the Thunderhead bundle and set it as iPhoneOS. + +#### Version 2.5.0 +* [NEW] Ability to set a mini notification background colour. +* [NEW] Ability to set a mini notification timer. +* [NEW] Ability to set a mini notification text size and colour. +* [NEW] Added support for flexible image width in mini notifications. +* [NEW] Ability to get structure data. +* [NEW] Ability to retrieve a response from an automatically triggered interaction call using a delegate pattern. +* [UPDATE] Updated manual interactions implementation to trigger known optimizations if blocks are not used. +* [UPDATE] Eliminate the need in adding compiler flag -ObjC during SDK integration. +* [UPDATE] Removed the use of the FBKVOController from the SDK. This implementation has been replaced by swizzling. ‘didMoveToWindow’, ‘setText’ and ‘setAttributedText’ will be swizzled as part of the automatic data capture. +* [UPDATE] Updated the ‘one_tid’ parameter used as part of the automatic identity transfer to ‘one-tid’. +* [UPDATE] Updated the ‘In the Works’ description copy text. +* [BUGFIX] Resolved an issue where poker chip appeared on top of the login screen. +* [BUGFIX] Resolved an issue where the SDK could crash if too many mapping requests where being created at the same time. + +#### Version 2.4.1 +* [BUGFIX] Fixed an issue where user is in process of entering text into text field and premature request with captured text might be sent to ONE before user finishes entering. + +#### Version 2.4.0 +* [NEW] Ability to track and capture data from repeating cells in Admin mode. +* [NEW] Ability to send a response code programmatically. +* [NEW] Ability to switch off automatic interaction detection in the SDK. +* [NEW] Added support for automatic interception of incoming parameters. +* [NEW] Added support for automatic appending of a ‘one_tid’ parameter on all outgoing links to support identity transfer. +* [UPDATE] Removed the need to add SDK dependencies manually and started fully supporting modules. +* [BUGFIX] Resolved an issue where the app crashed when a user would navigate to Preview mode iOS7. +* [BUGFIX] Fixed an issues where an app could not be exported due to a bundle unspecified key in the Thunderhead SDK bundle. +* [BUGFIX] Fixed an issues where not all interaction requests contained device data. +* [BUGFIX] Resolved an issue where a manually triggered interaction request for a different channel could contain an incorrect URI. +* [BUGFIX] Resolved an issue where the popover was being displayed over the element. +* [BUGFIX] Resolved an issue where the Admin popover showed the attribute name instead of hardcoded when using a dynamic proposition. +* [BUGFIX] Resolved an issue where the preview point counts was overlapped by status bar. + +#### Version 2.3.0 +* [NEW] Extended the SDKs programmatic support to allow response retrieval, from manually triggered interactions. +* [NEW] Added support for programmatically triggering interaction requests, for another space, from within a current mobile touchpoint. +* [UPDATE] Updated the UI for all key Admin mode screens. +* [UPDATE] Updated Preview mode point counts UI. +* [UPDATE] Updated Preview mode to align with new Tagger. +* [UPDATE] Updated Edit mode highlighting to align with new Tagger. +* [BUGFIX] Fixed an issue where the Preview mode poker chip would disappear when an alert was presented in iOS 7. + +#### Version 2.2.0 +* [NEW] Ability to select attributes for dynamic propositions using the Admin mode interface. +* [NEW] Ability to track and capture data from repeating Table View cells and cell elements. +* [NEW] Ability to track and capture data from repeating Collection View cells and cell elements. +* [BUGFIX] Fixed an issue where the capture points where being sent twice for the same element. + +#### Version 2.1.6 +* [BUGFIX] Fixed an issue where the session was being invalidated where no regions could be found for a view controller. +* [BUGFIX] Fixed an issue where a tracking point could be added to text field, search bar or text view. + +#### Version 2.1.5 +* [UPDATE] Added bitcode support +* [BUGFIX] Resolved an issue where passwords containing special characters weren’t parsed correctly by the network controller + +#### Version 2.1.4 +* [UPDATE] Updated the public method comments + +#### Version 2.1.3 +* [UPDATE] Ensure captured data is not sent multiple times +* [UPDATE] Improved implementation to support building the SDK under Xcode 6.x +* [BUGFIX] Changing region name causes the app crash +* [BUGFIX] No region alert message causes the app crash +* [BUGFIX] Requests are not always sent when popover appears +* [BUGFIX] Non-existent capture point are triggered in User mode +* [BUGFIX] Poker chip is active after dismissing No Region alert message \ No newline at end of file diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..215e86d --- /dev/null +++ b/Package.swift @@ -0,0 +1,22 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Thunderhead", + platforms: [ + .iOS(.v9) + ], + products: [ + .library( + name: "Thunderhead", + targets: ["Thunderhead"]), + ], + targets: [ + .binaryTarget( + name: "Thunderhead", + path: "Thunderhead.embeddedframework/Thunderhead.xcframework" + ) + ] +) diff --git a/README.md b/README.md index 43d2d49..924a6dc 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,19 @@ - [Requirements](#requirements) * [iOS version requirements](#ios-version-requirements) + * [Xcode version requirements](#xcode-version-requirements) - [Installation](#installation) + * [Swift Package Manager](#swift-package-manager) * [CocoaPods](#cocoapods) * [Manual installation](#manual-installation) + [Adding the SDK dependencies for manual installation](#adding-the-sdk-dependencies-for-manual-installation) + [Biometric authentication](#biometric-authentication) -- [Use the codeless Thunderhead SDK for iOS](#use-the-codeless-thunderhead-sdk-for-ios) +- [Configure the codeless Thunderhead SDK for iOS](#configure-the-codeless-thunderhead-sdk-for-ios) * [Initialize the SDK](#initialize-the-sdk) + [Import the SDK’s module](#import-the-sdks-module) - + [Set up the SDK in User mode](#set-up-the-sdk-in-user-mode) - + [Set up the SDK in Admin mode](#set-up-the-sdk-in-admin-mode) + + [Set up the SDK in User mode for App Store builds](#set-up-the-sdk-in-user-mode-for-app-store-builds) + + [Set up the SDK in Admin mode for internal distribution](#set-up-the-sdk-in-admin-mode-for-internal-distribution) + * [Further codeless integration considerations](#further-codeless-integration-considerations) + [For Salesforce Interaction Studio integrations](#for-salesforce-interaction-studio-integrations) + [`ViewController`/`View` lifecycle overriding rules](#viewcontrollerview-lifecycle-overriding-rules) + [Sending codeless Interactions based on the list of Interactions created under a Touchpoint](#sending-codeless-Interactions-based-on-the-list-of-Interactions-created-under-a-touchpoint) @@ -57,12 +60,6 @@ + [Append a `one-tid` parameter to a `NSURL` to facilitate identity transfer](#append-a-one-tid-parameter-to-a-nsurl-to-facilitate-identity-transfer) * [Disable automatic outbound link tracking](#disable-automatic-outbound-link-tracking) + [Programmatically trigger an outbound link tracking Interaction call](#programmatically-trigger-an-outbound-link-tracking-interaction-call) - * [Enable push notifications](#enable-push-notifications) - * [Get a push token](#get-a-push-token) - * [Send a push token](#send-a-push-token) - * [Handle notifications received through the ONE APNs interface](#handle-notifications-received-through-the-one-apns-interface) - - [Handling notifications while the app in foreground or background](#handling-notifications-while-the-app-in-foreground-or-background) - - [Displaying notifications while the app in foreground](#displaying-notifications-while-the-app-in-foreground) * [Send a location object](#send-a-location-object) * [Get a structure data](#get-a-structure-data) * [Get Tid](#get-tid) @@ -74,32 +71,80 @@ * [Salesforce Interaction Studio support](#salesforce-interaction-studio-support) * [Thunderhead ONE support](#thunderhead-one-support) +For native integration, simply follow the steps outlined under the installation and configuration section to quickly integrate the SDK into your app. + ## Requirements -The Thunderhead SDK for iOS supports iOS 8.0 and above. +The Thunderhead SDK for iOS supports iOS 9.0 and above. ### iOS version requirements -+ iOS minimum version (deployment target): iOS 8.0 -+ iOS base SDK version: iOS 13.0 -+ Xcode minimum version: 11.0 ++ iOS minimum version (deployment target): iOS 9.0 ++ iOS base SDK version: iOS 14.3 + +### Xcode version requirements + ++ Xcode minimum version: 12.0 + +*Note:* +- Xcode versions < 12.0 only support archiving an application with bitcode disabled. ## Installation +The Thunderhead SDK can be integrated via [Swift Package Manager](#swift-package-manager), [CocoaPods](#cocoapods) or [by manually adding it to your project](#manual-installation). + +### Swift Package Manager + +Adding a binary Swift package into your project can be done directly in Xcode in a few simple steps: + +1. Add the package dependency into your Xcode project. + + To do so, in the Xcode Navigation Bar, go to File > Swift Packages > Add Package Dependency… You might need to select your project in the next window if there are multiple projects in your workspace. + + Now enter the package repository URL provided below into the search field and hit Next. + + ```sh + https://github.com/thunderheadone/one-sdk-ios + ``` + + ![Thunderhead Add Package](https://github.com/thunderheadone/one-sdk-ios/raw/master/images/SPM/ThunderheadAddPackageURL.png) + +2. Select additional options such as a specific version number, branch or commit identifier. + + By default, Up to Next Major version is selected. We recommend using the latest version of the Thunderhead SDK for iOS, which you can find [here](https://github.com/thunderheadone/one-sdk-ios/releases). + + To integrate a specific version of the Thunderhead SDK, simply specify a version number you need. + + For example, to integrate version 6.0.0 of the Thunderhead SDK, specify the version number like on the screenshot below: + + ![Thunderhead Choose Package Version](https://github.com/thunderheadone/one-sdk-ios/raw/master/images/SPM/ThunderheadChoosePackage.png) + +3. Wait for Xcode to finish downloading and resolving the Swift package into your project. + + ![Thunderhead Cloning Package](https://github.com/thunderheadone/one-sdk-ios/raw/master/images/SPM/ThunderheadFetchPackage.png) + +4. Choose the package products and targets. + + ![Thunderhead Select Target](https://github.com/thunderheadone/one-sdk-ios/raw/master/images/SPM/ThunderheadSelectTarget.png) + +5. Drag and drop the **_ThunderheadBundle.bundle_** to **Copy Bundle Resources** section in your targets. + + ![Thunderhead Copy Thunderhead Bundle](https://github.com/thunderheadone/one-sdk-ios/raw/master/images/SPM/ThunderheadAddBundleResource.gif) + ### CocoaPods -Make sure you have the [CocoaPods](http://cocoapods.org) dependency manager installed. You can do so by executing the following command: +Make sure you have the [CocoaPods](https://cocoapods.org) dependency manager installed. You can do so by executing the following command: ```sh $ gem install cocoapods ``` -Specify the *Thunderhead SDK* in your podfile +Specify the *Thunderhead SDK* in your podfile. ```txt # Thunderhead SDK target :YourTargetName do - pod 'Thunderhead', '~> 5.3.3' + pod 'Thunderhead', '~> 6.0.0' end ``` @@ -109,7 +154,22 @@ Install using the following command: $ pod install ``` -See example project for pod installation [here](https://github.com/thunderheadone/one-sdk-ios/tree/master/examples/dynamic-initialization-example). +You can find an example project for pod installation [here](https://github.com/thunderheadone/one-sdk-ios/tree/master/examples/dynamic-initialization-example). + +*Note:* +- While running `pod install`, if you get the following warnings: + +```txt +[!] The `ThunderheadSampleApp [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-ThunderheadSampleApp/Pods-ThunderheadSampleApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation + - Use the `$(inherited)` flag, or + - Remove the build settings from the target. +[!] The `ThunderheadSampleApp [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-ThunderheadSampleApp/Pods-ThunderheadSampleApp.release.xcconfig'. This can lead to problems with the CocoaPods installation + - Use the `$(inherited)` flag, or + - Remove the build settings from the target. +``` + +Go to app target's **Build Settings**, add **$(inherited)** to **Other Linker Flags**, which will add linker flags generated in pods or see our [Troubleshooting Guide](TROUBLESHOOTING-GUIDE.md#resolve-undefined-symbols-for-architecture-arm64-compile-time-error). + ### Manual installation @@ -120,7 +180,7 @@ See example project for pod installation [here](https://github.com/thunderheadon + Navigate to your project build settings by selecting your project's Project File in the Project Navigator. + Select the main build target for your app. + Select the **Build Phases** tab. - + Confirm **_Thunderhead.framework_** is located in the **Link Binary With Libraries** section. + + Confirm **_Thunderhead.xcframework_** is located in the **Link Binary With Libraries** section. + Confirm **_ThunderheadBundle.bundle_** is located in the **Copy Bundle Resources** section. 5. Ensure your project enables modules by going to **Build Settings** tab and setting the flag for **Enable Modules (C and Objective-C)** to **Yes**. Check out **_Adding the SDK dependencies for manual installation_** if you need modules to be disabled. @@ -133,15 +193,18 @@ See example project for manual installation [here](https://github.com/thunderhea The SDK requires modules to be enabled. If you require modules to be disabled, you may need to include the following frameworks to the **Link Binary With Libraries**: ++ *Accelerate.framework* ++ *CoreLocation.framework* + *Foundation.framework* -+ *UIKit.framework* ++ *LocalAuthentication.framework* + *CoreGraphics.framework* -+ *SystemConfiguration.framework* + *MessageUI.framework* -+ *Accelerate.framework* -+ *LocalAuthentication.framework* + *SafariServices.framework* ++ *Security.framework* ++ *SystemConfiguration.framework* ++ *UIKit.framework* + *WebKit.framework* ++ *libsqlite3.tbd* *Note:* - If any of the frameworks are missing from your app, select the +icon in the lower-left corner of the **Link Binary With Libraries** section and add each framework, as needed, using the popup window. @@ -160,9 +223,9 @@ The SDK supports biometric authentication (Touch ID / Face ID) in Admin mode to your `Info.plist` file. Failure to do so results in a dialog that tells the user your app has not provided the Face ID usage description. -## Use the codeless Thunderhead SDK for iOS +## Configure the codeless Thunderhead SDK for iOS -Enable your app to automatically recognize **Interactions** by executing the following steps. +Enable your app to automatically recognize **Interactions** in your app, by executing the following steps: ### Initialize the SDK @@ -182,7 +245,7 @@ Complete the following steps to initialize the SDK. @import Thunderhead; ``` -#### Set up the SDK in User mode +#### Set up the SDK in User mode for App Store builds To start tracking, capturing, and receiving Optimizations with the Thunderhead SDK in User mode, you must first initialize it with your Thunderhead API parameters. You can find your Thunderhead API parameters on the Thunderhead ONE website or in Salesforce Interaction Studio. @@ -211,7 +274,7 @@ Objective-C: hostName:@"eu2.thunderhead.com"]; ``` -#### Set up the SDK in Admin mode +#### Set up the SDK in Admin mode for internal distribution To use the framework in Admin mode, simply change the `adminMode` boolean to `true`, as follows: @@ -237,6 +300,11 @@ Objective-C: adminMode:YES hostName:@"eu2.thunderhead.com"]; ``` + +**You have now successfully integrated the codeless Thunderhead SDK for iOS.** + +### Further codeless integration considerations + #### For Salesforce Interaction Studio integrations When integrating with Salesforce Interaction Studio you can set the Admin mode theme to match the Interaction Studio look and feel, as follows: @@ -255,7 +323,7 @@ Objective-C: #### `ViewController`/`View` lifecycle overriding rules -The framework listens to a number of UIViewController and UIView methods to provide the desired functionality. Those methods are: +The framework listens to a number of `UIViewController` and `UIView` methods to provide the desired functionality. Those methods are: - `viewWillAppear` - `viewDidAppear` - `viewWillDisappear` @@ -270,12 +338,12 @@ In order to reduce the number of unnecessary Interaction requests sent automatic *Note:* - The SDK will only send codeless Interactions if they have been created under a Touchpoint and/or if they match wildcard rules defined under a Touchpoint. - For a codeless Interaction to be sent by the SDK this Interaction needs to contain at least one Activity Capture Point, Attribute Capture Point, and/or Optimization Point. -- If you are running the SDK in [User mode](#set-up-the-sdk-in-user-mode), you need to ensure that all Interactions and related points have been fully published, before the SDK will trigger a request. - -**You have now successfully integrated the codeless Thunderhead SDK for iOS.** +- If you are running the SDK in [User mode](#set-up-the-sdk-in-user-mode-for-app-store-builds), you need to ensure that all Interactions and related points have been fully published, before the SDK will trigger a request. ## Additional features -Follow any of the steps below to access further functions of the SDK. +Follow any of the steps below to access further functions of the SDK. + +You will typically use these functions to extend the codeless functionality, turn off specific codeless functions or if you are adopting a pure programmatic integration. ### Opt an end-user out of or into tracking The following methods allow you to opt a user out of various levels of tracking and also opt them back in based on your app's privacy configuration. @@ -435,7 +503,7 @@ Objective-C: To disable in-list Optimizations, add the following to your app’s Info.plist file and set `DisableInListOptimization` to `YES` (boolean value). -![Thunderhead Config App's Info.plist file](images/ThunderheadConfigInfoPlistEntry.png) +![Thunderhead Config App's Info.plist file](https://github.com/thunderheadone/one-sdk-ios/raw/master/images/ThunderheadConfigInfoPlistEntry.png) ```xml Thunderhead Config @@ -1042,146 +1110,6 @@ passing the URL which will send an Interaction request ‘/one-click’ using th *Note:* - This will send a POST request to Thunderhead ONE or Salesforce Interaction Studio. -### Enable push notifications - -To receive push notifications from Thunderhead ONE or Salesforce Interaction Studio, take the following steps: - -1. Enable Push Notifications in Capabilities pane -2. Enable Background Modes in Capabilities pane -3. Select Remote Notifications under Background Modes section -4. Call the method `enablePushNotifications` by passing `true` as shown below: - - Swift: - ```swift - One.enablePushNotifications(true) - ``` - - - Objective-C: - ```objective-c - [One enablePushNotifications:YES]; - ``` - -*Note:* -- To disable this feature if it once was enabled, simply call the same method and pass `false`. - -### Get a push token - -To get the push token codelessly retrieved by the SDK, call the `getPushToken` method as shown below: - -Swift: -```swift -let pushToken = One.getPushToken() -// work with the push token -``` - - -Objective-C: -```objective-c -NSString *pushToken = [One getPushToken]; -// work with the push token -``` - -*Note:* -- This can be useful for testing and debugging, or to retrieve the token and pass it to another push notification provider. - -### Send a push token - -To send a push token, call `sendPushToken` method by passing a push token: - -Swift: -```swift -One.sendPushToken(pushToken) -``` - - -Objective-C: -```objective-c -[One sendPushToken:pushToken]; -``` - -The push token can be obtained and sent from the app delegate’s method `didRegisterForRemoteNotificationsWithDeviceToken` as shown below: - -Swift: -```swift -func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) { - One.sendPushToken(deviceToken) - // work with the push token -} -``` - - -Objective-C: -```objective-c -- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken -{ - [One sendPushToken:deviceToken]; - // work with the push token -} -``` - -*Note:* -- If you haven't enabled push notification support, you can use this function to programmatically store the push token in Thunderhead ONE or Salesforce Interaction Studio. - -### Handle notifications received through the ONE APNs interface - -##### Handling notifications while the app in foreground or background - -Swift: -```swift -func application(_ application: UIApplication, - didReceiveRemoteNotification userInfo: [AnyHashable : Any], - fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { - // Handle notification - // Call `completionHandler` with the appropriate `UIBackgroundFetchResult`. For example: - completionHandler(.newData) -} -``` - - -Objective-C: -```objective-c -- (void)application:(UIApplication *)application - didReceiveRemoteNotification:(NSDictionary *)userInfo - fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler -{ - // Handle notification - // Call `completionHandler` with the appropriate `UIBackgroundFetchResult`. For example: - completionHandler(UIBackgroundFetchResultNewData); -} -``` - - -##### Displaying notifications while the app in foreground - -Notifications received while the app is running in the foreground will not generate the standard system alert. Instead, they are passed to the `application:didReceiveRemoteNotification:fetchCompletionHandler:` callback on your app delegate. To display a standard system alert, implement `userNotificationCenter:willPresentNotification:withCompletionHandler:` method. - -For example, to show a standard alert view, do the following: - -**iOS 10+** - -Swift: -```swift -func userNotificationCenter(_ center: UNUserNotificationCenter, - willPresent notification: UNNotification, - withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { - // Handle notification - completionHandler([.alert, .badge, .sound]) -} -``` - - -Objective-C: -```objective-c -- (void)userNotificationCenter:(UNUserNotificationCenter *)center - willPresentNotification:(UNNotification *)notification - withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler -{ - // Handle notification - completionHandler(UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound); -} -``` - ### Send a location object diff --git a/TROUBLESHOOTING-GUIDE.md b/TROUBLESHOOTING-GUIDE.md index eb6b4aa..7b8cf7c 100644 --- a/TROUBLESHOOTING-GUIDE.md +++ b/TROUBLESHOOTING-GUIDE.md @@ -1,39 +1,50 @@ ![Thunderhead SDK](images/Thunderhead_Logo.png) -The Thunderhead SDK for iOS Troubleshooting Guide for Common Implementation Issues. +The Thunderhead SDK for iOS Troubleshooting Guide for common implementation issues. -## Deny/Block Network Connections in Xcode Simulator -### How to reduce Console connection failure messages in Xcode -For developers that use an external tool (i.e. Little Snitch) to deny/block network connections coming from the Simulator, you may find that Xcode spams the debug area console with a large amount of network log errors, like below: +- [Installation and archiving troubleshooting](#installation-and-archiving-troubleshooting) + * [No such module 'Thunderhead' Xcode compile error](#no-such-module--thunderhead--xcode-compile-error) + * [Resolve `Undefined symbols for architecture arm64` compile time error](#resolve--undefined-symbols-for-architecture-arm64--compile-time-error) + * [Archive Error SPM - Found an unexpected Mach-O header code: 0x72613c21](#archive-error-spm---found-an-unexpected-mach-o-header-code--0x72613c21) +- [How to resolve `UITableView` layout display issues](#how-to-resolve--uitableview--layout-display-issues) + * [Resolve `UITableView` layout issue by implementing `tableView:heightForRowAtIndexPath:`](#resolve--uitableview--layout-issue-by-implementing--tableview-heightforrowatindexpath--) + * [Disable the in-list Optimizations feature via App's Info.plist](#disable-the-in-list-optimizations-feature-via-app-s-infoplist) +- [Deny/Block Network Connections in Xcode Simulator](#deny-block-network-connections-in-xcode-simulator) + * [How to reduce Console connection failure messages in Xcode](#how-to-reduce-console-connection-failure-messages-in-xcode) -``` -2020-01-20 09:33:28.281517+0100 SampleApp[27123:934708] [] nw_socket_connect [C905.1:3] connect failed (fd 13) [64: Host is down] -2020-01-20 09:33:28.281642+0100 SampleApp[27123:934708] [] nw_socket_connect connect failed [64: Host is down] -2020-01-20 09:33:28.282565+0100 SampleApp[27123:934708] Connection 2: received failure notification -2020-01-20 09:33:28.282673+0100 SampleApp[27123:934708] Connection 2: failed to connect 1:64, reason -1 -2020-01-20 09:33:28.282808+0100 SampleApp[27123:934708] Connection 2: encountered error(1:64) -2020-01-20 09:33:28.286154+0100 SampleApp[27123:934708] Task .<708> HTTP load failed, 0/0 bytes (error code: -1004 [1:64]) -2020-01-20 09:33:28.286590+0100 SampleApp[27123:934657] Task .<708> finished with error [-1004] Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to server." UserInfo={NSUnderlyingError=0x600003d8b750 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=64, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://eu2.thunderhead.com/one/oauth1/2020-01-20 09:33:28.296102+0100 SampleApp[27123:934708] [] nw_socket_connect [C906.1:3] connect failed (fd 13) [64: Host is down] -rt/api/2.0/interaction/offline?sk=SITE_KEY, NSErrorFailingURLKey=https://servername.com/one/oauth1/rt/api/2.0/interaction?sk=SITE_KEY, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=64, NSLocalizedDescription=Could not connect to server.} -2020-01-20 09:33:28.304717+0100 SampleApp[27123:934708] [] nw_socket_connect connect failed [64: Host is down] -2020-01-20 09:33:28.307448+0100 SampleApp[27123:934708] [] nw_socket_connect [C906.2:3] connect failed (fd 13) [64: Host is down] -2020-01-20 09:33:28.307579+0100 SampleApp[27123:934708] [] nw_socket_connect connect failed [64: Host is down] -2020-01-20 09:33:28.310252+0100 SampleApp[27123:934708] [] nw_socket_connect [C906.3:3] connect failed (fd 13) [64: Host is down] -2020-01-20 09:33:28.310392+0100 SampleApp[27123:934708] [] nw_socket_connect connect failed [64: Host is down] -2020-01-20 09:33:28.312445+0100 SampleApp[27123:934708] [] nw_socket_connect [C906.4:3] connect failed (fd 13) [64: Host is down] + +## Installation and archiving troubleshooting +### No such module 'Thunderhead' Xcode compile error + +When integrating the Thunderhead SDK manually into your app, you may encounter this compile error. + +To resolve this, navigate to **Build Settings**, ensure the **Framework Search Paths** contains the framework filepath. If the framework is placed in your project directory, simply set the framework search path to `$(SRCROOT)` and set it to recursive. + +### Resolve `Undefined symbols for architecture arm64` compile time error + +When integrating the Thunderhead SDK via [CocoaPods](https://github.com/thunderheadone/one-sdk-ios#cocoapods), you may encounter this compile time error. + +To resolve this error, go to app target's **Build Settings**, add `$(inherited)` to **Other Linker Flags**, which will add the linker flags generated by the Pods to your app. + +![Thunderhead Other Linker Flag](images/ThunderheadOtherLinkerFlag.png) + +### Archive Error SPM - Found an unexpected Mach-O header code: 0x72613c21 + +When try to upload/distribute an archive, you may encounter this error, if Thunderhead SDK was integrated via [SPM](https://github.com/thunderheadone/one-sdk-ios/#swift-package-manager). + +To resolve this error, add the following **Run Script** to the scheme's **Build Post-actions**: + +```sh +rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Frameworks/Thunderhead.framework" ``` -These are **Apple error logs** logging *all* failed outgoing network connections configured with an external tool (i.e. Little Snitch) to block outgoing network calls in the Xcode Simulator. Below are potential solutions to help filter the Apple error logs that you see: -- Disable the OS (Operating System) Logs by setting `OS_ACTIVITY_MODE` = `disable` in your App Scheme Configuration. - - See [here](https://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-logs) -- Or, if you require to see the OS logs and only want to filter Thunderhead SDK's network calls, you can temporarily set the SDK's `optOut` setting to `true`. - - See [here](https://github.com/thunderheadone/one-sdk-ios#opt-an-end-user-out-of-tracking) +*Note:* -## No such module 'Thunderhead' Xcode compile error +- Make sure to select **Provide build settings** from the app. -When integrating the Thunderhead SDK manually into your app, you may encounter this compile error. + ![Thunderhead Unexpected Mach-O via SPM](images/ThunderheadUnexpectedMachOViaSPM.png) -In **Build Settings**, ensure the **Framework Search Paths** contains the framework filepath. If the framework is placed in your project directory, simply set the framework search path to $(SRCROOT) and set it to recursive. +- Please note this issue has already been reported to Apple's Swift Team. To track this bug [click here](https://bugs.swift.org/browse/SR-13343). ## How to resolve `UITableView` layout display issues @@ -57,7 +68,7 @@ Objective-C: ``` ### Disable the in-list Optimizations feature via App's Info.plist -- Disable the in-list Optimizations feature by adding the following to your app’s Info.plist file and set `DisableInListOptimization` to `YES` (boolean value). +- Disable the in-list Optimizations feature by adding the following config to your app’s `Info.plist` file and set `DisableInListOptimization` to `YES` (boolean value). ![Thunderhead Config App's Info.plist file](images/ThunderheadConfigInfoPlistEntry.png) @@ -72,3 +83,29 @@ Objective-C: ``` +## Deny/Block Network Connections in Xcode Simulator +### How to reduce Console connection failure messages in Xcode +For developers that use an external tool (i.e. Little Snitch) to deny/block network connections coming from the Simulator, you may find that Xcode spams the debug area console with a large amount of network log errors, like below: + +``` +2020-01-20 09:33:28.281517+0100 SampleApp[27123:934708] [] nw_socket_connect [C905.1:3] connect failed (fd 13) [64: Host is down] +2020-01-20 09:33:28.281642+0100 SampleApp[27123:934708] [] nw_socket_connect connect failed [64: Host is down] +2020-01-20 09:33:28.282565+0100 SampleApp[27123:934708] Connection 2: received failure notification +2020-01-20 09:33:28.282673+0100 SampleApp[27123:934708] Connection 2: failed to connect 1:64, reason -1 +2020-01-20 09:33:28.282808+0100 SampleApp[27123:934708] Connection 2: encountered error(1:64) +2020-01-20 09:33:28.286154+0100 SampleApp[27123:934708] Task .<708> HTTP load failed, 0/0 bytes (error code: -1004 [1:64]) +2020-01-20 09:33:28.286590+0100 SampleApp[27123:934657] Task .<708> finished with error [-1004] Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to server." UserInfo={NSUnderlyingError=0x600003d8b750 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=64, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://eu2.thunderhead.com/one/oauth1/2020-01-20 09:33:28.296102+0100 SampleApp[27123:934708] [] nw_socket_connect [C906.1:3] connect failed (fd 13) [64: Host is down] +rt/api/2.0/interaction/offline?sk=SITE_KEY, NSErrorFailingURLKey=https://servername.com/one/oauth1/rt/api/2.0/interaction?sk=SITE_KEY, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=64, NSLocalizedDescription=Could not connect to server.} +2020-01-20 09:33:28.304717+0100 SampleApp[27123:934708] [] nw_socket_connect connect failed [64: Host is down] +2020-01-20 09:33:28.307448+0100 SampleApp[27123:934708] [] nw_socket_connect [C906.2:3] connect failed (fd 13) [64: Host is down] +2020-01-20 09:33:28.307579+0100 SampleApp[27123:934708] [] nw_socket_connect connect failed [64: Host is down] +2020-01-20 09:33:28.310252+0100 SampleApp[27123:934708] [] nw_socket_connect [C906.3:3] connect failed (fd 13) [64: Host is down] +2020-01-20 09:33:28.310392+0100 SampleApp[27123:934708] [] nw_socket_connect connect failed [64: Host is down] +2020-01-20 09:33:28.312445+0100 SampleApp[27123:934708] [] nw_socket_connect [C906.4:3] connect failed (fd 13) [64: Host is down] +``` + +These are **Apple error logs** logging *all* failed outgoing network connections configured with an external tool (i.e. Little Snitch) to block outgoing network calls in the Xcode Simulator. Below are potential solutions to help filter the Apple error logs that you see: +- Disable the OS (Operating System) Logs by setting `OS_ACTIVITY_MODE` = `disable` in your App Scheme Configuration. + - See [here](https://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-logs) +- Or, if you require to see the OS logs and only want to filter Thunderhead SDK's network calls, you can temporarily opt out an end-user from all tracking. + - See [here](https://github.com/thunderheadone/one-sdk-ios#opt-an-end-user-outin-of-all-tracking) \ No newline at end of file diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/Info.plist b/Thunderhead.embeddedframework/Thunderhead.xcframework/Info.plist new file mode 100644 index 0000000..0fa03c7 --- /dev/null +++ b/Thunderhead.embeddedframework/Thunderhead.xcframework/Info.plist @@ -0,0 +1,42 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + Thunderhead.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + Thunderhead.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Headers/One.h b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Headers/One.h new file mode 100644 index 0000000..54fe2c0 --- /dev/null +++ b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Headers/One.h @@ -0,0 +1,315 @@ +// +// One.h +// Thunderhead +// +// Copyright © 2017 Thunderhead. All rights reserved. +// + +#import +#import +#import + +#define ONE_API_DEPRECATED(__VA_ARGS__) __attribute__((deprecated(__VA_ARGS__))); + +/*! + @typedef OneLogLevel + @brief This is an enum which specifies the log level output which will be printed to console. + @field kOneLogLevelNone This log level disables logging to console. + @field kOneLogLevelAll This log level prints everything to console. + @field kOneLogLevelWebService This log level prints everything relating to web services (requests, responses etc.) only. + @field kOneLogLevelFramework This log level prints framework events which occur whilst running the app. + @field kOneLogLevelDebug This log level prints debug logs to console. + */ +typedef NS_ENUM(NSInteger, OneLogLevel) { + kOneLogLevelNone NS_SWIFT_NAME(None), + kOneLogLevelAll NS_SWIFT_NAME(All), + kOneLogLevelWebService NS_SWIFT_NAME(WebService), + kOneLogLevelFramework NS_SWIFT_NAME(Framework), + kOneLogLevelDebug NS_SWIFT_NAME(Debug) +}; + +/*! + @typedef OneTheme + @brief This is an enum which specifies the theme used in design time. + @field OneThemeDefault Default theme in design time. + @field OneThemeInteractionStudio Interaction Studio theme in design time. + */ +typedef NS_ENUM(NSInteger, OneTheme) { + OneThemeDefault NS_SWIFT_NAME(Default), + OneThemeInteractionStudio NS_SWIFT_NAME(InteractionStudio) +}; + +/*! + @typedef OneOpt + @brief This is an enum which specifies the type used when opting in/out. + @field Out Configure Thunderhead SDK to opt out of all tracking, keychain tid storage, pasteboard tid storage, and/or city/country level tracking. + @field In Configure Thunderhead SDK to opt in for all tracking, keychain tid storage, pasteboard tid storage, and/or city/country level tracking. +*/ +typedef NS_OPTIONS(NSUInteger, OneOpt) { + Out NS_SWIFT_NAME(out), + In NS_SWIFT_NAME(in) +}; + +/*! + @typedef OneOptOptions + @brief This is an enum which specifies the configurations used in design time. + @field AllTracking Opt out/in from all tracking. + @field KeychainTidStorage Opt out/in from keychain Tid storage. + @field PasteboardTidStorage Opt out/in from pasteboard Tid storage. + @field CityCountryDetection Opt out/in from city/country level tracking. +*/ +typedef NS_OPTIONS(NSUInteger, OneOptOptions) { + AllTracking NS_SWIFT_NAME(allTracking) = 1, + KeychainTidStorage NS_SWIFT_NAME(keychainTidStorage) = 1 << 1, + PasteboardTidStorage NS_SWIFT_NAME(pasteboardTidStorage) = 1 << 2, + CityCountryDetection NS_SWIFT_NAME(cityCountryDetection) = 1 << 3, +}; + +/*! + @brief This delegate can be used to retrieve interaction responses from automatically triggered interactions. + @discussion Using this delegate is optional. See the Thunderhead SDK for iOS integration document for further details. + */ +@protocol OneInteractionResponseDelegate + +@property (nonatomic, copy) NSString *oneInteractionPath; + +- (void)interaction:(NSString *)interactionPath didReceiveResponse:(NSDictionary *)response NS_SWIFT_NAME(interaction(_:didReceiveResponse:)); + +@end + + +@interface One : NSObject + +/*! + @brief Initializes the framework. + @param siteKey The ONE Engagement Hub space site key. + @param touchPointURI The touchpoint URI path only without the protocol idetifier. + @param apiKey The ONE Engagement Hub space API key. + @param sharedSecret The ONE Engagement Hub space shared secret key. + @param userId A User ID which has access to the current touchpoint. It is recommended to use an api user: api@. + @param adminMode Define whether the framework is initialized in Admin or User mode. Set YES to initialize in Admin mode. Otherwise set NO to initialize in User mode. + @param hostName The ONE Engagement Hub server instance your space is hosted on. If you specify the host name without http or https, https will be used. + @discussion Call the method in app delegate's didFinishLaunchingWithOptions. + */ ++ (void)startSessionWithSK:(NSString *)siteKey uri:(NSString *)touchPointURI apiKey:(NSString *)apiKey sharedSecret:(NSString *)sharedSecret userId:(NSString *)userId adminMode:(BOOL)adminMode hostName:(NSString *)hostName NS_SWIFT_NAME(startSessionWithSK(_:uri:apiKey:sharedSecret:userId:adminMode:hostName:)); + +/*! + @brief Sends touchpoint properties to ONE via a PUT request for the interaction '/' (base touchpoint) and/or '/' with '*' (wildcard). + @param properties A dictionary of properties. Keys and values should be NSString objects. + */ ++ (void)sendBaseTouchpointProperties:(NSDictionary *)properties NS_SWIFT_NAME(sendBaseTouchpointProperties(_:)); + +/*! + @brief Sends properties for a given interaction path to ONE via a PUT request. + @param interactionPath An interaction path. + @param properties A dictionary of properties. Keys and values should be NSString objects. + */ ++ (void)sendProperties:(NSDictionary *)properties + forInteractionPath:(NSString *)interactionPath NS_SWIFT_NAME(sendProperties(_:forInteractionPath:)); + +/*! + @brief Sends an interaction request with properties for a given path to ONE via a POST request. + @param properties A dictionary of properties. Keys and values should be NSString objects. + @param interactionPath An interaction path. + @discussion If no properties are provided, an interaction request will be sent without properties. + */ ++ (void)sendInteraction:(NSString *)interactionPath + withProperties:(NSDictionary *)properties NS_SWIFT_NAME(sendInteraction(_:withProperties:)); + +/*! + @brief Sends an interaction request with properties for a given path to ONE via a POST request. + @param properties A dictionary of properties. Keys and values should be NSString objects. + @param interactionPath An interaction path. + @param block A completion block will be executed when the response is received. The processResponse: method can be called inside this block to handle the response object. + @discussion If no properties are provided, an interaction request will be sent without properties. + */ ++ (void)sendInteraction:(NSString *)interactionPath + withProperties:(NSDictionary *)properties + andBlock:(void(^)(NSDictionary *response, NSError *error))block NS_SWIFT_NAME(sendInteraction(_:withProperties:andBlock:)); + +/*! + @brief Sends an interaction request for a given path to ONE via a POST request. + @param interactionPath An interaction path. + */ ++ (void)sendInteraction:(NSString *)interactionPath NS_SWIFT_NAME(sendInteraction(_:)); + +/*! + @brief Sends an interaction request for a given path to ONE via a POST request. + @param interactionPath An interaction path. + @param block A completion block will be executed when the response is received. The processResponse: method can be called inside this block to handle the response object. + */ ++ (void)sendInteraction:(NSString *)interactionPath + withBlock:(void(^)(NSDictionary *response, NSError *error))block NS_SWIFT_NAME(sendInteraction(_:withBlock:)); + +/*! + @brief Sends a response code for a given interaction path via a PUT request. + @param responseCode A response code. + @param interactionPath An interaction path. + */ ++ (void)sendResponseCode:(NSString *)responseCode + forInteractionPath:(NSString *)interactionPath NS_SWIFT_NAME(sendResponseCode(_:forInteractionPath:)); + +/*! + @brief Retrieves a structure data from ONE for a given structure name. + @param structureName A structure name. + @param block A completion block containing the structure. + */ ++ (void)getStructureData:(NSString *)structureName + withBlock:(void(^)(NSDictionary *response, NSError *error))block NS_SWIFT_NAME(getStructureData(_:withBlock:)); + +/*! + @brief Sends an '/one-click' interaction call to ONE passing the link URL, host, path and parameters as properties to enable link attribution tracking. + @param link A NSURL instance. + */ ++ (void)sendInteractionForOutboundLink:(NSURL *)link NS_SWIFT_NAME(sendInteractionForOutboundLink(_:)); + +/** + * Disables automatic interaction detection. + * + * @param disable YES, if automatic interaction detection should be disabled, + * and NO otherwise. + */ ++ (void)disableAutomaticInteractionDetection:(BOOL)disable NS_SWIFT_NAME(disableAutomaticInteractionDetection(_:)); + +/** + * Disables automatic outbound link tracking. + * + * @param disable YES, if automatic outbound link tracking should be disabled, + * and NO otherwise. + */ ++ (void)disableAutomaticOutboundLinkTracking:(BOOL)disable NS_SWIFT_NAME(disableAutomaticOutboundLinkTracking(_:)); + +/*! + @brief Erases the user profile from the app user preferences. + */ ++ (void)clearUserProfile NS_SWIFT_NAME(clearUserProfile()); + +/*! + @brief Returns the current framework version. + */ ++ (NSString *)frameworkVersion NS_SWIFT_NAME(frameworkVersion()); + +/*! + @brief Sets the framework's log level. + @param logValue Log level. Possible values are kOneLogLevelNone, kOneLogLevelAll, kOneLogLevelWebService, kOneLogLevelFramework. + @discussion Set specific log level to see the framework outputs in the debug panel. By default, the log level is set to kOneLogLevelNone. + */ ++ (void)setLogLevel:(OneLogLevel)logValue NS_SWIFT_NAME(setLogLevel(_:)); + +/*! + @brief Sends the location object's latitude, longitude, horizontal accuracy and timestamp. + @param location A CLLocation object. + */ ++ (void)updateLocation:(CLLocation *)location NS_SWIFT_NAME(updateLocation(_:)); + +/*! + @brief Parses and sends URL parameters of a given URL to ONE + @param url A NSURL object. + */ ++ (void)handleURL:(NSURL *)url NS_SWIFT_NAME(handleURL(_:)); + +/*! + @brief Returns the ONE tid. + */ ++ (NSString *)getTid NS_SWIFT_NAME(getTid()); + +/*! + @brief Enables or disables automatic identity transfer for incoming and outgoing links. + @param disable Set YES to disable automatic identity transfer and NO otherwise. + @discussion Enabled by default. + */ ++ (void)disableIdentityTransfer:(BOOL)disable NS_SWIFT_NAME(disableIdentityTransfer(_:)); + +/*! + @brief Appends the ONE tid as parameter to a given URL. + @param url A NSURL object. + @return A NSURL object with the ONE tid. + */ ++ (NSURL *)getURLWithOneTid:(NSURL *)url NS_SWIFT_NAME(getURLWithOneTid(_:)); + +/*! + @brief Allows the given links to participate in identity transfer. + @param links A NSArray object containg NSURL or NSString objects. + @discussion The given links can be NSURL objects or NSString objects representing URL patterns. NSString objects can include wildcard characters. + */ ++ (void)whitelistIdentityTransferLinks:(NSArray *)links; + +/*! + @brief Disallows the given links to participate in identity transfer. + @param links A NSArray object containg NSURL or NSString objects. + @discussion The given links can be NSURL objects or NSString objects representing URL patterns. NSString objects can include wildcard characters. + */ ++ (void)blacklistIdentityTransferLinks:(NSArray *)links; + +/*! + @brief Synchronizes the app's customer identity with their identity in Mobile Safari. + */ ++ (void)identitySync NS_SWIFT_NAME(identitySync()); + +/*! + @brief Synchronizes the app's customer identity with their identity from a given URL. + @param url A NSURL object. + */ ++ (void)identitySyncWithURL:(NSURL *)url NS_SWIFT_NAME(identitySyncWithURL(_:)); + +/*! + @brief Handles a response received from ONE. All tracking and/or capture points will be parsed by the framework as usual. All optimization points, known by the framework, will be processed/displayed. + @param response A NSDictionary instance. + */ ++ (void)processResponse:(NSDictionary *)response NS_SWIFT_NAME(processResponse(_:)); + +/*! + @brief Register a given object to receive a response for an automatically triggered interaction call. + @param delegate An object conforming to OneInteractionResponseDelegate protocol. + @discussion If the object is deallocated, it will be automatically unregistered. If you want to unregister the object and use it for other needs, you can call removeInteractionResponseDelegate: method. + */ ++ (void)addInteractionResponseDelegate:(id )delegate NS_SWIFT_NAME(addInteractionResponseDelegate(_:)); + +/*! + @brief Removes a given object from receiving a response for an automatically triggered interaction call. + @param delegate An object you added by using addInteractionResponseDelegate: method. + */ ++ (void)removeInteractionResponseDelegate:(id)delegate NS_SWIFT_NAME(removeInteractionResponseDelegate(_:)); + +/*! + @brief Configure Thunderhead SDK to opt in/out from all interactions. + @param optOut YES, if Thunderhead SDK should be configured to opt out from all interactions or NO otherwise. + */ ++ (void)optOut:(BOOL)optOut NS_SWIFT_NAME(opt(out:)) ONE_API_DEPRECATED("Use Thunderhead Framework's +[One opt:forOptions:]"); + +/*! + @brief Configure Thunderhead SDK to opt out/in from all tracking, or keychain tid storage, or pasteboard tid storage and/or city/country level tracking. By default, the Thunderhead SDK is opted in for all settings. + @param oneOpt A OneOpt enum that determines if the configurations are opted in or out. For a list of possible values, see the constants for the OneOpt type. + @param options An integer bit mask that determines which configurations to opt out/in. For a list of possible values, see the constants for the OneOptOut type. +*/ ++ (void)opt:(OneOpt)oneOpt forOptions:(OneOptOptions)options NS_SWIFT_NAME(opt(_:forOptions:)); + +/*! + @brief Sets the framework's UI theme. + @param theme A OneTheme enum. For a list of possible values, see the constants for the OneTheme type. + @discussion Set specific themes to update the framework's UI in design time. By default, the theme is set to kOneThemeDefault. + */ ++ (void)setTheme:(OneTheme)theme NS_SWIFT_NAME(setTheme(_:)); + +@end + +/////////////////////////////////////////////////////////////////////////////////////////// +#pragma mark - Interaction ID +/////////////////////////////////////////////////////////////////////////////////////////// + +@interface UIViewController (OneInteracting) + +/*! + @property oneInteractionPath + @brief An interaction path. + */ +@property (nonatomic, copy) NSString *oneInteractionPath; + +/*! + @property excludeInteractionPath + @brief Excludes an interaction from being recognized by the framework + @discussion Set it to YES to exclude the interaction from processing. Default is NO. + */ +@property (nonatomic, assign) BOOL excludeInteractionPath; + +@end diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Headers/Thunderhead.h b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Headers/Thunderhead.h new file mode 100644 index 0000000..57c4ac1 --- /dev/null +++ b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Headers/Thunderhead.h @@ -0,0 +1,18 @@ +// +// Thunderhead.h +// Thunderhead +// +// Copyright © 2020 Thunderhead. All rights reserved. +// + +#import + +//! Project version number for Thunderhead. +FOUNDATION_EXPORT double ThunderheadVersionNumber; + +//! Project version string for Thunderhead. +FOUNDATION_EXPORT const unsigned char ThunderheadVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Info.plist b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Info.plist new file mode 100644 index 0000000..ea5ea21 Binary files /dev/null and b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Info.plist differ diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Modules/module.modulemap b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Modules/module.modulemap new file mode 100644 index 0000000..701e0de --- /dev/null +++ b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Modules/module.modulemap @@ -0,0 +1,19 @@ +framework module Thunderhead { + umbrella header "Thunderhead.h" + + export * + module * { export * } + + link framework "Accelerate" + link framework "CoreLocation" + link framework "Foundation" + link framework "LocalAuthentication" + link framework "CoreGraphics" + link framework "MessageUI" + link framework "SafariServices" + link framework "Security" + link framework "SystemConfiguration" + link framework "UIKit" + link framework "WebKit" + link "sqlite3" +} diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Thunderhead b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Thunderhead new file mode 100644 index 0000000..0b16544 Binary files /dev/null and b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_armv7/Thunderhead.framework/Thunderhead differ diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Headers/One.h b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Headers/One.h new file mode 100644 index 0000000..54fe2c0 --- /dev/null +++ b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Headers/One.h @@ -0,0 +1,315 @@ +// +// One.h +// Thunderhead +// +// Copyright © 2017 Thunderhead. All rights reserved. +// + +#import +#import +#import + +#define ONE_API_DEPRECATED(__VA_ARGS__) __attribute__((deprecated(__VA_ARGS__))); + +/*! + @typedef OneLogLevel + @brief This is an enum which specifies the log level output which will be printed to console. + @field kOneLogLevelNone This log level disables logging to console. + @field kOneLogLevelAll This log level prints everything to console. + @field kOneLogLevelWebService This log level prints everything relating to web services (requests, responses etc.) only. + @field kOneLogLevelFramework This log level prints framework events which occur whilst running the app. + @field kOneLogLevelDebug This log level prints debug logs to console. + */ +typedef NS_ENUM(NSInteger, OneLogLevel) { + kOneLogLevelNone NS_SWIFT_NAME(None), + kOneLogLevelAll NS_SWIFT_NAME(All), + kOneLogLevelWebService NS_SWIFT_NAME(WebService), + kOneLogLevelFramework NS_SWIFT_NAME(Framework), + kOneLogLevelDebug NS_SWIFT_NAME(Debug) +}; + +/*! + @typedef OneTheme + @brief This is an enum which specifies the theme used in design time. + @field OneThemeDefault Default theme in design time. + @field OneThemeInteractionStudio Interaction Studio theme in design time. + */ +typedef NS_ENUM(NSInteger, OneTheme) { + OneThemeDefault NS_SWIFT_NAME(Default), + OneThemeInteractionStudio NS_SWIFT_NAME(InteractionStudio) +}; + +/*! + @typedef OneOpt + @brief This is an enum which specifies the type used when opting in/out. + @field Out Configure Thunderhead SDK to opt out of all tracking, keychain tid storage, pasteboard tid storage, and/or city/country level tracking. + @field In Configure Thunderhead SDK to opt in for all tracking, keychain tid storage, pasteboard tid storage, and/or city/country level tracking. +*/ +typedef NS_OPTIONS(NSUInteger, OneOpt) { + Out NS_SWIFT_NAME(out), + In NS_SWIFT_NAME(in) +}; + +/*! + @typedef OneOptOptions + @brief This is an enum which specifies the configurations used in design time. + @field AllTracking Opt out/in from all tracking. + @field KeychainTidStorage Opt out/in from keychain Tid storage. + @field PasteboardTidStorage Opt out/in from pasteboard Tid storage. + @field CityCountryDetection Opt out/in from city/country level tracking. +*/ +typedef NS_OPTIONS(NSUInteger, OneOptOptions) { + AllTracking NS_SWIFT_NAME(allTracking) = 1, + KeychainTidStorage NS_SWIFT_NAME(keychainTidStorage) = 1 << 1, + PasteboardTidStorage NS_SWIFT_NAME(pasteboardTidStorage) = 1 << 2, + CityCountryDetection NS_SWIFT_NAME(cityCountryDetection) = 1 << 3, +}; + +/*! + @brief This delegate can be used to retrieve interaction responses from automatically triggered interactions. + @discussion Using this delegate is optional. See the Thunderhead SDK for iOS integration document for further details. + */ +@protocol OneInteractionResponseDelegate + +@property (nonatomic, copy) NSString *oneInteractionPath; + +- (void)interaction:(NSString *)interactionPath didReceiveResponse:(NSDictionary *)response NS_SWIFT_NAME(interaction(_:didReceiveResponse:)); + +@end + + +@interface One : NSObject + +/*! + @brief Initializes the framework. + @param siteKey The ONE Engagement Hub space site key. + @param touchPointURI The touchpoint URI path only without the protocol idetifier. + @param apiKey The ONE Engagement Hub space API key. + @param sharedSecret The ONE Engagement Hub space shared secret key. + @param userId A User ID which has access to the current touchpoint. It is recommended to use an api user: api@. + @param adminMode Define whether the framework is initialized in Admin or User mode. Set YES to initialize in Admin mode. Otherwise set NO to initialize in User mode. + @param hostName The ONE Engagement Hub server instance your space is hosted on. If you specify the host name without http or https, https will be used. + @discussion Call the method in app delegate's didFinishLaunchingWithOptions. + */ ++ (void)startSessionWithSK:(NSString *)siteKey uri:(NSString *)touchPointURI apiKey:(NSString *)apiKey sharedSecret:(NSString *)sharedSecret userId:(NSString *)userId adminMode:(BOOL)adminMode hostName:(NSString *)hostName NS_SWIFT_NAME(startSessionWithSK(_:uri:apiKey:sharedSecret:userId:adminMode:hostName:)); + +/*! + @brief Sends touchpoint properties to ONE via a PUT request for the interaction '/' (base touchpoint) and/or '/' with '*' (wildcard). + @param properties A dictionary of properties. Keys and values should be NSString objects. + */ ++ (void)sendBaseTouchpointProperties:(NSDictionary *)properties NS_SWIFT_NAME(sendBaseTouchpointProperties(_:)); + +/*! + @brief Sends properties for a given interaction path to ONE via a PUT request. + @param interactionPath An interaction path. + @param properties A dictionary of properties. Keys and values should be NSString objects. + */ ++ (void)sendProperties:(NSDictionary *)properties + forInteractionPath:(NSString *)interactionPath NS_SWIFT_NAME(sendProperties(_:forInteractionPath:)); + +/*! + @brief Sends an interaction request with properties for a given path to ONE via a POST request. + @param properties A dictionary of properties. Keys and values should be NSString objects. + @param interactionPath An interaction path. + @discussion If no properties are provided, an interaction request will be sent without properties. + */ ++ (void)sendInteraction:(NSString *)interactionPath + withProperties:(NSDictionary *)properties NS_SWIFT_NAME(sendInteraction(_:withProperties:)); + +/*! + @brief Sends an interaction request with properties for a given path to ONE via a POST request. + @param properties A dictionary of properties. Keys and values should be NSString objects. + @param interactionPath An interaction path. + @param block A completion block will be executed when the response is received. The processResponse: method can be called inside this block to handle the response object. + @discussion If no properties are provided, an interaction request will be sent without properties. + */ ++ (void)sendInteraction:(NSString *)interactionPath + withProperties:(NSDictionary *)properties + andBlock:(void(^)(NSDictionary *response, NSError *error))block NS_SWIFT_NAME(sendInteraction(_:withProperties:andBlock:)); + +/*! + @brief Sends an interaction request for a given path to ONE via a POST request. + @param interactionPath An interaction path. + */ ++ (void)sendInteraction:(NSString *)interactionPath NS_SWIFT_NAME(sendInteraction(_:)); + +/*! + @brief Sends an interaction request for a given path to ONE via a POST request. + @param interactionPath An interaction path. + @param block A completion block will be executed when the response is received. The processResponse: method can be called inside this block to handle the response object. + */ ++ (void)sendInteraction:(NSString *)interactionPath + withBlock:(void(^)(NSDictionary *response, NSError *error))block NS_SWIFT_NAME(sendInteraction(_:withBlock:)); + +/*! + @brief Sends a response code for a given interaction path via a PUT request. + @param responseCode A response code. + @param interactionPath An interaction path. + */ ++ (void)sendResponseCode:(NSString *)responseCode + forInteractionPath:(NSString *)interactionPath NS_SWIFT_NAME(sendResponseCode(_:forInteractionPath:)); + +/*! + @brief Retrieves a structure data from ONE for a given structure name. + @param structureName A structure name. + @param block A completion block containing the structure. + */ ++ (void)getStructureData:(NSString *)structureName + withBlock:(void(^)(NSDictionary *response, NSError *error))block NS_SWIFT_NAME(getStructureData(_:withBlock:)); + +/*! + @brief Sends an '/one-click' interaction call to ONE passing the link URL, host, path and parameters as properties to enable link attribution tracking. + @param link A NSURL instance. + */ ++ (void)sendInteractionForOutboundLink:(NSURL *)link NS_SWIFT_NAME(sendInteractionForOutboundLink(_:)); + +/** + * Disables automatic interaction detection. + * + * @param disable YES, if automatic interaction detection should be disabled, + * and NO otherwise. + */ ++ (void)disableAutomaticInteractionDetection:(BOOL)disable NS_SWIFT_NAME(disableAutomaticInteractionDetection(_:)); + +/** + * Disables automatic outbound link tracking. + * + * @param disable YES, if automatic outbound link tracking should be disabled, + * and NO otherwise. + */ ++ (void)disableAutomaticOutboundLinkTracking:(BOOL)disable NS_SWIFT_NAME(disableAutomaticOutboundLinkTracking(_:)); + +/*! + @brief Erases the user profile from the app user preferences. + */ ++ (void)clearUserProfile NS_SWIFT_NAME(clearUserProfile()); + +/*! + @brief Returns the current framework version. + */ ++ (NSString *)frameworkVersion NS_SWIFT_NAME(frameworkVersion()); + +/*! + @brief Sets the framework's log level. + @param logValue Log level. Possible values are kOneLogLevelNone, kOneLogLevelAll, kOneLogLevelWebService, kOneLogLevelFramework. + @discussion Set specific log level to see the framework outputs in the debug panel. By default, the log level is set to kOneLogLevelNone. + */ ++ (void)setLogLevel:(OneLogLevel)logValue NS_SWIFT_NAME(setLogLevel(_:)); + +/*! + @brief Sends the location object's latitude, longitude, horizontal accuracy and timestamp. + @param location A CLLocation object. + */ ++ (void)updateLocation:(CLLocation *)location NS_SWIFT_NAME(updateLocation(_:)); + +/*! + @brief Parses and sends URL parameters of a given URL to ONE + @param url A NSURL object. + */ ++ (void)handleURL:(NSURL *)url NS_SWIFT_NAME(handleURL(_:)); + +/*! + @brief Returns the ONE tid. + */ ++ (NSString *)getTid NS_SWIFT_NAME(getTid()); + +/*! + @brief Enables or disables automatic identity transfer for incoming and outgoing links. + @param disable Set YES to disable automatic identity transfer and NO otherwise. + @discussion Enabled by default. + */ ++ (void)disableIdentityTransfer:(BOOL)disable NS_SWIFT_NAME(disableIdentityTransfer(_:)); + +/*! + @brief Appends the ONE tid as parameter to a given URL. + @param url A NSURL object. + @return A NSURL object with the ONE tid. + */ ++ (NSURL *)getURLWithOneTid:(NSURL *)url NS_SWIFT_NAME(getURLWithOneTid(_:)); + +/*! + @brief Allows the given links to participate in identity transfer. + @param links A NSArray object containg NSURL or NSString objects. + @discussion The given links can be NSURL objects or NSString objects representing URL patterns. NSString objects can include wildcard characters. + */ ++ (void)whitelistIdentityTransferLinks:(NSArray *)links; + +/*! + @brief Disallows the given links to participate in identity transfer. + @param links A NSArray object containg NSURL or NSString objects. + @discussion The given links can be NSURL objects or NSString objects representing URL patterns. NSString objects can include wildcard characters. + */ ++ (void)blacklistIdentityTransferLinks:(NSArray *)links; + +/*! + @brief Synchronizes the app's customer identity with their identity in Mobile Safari. + */ ++ (void)identitySync NS_SWIFT_NAME(identitySync()); + +/*! + @brief Synchronizes the app's customer identity with their identity from a given URL. + @param url A NSURL object. + */ ++ (void)identitySyncWithURL:(NSURL *)url NS_SWIFT_NAME(identitySyncWithURL(_:)); + +/*! + @brief Handles a response received from ONE. All tracking and/or capture points will be parsed by the framework as usual. All optimization points, known by the framework, will be processed/displayed. + @param response A NSDictionary instance. + */ ++ (void)processResponse:(NSDictionary *)response NS_SWIFT_NAME(processResponse(_:)); + +/*! + @brief Register a given object to receive a response for an automatically triggered interaction call. + @param delegate An object conforming to OneInteractionResponseDelegate protocol. + @discussion If the object is deallocated, it will be automatically unregistered. If you want to unregister the object and use it for other needs, you can call removeInteractionResponseDelegate: method. + */ ++ (void)addInteractionResponseDelegate:(id )delegate NS_SWIFT_NAME(addInteractionResponseDelegate(_:)); + +/*! + @brief Removes a given object from receiving a response for an automatically triggered interaction call. + @param delegate An object you added by using addInteractionResponseDelegate: method. + */ ++ (void)removeInteractionResponseDelegate:(id)delegate NS_SWIFT_NAME(removeInteractionResponseDelegate(_:)); + +/*! + @brief Configure Thunderhead SDK to opt in/out from all interactions. + @param optOut YES, if Thunderhead SDK should be configured to opt out from all interactions or NO otherwise. + */ ++ (void)optOut:(BOOL)optOut NS_SWIFT_NAME(opt(out:)) ONE_API_DEPRECATED("Use Thunderhead Framework's +[One opt:forOptions:]"); + +/*! + @brief Configure Thunderhead SDK to opt out/in from all tracking, or keychain tid storage, or pasteboard tid storage and/or city/country level tracking. By default, the Thunderhead SDK is opted in for all settings. + @param oneOpt A OneOpt enum that determines if the configurations are opted in or out. For a list of possible values, see the constants for the OneOpt type. + @param options An integer bit mask that determines which configurations to opt out/in. For a list of possible values, see the constants for the OneOptOut type. +*/ ++ (void)opt:(OneOpt)oneOpt forOptions:(OneOptOptions)options NS_SWIFT_NAME(opt(_:forOptions:)); + +/*! + @brief Sets the framework's UI theme. + @param theme A OneTheme enum. For a list of possible values, see the constants for the OneTheme type. + @discussion Set specific themes to update the framework's UI in design time. By default, the theme is set to kOneThemeDefault. + */ ++ (void)setTheme:(OneTheme)theme NS_SWIFT_NAME(setTheme(_:)); + +@end + +/////////////////////////////////////////////////////////////////////////////////////////// +#pragma mark - Interaction ID +/////////////////////////////////////////////////////////////////////////////////////////// + +@interface UIViewController (OneInteracting) + +/*! + @property oneInteractionPath + @brief An interaction path. + */ +@property (nonatomic, copy) NSString *oneInteractionPath; + +/*! + @property excludeInteractionPath + @brief Excludes an interaction from being recognized by the framework + @discussion Set it to YES to exclude the interaction from processing. Default is NO. + */ +@property (nonatomic, assign) BOOL excludeInteractionPath; + +@end diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Headers/Thunderhead.h b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Headers/Thunderhead.h new file mode 100644 index 0000000..57c4ac1 --- /dev/null +++ b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Headers/Thunderhead.h @@ -0,0 +1,18 @@ +// +// Thunderhead.h +// Thunderhead +// +// Copyright © 2020 Thunderhead. All rights reserved. +// + +#import + +//! Project version number for Thunderhead. +FOUNDATION_EXPORT double ThunderheadVersionNumber; + +//! Project version string for Thunderhead. +FOUNDATION_EXPORT const unsigned char ThunderheadVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Info.plist b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Info.plist new file mode 100644 index 0000000..0aa52e2 Binary files /dev/null and b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Info.plist differ diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Modules/module.modulemap b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Modules/module.modulemap new file mode 100644 index 0000000..701e0de --- /dev/null +++ b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Modules/module.modulemap @@ -0,0 +1,19 @@ +framework module Thunderhead { + umbrella header "Thunderhead.h" + + export * + module * { export * } + + link framework "Accelerate" + link framework "CoreLocation" + link framework "Foundation" + link framework "LocalAuthentication" + link framework "CoreGraphics" + link framework "MessageUI" + link framework "SafariServices" + link framework "Security" + link framework "SystemConfiguration" + link framework "UIKit" + link framework "WebKit" + link "sqlite3" +} diff --git a/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Thunderhead b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Thunderhead new file mode 100644 index 0000000..ec5b2a6 Binary files /dev/null and b/Thunderhead.embeddedframework/Thunderhead.xcframework/ios-arm64_i386_x86_64-simulator/Thunderhead.framework/Thunderhead differ diff --git a/Thunderhead.embeddedframework/ThunderheadBundle.bundle/Info.plist b/Thunderhead.embeddedframework/ThunderheadBundle.bundle/Info.plist index 64efe34..7ea2974 100644 Binary files a/Thunderhead.embeddedframework/ThunderheadBundle.bundle/Info.plist and b/Thunderhead.embeddedframework/ThunderheadBundle.bundle/Info.plist differ diff --git a/Thunderhead.podspec b/Thunderhead.podspec index 0f1abaa..c4c8151 100644 --- a/Thunderhead.podspec +++ b/Thunderhead.podspec @@ -1,18 +1,27 @@ +# +# Be sure to run `pod lib lint Thunderhead.podspec' to ensure this is a +# valid spec before submitting. +# +# Any lines starting with a # are optional, but their use is encouraged +# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html +# + Pod::Spec.new do |s| s.name = "Thunderhead" - s.version = "5.3.3" + s.version = "6.0.0" s.summary = "The Thunderhead SDK for iOS, for integrating the ONE Engagement Hub or Interaction Studio into your iOS application." s.authors = { "Thunderhead ONE" => "onesupport@thunderhead.com"} s.homepage = "https://github.com/thunderheadone/one-sdk-ios" - s.description = "The Thunderhead SDK for iOS, for integrating ONE or Interaction Studio into your iOS application. The SDK supports iOS 8.0 and above." + s.description = "The Thunderhead SDK for iOS, for integrating ONE or Interaction Studio into your iOS application. The SDK supports iOS 9.0 and above." s.license = { :type => "Commercial", :text => "Copyright (c) 2020 Thunderhead One Inc. All rights reserved." } - s.frameworks = ["Accelerate", "CoreLocation", "Foundation", "LocalAuthentication", "CoreGraphics", "MessageUI", "SafariServices", "Security", "SystemConfiguration", "UIKit", "WebKit", "UserNotifications"] + s.frameworks = ["Accelerate", "CoreLocation", "Foundation", "LocalAuthentication", "CoreGraphics", "MessageUI", "SafariServices", "Security", "SystemConfiguration", "UIKit", "WebKit"] s.library = "sqlite3" s.source = { :git => "https://github.com/thunderheadone/one-sdk-ios.git", :tag => "#{s.version}" } - s.platform = :ios, "8.0" - s.preserve_paths = "Thunderhead.embeddedframework/Thunderhead.framework" - s.public_header_files = "Thunderhead.embeddedframework/Thunderhead.framework/Headers/One.h" - s.source_files = "Thunderhead.embeddedframework/Thunderhead.framework/Headers/One.h" - s.resources = "Thunderhead.embeddedframework/ThunderheadBundle.bundle" - s.vendored_frameworks = "Thunderhead.embeddedframework/Thunderhead.framework" + s.platform = :ios, "9.0" + s.default_subspec = 'Core' + s.subspec 'Core' do |core| + core.preserve_paths = 'Thunderhead.embeddedframework/Thunderhead.xcframework' + core.vendored_frameworks = 'Thunderhead.embeddedframework/Thunderhead.xcframework' + core.resources = 'Thunderhead.embeddedframework/ThunderheadBundle.bundle' + end end diff --git a/images/SPM/ThunderheadAddBundleResource.gif b/images/SPM/ThunderheadAddBundleResource.gif new file mode 100644 index 0000000..3f81088 Binary files /dev/null and b/images/SPM/ThunderheadAddBundleResource.gif differ diff --git a/images/SPM/ThunderheadAddPackageURL.png b/images/SPM/ThunderheadAddPackageURL.png new file mode 100644 index 0000000..f05b499 Binary files /dev/null and b/images/SPM/ThunderheadAddPackageURL.png differ diff --git a/images/SPM/ThunderheadChoosePackage.png b/images/SPM/ThunderheadChoosePackage.png new file mode 100644 index 0000000..72c7578 Binary files /dev/null and b/images/SPM/ThunderheadChoosePackage.png differ diff --git a/images/SPM/ThunderheadFetchPackage.png b/images/SPM/ThunderheadFetchPackage.png new file mode 100644 index 0000000..851c967 Binary files /dev/null and b/images/SPM/ThunderheadFetchPackage.png differ diff --git a/images/SPM/ThunderheadSelectTarget.png b/images/SPM/ThunderheadSelectTarget.png new file mode 100644 index 0000000..835f570 Binary files /dev/null and b/images/SPM/ThunderheadSelectTarget.png differ diff --git a/images/ThunderheadConfigInfoPlistEntry.png b/images/ThunderheadConfigInfoPlistEntry.png index 2dc09ce..8dce32f 100644 Binary files a/images/ThunderheadConfigInfoPlistEntry.png and b/images/ThunderheadConfigInfoPlistEntry.png differ diff --git a/images/ThunderheadOtherLinkerFlag.png b/images/ThunderheadOtherLinkerFlag.png new file mode 100644 index 0000000..76f95a6 Binary files /dev/null and b/images/ThunderheadOtherLinkerFlag.png differ diff --git a/images/ThunderheadUnexpectedMachOViaSPM.png b/images/ThunderheadUnexpectedMachOViaSPM.png new file mode 100644 index 0000000..f462181 Binary files /dev/null and b/images/ThunderheadUnexpectedMachOViaSPM.png differ diff --git a/migration-guides/README.md b/migration-guides/README.md new file mode 100644 index 0000000..2e3ed7f --- /dev/null +++ b/migration-guides/README.md @@ -0,0 +1,2 @@ +# Thunderhead iOS SDK Migration Guides +* [SDK 5.x.x to 6.0.0](THUNDERHEAD-6.0.0-MIGRATION-GUIDE.md) \ No newline at end of file diff --git a/migration-guides/THUNDERHEAD-6.0.0-MIGRATION-GUIDE.md b/migration-guides/THUNDERHEAD-6.0.0-MIGRATION-GUIDE.md new file mode 100644 index 0000000..9f9672f --- /dev/null +++ b/migration-guides/THUNDERHEAD-6.0.0-MIGRATION-GUIDE.md @@ -0,0 +1,27 @@ +# Thunderhead iOS SDK Migration Guide + +## Thunderhead SDK 5.* to 6.* + +Thunderhead SDK 6.+ is a compatibility release for iOS 14 support. It adds a number of new features and drops support for iOS 8. + +### XCFramework Integration + +Thunderhead SDK 6.+ for iOS is bundled as .xcframework file (XCFramework) instead of as .framework file. If you’re using the manual integration, you need to remove the old framework from the Frameworks, Libraries, and Embedded Content section of your target and add the XCFramework instead. Also, you need to remove the old Bundle from Bundle Resources and add the new Bundle into Bundle Resources. + +![Thunderhead Other Linker Flag](images/6.0.0/ThunderheadXCFrameworkIntegration.png) + + +### Push Notifications + +Support for push notifications from Thunderhead ONE or Salesforce Interaction Studio has been removed starting with Thunderhead SDK 6.0.0. If you're using any of the following ONE API's, you need to remove them from your codebase when you are integrating Thunderhead SDK 6.+. + + + + +Removed `enablePushNotifications` + +Removed `getPushToken` + +Removed `sendPushToken` diff --git a/migration-guides/images/6.0.0/ThunderheadXCFrameworkIntegration.png b/migration-guides/images/6.0.0/ThunderheadXCFrameworkIntegration.png new file mode 100644 index 0000000..1f5333f Binary files /dev/null and b/migration-guides/images/6.0.0/ThunderheadXCFrameworkIntegration.png differ