Skip to content

Commit

Permalink
Merge pull request #341 from bvengineering/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rahulbawane authored Sep 19, 2024
2 parents 1611404 + 5db0b86 commit 759cc54
Show file tree
Hide file tree
Showing 63 changed files with 871 additions and 424 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/sonarscanCI.yml

This file was deleted.

2 changes: 1 addition & 1 deletion BVSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = "BVSDK"
s.version = '8.11.0'
s.version = '8.12.1'
s.homepage = 'https://developer.bazaarvoice.com/'
s.license = { :type => 'Commercial', :text => 'See https://developer.bazaarvoice.com/API_Terms_of_Use' }
s.author = { 'Bazaarvoice' => 'support@bazaarvoice.com' }
Expand Down
56 changes: 44 additions & 12 deletions BVSDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion BVSDK/BVCommon/BVAuthenticatedUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

/// user information can be included in the userAuthString - sent with:
/// [[BVSDKManager sharedManager] setUserWithAuthString:myAuthString];
/// [[BVSDKManager sharedManager] setUAS:myAuthString];

#define BVUSER_ID @"userid"
#define BVUSER_AGE @"age";
Expand Down
2 changes: 1 addition & 1 deletion BVSDK/BVCommon/BVSDKConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define BVSDKConstants_h

/// Provides the master version of the SDK.
#define BV_SDK_VERSION @"8.11.0"
#define BV_SDK_VERSION @"8.12.1"

/// Conversation SDK Version
#define SDK_HEADER_NAME @"X-UA-BV-SDK"
Expand Down
4 changes: 2 additions & 2 deletions BVSDK/BVCommon/BVSDKManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ typedef NS_ENUM(NSUInteger, BVConfigurationType) {
/// minimum timeout of 240 seconds for post requests.
@property(nonatomic, assign) float timeout;

/// The authenticed user retrieved after calling setUserWithAuthString. The
/// The authenticed user retrieved after calling setUAS. The
/// model may be empty until the BV user profile has been reconcilled.
@property(nonnull, strong, readonly) BVAuthenticatedUser *bvUser;

Expand Down Expand Up @@ -99,7 +99,7 @@ typedef NS_ENUM(NSUInteger, BVConfigurationType) {
@param userAuthString The UAS that was generated server-side for
Bazaarvoice.
*/
- (void)setUserWithAuthString:(nonnull NSString *)userAuthString;
- (void)setUAS:(nonnull NSString *)userAuthString;

/**
Generate DFP (Doubleclick For Publsher's) compatible custom targeting.
Expand Down
2 changes: 1 addition & 1 deletion BVSDK/BVCommon/BVSDKManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ - (void)setLogLevel:(BVLogLevel)logLevel {

#pragma mark - user

- (void)setUserWithAuthString:(NSString *)userAuthString {
- (void)setUAS:(NSString *)userAuthString {
if (userAuthString && 0 < userAuthString.length) {
[self setUserId:userAuthString];
} else {
Expand Down
1 change: 1 addition & 0 deletions BVSDK/BVCommon/Private/BVMultiPart+NSURLRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

+ (nullable NSString *)
generateBoundaryWithData:(nonnull NSMutableData *)bodyData
andFileName:(nonnull NSString *)fileName
andContentDictionary:(nonnull NSDictionary *)contentDictionary;

@end
11 changes: 8 additions & 3 deletions BVSDK/BVCommon/Private/BVMultiPart+NSURLRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
[NSString \
stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", \
(X)]
#define BVFORM_NSSTRING_FOR_NAME(X) \
[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"; ", \
(X)]
#define BVFORM_NSSTRING_FOR_FILENAME(X) \
[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"; " \
@"filename=\"upload.jpg\"\r\n", \
[NSString stringWithFormat:@"filename=\"%@\"\r\n", \
(X)]
#define BVFORM_NSSTRING_FOR_FILE_CONTENT_TYPE \
@"Content-Type: application/octet-stream\r\n\r\n"
Expand All @@ -34,6 +36,7 @@ @implementation NSURLRequest (MultiPart)

+ (nullable NSString *)
generateBoundaryWithData:(nonnull NSMutableData *)bodyData
andFileName:(nonnull NSString *) fileName
andContentDictionary:(nonnull NSDictionary *)contentDictionary {
NSString *boundary = nil;
NSMutableArray<NSData *> *contentData = nil;
Expand Down Expand Up @@ -85,7 +88,9 @@ @implementation NSURLRequest (MultiPart)

if (__IS_KIND_OF(obj, NSData)) {
NSData *value = (NSData *)obj;
[data appendData:[BVFORM_NSSTRING_FOR_FILENAME(keyString)
[data appendData:[BVFORM_NSSTRING_FOR_NAME(keyString)
dataUsingEncoding:NSUTF8StringEncoding]];
[data appendData:[BVFORM_NSSTRING_FOR_FILENAME(fileName)
dataUsingEncoding:NSUTF8StringEncoding]];
[data appendData:[BVFORM_NSSTRING_FOR_FILE_CONTENT_TYPE
dataUsingEncoding:NSUTF8StringEncoding]];
Expand Down
8 changes: 8 additions & 0 deletions BVSDK/BVConversations/Submission/BVBaseUGCSubmission.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,12 @@
- (void)addPhoto:(nonnull UIImage *)image
withPhotoCaption:(nullable NSString *)photoCaption;

/// Add a user-provided video.
///
/// @param videoPath The user-provded video.
/// @param videoCaption The user-provided caption for the video.
- (void)addVideo:(nonnull NSString *)videoPath
withVideoCaption:(nullable NSString *)videoCaption
uploadVideo:(BOOL)uploadVideo;

@end
Loading

0 comments on commit 759cc54

Please sign in to comment.