-
-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phonegap 3.0 compatibility? Project status? #1
Comments
Hello! Yes, I'm just done working on a project using it. It's on the store and it works, so the plugin is certainly safe to use. I didn't try on Cordova 3.0 yet however, I use PhoneGap 2.7.0. |
It seems PhoneGap 3.0 ios project has ARC enabled as default. When compiling this code it is not working. |
I am using the plugin with Cordova 3.0x and it works for the most part. The main issue is that the config.xml needs to be updated to change the plugin tag to be a feature tag. |
I second the issue of ARC problems. There are several uses of the release function, e.g. [numberFormatter release];, that are not permitted. |
FYI you can get around ARC restrictions by following these instructions for Also for PhoneGap >= 3.0 this plugin can be installed with a single command:
|
I setup the plugin through the cordova plugin command on Phonegap 3.0 I made sure the xml file has the feature tags and everything is in the right places. I have been trying to get the plugin to work but for some reason storekit isn't being recognized from the beginning. I am running it inside the device ready function. Can someone please look into this? I've been bashing my head on this for hours and couldn't get it to work. |
take a look at https://github.com/jkirkell/cordova-inapp-sample which is just the steps to follow for setting up using InApp purchasing plugins. The code is for reference only and should not be run since I excluded the binaries. |
jkirkell thank you very much for the fast reply! I checked my project and everything is setup perfectly. I am sorry I miss worded my problem. I found the exact problem. When I do: The callback function does not run. InAppPurchase[objc]: Getting products data That's about all I receive. I tried setting alerts and a variety of other tests inside the callback, but nothing seems to work. It would be of great help if someone can help figure this out because I noticed many people were experiencing this problem on the guide page as well. |
If you know a little Objective-C, when you compile and come up with errors, you can go through the list and click on each to highlight the problem lines, then you can comment out (add "//" to the beginning of the line) any line that just has release on it. There's one line that has some other initialisation too, where you would just remove the "release" part, and not the rest. |
@areoburn I now see what you are seeing, but only when I compile and push to IOS7 in the simulator. IOS6.1 still works fine. I am looking at it and will report back later today. |
The super quick answer is that the code works fine when using the simulator for IOS6.1 only. IOS7 and IOS7 64bit both are croaking with the storekit initialization. I will keep working on it. |
I thought you can't test storekit in the simulator? I wouldn't expect it to work in the simulator at all. |
For anyone looking, Apple is not letting the simulator to run in-app purchases per their notes https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/index.html. StoreKit (In-App purchases) will not work in the Simulator. 13962338 I have tested the current code on a device running IOS7 (iPhone5) and sandbox in-app purchasing works. |
Thank you jkirkell! I finally can continue working on my app! Has anyone experienced this problem with the callback function? var IAP_loaded = false; // Global Scope console.log("4] -- IAP Loaded: "+IAP_loaded); // Outputs false For some my global variables aren't staying modified outside the function itself... |
Never mind, I figured out storekit is being run as async and I came across a solution. Thanks again for the help |
Hey have any of you experienced the Error message "Cannot connect to itunes" after a successful purchase restore? I seem to keep getting this error, but the purchase is going through. Not sure if this is a sandbox environment error or not |
Running in the simulator using a sandbox user on IOS6 or 6.1, I would see strange issues like
When I installed on a device and used the sandbox user, all that went away. Hope that helps |
For short, both methods work well:
Thanks, |
The error messages are clear, though I ran into one app crash during my usage. I'm not sure if it was related specifically to what I commented out, but I ended up switching to the "Add -fno-objc-arc flag" option to keep things simple. |
@jkirkell and @areoburn did you guys ever figure out a fix for the |
Apple disabled running storekit through the IOS Simulator. When you install What I ended up doing in my code was to add a flag to add the product as a Hope that helps. On Thu, Oct 3, 2013 at 10:46 AM, wootwoot1234 notifications@github.comwrote:
|
Hey Jeff. Thanks for the quick response. Good point. I always forget to login to my test account. I logged in and still the load callback isn't being called. I thought it might be a timing issue with the init function so I pulled the load function out of the ready callback and put it in a 'setTimeout()' which delayed the call by 1 second but that didn't help. Here's the console output:
Thanks for the help. I really like how you cleaned up this plugin. The log outputs are really helpful. |
Here's my code (after removing the
|
Hey Jeff. Never mind my last couple of comments. You're correct, it's working. I just stripped my code down to nothing but the in app purchase and the load callback fired so there's something wrong somewhere else. Thanks again for this plugin. Oh, one last thing. The readme.md file talks about some functions that no longer exist. If you want I'm happy to clean it up. |
Hi wootwoot, |
Add triggers for hooking into restore failed or completed
Merge With head
Hello!
Just curious about this project status given the warning in the readme:
WARNING: I'M CURRENLTY REWRITING PART OF THIS PLUGING. IT'S NOT YET USABLE!
Now that cordova 3.0 is out it's unclear whether this will work or not, or whether it is still in active development.
The text was updated successfully, but these errors were encountered: