Issues integrating Mailgun SDK with CocoaPods in iOS Objective-C project

Hey everyone,

I’m struggling to set up the Mailgun SDK in my iOS app using CocoaPods. I’ve already installed CocoaPods on my machine, but I’m now unsure of the next steps.

The Mailgun documentation suggests adding the following line to the Podfile:

pod 'emailService', '~> 2.1.5'

However, when I try to execute this in Terminal, I get an error saying the command isn’t found. I’m confused about where exactly I should add this line. Do I need to create a Podfile in my project folder first?

I’m also unclear on how the Mailgun files get incorporated into my project’s ‘Supporting Files’ folder. Does CocoaPods handle this automatically?

I’d appreciate any guidance from those who have integrated Mailgun with CocoaPods in an Objective-C project. Thanks!

I’ve been through this process recently, and I can share some insights. First, you need to navigate to your project directory in Terminal. Once there, run ‘pod init’ to create a Podfile. Open this file in a text editor and add the Mailgun pod line you mentioned. Save the file, then run ‘pod install’ in Terminal. This command fetches and integrates the SDK into your project.

CocoaPods handles the file integration automatically, so you don’t need to worry about manually adding files to your ‘Supporting Files’ folder. After installation, make sure to use the .xcworkspace file to open your project, not the .xcodeproj file. This ensures that Xcode recognizes the CocoaPods dependencies.

If you’re still having issues, double-check that your Podfile syntax is correct and that you’re using the latest version of CocoaPods. It’s a bit finicky sometimes, but once set up, it makes managing dependencies much easier.

hey ben, try running pod init in your project folder to create a podfile, then add your line. after that, run pod install, and open the .xcworkspace file. hope it works for ya!