Menu

Show posts

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

Topics - msx

#61
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?.
#62
Tengo un problema con la pantalla táctil del iPhone. Resulta que la zona superior del móvil (donde aparece el nombre de la compañía, la cobertura, la batería...) no responde al táctil con el comando MOUSESTATE, ¿es ésto normal?
#63
Bueno pues se me ha ocurrido un método muy sencillo para detectar dispositivos con Jailbreak. Quizás a alguno os pueda resultar útil, aunque mi opinión es que no sería conveniente discriminar dispositivos en función de que tengan o no el Jailbreak, ya que eso no tiene por qué significar que hayan pirateado nuestro software, es posible que lo haya comprado legalmente, y eso no lo podremos saber nunca. En caso de hacer algún tipo de discriminación, lo ético sería avisarlo en la descripción de la AppStore para que lo tengan en cuenta antes de pagarlo.

Bueno, como ya sabemos, la primera misión del Jailbreak es colarle la aplicación Cydia y a partir de ahí ya todo es posible. Pues el truco es tan simple como comprobar que existe la aplicación Cydia en el dispositivo, para eso hacemos la siguiente prueba:

Code (glbasic) Select

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


Saludos  :booze:
#64
Mi desesperación me obligar a abrir este post para que la gente más experimentada puedan echar una mano a los novatos como yo. Llevo un mes intentando publicar una mierda de programa para que me sirva de experiencia antes de sacar un juego que estoy terminando. El caso es que me he estancado, con lo que me he deprimido y ya no tengo ganas de seguir con el juego hasta que no sea capaz de publicar éste.

Es un simple programa que te da los resultados online de las principales ligas de fútbol europeas.

Comienza mi problema con el dichoso Application failed codesign verification cuando compilo en Release. Sin embargo el programa se instala correctamente y funciona, con lo que no alcanzo a comprender en que repercutirá.

Cuando compilo en Distribution me sale lo siguiente:
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".

Y pulso Install and Run
¿ésto os sale a vosotros también?.

A continuación se instala en mi iPhone y al final no llega a arrancar y me sale en el Xcode Error from Debugger: The program being debugged is not being run
¿ésto es normal?

Pero la compilación es Succeeded  :(

También deciros que ayer mismo instalé de nuevo el MAC OS X 10.6.6 en mi Hackintosh con Xcode 3.2.6 e iOS 4.3 y desde entonces cuando compilo me salen 190 veces el siguiente warning ld: warning: CPU_SUBTYPE_ARM_ALL subtype is deprecated: /Users/ruben/Desktop/XCode/Lib/libGLBasiciPhone-egl.a(iPhoneAppController.o)
¿y ésto os pasa?

No sé si estos errores afectan para la publicación del programa ya que como os he dicho el resultado es Succeeded, en caso de que no afecte... como publicarlo. He probado a buscar el .app y comprimirlo y subirlo con el Uploader, pero en principio lo hace bien, sin embargo ya me lo han echado para atras 4 veces porque dice:
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.

Por último lo he intentado desde el Xcode, usando Build and Archive (cosa que no sabía que existia), le he dado a Validate y después a Submit y en principio esta subido al Itunnes Connect, pero no sé si esta es la forma correcta.

Bueno, como veréis estoy sumido en un mar de dudas y muy desmoralizado, si alguien más experimentado pudiera ayudarme estaría muy agradecido.

Gracias  :nw:


#65
Felicidades Iván, que pases un gran día  :enc: :enc:
#66
Llevo una semana peleandome con el maldito warning:

Application failed codesign verification.  The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)

He borrado todos los certificados y llaves como 5 veces, y los he vuelto a generar otras tantas. He creado y borrado otras tantas veces el provisioning profile y al final siempre me da el mismo error. ¿A alguien le ha ocurrido ésto? ¿cómo se soluciona?.

zenkiu

#67
Bueno, pues para el que quiera integrar iAds en su aplicación para que corra en IOS 4.0 y todas las versiones posteriores o voy a dejar los pasos que yo he seguido y que ha funcionado al menos con 4.0.2, 4.1, 4.2.1, 4.3.1 (verificado por ampos y por mí mismo).

Consiste en seguir los pasos del gran matchy (gracias) con una pequeña modificación.

