HEEELP... Stuck with implementing Stripe's Apple Pay in rubymotion

122 views
Skip to first unread message

hol...@slangthis.com

unread,
Mar 10, 2015, 12:14:39 AM3/10/15
to rubym...@googlegroups.com
Specifically, there are 2 of Stripe's instructions that leave me stuck:

1: In Xcode, open your project settings, choose the "Capabilities" tab, and enable the "Apple Pay" switch. - https://stripe.com/docs/mobile/apple-pay#setup

2: You'll first need to add STRIPE_ENABLE_APPLEPAY to your app's build settings under "Preprocessor Macros". - https://stripe.com/docs/mobile/ios#applepay

How do I do these 2 things in Rubymotion?

hol...@slangthis.com

unread,
Mar 10, 2015, 12:32:45 PM3/10/15
to rubym...@googlegroups.com
No-one has integrated Apple Pay with Rubymotion before? Isn't there anyone with an idea of how you'd do those 2 steps in Rubymotion?

Caram Dache

unread,
Mar 10, 2015, 3:00:32 PM3/10/15
to rubym...@googlegroups.com
I assume you have gone through the ApplePay’s reference on Apple developer site already?
    https://developer.apple.com/apple-pay/ 

And that you have gone through tutorials like these?

And now you have selected STRIPE as a payment provider?

Then maybe you are ahead of us all and we would welcome your further exploration reports. I suggest you follow Ray Wenderlich’s tutorial using XCode and, once you have your first example running, port it to RM. In particular, you will have to find out how to add capabilities to your Rakefile.

Caram

--
You received this message because you are subscribed to the Google Groups "RubyMotion - Ruby for iOS, OS X, and Android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubymotion+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubymotion/dcca6cb3-d9dd-48a9-b04e-a1c76fe77bab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hol...@slangthis.com

unread,
Mar 10, 2015, 3:03:08 PM3/10/15
to rubym...@googlegroups.com
Hi Caram

Thanks a lot for the answer. I'm not asking a general question to how you implement Apple Pay with Rubymotion though. I have 2 very specific questions about how to implement specific things in Rubymotion. If you have any suggestions on how you'd do these 2 things in Rubymotion, I'd love to hear it:

1: In Xcode, open your project settings, choose the "Capabilities" tab, and enable the "Apple Pay" switch. - https://stripe.com/docs/mobile/apple-pay#setup

2: You'll first need to add STRIPE_ENABLE_APPLEPAY to your app's build settings under "Preprocessor Macros". - https://stripe.com/docs/mobile/ios#applepay

Vasko Markovski

unread,
Mar 10, 2015, 4:02:46 PM3/10/15
to rubym...@googlegroups.com
1. My guess would be that "Capabilities" in xcode (which Caram mentioned adding to your Rakefile above) are "Entitlements" in RubyMotion, which you can find out about here:

Here's the relevant code from that page:
Motion::Project::App.setup do |app|
  # ...
  app.entitlements['keychain-access-groups'] = [
    app.seed_id + '.' + app.identifier
  ]
end
2. My next guess would be that you need to add that the STRIPE_ENABLE_APPLEPAY to your Rakefile as well, which you can find out about here:

Here's the relevant code from that page:
Motion::Project::App.setup do |app|
  # ...
  app.info_plist['CFBundleURLTypes'] = [
    { 'CFBundleURLName' => 'com.mycompany.x-videoplayer',
      'CFBundleURLSchemes' => ['x-videoplayer'] }
  ]
end
OR it might be related to this:



Again, these are just guesses because I haven't implemented Apple Pay into any of my apps.

If any of that works for you, please do write back to this thread with a working solution.

Thanks,
Vasko

Vasko M

unread,
Mar 10, 2015, 4:08:12 PM3/10/15
to rubym...@googlegroups.com
Actually, having quickly glanced at the Ray Wenderlich tutorial, I think you #2 question is answered by passing agruments to the rake command (my 2nd guess above).

Something along the lines of:

rake args="-STRIPE_ENABLE_APPLEPAY"
Reply all
Reply to author
Forward
0 new messages