Search code examples
iosapple-push-notificationsrubymotionrubymotion-promotion

ProMotion-push install dependency issue


I am building an iOS app using the splendid RubyMotion framework and ProMotion gem stack. I want to have push notifications and hope to implement that via the ProMotion-push gem.

The Problem

When I use

gem 'ProMotion-push'

in my Gemfile, I get a

ProMotion-push (>= 0) ruby depends on ProMotion (~> 2.0.0)

error from Bundler. (I have had ProMotion 1.2.1 installed.)

I can install ProMotion 2.0.0.rc1, but there is no plain version 2.0.0 (i.e., without release candidate versioning). ProMotion-push will not install for me (I get the same error) if I have ProMotion 2.0.0.rc1 (or 2.0.0.rc4 ) installed. What to do? Thanks!

The Solution

Jamon's quick response below allowed me to access the ProMotion-push vendored gem without the dependency error. A few details for anyone else following this solution:

(1) You change the dependency in the ProMotion-push.gemspec file like so,

spec.add_dependency "ProMotion", "~> 2.0.0.rc4"

(2) Don't forget to add ProMotion 2.0.0.rc4 to your Gemfile as follows,

gem "ProMotion", "~> 2.0.0.rc4", git: 'https://github.com/clearsightstudio/ProMotion.git'

Thanks again, Jamon!


Solution

  • Sorry about the problems you're having with this, Peter. It's entirely my fault for taking so long to release 2.0.0.

    The good news is that I'll be releasing ProMotion 2.0.0 this week. So this problem will go away then.

    In the meantime, you can do this:

    1. In your app's root folder, create a folder vendor/gems and cd into it
    2. git clone https://github.com/clearsightstudio/ProMotion-push.git
    3. Manually edit the dependency to "2.0.0.rc4" which is the latest release
    4. In your Gemfile: `gem 'ProMotion-push', path: 'vendor/gems/ProMotion-push'

    Then, when we release PM 2.0.0, you can go back to referencing the RubyGems version.