OneSignal / OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Other
487 stars 263 forks source link

[question]: OneSignal iOS SDK size not optimal for app clips. Can we shrink the size of SDK. #1438

Open Nishannb opened 1 month ago

Nishannb commented 1 month ago

How can we help?

I recently integrated oneSignal notification for app clips which has the size limit of 10MB (for making it work in most iphones). But the size of OneSignal iOS SDK itself is 6.5MB, is there any way we can shrink the size of SDK.

Code of Conduct

jkasten2 commented 1 month ago

@Nishannb could you explain where you are seeing this increase? Is it increasing the size of your app at the Xcode Archive phase or the end result, such as what is reported by test flight.

To lower the size you can omit parts of the OneSignal SDK you don't use, example In-App Messages and location.

Nishannb commented 1 month ago

_Yes, after the Xcode Archive phase, I checked the Framework size. I do parts of framework that I don't use, I want to make sure which I can omit without affecting what's working i.e. notification feature.

The app is built on react native and when I check the onesignal docs for react native SDK, it mentions entire framework to be added. I could not find a way for selecting sub-specs. Is there any way you can help ?

FYI, this is the framework folder screenshot I have.

Screenshot 0006-05-22 at 10 29 01
emawby commented 1 month ago

@Nishannb Thank you for reaching out. Yes the lack of modularity is currently a limitation of our react native SDK and is something we are looking to address in the future.

Nishannb commented 1 month ago

Is there a timeline we look forward to for react native SDK. We want to reimplement onesignal notification in our project but the size became the bottleneck as we want to run on app clips and instant apps.

emawby commented 3 weeks ago

There is no timeline to share at the moment, I apologize.