In App Purchase payment dialog not showing on Mac OS Lion - objective-c

I am writing an mac application for the Mac App Store that uses in app purchase. I double checked and I think I have implemented everything correctly. So when I am making a product request the delegate method
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
is called, with the correct product id. Then I make a payment using
[[SKPaymentQueue defaultQueue] addPayment:payment];
The issue appears at this point. In the first 10-15 minutes the purchase dialog does not show up at all, and I neither do I receive the updatedTransactions notification. After some time if I try again, everything works correctly, I am prompted in 1-2 seconds for my credentials. This seems very strange for me, because they should work from the start.
Because of this my app was rejected several times, stating that in app purchases do not work.
Yes, I have added the receipt verification code, and if it doesn't exist then I exit the app with code 173, I am prompted for my credentials, then the app reopens but the in apps do not work even after this. And yes, I have tested this with a built that has been created with a distribution profile. I am using XCode 4.2, and my OS is Lion.
After adding the payment to the queue, I tried starting a timer to check the transactions property of SKPaymentQueue periodically. The transactionIdentifier is the correct one, and it's transactionState is SKPaymentTransactionStatePurchasing. This tells me that there is some communication issue between StoreKit and the Apple servers.
Anyone else experienced this issue? Any help would be appreciated, I am struggling with this for 3 days now and could not find a solution for this, and it's driving me crazy.

I've found the answer at last. I have indeed implemented everything correctly according to the In App Purchase Programming Guide.
It seems what I've been doing wrong is to add the transaction observer, before the receipt verification code. After I have changed the order (first verify the receipt, then add the observer) everything worked correctly. This detail should be mentioned somewhere. It caused a lot of headache.

Related

Do I need to wait for another review when my app is already approvedand [Pending developer release] and I want to test it in [BetaTesting]?

I need to know if I have to wait for another review proccess after I already did it and my app is now in Pending Developer Release.
The point is I need to keep it in [PDRelease] mode until my testers say everything is ok, publish it.
But it has no sense if the app is approved and waiting "manual release" and then I need to resend it to another review or better called: "Beta testing review".
Thanks!
As far as I know that is correct, they are two separate workflows... If you had submitted the build to be approved for public beta testing and submitted it to the store at the same time you would be in a different place. Whether or not behind the scene it checks the work flow value to see if its pending release and short circuits the review is completely opaque as far as I know.

Titanium in-app purchase with ti.storekit - product not found

