Invalid product identifier - iphone

I have tried numerous ways to fix this error, but they haven't fix my problems.
I used NSLog and found out that the method productRequest:didReceiveResponse wasn't called.
But I don't know what could cause this.
Here are the things that I have tried:
Upload the binary
Delete app from the device and reinstall it from xcode
waited for a day after i submit the product in iTunes connect
checked 'clear for sale'
doubled checked that i use the full product ID when making the request
Basically i tried everything from Troy Brant's post
http://troybrant.net/blog/2010/01/invalid-product-ids/
But I'm still getting this error.
Please answer if you have any suggestion.

Ensure that you have an SKProductsRequestDelegate and that the SKProductsRequest delegate object is being set, otherwise no messages will get passed around appropriately.

Related

iCloud and GEOResourceManifestServerRemoteProxy: Lost connection to geod warning

I am testing my app that uses iCloud. Sometimes, when I fire up the app I get the following warning in the console:
GEOResourceManifestServerRemoteProxy: Lost connection to geod
Once I get this warning I don't seem to get any data from iCloud. I have tried searching this issue, but have found very little information on it.
Any suggestions on how one should try to detect this issue and try to handle it?
I realize that you asked this back in March, but according to this it can happen when a login (like a connection to FB) has timed out.
If you do a stacktrace and see , then this should help.
And here is the code for that interface, if that's helpful.

XCode debugger not helping find device-only issue

