diff --git a/.github/workflows/issue-autorespond-and-close.yml b/.github/workflows/issue-autorespond-and-close.yml new file mode 100644 index 000000000..f1a6baa64 --- /dev/null +++ b/.github/workflows/issue-autorespond-and-close.yml @@ -0,0 +1,14 @@ +name: Auto respond and close issue + +on: + issues: + types: + - opened + +jobs: + auto-respond-and-close-issue: + uses: mparticle/mparticle-workflows/.github/workflows/auto-respond-close-issue.yml@main + with: + issue_number: ${{ github.event.issue.number }} + repository: ${{ github.repository }} + user_login: ${{ github.event.issue.user.login }} \ No newline at end of file diff --git a/README.md b/README.md index 32dabcbc0..5382c835d 100644 --- a/README.md +++ b/README.md @@ -100,37 +100,38 @@ Kit | CocoaPods | Carthage | Swift Package Manager | ----|:---------:|:-------:|:-------:| [Adjust](https://github.com/mparticle-integrations/mparticle-apple-integration-adjust) | ✓ | ✓ | ✓ [Appboy](https://github.com/mparticle-integrations/mparticle-apple-integration-appboy) | ✓ | ✓ | ✓ -[Adobe](https://github.com/mparticle-integrations/mparticle-apple-integration-adobe) | ✓ | ✓ | +[Adobe](https://github.com/mparticle-integrations/mparticle-apple-integration-adobe) | ✓ | ✓ | ✓ [AppsFlyer](https://github.com/mparticle-integrations/mparticle-apple-integration-appsflyer) | ✓ | ✓ | ✓ [Appsee](https://github.com/mparticle-integrations/mparticle-apple-integration-appsee) | ✓ | | -[Apptentive](https://github.com/mparticle-integrations/mparticle-apple-integration-apptentive) | ✓ | ✓ | -[Apptimize](https://github.com/mparticle-integrations/mparticle-apple-integration-apptimize) | ✓ | | +[Apptentive](https://github.com/mparticle-integrations/mparticle-apple-integration-apptentive) | ✓ | ✓ | ✓ +[Apptimize](https://github.com/mparticle-integrations/mparticle-apple-integration-apptimize) | ✓ | ✓ | ✓ [Apteligent](https://github.com/mparticle-integrations/mparticle-apple-integration-apteligent) | ✓ | | -[Blueshift](https://github.com/blueshift-labs/mparticle-apple-integration-blueshift) | ✓ | | -[Branch Metrics](https://github.com/mparticle-integrations/mparticle-apple-integration-branchmetrics) | ✓ | ✓ | -[Button](https://github.com/mparticle-integrations/mparticle-apple-integration-button) | ✓ | ✓ | -[CleverTap](https://github.com/mparticle-integrations/mparticle-apple-integration-clevertap) | ✓ | ✓ | -[comScore](https://github.com/mparticle-integrations/mparticle-apple-integration-comscore) | ✓ | | +[Blueshift](https://github.com/blueshift-labs/mparticle-apple-integration-blueshift) | ✓ | ✓ | +[Branch Metrics](https://github.com/mparticle-integrations/mparticle-apple-integration-branchmetrics) | ✓ | ✓ | ✓ +[Button](https://github.com/mparticle-integrations/mparticle-apple-integration-button) | ✓ | ✓ | ✓ +[CleverTap](https://github.com/mparticle-integrations/mparticle-apple-integration-clevertap) | ✓ | ✓ | ✓ +[comScore](https://github.com/mparticle-integrations/mparticle-apple-integration-comscore) | ✓ | | ✓ [Flurry](https://github.com/mparticle-integrations/mparticle-apple-integration-flurry) | ✓ | | -[Google Analytics for Firebase](https://github.com/mparticle-integrations/mparticle-apple-integration-google-analytics-firebase) | ✓ | | +[Foresee](https://github.com/mparticle-integrations/mparticle-apple-integration-foresee) | ✓ | | ✓ +[Google Analytics for Firebase](https://github.com/mparticle-integrations/mparticle-apple-integration-google-analytics-firebase) | ✓ | ✓ | ✓ +[Google Analytics 4 for Firebase](https://github.com/mparticle-integrations/mparticle-apple-integration-google-analytics-firebase-ga4) | ✓ | ✓ | ✓ [Instabot](https://github.com/mparticle-integrations/mparticle-apple-integration-instabot) | ✓ | | -[Iterable](https://github.com/mparticle-integrations/mparticle-apple-integration-iterable) | ✓ | ✓ | -[Kahuna](https://github.com/mparticle-integrations/mparticle-apple-integration-kahuna) | ✓ | | -[Kochava](https://github.com/mparticle-integrations/mparticle-apple-integration-kochava) | ✓ | | ✓ -[Leanplum](https://github.com/mparticle-integrations/mparticle-apple-integration-leanplum) | ✓ | ✓ | -[Localytics](https://github.com/mparticle-integrations/mparticle-apple-integration-localytics) | ✓ | ✓ | -[Optimizely](https://github.com/mparticle-integrations/mparticle-apple-integration-optimizely) | ✓ | ✓ | -[OneTrust](https://github.com/mparticle-integrations/mparticle-apple-integration-onetrust) | ✓ | ✓ | +[Iterable](https://github.com/mparticle-integrations/mparticle-apple-integration-iterable) | ✓ | ✓ | ✓ +[Kochava](https://github.com/mparticle-integrations/mparticle-apple-integration-kochava) | | | ✓ +[Leanplum](https://github.com/mparticle-integrations/mparticle-apple-integration-leanplum) | ✓ | ✓ | ✓ +[Localytics](https://github.com/mparticle-integrations/mparticle-apple-integration-localytics) | ✓ | ✓ | ✓ +[Optimizely](https://github.com/mparticle-integrations/mparticle-apple-integration-optimizely) | ✓ | ✓ | ✓ +[OneTrust](https://github.com/mparticle-integrations/mparticle-apple-integration-onetrust) | ✓ | ✓ | ✓ [Pilgrim](https://github.com/mparticle-integrations/mparticle-apple-integration-pilgrim) | ✓ | ✓ | [Primer](https://github.com/mparticle-integrations/mparticle-apple-integration-primer) | ✓ | ✓ | -[Radar](https://github.com/mparticle-integrations/mparticle-apple-integration-radar) | ✓ | ✓ | -[Responsys](https://github.com/mparticle-integrations/mparticle-apple-integration-responsys) | | | +[Radar](https://github.com/mparticle-integrations/mparticle-apple-integration-radar) | ✓ | ✓ | ✓ +[Responsys](https://github.com/mparticle-integrations/mparticle-apple-integration-responsys) | ✓ | | [Reveal Mobile](https://github.com/mparticle-integrations/mparticle-apple-integration-revealmobile) | ✓ | | -[Singular](https://github.com/mparticle-integrations/mparticle-apple-integration-singular) | ✓ | | +[Singular](https://github.com/mparticle-integrations/mparticle-apple-integration-singular) | ✓ | | ✓ [Skyhook](https://github.com/mparticle-integrations/mparticle-apple-integration-skyhook) | ✓ | | -[Taplytics](https://github.com/mparticle-integrations/mparticle-apple-integration-taplytics) | ✓ | | +[Taplytics](https://github.com/mparticle-integrations/mparticle-apple-integration-taplytics) | ✓ | | ✓ [Tune](https://github.com/mparticle-integrations/mparticle-apple-integration-tune) | ✓ | ✓ | -[Urban Airship](https://github.com/mparticle-integrations/mparticle-apple-integration-urbanairship) | ✓ | | +[Urban Airship](https://github.com/mparticle-integrations/mparticle-apple-integration-urbanairship) | ✓ | | ✓ [UserLeap](https://github.com/UserLeap/userleap-mparticle-ios-kit) | ✓ | ✓ | [Wootric](https://github.com/mparticle-integrations/mparticle-apple-integration-wootric) | ✓ | | diff --git a/mParticle-Apple-SDK/Utils/MPStateMachine.m b/mParticle-Apple-SDK/Utils/MPStateMachine.m index 1c35b8c0d..adb58fa40 100644 --- a/mParticle-Apple-SDK/Utils/MPStateMachine.m +++ b/mParticle-Apple-SDK/Utils/MPStateMachine.m @@ -385,43 +385,7 @@ - (NSString *)deviceTokenType { } - (NSNumber *)firstSeenInstallation { - if (_firstSeenInstallation != nil) { - return _firstSeenInstallation; - } - - MPIUserDefaults *userDefaults = [MPIUserDefaults standardUserDefaults]; - NSNumber *firstSeenInstallation = userDefaults[kMPAppFirstSeenInstallationKey]; - if (firstSeenInstallation != nil) { - _firstSeenInstallation = firstSeenInstallation; - } else { - [self willChangeValueForKey:@"firstSeenInstallation"]; - _firstSeenInstallation = @YES; - [self didChangeValueForKey:@"firstSeenInstallation"]; - - dispatch_async(dispatch_get_main_queue(), ^{ - userDefaults[kMPAppFirstSeenInstallationKey] = self->_firstSeenInstallation; - }); - } - - return _firstSeenInstallation; -} - -- (void)setFirstSeenInstallation:(NSNumber *)firstSeenInstallation { - if (_firstSeenInstallation != nil) { - return; - } - - MPIUserDefaults *userDefaults = [MPIUserDefaults standardUserDefaults]; - NSNumber *fsi = userDefaults[kMPAppFirstSeenInstallationKey]; - if (fsi == nil) { - [self willChangeValueForKey:@"firstSeenInstallation"]; - _firstSeenInstallation = firstSeenInstallation; - [self didChangeValueForKey:@"firstSeenInstallation"]; - - dispatch_async(dispatch_get_main_queue(), ^{ - userDefaults[kMPAppFirstSeenInstallationKey] = self->_firstSeenInstallation; - }); - } + return (_firstSeenInstallation == nil) ? @NO : _firstSeenInstallation; } - (MPInstallationType)installationType { @@ -440,6 +404,7 @@ - (MPInstallationType)installationType { } } else { _installationType = MPInstallationTypeKnownInstall; + _firstSeenInstallation = @YES; } [self didChangeValueForKey:@"installationType"]; @@ -452,7 +417,7 @@ - (void)setInstallationType:(MPInstallationType)installationType { _installationType = installationType; [self didChangeValueForKey:@"installationType"]; - self.firstSeenInstallation = installationType != MPInstallationTypeKnownUpgrade ? @YES : @NO; + _firstSeenInstallation = @(installationType == MPInstallationTypeKnownInstall); } #if TARGET_OS_IOS == 1