6

I'm very new to iOS developing, so any help is appreciated!

So I basically installed Cocoapods, installed pod Stripe and basically had issues going forward. I ended up deleting the files for my project, .xcworkspace, Pods folder, my original project, etc. I wanted to start completely over to make it easier and not complicate things more.

I basically created a new .xcodeproj from a Parse Starter Project. I got set up on Heroku and then I went to install the pod Stripe. I did 'pod install' and it said everything was good and to use the '.xcworkspace' going forward. So I figured everything was fine. I went to look for the '.xcworkspace' file and it's nowhere to be found on my computer.

Then I went back to Terminal and did 'pod install' again, I'm getting a new message that doesn't include 'use the .xcworkspace file going forward'.

Attached are screenshots of TerminalPodfileFiles In Finder

Any help so I can get Stripe up and running is appreciated!! Thank you!!

  • Avoid keeping two `.xcodeproj` files in same directory or folder if you plan to install *cocoapods* in it, i'm guessing you have a `.xcodeproj` file in `ParseStarterProject`, if its just for reference keep it outside the project folder or if you just want to include some classes of this starter project just copy and paste them in your new workspace that you will create,Are you using parse as this app's backend server? – Dravidian Aug 24 '16 at 10:39

2 Answers2

6

Algorithm:

  1. Add Podfile to your project folder

enter image description here

Podfile example:

 use_frameworks!

 target 'stackoverflow-39113331' do
 pod 'Stripe'
 pod 'PaymentKit'
 end
  1. In the terminal go to your project folder

enter image description here

  1. then make pod install

enter image description here

Your result folder:

enter image description here

Vasily Bodnarchuk
  • 24,482
  • 9
  • 132
  • 127
  • This seemed to work and I have a separate folder in my project folder under the 'Pod' folder that has Stripe installed. When I follow the directions though to integrate Stripe on their website, it says their is 'no module' for Stripe. Am I doing something wrong? :/ –  Aug 24 '16 at 15:12
  • Can you send me that directions to integrate Stripe? – Vasily Bodnarchuk Aug 24 '16 at 15:14
  • https://stripe.com/docs/mobile/ios - this is the link for the directions. Stripe seems to be in my 'pods' section in my project. The next steps are to 'import Stripe' in the AppDelegate and it's not working :/ –  Aug 24 '16 at 15:18
  • Ok. This is another question. Can you create new question? I will help you to install Stripe in your project. I will create working example for you. – Vasily Bodnarchuk Aug 24 '16 at 15:26
  • Just created the question! http://stackoverflow.com/questions/39127433/stripe-integrating-issues –  Aug 24 '16 at 15:29
2

If you could start over again , do that.

After creating a new XcodeProject project in your downloads folder named Thrill

Open TERMINAL , navigate to your project.

Instead of

cd Users/deborah/Downloads/Thrill/Thrill.xcodeproj

use

cd ~/Downloads/Thrill

1.) Run pod init

Never open your PodFile with TextEdit , use some other editor for eg. sublimeText2

If you are already using cocoapods integrate parse using cocoapods only no need to import their frameworks separately .

Your podfile :-

  use_frameworks!

  target 'Thrill' do

  pod 'Parse' 
  pod 'Stripe'
  pod 'PaymentKit'    

  end

This should install both parse and bolts for you in your Thrill project

2.) Run pod install ...

Dravidian
  • 9,945
  • 3
  • 34
  • 74
  • I want to make a long term app (however, it's also practice for when I make other apps). –  Aug 24 '16 at 14:41
  • It's a Parse Server Starter Project that is deployed to Heroku. Does this still matter since it's via Heroku? And I'm having an issue with this again :( It seems like Stripe isn't installing for some reason. I'm getting the error in the Terminal 'The Podfile Does Not Contain Any Dependencies'. –  Aug 24 '16 at 14:56
  • Try running `pod update`, also make sure you are using`xcworkspace` not `xcodeproj` – Dravidian Aug 24 '16 at 15:28