0

I have a simple flash cards app with possible in-app purchases. It is currently running in the apple store but I was working in some updates and now when I try to run the app by console or using installr it crash without an specific error in the console.

The crash occur when I try to get access to the In-Apps information. It's currently running rubymotion 3.11 and I tried with 3.10 and downgrading until version 3.6 and with different gems like ProMotion-iap, Helu, Vendor and always ending with the same problem.

This is the message that I get when running rake debug=1 :

thread #1: tid = 0x3d2fd4, 0x00f090b0 libobjc.A.dylib`objc_msgSend + 12, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x4)
frame #0: 0x00f090b0 libobjc.A.dylib`objc_msgSend + 12
libobjc.A.dylib`objc_msgSend + 12:
-> 0xf090b0:  movl   (%eax), %edx
0xf090b2:  movzwl 0xc(%edx), %eax
0xf090b6:  andl   %ecx, %eax
0xf090b8:  shll   $0x3, %eax

And this is how I am making the call:

@products = Vendor::Products.new([{:name => "iap1", :id => "com.app.set1"}, {:name => "iap2", :id => "com.app.set1"}]) do |products|
  products.map{ |product| NSLog "Product exists?: #{product.success}" }
  products.map{ |product| NSLog "Product error: #{product.error}" }
  products.map{ |product| NSLog "Product response: #{product.response}" }
end

Thank you.

  • Hi Claudia! I wrote PM-iap. Have you tried using SKProductsRequest directly? Something like https://github.com/clearsightstudio/ProMotion-iap/blob/master/lib/ProMotion/iap.rb#L40-L42 (and look below to the SKProductsRequestDelegate methods for your delegate methods). Keep it as bare-bones as possible and see what happens. It appears to be some reference getting lost, and could be a RubyMotion bug. If that crashes, try a vendored Objective-C class. – Jamon Holmgren May 18 '15 at 03:40
  • Hi Jamon! Sorry for the delay in my answer. I was able to run my app by setting in the rake file app.sdk_version="7.1" but when I try to use 8.2 or 8.3 the app just crash. I did what you recommend and print out in an alert the error message "Error domain=SSErrorDomain Code=0 'Cannot connect to iTunes Store'" after that I google for something similar and found this post http://samritchie.net/2015/01/29/the-operation-couldnt-be-completed-sserrordomain-error-100/ Any thoughts? – Claudia Lorena Aguilar Jun 01 '15 at 16:40
  • I think that post is talking about something else. You won't be able to test the IAP in your Simulator (http://stackoverflow.com/questions/18255654/i-am-getting-error-while-requesting-products-from-app-store-for-iap). I'm not sure why the 8.2/8.3 SDK would crash! That's very odd. Seems like a bug in RubyMotion. – Jamon Holmgren Jun 02 '15 at 04:12

0 Answers0