I have my in-app product all set up for purchase in iTunes Connect via ti.storekit:
My Appcelerator 4.0 app compiles and deploys to my device (dev profile). The ti.storekit is linked to my app and it compiles. It also seems to execute correctly, in terms of no unhandled exceptions. But it is telling me that it can't find my In-App purchase product. I have tried handing "15 Keys" and also "15Keys" to ti.storekit. I wasn't sure which one it wanted (Reference Name or Product ID) - but anyway neither works.
Here's the documentation I've been following.
And here is the function in ti.storekit that produces the error message:
function requestProduct(identifier, success)
{
Storekit.requestProducts([identifier], function (evt) {
if (!evt.success) {
alert('ERROR: We failed to talk to Apple!');
}
else if (evt.invalid) {
alert('ERROR: Invalid product: ' + identifier);
}
else {
success(evt.products[0]);
}
});
}
The "else if" line is being executed: alert('ERROR: Invalid product: ' + identifier);
What am I doing wrong? Should I be handing it the Reference Name (15 Keys) or the Product ID (15Keys)? And since I have tried both and neither works, how can I troubleshoot this? What am I doing wrong?
EDIT:
I am unclear on 3 things:
1- Should I go into Settings on my ipad and log in to itunes/store with my TEST USER apple sandbox account? I'm unable to do this because it keeps requiring me to enter a credit card. Test credit cards I've used in the past (on other non-iOS systems), such as 4111111111111111 do not work, and I cannot continue and sign in. Not even sure if I'm supposed to do this. If so, what CC credentials can I use? Should I use a REAL CC for this? Based on everything I'm reading in other articles and posts, it says to never link a test account to a CC number...then WHY won't apple let me log in my test user to my apple device (inside Settings) without entering a credit card?
2- I'm not following the steps in https://github.com/appcelerator-modules/ti.storekit/blob/master/ios/example/app.js EXACTLY, because in my app there is nothing to download, nothing to host, etc. In my app, users can buy keys, which are just digital entities in my app -- nothing to download. So I have removed all code/steps that have anything to do with downloading/hosting.
3- Version 1.0.0 of my app is awaiting review in the app store. This version has no ti.storekit and no in-app purchase. Nothing. BUT I'm working on a newer version with all the storekit and in-app purchase stuff in my latest appcelerator 4.0 project. Shouldn't this work in my dev environment, on my connected ipad, in a dev build? The fact that I have 1.0.0 awaiting review, with no storekit stuff, should have nothing to do with my new version in my dev account with storekit, right? Also I am puzzled by this message:
Do I need to submit a new build to Apple before my DEV storekit stuff will work? If so, this seems very strange, as though an app-store release candidate is connected with stuff I have in development in my local environment. Is this message indicating why my dev storekit stuff won't work? My in-app purchase product seems correctly configured, but shouldn't I be able to connect with this in dev/sandbox regardless of the 1.0 app (no storekit) awaiting review in the app store?
Thanks everyone for your help...I must be missing some critical step I'm not seeing.
Did you check if you use the Sandbox for testing?
https://github.com/appcelerator-modules/ti.storekit/blob/master/ios/example/app.js#L86
And are you aware that you have to sign out of your existing App Store account to test?
https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/TestingInAppPurchases.html
You have to use the Product ID (15Keys).

iTunes Connect doesn't ask for updated screenshots?

I've updated my iPhone app to support the iPhone 5 screen..
I've done this before for another app and I was forced to upload new screenshots taken with the iPhone 5.
This time however, iTunes Connect just displays the status as "waiting for review" and isn't mentioning anything about the screenshots..
I'm slightly worried something has gone wrong? App works great on iPhone 5 and simulator though.
It turns out Apple can block apps during the review process that have something wrong with metadata. If they decide your metadata is wrong they'll just change your app's status to "Metadata Rejected".
Here's the quote from the rules for this status:
Appears when specific metadata items aside from your binary have not
passed review. To resolve the issue, edit the metadata in iTunes
Connect and your existing binary is then reused for the review
process. You receive a communication from App Review in the Resolution
Center regarding the reason for the metadata rejection.
When things change to the AppStore (Apple adds a device) they might require you to get new screenshots. But if nothing changed in their system, it's normal that they don't ask.
Don't worry!
They copy over the screenshots from your last version of the app (or is your Retina4 screenshot section in itunesconnect empty?). So if you donĀ“t want to update them, it should be okay like this.
Chances are your app has not hit review (and now as of the 21st) and won't be reviewed until after the 29th. Once your app hits review, it will become rejected for the missing screenshots. If you want to save yourself some time and pain, update the screenshots while Apple is on their downtime for the Christmas holiday. You'll thank yourself later.
My app got accepted yesterday, no word about the screenshots.
App works fine on iPhone 5, mailed Apple to complain this probably is a bug (iTUnes Connect does not recognize localized Default.png, which is what is checked to verify it is iPhone 5 optimized I believe.)

Google Chrome extension crashes on update.