1.- Al inicio de nuestra aplicación (fuera del bucle SHOWSCREEN) añadimos glb_BannerInit()
2.- Al final de nuestra aplicación añadimos:
Code (glbasic) Select
?IFDEF IPHONE
IMPORT "C" void glb_BannerInit()
?ELSE
FUNCTION glb_BannerInit:
DEBUG "[WIN] Banner Init (sim) \n"
ENDFUNCTION
?ENDIF


3.- Compilamos para Iphone.
4.- Dentro de la carpeta Proyecto\XCode\Classes creamos dos archivos AppViewController.h y AppViewController.mm.
5.- En AppViewController.h escribimos con un editor de texto:
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

6.- En AppViewController.mm escribimos con un editor de texto:
Code (glbasic) Select
// 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];
}

NOTA: A diferencia del código de matchy, aquí comprobamos la existencia de la variable ADBannerContentSizeIdentifierPortrait que solo está definida a partir de iOS 4.2 y la salida del iPAD, y en función de la existencia o no, usamos la variable ADBannerContentSizeIdentifierLandscape y ADBannerContentSizeIdentifierPortrait o usamos ADBannerContentSizeIdentifier480x32 y ADBannerContentSizeIdentifier320x50, respectivamente. Esta discriminación se hace con un simple IF.
7.- Vamos a nuestro Mac o Hackintosh (como el mío).
8.- Abrimos nuestro Proyecto con XCODE.
9.- Sobre la carpeta Classes que aparece en el programa XCode (menú de la izquierda) pulsamos botón derecho y seleccionamos Add Files.
10.- Añadimos los archivos AppViewController.h y AppViewController.mm.
11.- Expandimos el directorio Target, y sobre el nombre de nuestro proyecto (iPhone) pulsamos botón derecho y elegimos Get Info.
12.- Seleccionamos pestaña Build y seleccionamos All Configurations
13.- En Base SDK seleccionamos el que tengamos (seguramente IOS 4.2)
14.- En iPhone OS Deployment Target seleccionamos IOS 4.0.
15.- Vamos a carpeta Framework, botón derecho y Add Framework.
16.- Añadimos iAd.framework y CoreGraphics.framework (éste no sé si es necesario pero yo lo pongo).
17.- Build y a esperar...

Bueno, espero que os sirva, si alguien quiere traducirlo... que tenga paciencia  :D

También he adjuntado un archivo RAR, con los ficheros que hay que crear por si a alguien no le apetece trabajar tanto  =D

Saludosssss  :enc: :enc:

Actualizado tutorial, totalmente operativo para iOS>=4.0

[attachment deleted by admin]
#68
Who knows Opera Mobile Store? They promise a 70% of sales.

http://publishers.mobilestore.opera.com/register/devlogin.php
#69
GLBasic - en / Light sensor
2011-Feb-19
how could I measure the light sensor of iphone?  O_O

Thank you.
#70
I tried to test the examples that use the newton dll and shows me an error, what I'm doing wrong?

Thank you
#71
Is there a way to comment several lines of  code using / * xxxx  * / as in C language? If that can be added for me would be helpful.
#72
When I add a background image with LOADBMP Command the black area of the Sprites are displayed transparents (I use the DRAWSPRITE Command). Does anyone know what happens?.  :doubt:
#73
Siento mi pobre inglés, por eso escribiré en español y traduciré con google.

He seguido el manual para compilar en IPhone, ya estoy registrado en GLBasic como usuario Premium, así que selecciono IPhone en Opciones dentro Compilador y la resolucion a 320x480 y procedo a compilar. Finalmente busco el fichero .xcodeproj y no lo encuentro por ningún sitio, en su lugar encuentro un fichero .exe ¿podéis ayudarme?. Gracias

Translate by Google:

Sorry my  poor English, so write  in Spanish and translate it with  google.

I followed the manual for compiling on iPhone, I'm registered as a GLBasic Premium user, so I select iPhone in Compiler Options and the resolution to 320x480 and proceed to compile. Finally look for the .xcodeproj file and I can not find it anywhere, instead find a .exe file. Can you help?. Thanks
#74
Hi, I'm a new user of GLBasic and I have my first doubt. What is the equivalent of grabsprite command for iphone?.

I'm sorry for my poor English.

Thank you