Apple's iAd's sample code not working as expected - iphone

I am trying to implement iAd's in my app and written all the required code for this... But for reasons unknown to me and my pals, my code is not working and i am not able to see the iAd's in my app. Even sample code from apples regarding iAd's is not working on my mac. The same code worked absolutely fine when ran on another system from another location. me and my pals are scratching our heads due to this from the past 3 days. I am posting two screenshots of the same code ran from two different locations and machines.... i am using X-code version 3.2.5, SDK version 4.2, Mac version 10.6.
All the inputs of any kind are appreciated....

When testing iAd on your iPhone simulator you will obtain a couple of positive and negative feedbacks for each iAd request. This is made to give you the possibility to test what will happen when you receive an ad, and when you do not receive it.
Generally, if you launch the application a couple of times, you should be able to see the ads appear almost once.
Otherwise, to better investigate the problem, you should post some example code from your app, to understand how you implemented the delegate methods to handle iAd events.

Related

Appcelerator Live View Console.Log not working

Odd one this. Ever since upgrading to iOS10 and the latest Appcelerator SDK (5.5.0), I can't get even a simple console.log("hi!") to show anything in the console when I'm testing on an iPhone 6s Plus connected to my Mac via USB, using LiveView.
I've tried changing it to Ti.API.info("hi!") - which I believe is the old way to do it - to no avail. If I change it to alert("hi!"), that works fine. However, it's not as useful as console.log used to be when developing things which MUST be tested on a connected device (the camera, in my case).
I've Googled this, plus done extensive searching on StackOverflow.
It may be that this is so new that no-one has noticed yet.
Can anyone help?
It's a known issue. Apple changed something with the way they log data. The Appcelerator SDK has to be adapted to this changes. I'm pretty sure they'll fix it asap. You'll have to await an update.
Greetings
Edit: Here is the corresponding jira ticket (https://jira.appcelerator.org/browse/TIMOB-23786)

UIScrollView doesn't work after App Store update

I have submitted an update of my application to iTunes which I got it approved today. Lately I have downloaded it on my device from iTunes to check and I found one functionality is not working as expected.
Problem:
I have a UIScrollView in my app and has horizontal scrolling. After the update I am not able to scroll it. I restarted the app and then it starts scrolling but scrolling infinite horizontally. I know this sounds stupid.
Immediately I opened my project code and ran it on device to check the issue using development provisioning profile but it is working perfectly over there.
Can any one suggest me what can be the issue? Or how can I debug that what went wrong when I submitted the update to iTunes?
You give us very little to work with, but here are a couple of suggestions:
Make sure you're looking at exactly the same code
Make sure you're testing code built with exactly the same compiler settings. For example, usually when you're running from Xcode you'll compile in debug mode. Don't. Compile it in "release" mode (with all the optimisations switched on)
Don't worry about provisioning profiles; they won't be the problem
If it's affecting all iOS 5 and 6 devices, though, I do wonder how you were testing it? And how fundamental is the scrolling to your app? It did, after all, pass Apple's testing. Maybe it's only happening on your devices because it has some "junk" left over from your previous testing?

didUpdateToLocation not called with iOS 4 in my device...?

I try lots and lots and searching most of posts, all with same answers. But I have take all the things included which is needed to use location service. My application properly get location and called didUpdateToLocatioon in simulator 5.1. But when I try same code with simulator 4.3, it gives me "server did not accept client registration 68". And when I try to debug the same code with my device with OS 4.3.5, it always go into didFailWithError.Can anyone have the same issue I had since last 2 days. And now I'm really frustrating with same answer from all around which I already did.
It's just fault of device, with some issue I just switched off the device and now when I run my app in it, without a line of code change. It works fine.
After 3 day just wasting my time to posting and searching all.
So, my suggetion is if anyone who have the same issue like when u try to find location and it go into "didFailWithError".
Just restrart your device.

detecting and preventing crashed on older iOS (Suspecting EventKit)

Dear Scholars.
I have created a simple application using the latest SDK (4.2.1), Which runs smoothly and error free on all devices with iOS 4.x.x.
Lately I am getting some comments from users with older iOS version complaining the application is crashing on start, on Apple's crash log I see nothing at all.
Pushing my investigation forward, the only suspect I have at the moment is the use of EventKit class, which if memory serves, where introduced only after iOS4.
I am using it very lightly in one of my classes, and it works perfectly on iOS4.2.1
#import <EventKit/EventKit.h>
//some time later
[self setADateInCal: [MyTimeArray objectAtIndex:0] :formatterDate];
Thus my Questions:
Can this be the issue that crashes my application on iOS < 4 ?
How can I prevent it without dropping the feature for people with iOS4
In general, How can I test this? I have the latest official iOS on my device and SDK, the simulator is limited to how back it can go in regrading to iOS version... any magical way to do so?
1.) Yes. If it wasn't in the API in <4.0 than anyone not running >4.0 will crash.
2.) Test to see if the class is available using NSClassFromString (Google for examples) and respondsToSelector in correspondence to see if the method you want is available to use in the OS version the client is running. You will also probably need to weak link the EventKit framework (again Google for how to do this).
3.) The only real way to test this is to keep a device at the OS you want to test. Personally, I have an old iPhone that I never update running 3.1.3 for things just like this. Alternatively, you can keep old installs of xcode+iOSSDK on different partitions or something and use their simulator. (for future updates i guess since you obviously haven't done this for <4.0). But no, there is no magical way to do this. sorry.
edit for clarity on Number 2: Basically you will check to see if the class/method you want is available on the OS version you are currently running, if it is you can use it, if not you will have to find a work around (omit completely or do it another way that is compliant with older versions).
Yes it could be causing the crash. Issues with missing libraries do not report anything in the apple crash log.
To prevent it from happening you need to do two things,
Weak link the event kit library in xcode.
Check for its existence in your code with something like
,
if(!NSClassFromString(#"EKEventKit")){
//do stuff with event kit
}
The only way to test on the actual iOS version is to get hold of a physical device running ios < 4.

iAdSuite not working

Ive downloaded Apple's iAd code examples iAdSuite and when I compiled it to both the simulator and the device (4.1) I never see an ad. Anyone know whats going on?
I had the same problem last week. It was a problem on Apples side since it works again since a few days without any changes on my side.
Do you still have problems receiving test ads?
#huber_th I think you're right, delivery of test ads from Apple is erratic at times, for hours and even days. Testing can be time-consuming to put it mildly.
The answer is that I'm based in Sydney where iAd is not currently working.