简体   繁体   中英

How do I specify the version of react-native-onesignal in my podfile?

I'm following this guide on how to set up OneSignal with React Native. In the section where it says In your Podfile, add the notification service extension... , it says to add the following to my Podfile:

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignal', '>= 2.9.3', '< 3.0'
end

I think this is outdated though, because my version of react-native-onesignal is 3.7.2. How should I change this line in my Podfile to accommodate this newer version?

You haven't specified which version range you think is appropriate instead, but if this Pod follows the common convention where breaking changes only happen when the major version changes, then you would use the constraints

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignal', '>= 3.7.2', '< 4.0'
end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM