Answered

Loading of Intercom SDK via Swift Package Manager takes very long on CI

  • 8 September 2022
  • 11 replies
  • 245 views

Hi everyone, since SPM loads a full mirror of the repository it needs to fetch ~1.5GB of data before a build can start. On a developer machine I don't care to much about that. A lot of it is cached, so its not like I have to pull the repo every time.

BUT:

The loading of the Intercom SDK SPM on our CI takes a very long time, since it needs to pull a fresh repo mirror everytime it runs. By far the most time of any of our packages which we load. And since we pay per minute this really increases our costs.

Other SDKs like Stripe (https://github.com/stripe/stripe-ios-spm and Klarna (https://github.com/klarna/klarna-mobile-sdk-spm have created lightweight mirrors of the SDK that just contain the Sources and Binaries in tagged releases. Would this be a something you could consider?

This would save us a lot of time and money during our CI runtime.

icon

Best answer by Brian B11 10 July 2023, 11:19

View original

11 replies

Userlevel 2

Hey @user1873​! Daniel from Customer Support Engineering here 🔧 

 

This is something that our mobile team are aware of and are actively looking for a better alternative to our current implementation. If you'd like to be notified when this issue has been resolved, feel free to write in to us over the Messenger and let us know that the public iOS repo is too large to load each time, and we'll get you added to our existing issue 👍

Hello, Has there been any updates to this issue? My team is experiencing the same issue.

By now it’s 2gb and our CI keeps failing quite often because we’re running into 10 minute timeouts (which also cost us money). This needs to get fixed soon! Please see my support message about that too.

Userlevel 2
Badge +2

@Marco Boerner @Wilson K11 @User1873 

This has now be fixed. SPM should take a few seconds now.

Thanks

Brian

Great! Thanks a lot! 😎

Userlevel 2
Badge +2

Sorry folks. The fix we applied caused some other issues so we had to revert it.
Working on a different solution now. Will post here with an update once we’ve resolved it.

Brian

Userlevel 2
Badge +2

We now have a new repo for Intercom Swift Packages.

Please use https://github.com/intercom/intercom-ios-sp when integrating Intercom with SPM.

Thanks

@Brian B11 
We tried using the new url  https://github.com/intercom/intercom-ios-sp
It looked like our build did timeout at 60 minutes in microsoft app center.

Userlevel 2
Badge +2

@Wilson K11 Have you tried to run this locally? I tested it just now to be sure and its working fine for me.

Could there be an issue with your CI?

Would be nice to update the documentation.
https://developers.intercom.com/installing-intercom/ios/installation/

SPM section still shows to use the package that makes any CI timeout.

Userlevel 4
Badge +5

Thanks for pointing that out @kironet ! I’ll reach out to the team in charge of our Developer docs and let them know we need to add a reference to that https://github.com/intercom/intercom-ios-sp repo!

Reply