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

Commit

Permalink
Merge pull request #74 from thunderheadone/release/7.1.0
Browse files Browse the repository at this point in the history
Update from release/7.1.0
  • Loading branch information
th-anguyen authored Aug 19, 2021
2 parents cfe2da0 + b806078 commit f84a337
Show file tree
Hide file tree
Showing 13 changed files with 158 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### Version 7.1.0
* [NEW] Added ability to get the current SDK configuration. For more info, see [our readme](https://github.com/thunderheadone/one-sdk-ios#get-current-configuration).

#### Version 7.0.0
* [BREAKING] Added support for using the Thunderhead SDK with Xcode 12.5. If you are using an older version of Xcode, you will only be able to archive your app with bitcode disabled.
* [BREAKING] JSON Assets no longer contain HTML encoded entities and the SDK no longer attempts to remove HTML encoded entities. If you still require the old encoding to be returned, please reach out to our [support team](https://github.com/thunderheadone/one-sdk-ios#thunderhead-one-support).
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
* [Send a location object](#send-a-location-object)
* [Get a structure data](#get-a-structure-data)
* [Get Tid](#get-tid)
* [Get current configuration](#get-current-configuration)
* [Access debug information](#access-debug-information)
* [Identify the framework version](#identify-the-framework-version)
* [Clear the user profile](#clear-the-user-profile)
Expand Down Expand Up @@ -149,7 +150,7 @@ Specify the *Thunderhead SDK* in your podfile.
```txt
# Thunderhead SDK
target :YourTargetName do
pod 'Thunderhead', '~> 7.0.0'
pod 'Thunderhead', '~> 7.1.0'
end
```

Expand Down Expand Up @@ -1213,6 +1214,31 @@ Objective-C:
- Retrieving the current `tid` can be useful if you want to monitor the current user in Thunderhead ONE or Salesforce Interaction Studio.
- The tid can also be used if you need to pass the identity of the current user to another system which sends data to Thunderhead ONE or Salesforce Interaction Studio.

### Get current configuration

To get the current configuration of the SDK, call:

Swift:
```swift
let currentConfiguration = OneConfiguration.currentConfiguration()
let siteKey = currentConfiguration?.siteKey

// To access configuration properties, you can also call:
let siteKey = OneConfiguration.shared().siteKey
```

Objective-C:
```objective-c
OneConfiguration *currentConfiguration = [OneConfiguration currentConfiguration];
NSString *siteKey = currentConfiguration.siteKey;

// To access configuration properties, you can also call:
NSString *siteKey = [OneConfiguration shared].siteKey;
```

*Note:*
- Retrieving the current configuration can be useful to validate your setup, especially if you have multiple configurations in an app.

### Access debug information

The Thunderhead SDK for iOS provides 5 distinct debugging levels, that can be enabled in the `didFinishLaunchingWithOptions` method of your project's AppDelegate, as shown below:
Expand Down
14 changes: 7 additions & 7 deletions Thunderhead.embeddedframework/Thunderhead.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>Thunderhead.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>Thunderhead.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//
// OneConfiguration.h
// Thunderhead
//
// Copyright © 2021 Thunderhead. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface OneConfiguration : NSObject

- (instancetype)init NS_UNAVAILABLE;

/*!
@brief Returns a singleton class.
*/
+ (instancetype)shared;

/*!
@brief Returns the current configuration.
*/
+ (OneConfiguration *)currentConfiguration NS_SWIFT_NAME(currentConfiguration());

/**
* The ONE Engagement Hub space site key.
*/
@property (nonatomic, copy) NSString *siteKey;

/**
* The ONE Engagement Hub space Touchpoint URI.
*/
@property (nonatomic, copy) NSString *touchpointURI;

/**
* The ONE Engagement Hub space API key.
*/
@property (nonatomic, copy) NSString *apiKey;

/**
* The ONE Engagement Hub space shared secret key.
*/
@property (nonatomic, copy) NSString *sharedSecret;

/**
* The ONE Engagement Hub space userId.
*/
@property (nonatomic, copy) NSString *userId;

/**
* Returns whether the framework is initialized in Admin or User mode. Returns YES if in Admin mode. Otherwise returns NO if in User mode.
*/
@property (nonatomic, getter=isAdminMode) BOOL adminMode;

/**
* The ONE Engagement Hub space host name.
*/
@property (nonatomic, copy) NSString *hostName;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ FOUNDATION_EXPORT const unsigned char ThunderheadVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <Thunderhead/PublicHeader.h>

#import <Thunderhead/One.h>
#import <Thunderhead/OneConfiguration.h>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//
// OneConfiguration.h
// Thunderhead
//
// Copyright © 2021 Thunderhead. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface OneConfiguration : NSObject

- (instancetype)init NS_UNAVAILABLE;

/*!
@brief Returns a singleton class.
*/
+ (instancetype)shared;

/*!
@brief Returns the current configuration.
*/
+ (OneConfiguration *)currentConfiguration NS_SWIFT_NAME(currentConfiguration());

/**
* The ONE Engagement Hub space site key.
*/
@property (nonatomic, copy) NSString *siteKey;

/**
* The ONE Engagement Hub space Touchpoint URI.
*/
@property (nonatomic, copy) NSString *touchpointURI;

/**
* The ONE Engagement Hub space API key.
*/
@property (nonatomic, copy) NSString *apiKey;

/**
* The ONE Engagement Hub space shared secret key.
*/
@property (nonatomic, copy) NSString *sharedSecret;

/**
* The ONE Engagement Hub space userId.
*/
@property (nonatomic, copy) NSString *userId;

/**
* Returns whether the framework is initialized in Admin or User mode. Returns YES if in Admin mode. Otherwise returns NO if in User mode.
*/
@property (nonatomic, getter=isAdminMode) BOOL adminMode;

/**
* The ONE Engagement Hub space host name.
*/
@property (nonatomic, copy) NSString *hostName;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ FOUNDATION_EXPORT const unsigned char ThunderheadVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <Thunderhead/PublicHeader.h>

#import <Thunderhead/One.h>
#import <Thunderhead/OneConfiguration.h>
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Thunderhead.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "Thunderhead"
s.version = "7.0.0"
s.version = "7.1.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"
Expand Down

0 comments on commit f84a337

Please sign in to comment.