How to force an iAd not to load? - ios5

I am trying to test an alternate ad provider for times when didFailToReceiveAdWithError is called.
In the iOS simulator I keep getting the test iAd, so I don't know what happens when an iAd fails to load.
2011-12-01 04:56:11.601 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 04:57:12.582 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 04:58:13.580 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 04:59:14.578 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:00:15.581 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:01:16.572 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:02:17.574 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:03:18.573 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:04:19.570 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:05:20.566 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:06:21.567 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:07:22.565 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:08:23.563 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:09:24.562 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:10:25.559 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:11:26.558 App Name -[theViewController bannerViewDidLoadAd:]
2011-12-01 05:12:59.340 App Name -[theViewController bannerViewWillLoadAd:]
2011-12-01 05:12:59.770 App Name -[theViewController bannerViewDidLoadAd:]
Is there a way to force an iAd to fail to receive an ad?

When running debug builds, you should see occasional errors. The iAd Programming Guide says:
While you are developing your application, iAd Network sends test
advertisements to your application. To assist you in validating your
implementation, the iAd Network occasionally returns errors to test
your error handling code. You can also test your error handling
support manually by turning your device’s wireless capability off.
I've definitely observed this behavior in my own apps. Or, like it says above, turn wireless off.

Theres no literal way to stop the iad simulation from sending an ad. The way I would do this is to put a random number generator with the code that sets up your ads. Have one value set up an iAd and another call the didFailToLoad method so your can test your new system.
Hope that helps

Related

Set Facebook Application ID dynamically in flutter for iOS

My iOS application requires multiple Facebook Applications. But, since we have to put the application ID and client ID on the info.plist file. So, it's impossible to switch or change the application ID without a dynamic way.
As per facebook documentation (https://developers.facebook.com/docs/reference/ios/3.24/class/FBSettings/), I found there is a method named setAppID/setDefaultAppID. Through this, I should be able to change the Facebook application ID dynamically. But, in the FBSDKCoreKit package, there are no such methods.
I tried:
FBSDKCoreKit.Settings.setAppID("appID") [No such method]
FBSDKCoreKit.Settings().setAppID("appID") [No such method]
FBSDKCoreKit.Settings.appId = "appID" [Doesn't work]
FBSDKCoreKit.Settings.shared.appId = "appID" [iOS application crashes]

App terminates on run

I am making an app in Swift and Xcode 6 and everything has been working fine, until now. When I go to run it, I get a delegate error and it crashes immediately. Here is the debugger code:
2014-11-11 10:18:48.282 Pro Cast[2987:65789] *** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'You have to call setApplicationId:clientKey: on Parse to configure Parse.'
I've never had an issue with Parse up tot his point. What can I do?
You need to set your Parse applicationID and clientID in the AppDelegate.m. Specifically in didFinishLaunchingWithOptions You can get your appID and clientID on the parse website.
Don't forget to import the parse framework.

App Crashes After Facebook Login

i made an iphone App which I've submitted in the App store . The App is there in the App Store for about an year . It has basically a faceBook Login button . One fine day it crashes, the moment i click my Facebook login Button in my iPhone 4, iPhone 4s.When i try to run it in my Macbookpro it also crashed . I'm getting the error
"Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull lowercaseString]: unrecognized selector sent to instance 0x2125ce8'".........
It works fine in my iPhone 3Gs...please help me .How can a iPhone App crash After working fine for about an year. Is it something related to Facebook updated methods or related to iPhone version.The App crashes exactly after FBrequest is called !please help me I'm losing my reputation .......
Looks like there is a string in your app that is set to point to NSNull. The app crashes when you are attempting to make that string lowercase.
Since NSNull points to a static object of type NSNull, trying to send the message "lowercaseString" to it causes the app to crash. (if it had been nil, Objective-C would simply ignore the message)
Could it be that there is a string somewhere that used to be set to a value, but for some reason now has been removed and is set to NSNull? It could be due to changes in the FaceBook-API but it could also be caused by changes in what the server is sending to you, different information in your facebook account and many other things. The parser you are using may be setting NSNull instead of nil whenever a NULL-value is sent by the server.
Bare in mind that it might also not be related to Facebook at all, since you find different behaviour on iPhone3GS.
You could try to look around for NSString values in your code that you are trying to make lowercase. Use the debugger to try to identify strings that are of type NSNull. You can compare your strings to NSNull like this:
if (text == (id)[NSNull null]) {
// String is NSNull!
}

Bundle Identifier

my bundle identifier : com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
app Name : World
my account name in apple : S111
what's my bundle identifier for insert into itunesConnect for upload app?
company name means "Organization Name" that exist in (Info->build) or means apple id ?
Do you have your own website and domain name? If you own the registration for the domain sample.com, and your app name is "world", then you would use com.sample.world. Don't use that because you don't own the domain registration for sample.com. What domain do you own?

Do "Product Name" and "Bundle Display Name" have to match?

I've recently submitted an app to the app store. I didn't really understand everything about the "Product name" and the "Bundle Display Name" until now. I originally was calling my app "Knock Out", so the Product Name is "iKnockout3D." I later changed the name to "Shatter 3D," so the app that I have in review has an iTunes name and bundle display name of "Shatter 3D," but a product and executable name if "iKnockout3D." Is this something that could cause it to be rejected? I'm trying to decide if I should pull it now and resubmit or take the risk and wait...
Thanks!
Nope. Rebranding your app doesn't involve the bundle identifier which is rather handy.