we are developing an extension, hosted in the Google chrome web store.recently - we've got complaints from our users that sometime they get a notification window saying "the extension crashed, click here to reload".
after a short research we found out that this is happening only when we upload a new version to the Chrome Web Store.
we started to look it up online and found no documentation what so ever for this, so we started to check for it ourselves.
we tried to see what exactly can cause this problem and if we can identify a distinctive cause.
our tries included updating only the manifest.json file, a css file, a js file or not changing nothing at all but the version number, and on each change we've uploaded a new version and update it in about 10 different machines.
the results were the same, when on each update we made, it caused the extension to crash on just a few of the machines, while updating perfectly fine on the others. each time different machines acted differently.
then, we thought it might be related to the fact we have a timer working in the background page, and it might be happening just at the time it is working.
so we tried to raise the timer's frequency (from 5 seconds to 100 millisecond), and it still acted the same, crashing on only 3 out of the 10 machines.
we ran out of ideas now, and it really causing a problem in terms of user experience to our extension's users.
did someone had this problem, or came across any extension crashes on version update?
is it a known bug in chrome's extension engine or are we doing something wrong?
I am having the same problem and I think I found the cause. Do you by chance, override the new tab page?
I am able to reproduce the problem 100% of the time and when I remove the new tab override from the manifest, the problem goes away.
I opened an issue: Issue 104401

iOS Crash Reporter Service / Alternative to MacDevCrashReports.com

I'm looking for a iOS crash reporter web service. I know MacDevCrashReports but they currently do not accept new sign ups.
I know there is a open source crash reporter framework on GitHub, but I don't want to put that stuff on a server, configure it and so on. A nice web service would be much nicer.
Thanks,
Patrick
I've been using Crittercism for my iOS and Android apps. It's saved me a LOT of time. It has a few more features than BugSense and Hoptoad.
MacDevCrashReports is running out, since I am not able to continue providing the service for free, the amount of data is just too huge. 100.000 crash reports e.g. require about 2GB of storage. BUT I am working on a new service with some friends to provide enhanced functionality for managing crash reports and other developer related data. You might want to check for HockeyApp for news about that.
Until then, you can also use the source MacDevCrashReports is based on, on your own web server. It is completely open source and available at GitHub.
The process of collecting crashes is using PLCrashReporter. Which is more reliable and is async-safe. There are also cases of crashes, like crashes in objc runtime, where it will result in a deadlock (Information by Landon Fuller, creator of PLCrashReporter).
Symbolication of PLCrashReporter created crash log files, can be done with the dSYM bundles, check this description.
Regarding the AppStore argument from Peter. As Patrick points out, this is not working for Ad-Hoc builds, which is one big issue, since you want to find and fix the crashes while testing. On the other side, the crash reports in iTunes Connect are very inaccurate:
The data set only updates once a day
The data is only available after users sync their devices with iTunes and only IF they agreed sending that data. Since most users don't understand the dialog, they deny
You only get a subset of crashes, the top 5
You don't get instant reports, as opposed using an in-app reporter
You don't get grouping of similar crashes as the web service does
You don't get a web interface to work with the crashes, make notes, mark as fixed, etc.
iTunes connect reports for my app to have 0 (zero) crashes, but in my database there are about 200! Check this blog post by futuretap about their experience and findings of using an in-app crash reporter.
There is a new service called BugSense . Give it a shot!
For ad-hoc crash reports you can use TestFlight. It has TestFlights SDK, using which you can collect crash reports and additional data, checkpoints, feedbacks.
If you're distributing through the App Store, you should get crash reports in iTunes Connect.
We're playing around with Hoptoad for some apps. Looks to work pretty well.
I've used HockeyApp and Crashlytics with great success. HockeyApp is nice in that once you've added your IPA file to their service they even provide a download page for you to distribute your build to your testers.
Crashlytics is a little cleaner from a UX perspective but it's still in beta and has a bit of a wait period whereas HockeyApp you can use immediately and it's a bit more mature. It also seems Crashlytics gives preference to apps that are already in the app store when you sign up for the program.
You can also check out BugHD,support iOS,Mac & Android Crash Report
For tracking crashes, I really like Appsee for iOS (although also great for Android apps). It gives detailed crash reports, and also session recordings that let you visually monitor all crashes within your app.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Appsee.start()
return true
}