Skip to content

Commit

Permalink
chore(release): pulling release/1.20.0 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Pallab Maiti authored Sep 19, 2023
2 parents 4766914 + 6740c0c commit 9d18979
Show file tree
Hide file tree
Showing 62 changed files with 809 additions and 263,973 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-quality-checks-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install xcpretty
run: gem install xcpretty
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install xcpretty
run: gem install xcpretty
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check PR title
uses: rudderlabs/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/deploy-cocoapods-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: startsWith(github.ref, 'refs/heads/beta-release/')
steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Cocoapods
run: gem install cocoapods
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-cocoapods-manual-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: startsWith(github.ref, 'refs/heads/master-v2')
steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Cocoapods
run: gem install cocoapods
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-cocoapods-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: startsWith(github.ref, 'refs/heads/master')
steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Cocoapods
run: gem install cocoapods
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-cocoapods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: macOS-latest
steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Cocoapods
run: gem install cocoapods
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-new-beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: startsWith(github.ref, 'refs/heads/fix/') || startsWith(github.ref, 'refs/heads/feat/')
steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-new-release-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: startsWith(github.ref, 'refs/heads/develop-v2') || startsWith(github.ref, 'refs/heads/hotfix-v2/')
steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/hotfix/')
steps:
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-new-release-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
echo "release_version=$VERSION" >> $GITHUB_OUTPUT
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
echo "release_version=$VERSION" >> $GITHUB_OUTPUT
- name: Checkout source branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install xcpretty
run: gem install xcpretty
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.20.0](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.19.2...v1.20.0) (2023-09-19)


### Features

