I have a problem with the command MOUSESTATE in my iPhone. The return value is always zero for the top of the screen, where the coverage and the battery are shown. Could this be a bug?.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
LOCAL Search_Cydia
Search_Cydia=DOESDIREXIST("/var/lib/cydia")
PRINT "SEARCHING CYDIA...",0,0
IF Search_Cydia=TRUE
PRINT "Cydia FOUND! iPhone/iPad Jailbroken",0,10
ELSE
PRINT "Cydia NOT FOUND!",0,10
ENDIF
Quote
Can't run "iPhone" on the iPhone "iPhone de ROM"
The iPhone "iPhone de ROM" doesn't have the provisioning profile with which the application was signed.
Click "Install and Run" to install the provisioning profile "XXX" on "iPhone de ROM" and continue running "YYY.app".
Quote
We encountered the issue when selecting the application on the Home screen - the app displayed a launch image then quit unexpectedly. This may be because iOS 4 uses a watchdog timer for applications; if an application takes too long to complete its initial startup, the operating system terminates the application.
?IFDEF IPHONE
IMPORT "C" void glb_BannerInit()
?ELSE
FUNCTION glb_BannerInit:
DEBUG "[WIN] Banner Init (sim) \n"
ENDFUNCTION
?ENDIF
Quote// This filename is "AppViewController.h"
#import "iAd/ADBannerView.h"
@interface AppViewController : UIViewController <ADBannerViewDelegate> {
ADBannerView * bannerView;
UIView * _appView;
UIWindow * _appWindow;
}
@property (nonatomic, retain) IBOutlet UIView * appView;
@property (nonatomic, retain) IBOutlet ADBannerView * bannerView;
@property (nonatomic, retain) IBOutlet UIWindow * appWindow;
- (void)createBannerView;
- (void)showBanner;
- (void)hideBanner;
- (void)changeBannerOrientation:(UIInterfaceOrientation)toOrientation;
@end
// This filename is "AppViewController.mm"
#import "AppViewController.h"
@implementation AppViewController
@synthesize appView = _appView;
@synthesize bannerView; // = _bannerView;
@synthesize appWindow = _appWindow;
# pragma mark -
# pragma mark View
- (void)viewDidLoad {
[super viewDidLoad];
// NSLog(@"viewDidLoad");
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
// NSLog(@"viewDidAppear");
}
//- (void)viewWillAppear:(BOOL)animated {
// NSLog(@"viewWillAppear");
// if (bannerView) {
// UIInterfaceOrientation orientation=self.interfaceOrientation;
// [self changeBannerOrientation:orientation];
// }
//}
- (void)dealloc {
[super dealloc];
}
//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
//
// return (interfaceOrientation == UIInterfaceOrientationPortrait) | (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) | (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
//}
#pragma mark -
#pragma mark ADBanner
//- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
//if (bannerView) {
// [self changeBannerOrientation:toInterfaceOrientation];
//}
// NSLog(@"shouldAutorotate");
//}
- (void)changeBannerOrientation:(UIInterfaceOrientation)toOrientation {
if (&ADBannerContentSizeIdentifierPortrait != nil)
{
if (UIInterfaceOrientationIsLandscape(toOrientation)) {
bannerView.currentContentSizeIdentifier=ADBannerContentSizeIdentifierLandscape;
self.view.frame=CGRectMake(0,0, 320, 120);
} else {
bannerView.currentContentSizeIdentifier=ADBannerContentSizeIdentifierPortrait;
self.view.frame=CGRectMake(0,0, 480, 100);
}
}else {
if (UIInterfaceOrientationIsLandscape(toOrientation)) {
bannerView.currentContentSizeIdentifier=ADBannerContentSizeIdentifier480x32;
self.view.frame=CGRectMake(0,0, 320, 120);
} else {
bannerView.currentContentSizeIdentifier=ADBannerContentSizeIdentifier320x50;
self.view.frame=CGRectMake(0,0, 480, 100);
}
}
}
- (void)bannerViewDidLoadAd:(ADBannerView *)banner {
NSLog(@"bannerViewDidLoad");
// self.bannerView.hidden=NO;
[self showBanner];
}
- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
// self.bannerView.hidden=YES;
// NSLog(@"bannerView");
NSLog(@"E R R O R: '%@'",error);
// [self hideBanner];
}
- (void)createBannerView {
// NSLog(@"Banner creating...");
_appWindow = [[UIApplication sharedApplication] keyWindow];
bannerView=[[[ADBannerView alloc] init] autorelease];
bannerView.delegate=self;
self.view.frame = CGRectMake(0,430, 768, 50);
bannerView.frame=CGRectMake(0,530, 768, 50);
if (&ADBannerContentSizeIdentifierPortrait != nil)
{
bannerView.currentContentSizeIdentifier=ADBannerContentSizeIdentifierPortrait;
} else {
bannerView.currentContentSizeIdentifier=ADBannerContentSizeIdentifier320x50;
}
[self.view addSubview:self.bannerView];
[_appWindow addSubview:self.view];
[_appWindow makeKeyWindow];
// [_appWindow makeKeyAndVisible];
}
- (void)showBanner {
// NSLog(@"Show banner");
CGRect bannerFrame=bannerView.frame;
bannerFrame.origin.y=0;
[UIView beginAnimations:@"showBanner" context:NULL];
bannerView.frame=bannerFrame;
[UIView commitAnimations];
}
- (void)hideBanner {
// NSLog(@"Hide banner");
CGRect bannerFrame=bannerView.frame;
bannerFrame.origin.y=-bannerFrame.size.height;
bannerView.frame=bannerFrame;
}
#pragma mark -
#pragma mark GLB
- (void)initBanner {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
[self performSelectorOnMainThread:@selector(createBannerView) withObject:nil waitUntilDone:YES];
[pool release];
}
@end
extern "C" void glb_BannerInit() {
AppViewController * UIGlbasic;
UIGlbasic = [[AppViewController alloc] init];
[UIGlbasic createBannerView];
// [UIGlbasic release];
[UIGlbasic retain];
}