So, I have an iOS tabbed app (live and free in the store [http://itunes.com/apps/iphoundyou]). One tab is a grouped tableview, with the number of groups (1 or 2) dependent on some JSON that a web service returns. The JSON is valid and straightforward. Handling it seems to be easy, and, when run in the simulator, behaves as expected. However, I just found that when run on the device, if the two section reaction is needed...it crashes.
"ok" I thought "I'll just hook up my device, launch the debugger, replicate the crash, and figure out where I have a bug"
However, when I did that, I get the most unhelpful response I could expect:
So, given that it works in the simulator, is there any suggestions as to how else to track down the flaw? The code for the tableview is nothing special, along the lines of "if this JSON key exists, number of sections=2...with the number of rows of that section equal to the number of items in another array within the JSON"
Another note: I recently started seeing a dozen or so of these when launching an app:
unable to read unknown load command 0x25
unable to read unknown load command 0x26
Thanks so much.
In my case it turned out that it was just my own error: I'd updated my device OS but didn't have that SDK (I was behind in updating XCode)

What causes (and how can I fix) this odd Core Location error?

ERROR,Generic,Time,320195751.128,Function,"void
CLClientHandleRegistrationTimerExpiry(__CFRunLoopTimer*,
void*)",Registration timer expired,
but client is still registering!
There are only a few mentions of this problem that I was able to dig up in the wider Internet, and nobody has useful info. Here's the context:
I have an app that monitors the device's location via CLLocationManager's startUpdatingLocation method. It starts monitoring, runs for a little while, then this message pops up in the debug output. From that point forward, no more location updates are delivered.
This error is killing the location functionality of the app, and I'm at a loss as to what may be causing it. It even has an exclamation point at the end, which means it's clearly an exciting error.
Update:
Though I never found a solution to the problem, or figured out why it happens in the first place, I've also lost the ability to reproduce it. This seems to have happened during some period of time in which I did many things, including a general change in code structure followed by update to the iOS 5 beta. Something there seems to have silenced the issue for me.
Have you implemented
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
and does this catch it?
You need to check for kCLErrorNetwork, kCLErrorDenied, kCLErrorHeadingFailure and kCLErrorLocationUnknown in the normal run of things but I'm wondering if there are other errors that the delegate can still catch?
This could give you the opportunity to stop and then restart location services.
Going off of what #schillace had to share, is it possible that you're attempting to force location updates without heeding the user's authorization status?
Try to hold off on calling -startUpdatingLocation until you know that [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized.
I don't know if this is the answer or not, but here's a hint...I'm working with assetFromURL and I'm getting intermittent failures to load images from the asset library. So I wrote a bit of code to test a theory, that loads every url in the library very quickly. I started seeing this error with this bit of code.
So...my theory is that if you make a call that causes the location manager to show the "app wants your location" dialog, and then you continue to make calls while that dialog is up, you'll get this error. Once I acknowledged the dialog and re-ran the program, I didn't see this error any more.
Hope that helps, it's just a guess.
Are you sure this is a problem? It looks to me like you are debugging to a breakpoint (effectively suspending the application) before the registration to the location manager is completed. Meanwhile, the timer expires and you haven't finished your registration. If you take out the breakpoints, does the message ever appear?
Are you doing location stuff on the main thread? I had all sorts of bizarro issues with CLLocation API calls from a background thread. I moved a couple of key setup calls into the main thread, then everything worked fine.
I got the same error and figured out that it was because I had forgotten to mention that the class implements the CLLocationManagerDelegate in the .h file.
Adding the CLLocationManagerDelegate to the header file, and the following line to point to the delegate solved the error for me.
locationManager.delegate = self;
[locationManager startUpdatingHeading];
I got this when implementing the timeout (perform selector after delay) in LocateMe, my previous code used another method. I don't know if this is a clue.
I had forgotten to add
Privacy - Location When In Use Usage Description
I did that and the error went away for me.

Problems with Twitter+OAuth+iPhone. Kids are Crying

This case is really strange, i've spent 2 whole days to get Twitter Oauth working with the iPhone and i failed over and over again. Its strange since most of the people don't seem to have the same problem as me.
First of all, the Consumer Key and Consumer Secret is okay, i tried with 2 OAuth apps (Twitter) with every possible configuration and got nothing, i even tried with a completely funcional app and the result was the same. So the Twitter app is okay, the problem doesnt lie there.
I've tried Bengottlieb's solution: http://github.com/bengottlieb/Twitter-OAuth-iPhone provided my Consumer Key and Secret and all i've got from Twitter is a "Sorry, the page doesn't exist".
I tried with "ShareKit" which is intended to be a n00b's proof drop in component, you just need to provide your Consumer key and Consumer Secret and i receive the message: "Request Error: There was a problem requesting authorization from Twitter".
I've tried including only OAuthConsumer and implementing code as tutorials say and i receive again the "Sorry, the page doesn't exist" page.
I'm using XCode 3.2.3 with the SDK 4.0 and i will download the 3.2.4 as another desperate solution.
Any help will be appreciated and maybe you achieve to make kids stop crying :'(
Thanks in advance :)
Thanks Gordon, your advice took me to the solution. I was receiving from Twitter the message "Failed to validate oauth signature and token". I googled it and found that i needed to change the Time zone.
If someone has the same problem on your Mac do this:
-Click on the clock and then "Date & Time preferences"
-Check "Set date and time automatically with: Apple Americas/U.S. (time.apple.com)"
That's all, the problem was with the timestamp which had been generated with an incorrect hour.
2 days wasted for such stupid thingy XD
I know you said your consumer key / secret pair are correct, but unless you started messing around in ShareKit's code, that's basically the only thing that could be wrong. Are you absolutely, 100% sure you're using the consumer key and secret provided to you by Twitter when you registered the application?
Same problem occurred in device. It was because of the wrong time in device. If the device time is set in the past(like the real time is 10:00, but time is set as 9:30 in device), then also this problem will arise.
So, check your time setting in device, if this problem arises.

What causes “EXC_BAD_ACCESS” error when getting wifi information?

I'm getting the following error
Program received signal: “EXC_BAD_ACCESS”.
warning: check_safe_call: could not restore current frame
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
My app is to get wifi information
libHandle = dlopen("/System/Library/PrivateFrameworks/ MobileWiFi.framework/MobileWiFi",RTLD_LAZY);
open = dlsym(libHandle, "Apple80211Open");
bind = dlsym(libHandle, "Apple80211BindToInterface");
close = dlsym(libHandle, "Apple80211Close");
scan = dlsym(libHandle, "Apple80211Scan");
open(&airportHandle);
bind(airportHandle, #"en0");
When the code reaches open(&airportHandle), I receive the error but I'm not sure because at this line it stops.
How can I resolve this?
For any EXC_BAD_ACCESS errors, you are usually trying to send a message to a released object. The BEST way to track these down is use NSZombieEnabled.
This works by never actually releasing an object, but by wrapping it up as a "zombie" and setting a flag inside it that says it normally would have been released. This way, if you try to access it again, it still know what it was before you made the error, and with this little bit of information, you can usually backtrack to see what the issue was.
It especially helps in background threads when the Debugger sometimes craps out on any useful information.
VERY IMPORTANT TO NOTE however, is that you need to 100% make sure this is only in your debug code and not your distribution code. Because nothing is ever released, your app will leak and leak and leak. To remind me to do this, I put this log in my appdelegate:
if(getenv("NSZombieEnabled") || getenv("NSAutoreleaseFreedObjectCheckEnabled"))
NSLog(#"NSZombieEnabled/NSAutoreleaseFreedObjectCheckEnabled enabled!");
If you need help finding the exact line, Do a Build-and-Debug (CMD-Y) instead of a Build-and-Run (CMD-R). When the app crashes, the debugger will show you exactly which line and in combination with NSZombieEnabled, you should be able to find out exactly why.
EXC_BAD_ACCESS always occurs when accessing memory you already have released. In your sample code, I can't see where airportHandle is initialized, or wheter it is initialized at all for that matter.
If it has been initialized but you just forgot to post that code, you should try checking if you released the handle somewhere.
To debug such an access violation, it is often useful to set the NSZombieEnabled Environment flag to YES. This will cause the Obj-C runtime to log access to released memory to the console. You can find a full tutorial on how to use that information together with Instruments to find your problem.
You can do it EASILY with Instruments: See this really great post:
http://www.corbinstreehouse.com/blog/2007/10/instruments-on-leopard-how-to-debug-those-random-crashes-in-your-cocoa-app/comment-page-1/#comment-43762
EXC_BAD_ACCESS. is mainly found when u released any object which you have further needed in future.it is unable to find but there is solution to find out u must have to be in a DEBUG mode . then follow these links
http://www.codza.com/how-to-debug-exc_bad_access-on-iphone
it really works
I'm working on the same thing, and I get the same issue. If you enter in debug mode, you can see that when we use open = dlsym(libHandle, "Apple80211Open"); the function still equals to 0.
So in my opinion you are looking for the Apple80211Open in a framework which did not contain this function.
Apple80211Open is in the Apple80211 private framework which is outdated in >iOS 2.x SDK. The equivalent in the MobileWifi framework, which is for the 3.x and 4.x SDK, is /System/Library/SystemConfiguration/WiFiManager.bundle/WiFiManager instead of /System/Library/PrivateFrameworks/MobileWiFi.framework/MobileWiFi