* error reporter ([#380](https://github.com/rudderlabs/rudder-sdk-ios/issues/380)) ([5683ccb](https://github.com/rudderlabs/rudder-sdk-ios/commit/5683ccb42eb9d5445efa69ad8cf1e52ca8dad195))
* get session_id ([#385](https://github.com/rudderlabs/rudder-sdk-ios/issues/385)) ([7a590f0](https://github.com/rudderlabs/rudder-sdk-ios/commit/7a590f05fd50e48155e0e2bc50ef44e491ca9475))
* revamped db encryption ([#388](https://github.com/rudderlabs/rudder-sdk-ios/issues/388)) ([0efaffa](https://github.com/rudderlabs/rudder-sdk-ios/commit/0efaffa750656eff6f589184e2fc6052d134ed50))


### Bug Fixes

* db encryption improvements ([#381](https://github.com/rudderlabs/rudder-sdk-ios/issues/381)) ([82504dd](https://github.com/rudderlabs/rudder-sdk-ios/commit/82504ddc6f56a7009d94bd4a28e672bd63f10ebc))
* ensure batch array in the request payload is never empty ([#387](https://github.com/rudderlabs/rudder-sdk-ios/issues/387)) ([7e7a92a](https://github.com/rudderlabs/rudder-sdk-ios/commit/7e7a92a4f362dd757be4ca033af863f1aaa1c0bf))
* SPM build error due to use of unsafe flags ([#384](https://github.com/rudderlabs/rudder-sdk-ios/issues/384)) ([d5edb2e](https://github.com/rudderlabs/rudder-sdk-ios/commit/d5edb2e380483666c66243ad576f7c2a05402697))

### [1.19.2](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.19.1...v1.19.2) (2023-08-28)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
ED0CA6DD2A7D049E00899C1C /* RudderConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = ED0CA6DA2A7D049E00899C1C /* RudderConfig.plist */; };
ED0CA6DE2A7D049E00899C1C /* SampleRudderConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = ED0CA6DB2A7D049E00899C1C /* SampleRudderConfig.plist */; };
ED0CA6DF2A7D049E00899C1C /* RudderConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0CA6DC2A7D049E00899C1C /* RudderConfig.swift */; };
ED7619FF2727E28800B086F4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = ED7619ED2727E28700B086F4 /* InfoPlist.strings */; };
Expand All @@ -24,6 +23,7 @@
ED761A052727E28800B086F4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ED7619FA2727E28800B086F4 /* Images.xcassets */; };
ED761A062727E28800B086F4 /* CustomFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = ED7619FC2727E28800B086F4 /* CustomFactory.m */; };
ED761A072727E28800B086F4 /* _AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = ED7619FD2727E28800B086F4 /* _AppDelegate.m */; };
ED8738CE2AB363A80076D24A /* EncryptedDatabaseProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = ED8738CC2AB363A80076D24A /* EncryptedDatabaseProvider.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -36,7 +36,6 @@
6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
ED0CA6D62A7D048D00899C1C /* RudderSampleAppObjC-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RudderSampleAppObjC-Bridging-Header.h"; sourceTree = "<group>"; };
ED0CA6DA2A7D049E00899C1C /* RudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = RudderConfig.plist; sourceTree = "<group>"; };
ED0CA6DB2A7D049E00899C1C /* SampleRudderConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SampleRudderConfig.plist; sourceTree = "<group>"; };
ED0CA6DC2A7D049E00899C1C /* RudderConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RudderConfig.swift; sourceTree = "<group>"; };
ED3B022F272A67AB000893AA /* RudderSampleAppObjC.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RudderSampleAppObjC.entitlements; sourceTree = "<group>"; };
Expand All @@ -55,6 +54,8 @@
ED7619FB2727E28800B086F4 /* CustomIntegration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomIntegration.h; sourceTree = "<group>"; };
ED7619FC2727E28800B086F4 /* CustomFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomFactory.m; sourceTree = "<group>"; };
ED7619FD2727E28800B086F4 /* _AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _AppDelegate.m; sourceTree = "<group>"; };
ED8738CA2AB363A80076D24A /* EncryptedDatabaseProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EncryptedDatabaseProvider.h; sourceTree = "<group>"; };
ED8738CC2AB363A80076D24A /* EncryptedDatabaseProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EncryptedDatabaseProvider.m; sourceTree = "<group>"; };
F928F8A942558010CC7088BF /* Pods-RudderSampleAppObjC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderSampleAppObjC.debug.xcconfig"; path = "Target Support Files/Pods-RudderSampleAppObjC/Pods-RudderSampleAppObjC.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -118,7 +119,6 @@
ED0CA6D92A7D049E00899C1C /* RudderConfig */ = {
isa = PBXGroup;
children = (
ED0CA6DA2A7D049E00899C1C /* RudderConfig.plist */,
ED0CA6DB2A7D049E00899C1C /* SampleRudderConfig.plist */,
ED0CA6DC2A7D049E00899C1C /* RudderConfig.swift */,
);
Expand All @@ -139,6 +139,8 @@
ED7619FC2727E28800B086F4 /* CustomFactory.m */,
ED7619FB2727E28800B086F4 /* CustomIntegration.h */,
ED7619EF2727E28700B086F4 /* CustomIntegration.m */,
ED8738CA2AB363A80076D24A /* EncryptedDatabaseProvider.h */,
ED8738CC2AB363A80076D24A /* EncryptedDatabaseProvider.m */,
ED7619FA2727E28800B086F4 /* Images.xcassets */,
ED7619ED2727E28700B086F4 /* InfoPlist.strings */,
ED7619F32727E28700B086F4 /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -213,7 +215,6 @@
buildActionMask = 2147483647;
files = (
ED761A012727E28800B086F4 /* LaunchScreen.storyboard in Resources */,
ED0CA6DD2A7D049E00899C1C /* RudderConfig.plist in Resources */,
ED0CA6DE2A7D049E00899C1C /* SampleRudderConfig.plist in Resources */,
ED761A052727E28800B086F4 /* Images.xcassets in Resources */,
ED7619FF2727E28800B086F4 /* InfoPlist.strings in Resources */,
Expand All @@ -232,14 +233,18 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RudderSampleAppObjC/Pods-RudderSampleAppObjC-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/MetricsReporter-iOS12.0/MetricsReporter.framework",
"${BUILT_PRODUCTS_DIR}/RSCrashReporter-iOS12.0/RSCrashReporter.framework",
"${BUILT_PRODUCTS_DIR}/RudderKit-iOS12.0/RudderKit.framework",
"${BUILT_PRODUCTS_DIR}/Rudder-iOS/Rudder.framework",
"${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MetricsReporter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RSCrashReporter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RudderKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rudder.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SQLCipher.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -277,6 +282,7 @@
files = (
ED0CA6DF2A7D049E00899C1C /* RudderConfig.swift in Sources */,
ED761A032727E28800B086F4 /* main.m in Sources */,
ED8738CE2AB363A80076D24A /* EncryptedDatabaseProvider.m in Sources */,
ED761A062727E28800B086F4 /* CustomFactory.m in Sources */,
ED761A002727E28800B086F4 /* CustomIntegration.m in Sources */,
ED761A072727E28800B086F4 /* _AppDelegate.m in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// EncryptedDatabaseProvider.h
// RudderDatabaseEncryption
//
// Created by Pallab Maiti on 14/09/23.
//

#import <Foundation/Foundation.h>
#import <Rudder/Rudder.h>

NS_ASSUME_NONNULL_BEGIN

@interface EncryptedDatabaseProvider : NSObject<RSDatabaseProvider>

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//
// EncryptedDatabaseProvider.m
// RudderDatabaseEncryption
//
// Created by Pallab Maiti on 14/09/23.
//

#import "EncryptedDatabaseProvider.h"
#import "sqlite3.h"

@interface RSEncryptedDatabase : NSObject <RSDatabase>

@end

@implementation RSEncryptedDatabase {
sqlite3 *db;
}

- (int)open_v2:(const char *)filename flags:(int)flags zVfs:(const char *)zVfs {
return sqlite3_open_v2(filename, &db, flags, zVfs);
}


- (int)exec:(const char *)zSql xCallback:(callback)xCallback pArg:(void *)pArg pzErrMsg:(char * _Nullable *)pzErrMsg {
return sqlite3_exec(db, zSql, xCallback, pArg, pzErrMsg);
}

- (int)close {
return sqlite3_close(db);
}

- (int)step:(void *)pStmt {
return sqlite3_step(pStmt);
}

- (int)finalize:(void *)pStmt {
return sqlite3_finalize(pStmt);
}

- (int)prepare_v2:(const char *)zSql nBytes:(int)nBytes ppStmt:(void **)ppStmt pzTail:(const char **)pzTail {
return sqlite3_prepare_v2(db, zSql, nBytes, (sqlite3_stmt **)(ppStmt), pzTail);
}

- (int)column_int:(void *)pStmt i:(int)i {
return sqlite3_column_int(pStmt, i);
}

- (const unsigned char *)column_text:(void *)pStmt i:(int)i {
return sqlite3_column_text(pStmt, i);
}

- (int)key:(const void *)pKey nKey:(int)nKey {
return sqlite3_key(db, pKey, nKey);
}

@end

@implementation EncryptedDatabaseProvider

- (id<RSDatabase>)getDatabase {
return [RSEncryptedDatabase new];
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import <Rudder/Rudder.h>
#import <AdSupport/ASIdentifierManager.h>
#import "RudderSampleAppObjC-Swift.h"

#import "EncryptedDatabaseProvider.h"

static int userCount = 1;
static int eventCount = 1;
Expand All @@ -27,14 +27,17 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
if (path != nil) {
NSURL *url = [NSURL fileURLWithPath:path];
RudderConfig *rudderConfig = [RudderConfig createFrom:url];
NSLog(@"------%@------", NSHomeDirectory());
if (rudderConfig != nil) {
RSConfigBuilder *builder = [[RSConfigBuilder alloc] init];
[builder withLoglevel:RSLogLevelVerbose];
[builder withTrackLifecycleEvens:YES];
[builder withCollectDeviceId:NO];
[builder withRecordScreenViews:YES];
[builder withDataPlaneUrl:rudderConfig.DEV_DATA_PLANE_URL];
[builder withDBEncryption:[[RSDBEncryption alloc] initWithKey:@"test1234" enable:YES]];
[builder withControlPlaneUrl:rudderConfig.DEV_CONTROL_PLANE_URL];
[builder withSleepTimeOut:3000];
[builder withDBEncryption:[[RSDBEncryption alloc] initWithKey:@"test1234" enable:NO databaseProvider:[EncryptedDatabaseProvider new]]];
[RSClient getInstance:rudderConfig.WRITE_KEY config:[builder build]];
}
}
Expand Down
Loading

0 comments on commit 9d18979

Please sign in to comment.