Onesignal-ios-sdk: SPM version of OneSignal weights 500MB

Created on 10 Aug 2020  路  8Comments  路  Source: OneSignal/OneSignal-iOS-SDK

Description:
Swift package for OneSignal is at least 10 times bigger than any other package I've ever seen.
Looking deeper, it's .git folder, that weights almost 400MB.
pack-3bfa9dd8c5f1e3fe6557fe005f965e476dd198bc.pack file - is absurdly inflated.

It makes code-checkouts & resetting of the cache unnecessary long

Environment
Release: 2.15.1
Xcode: 12

Steps to Reproduce Issue:

  1. Add OneSignal as a Swift Package to your project
  2. Go to Xcodes' Derived data -> SourcePackages -> checkouts -> OneSignal-iOS-SDK

Anything else:

Most helpful comment

We are in the process of fixing this by distributing the SDK as a binary via SwiftPM. This requires Xcode 12 so we are creating a new repo "OneSignal-XCFramework" that will be used just for Xcode 12+ SwiftPM. If you are on Xcode 11 you will need to continue to use this repo.

All 8 comments

@ksloginov This iOS OneSignal github repo has been around for more than 5 years and contains a lot of history and binaries for each release to support Cocoapods which contributes to the large size.

There was an ask a while back to use a git clone depth of 1 on Swift's bug tracker.
https://bugs.swift.org/browse/SR-3313

It has been marked as "Won't Do" with the following as the reason.
"... SwiftPM will clone the entire repository which is preferable by github."

However I don't believe they account for lager repos like this one so I have left the following comment.
https://bugs.swift.org/browse/SR-3313?focusedCommentId=58042&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-58042

I recommend watching their issue and some leaving a comment to get SwiftPM to reconsider.

pod 'OneSignal', '2.15.1' is not working

@lawgimenez This issue's topic is on the size of this SDK as a SwiftPM.
Since you are having a setup issue with Cocoapods please open a new issue with the full error and details on reproducing the issue.

Closing due to no response.

The problem is still real. Lately, it takes about 40-50 minutes to download OneSignal's package. Other packages got slow too, but all 10 other packages in total take less than 2 minutes, so the difference with OneSignal is absolutely dramatic.

Issue still exists on 3.1.0 - 570.9 MB for 545 items.

We are in the process of fixing this by distributing the SDK as a binary via SwiftPM. This requires Xcode 12 so we are creating a new repo "OneSignal-XCFramework" that will be used just for Xcode 12+ SwiftPM. If you are on Xcode 11 you will need to continue to use this repo.

Any updates on onsignal-xcframework?

Was this page helpful?
0 / 5 - 0 ratings