ios-library: Taking too long during archiving with Airship SDK 16.9.2 Cocoapods

❗For how-to inquiries involving Airship functionality or use cases, please contact (support)[https://support.airship.com/].

Preliminary Info

What Airship dependencies are you using?

Airship 16.9.2

What are the versions of any relevant development tools you are using?

Report

Xcode 13.4.1, Swift Language

What unexpected behavior are you seeing?

CI Builds are taking too ling during archiving with 16.9.2. Everything is working fine with the existing version 14.4.0 but when I upgraded to 16.9.2 I am seeing too long.

What is the expected behavior?

CI builds should finish archiving with in the time.

What are the steps to reproduce the unexpected behavior?

Create a Sample App, use Cocopods for integrating Airship, then archive the build.

Do you have logging for the issue?

No Logs

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

I have the build times back down to ~30 seconds for the swift phase. I just need to get the changes validated by QA. I hope to have a release on Thursday.

QA is looking good, I should have the release started soon.

If you are curious what happened: I made a change to add new view modifiers to our scene & survey features. These view modifiers interact with an environment object that may or may not be there, so I had to break them out into separate modifiers since if you try to access an environment object that is not there swiftui will crash. I was chaining the view modifiers with an applyIf(_:transform) block since they are optional, and it was not obvious how to concat an unknown array of modifiers together. This worked fine and even with the compiler warnings enabled nothing seemed out of place. This long chain of optional view modifiers (5ish in a row) was the cause. I switched to a resultbuilder that concats the view modifiers and applies it once to the view and that brought the build times back down. I also added some type hints to some of the longer methods (had a few over 150ms), but that had almost no effect on total build time.

Our CI took much longer with that change, but I assumed that was from the bump of macOS version from 11 to 12 in our github actions.

~30 still seems too long to me but it’s at least reasonable. I believe we can further reduce build times soon once we get everything into swift and better limit what we expose to obj-c.

I was able to narrow it down to this commit - https://github.com/urbanairship/ios-library/commit/16634407b62406a007936531be569b2dfa9f8e17

Still looking for a fix