Skip to content

feat: Update Urban Airship to version 19.x#31

Merged
BrandonStalnaker merged 3 commits intodevelopmentfrom
feat/7049-Update-UrbanAirship-To-Version-19
Mar 19, 2025
Merged

feat: Update Urban Airship to version 19.x#31
BrandonStalnaker merged 3 commits intodevelopmentfrom
feat/7049-Update-UrbanAirship-To-Version-19

Conversation

@BrandonStalnaker
Copy link
Contributor

Summary

  • Updated to version 19.x of Urban Airship

Testing Plan

  • Was this tested locally? If not, explain why.
  • Tested in sample app and confirmed data being sent to Urban Airship

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

self->_started = YES;

UAConfig *config = [UAConfig defaultConfig];
UAConfig *config = [UAConfig config];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh dang, so this is going to change some behavior that I am not sure if anyone is relying on. defaultConfig loads the plist values into the config if available. config is just a factory method. We did not expose a defaultConfig version so we can either not worry about, wait for the next release, or we can add some code here to try to use the loadFromplist method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rlepinski What if we did something like this?

Suggested change
UAConfig *config = [UAConfig config];
NSError *error = nil;
UAConfig *config = [UAConfig fromPlistWithContentsOfFile:@"AirshipConfig.plist" error:&error];
if (error) {
NSLog(@"Airship config failed to initialize based off AirshipConfig.plist: %@", error);
NSLog(@"mParticle will attempt to manually construct UA Config based off your Connection Settings");
config = [UAConfig config];
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will get 2 types of errors here:

  • If the file does not exist you will get an error. I would imagine you would want to ignore this one for your plugin since some apps will probably rely on mParticle to construct the needed bits.
  • Some parsing error, this one you will want to log

How about adding a file exists check before logging those errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know what you think @rlepinski

@BrandonStalnaker BrandonStalnaker force-pushed the feat/7049-Update-UrbanAirship-To-Version-19 branch from af77d27 to 87c8378 Compare March 19, 2025 15:14
Copy link
Contributor

@rlepinski rlepinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@BrandonStalnaker BrandonStalnaker merged commit d2ef60d into development Mar 19, 2025
3 checks passed
@BrandonStalnaker BrandonStalnaker deleted the feat/7049-Update-UrbanAirship-To-Version-19 branch March 19, 2025 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants