Tapstream - ParkinT/RubyMotion_Life GitHub Wiki
Tapstream
IntegratingTo use Tapstream in RubyMotion you simply follow these steps. {this assumes you have downloaded the API framework}
-
Move all the Tapstream.framework files to a directory under your project (vendor is the recommended name)
-
Add this to your Rakefile
app.vendor_project('vendor/Tapstream.framework', :static, :products => ['Tapstream'], :headers_dir => 'Headers')
-
Include these two lines in your
app_delegate.rb
in theapplication
didFinishLoadingTapstream.shared.setAccountName("TAPSTREAM_ACCOUNT_NAME", developerSecret:"DEV_SECRET_KEY") Tapstream.shared.fireEvent("activation")
If you experience the following error message
/usr/bin/gen_bridge_metadata:59:in basename': can't convert nil into String (TypeError) from /usr/bin/gen_bridge_metadata:59 rake aborted! Command failed with status (1): [RUBYOPT='' /usr/bin/gen_bridge_metadata --...] It is related to the fact that
Bridge` is assuming the cpp-* file(s) exist in /usr/bin
In my case they are in /Developer/usr/bin I located them with this command:
find / -name "cpp*" -print
You must modify the offending line (line 59) in /usr/bin/gen_bridge_metadata to reference the correct directory.
In my case I changed it to this
CPP = ['/Developer/usr/bin/cpp-4.2', '/Developer/usr/bin/cpp-4.0', '/Developer/usr/bin/cpp'].find { |x| File.exist?(x) }
{It has been reported that updating to latest BridgeSupport Preview 3 from fixes this}