Skip to content

Commit dd6f3c1

Browse files
authored
Fixed opening two intent for MainActivity when clicking on push notification with deep-link. (#92)
* Updated iOS SDK to 22.06.0 * Updated RN SDK and android SDK version to 22.02.1
1 parent 660d0d2 commit dd6f3c1

24 files changed

+217
-153
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 22.02.1
2+
* Fixed opening two intent for MainActivity when clicking on push notification with deep-link.
3+
* Updated underlying android SDK version to 22.02.1
4+
* Updated underlying iOS SDK version to 22.06.0
5+
16
## 22.02.0
27
* Fixed notification trampoline restrictions in Android 12 using reverse activity trampolining implementation.
38
* Updated underlying android SDK version to 22.02.0

CountlyReactNative.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'CountlyReactNative'
3-
s.version = '22.02.0'
3+
s.version = '22.02.1'
44
s.license = {
55
:type => 'COMMUNITY',
66
:text => <<-LICENSE

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ repositories {
4141

4242
dependencies {
4343
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
44-
implementation 'ly.count.android:sdk:22.02.0'
44+
implementation 'ly.count.android:sdk:22.02.1'
4545

4646
// Import the BoM for the Firebase platform
4747
// The BoM version of 28.4.2 is the newest release that will target firebase-messaging version 22

android/src/main/java/ly/count/android/sdk/react/CountlyReactNative.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public String toString(){
7979
public class CountlyReactNative extends ReactContextBaseJavaModule implements LifecycleEventListener {
8080

8181
public static final String TAG = "CountlyRNPlugin";
82-
private String COUNTLY_RN_SDK_VERSION_STRING = "22.02.0";
82+
private String COUNTLY_RN_SDK_VERSION_STRING = "22.02.1";
8383
private String COUNTLY_RN_SDK_NAME = "js-rnb-android";
8484

8585
private static final CountlyConfig config = new CountlyConfig();

example/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rm App.js
1111
curl https://raw.githubusercontent.com/Countly/countly-sdk-react-native-bridge/master/example/App.js --output App.js
1212
curl https://raw.githubusercontent.com/Countly/countly-sdk-react-native-bridge/master/example/Example.js --output Example.js
1313

14-
14+
1515

1616
cd ./ios
1717
pod install

ios/src/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 22.06.0
2+
- Added `CountlyAutoViewTrackingName` protocol for supporting custom view titles with AutoViewTracking
3+
- Added `setNewURLSessionConfiguration:` method to be able change URL session configuraion on the go (thanks @angelix)
4+
- Added ability to save user details on SDK initialization
5+
- Added device ID type to every request being sent
6+
- Fixed missing remote config consent
7+
- Fixed auto view tracking for iOS 13+ PageSheet modal presentations
8+
- Deleted previously deprecated and inoperative methods and config flags
9+
10+
- Other various improvements
11+
- Updated HeaderDocs, internal logs, inline notes and pragma marks
12+
- Updated Countly project settings for Xcode 13.4.1 (13F100)
13+
14+
15+
116
## 21.11.2
217
- Added direct and indirect attribution
318
- Added platform info to default segmentation of push action events

ios/src/Countly-PL.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Countly-PL'
3-
s.version = '21.11.2'
3+
s.version = '22.06.0'
44
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
55
s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.'
66
s.homepage = 'https://github.com/Countly/countly-sdk-ios'

ios/src/Countly.h

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ NS_ASSUME_NONNULL_BEGIN
4040
*/
4141
- (void)setNewHost:(NSString *)newHost;
4242

43+
/**
44+
* Sets a new URL session configuration to be used with all requests.
45+
* @param newURLSessionConfiguration The new URL session configuration
46+
*/
47+
- (void)setNewURLSessionConfiguration:(NSURLSessionConfiguration *)newURLSessionConfiguration;
48+
4349
/**
4450
* Sets a new app key to be used in new requests.
4551
* @discussion Before switching to the new app key, this method suspends Countly and resumes it immediately after.
@@ -50,12 +56,6 @@ NS_ASSUME_NONNULL_BEGIN
5056
*/
5157
- (void)setNewAppKey:(NSString *)newAppKey;
5258

53-
/**
54-
* @c setCustomHeaderFieldValue: method is deprecated. Please use @c URLSessionConfiguration property on @c CountlyConfig instead.
55-
* @discussion Calling this method will have no effect.
56-
*/
57-
- (void)setCustomHeaderFieldValue:(NSString *)customHeaderFieldValue DEPRECATED_MSG_ATTRIBUTE("Use 'URLSessionConfiguration' property on CountlyConfig instead!");
58-
5959
/**
6060
* Flushes request and event queues.
6161
* @discussion Flushes persistently stored request queue and events recorded but not converted to a request so far.
@@ -381,34 +381,6 @@ NS_ASSUME_NONNULL_BEGIN
381381
*/
382382
- (void)recordLocation:(CLLocationCoordinate2D)location city:(NSString * _Nullable)city ISOCountryCode:(NSString * _Nullable)ISOCountryCode IP:(NSString * _Nullable)IP;
383383

384-
/**
385-
* Records user's location info to be used for geo-location based push notifications and advanced user segmentation.
386-
* @discussion By default, Countly Server uses a geo-ip database for acquiring user's location.
387-
* @discussion If the app uses Core Location services and granted permission, a location with better accuracy can be provided using this method.
388-
* @discussion This method overrides @c location property specified on initial configuration, and sends an immediate request.
389-
* @param location User's location with latitude and longitude
390-
*/
391-
- (void)recordLocation:(CLLocationCoordinate2D)location DEPRECATED_MSG_ATTRIBUTE("Use 'recordLocation:city:ISOCountryCode:IP:' method instead!");
392-
393-
/**
394-
* Records user's city and country info to be used for geo-location based push notifications and advanced user segmentation.
395-
* @discussion By default, Countly Server uses a geo-ip database for acquiring user's location.
396-
* @discussion If the app has information about user's city and/or country, these information can be provided using this method.
397-
* @discussion This method overrides @c city and @c ISOCountryCode properties specified on initial configuration, and sends an immediate request.
398-
* @param city User's city
399-
* @param ISOCountryCode User's ISO country code in ISO 3166-1 alpha-2 format
400-
*/
401-
- (void)recordCity:(NSString *)city andISOCountryCode:(NSString *)ISOCountryCode DEPRECATED_MSG_ATTRIBUTE("Use 'recordLocation:city:ISOCountryCode:IP:' method instead!");
402-
403-
/**
404-
* Records user's IP address to be used for geo-location based push notifications and advanced user segmentation.
405-
* @discussion By default, Countly Server uses a geo-ip database for acquiring user's location.
406-
* @discussion If the app needs to explicitly specify the IP address due to network requirements, it can be provided using this method.
407-
* @discussion This method overrides @c IP property specified on initial configuration, and sends an immediate request.
408-
* @param IP User's explicit IP address
409-
*/
410-
- (void)recordIP:(NSString *)IP DEPRECATED_MSG_ATTRIBUTE("Use 'recordLocation:city:ISOCountryCode:IP:' method instead!");
411-
412384
/**
413385
* Disables geo-location based push notifications by clearing all existing location info.
414386
* @discussion Once disabled, geo-location based push notifications can be enabled again by calling @c recordLocation: or @c recordCity:andISOCountryCode: or @c recordIP: method.

ios/src/Countly.m

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ - (void)startWithConfig:(CountlyConfig *)config
111111

112112
CountlyDeviceInfo.sharedInstance.customMetrics = [config.customMetrics cly_truncated:@"Custom metric"];
113113

114+
[Countly.user save];
115+
114116
#if (TARGET_OS_IOS)
115117
CountlyFeedbacks.sharedInstance.message = config.starRatingMessage;
116118
CountlyFeedbacks.sharedInstance.sessionCount = config.starRatingSessionCount;
@@ -205,6 +207,13 @@ - (void)setNewHost:(NSString *)newHost
205207
CountlyConnectionManager.sharedInstance.host = newHost;
206208
}
207209

210+
- (void)setNewURLSessionConfiguration:(NSURLSessionConfiguration *)newURLSessionConfiguration
211+
{
212+
CLY_LOG_I(@"%s %@", __FUNCTION__, newURLSessionConfiguration);
213+
214+
CountlyConnectionManager.sharedInstance.URLSessionConfiguration = newURLSessionConfiguration;
215+
}
216+
208217
- (void)setNewAppKey:(NSString *)newAppKey
209218
{
210219
CLY_LOG_I(@"%s %@", __FUNCTION__, newAppKey);
@@ -224,11 +233,6 @@ - (void)setNewAppKey:(NSString *)newAppKey
224233
[self resume];
225234
}
226235

227-
- (void)setCustomHeaderFieldValue:(NSString *)customHeaderFieldValue
228-
{
229-
CLY_LOG_W(@"setCustomHeaderFieldValue: method is deprecated. Please use `URLSessionConfiguration` property on `CountlyConfig` instead.");
230-
}
231-
232236
- (void)flushQueues
233237
{
234238
CLY_LOG_I(@"%s", __FUNCTION__);
@@ -764,33 +768,6 @@ - (void)recordLocation:(CLLocationCoordinate2D)location city:(NSString * _Nullab
764768
[CountlyLocationManager.sharedInstance recordLocation:location city:city ISOCountryCode:ISOCountryCode IP:IP];
765769
}
766770

767-
- (void)recordLocation:(CLLocationCoordinate2D)location
768-
{
769-
CLY_LOG_W(@"recordLocation: method is deprecated. Please use recordLocation:city:countryCode:IP: method instead.");
770-
771-
[CountlyLocationManager.sharedInstance recordLocation:location city:nil ISOCountryCode:nil IP:nil];
772-
}
773-
774-
- (void)recordCity:(NSString *)city andISOCountryCode:(NSString *)ISOCountryCode
775-
{
776-
CLY_LOG_W(@"recordCity:andISOCountryCode: method is deprecated. Please use recordLocation:city:countryCode:IP: method instead.");
777-
778-
if (!city.length && !ISOCountryCode.length)
779-
return;
780-
781-
[CountlyLocationManager.sharedInstance recordLocation:kCLLocationCoordinate2DInvalid city:city ISOCountryCode:ISOCountryCode IP:nil];
782-
}
783-
784-
- (void)recordIP:(NSString *)IP
785-
{
786-
CLY_LOG_W(@"recordIP: method is deprecated. Please use recordLocation:city:countryCode:IP: method instead.");
787-
788-
if (!IP.length)
789-
return;
790-
791-
[CountlyLocationManager.sharedInstance recordLocation:kCLLocationCoordinate2DInvalid city:nil ISOCountryCode:nil IP:IP];
792-
}
793-
794771
- (void)disableLocationInfo
795772
{
796773
CLY_LOG_I(@"%s", __FUNCTION__);

ios/src/Countly.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Countly'
3-
s.version = '21.11.2'
3+
s.version = '22.06.0'
44
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
55
s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.'
66
s.homepage = 'https://github.com/Countly/countly-sdk-ios'

0 commit comments

Comments
 (0)