I'm adding OneSignal to my Ionic Cordova project, and following this guide. In section 3.16 it mentions the Platforms -> ios -> Pods
folder, but this Pods
folder doesn't exist. I know that to create the Pods
folder you have to run pod install
, but I've never done this in an Ionic Cordova project. Should I navigate to Platforms/ios
and run pod install
from there? The reason I ask is that even though in section 2.1 they mention npm install ionic-cordova-plugin
, they never mention running pod install
.
Asked
Active
Viewed 1,094 times
1

gkeenley
- 6,088
- 8
- 54
- 129
-
You must have a pods folder under `platforms/ios/Pods`. This folder should be generated during the build process. Have you every built your app for iOS before installing the onesignal plugin ? Or is it a fresh app ? – saperlipopette Feb 11 '21 at 01:24
-
I had not built the app for iOS before installing. Does the Pods folder get generated when you build the app for iOS, or just when you run `pod install`? – gkeenley Feb 11 '21 at 02:20
-
The pods folder should be generated at build time if it does not exist. Try building your app just to try and see if it resolves the issue – saperlipopette Feb 11 '21 at 15:47
1 Answers
0
This whole thing seems rather iffy, as generally, in Cordova projects, the platform
folder should be under .gitignore
. The entire guide consists of modifying files that should not be in your repository.
That being said, in order to generate the Pods
folder, cf. OneSignal's native iOS SDK guide.
- Create
Podfile
underplatforms/ios
- Copy the contents into
Podfile
from the link provided (change accordingly, e.g.'your_project_name'
:
target 'your_project_name' do
#only copy below line
pod 'OneSignal', '>= 3.0.0', '< 4.0'
end
target 'OneSignalNotificationServiceExtension' do
#only copy below line
pod 'OneSignal', '>= 3.0.0', '< 4.0'
end
- Run
pod install

Nikitah
- 719
- 5
- 15