he conseguido un iphone

Re: he conseguido un iphone

Postby Antonio Linares » Wed Dec 22, 2010 7:39 am

Manuel,

A la espera de que la lista se pronuncie, he conseguido solucionar el error con este código que parece funcionar bien :-)

Code: Select all  Expand view

#include <dirent.h>
#include <fnmatch.h>

DIR * opendir$INODE64$UNIX2003( char * dirName )
{
    return opendir( dirName );
}

struct dirent * readdir$INODE64( DIR * dir )
{
    return readdir( dir );
}

BOOL closedir$UNIX2003( DIR * dir )
{
    return closedir( dir );
}   

int fnmatch$UNIX2003( const char * pattern, const char * string, int flags )
{
    return fnmatch( pattern, string, flags );
}
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby mastintin » Wed Dec 22, 2010 7:40 am

Antonio Linares wrote:Manuel,

Reportado el error de File() en el simulador en la lista de Harbour:
https://groups.google.com/group/harbour-devel/browse_thread/thread/d34ef6434f5de2fa?hl=es

Gracias Antonio . Mi Ingles es inexistente y estas cosas me son muy complicadas :-).
Feliz Navidad a todos.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby mastintin » Wed Dec 22, 2010 7:54 am

Añado las funciones al archivo simuls.m que tenemos para compatibilidad con el simulador ....
Sabes algo de las funciones write$UNIX2003( int i, char * s ) y fopen$UNIX2003( void ) ?
Parece que tienen el mismo problema ... a ver si Vicktor nos lo soluciona.
Según yo creo ( cosa que puede ser mentira , dado que mi ingles ... ) parece como que cuando generamos las librerias de harbour se hace automaticamente y toman el formato -arch x86_64 correcto para fivemac , pero para el simulador deben ser -arch i386 y aqui han hecho cambios apple en las librerias .
saludos.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Antonio Linares » Wed Dec 22, 2010 8:17 am

Manuel,

mastintin wrote:Una cosa queda en el tintero ... Xcode no generará la aplicacion si no tenemos un certificado de desarrollador de apple .
Si uno se dedica profesionalmente a programar no supone un gran problema el desembolso a realizar , pero si solo se pretende "probar" o usamos el simulador que no necesita certificado ( de momento no disponible :D ) o usamos un iphone con jailbreak y "simulamos" que tenemos certificado para que xcode compile el programa ...
Seguir esta guía para el tema del certificado ( lo del paquete para cydia es otro tema ) http://iapps.scenebeta.com/tutorial/como-publicar-una-aplicacion-en-cydia-xcode-3-2-3iphone-sdk-4


Para usar este tipo de certificados necesitas hacer jailbreak ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby Antonio Linares » Wed Dec 22, 2010 8:25 am

Manuel,

mastintin wrote:Sabes algo de las funciones write$UNIX2003( int i, char * s ) y fopen$UNIX2003( void ) ?


Prueba con estas:
Code: Select all  Expand view
#include <dirent.h>
#include <fnmatch.h>

DIR * opendir$INODE64$UNIX2003( char * dirName )
{
    return opendir( dirName );
}

struct dirent * readdir$INODE64( DIR * dir )
{
    return readdir( dir );
}

BOOL closedir$UNIX2003( DIR * dir )
{
    return closedir( dir );
}   

int fnmatch$UNIX2003( const char * pattern, const char * string, int flags )
{
    return fnmatch( pattern, string, flags );
}

int write$UNIX2003( const void * buffer, size_t size, size_t count, FILE * stream )
{
    return fwrite( buffer, size, count, stream );
}   

FILE * fopen$UNIX2003( const char * fname, const char * mode )
{
    return fopen( fname, mode );
}
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby mastintin » Wed Dec 22, 2010 9:09 am

Antonio Linares wrote:Manuel,

mastintin wrote:Una cosa queda en el tintero ... Xcode no generará la aplicacion si no tenemos un certificado de desarrollador de apple .
Si uno se dedica profesionalmente a programar no supone un gran problema el desembolso a realizar , pero si solo se pretende "probar" o usamos el simulador que no necesita certificado ( de momento no disponible :D ) o usamos un iphone con jailbreak y "simulamos" que tenemos certificado para que xcode compile el programa ...
Seguir esta guía para el tema del certificado ( lo del paquete para cydia es otro tema ) http://iapps.scenebeta.com/tutorial/como-publicar-una-aplicacion-en-cydia-xcode-3-2-3iphone-sdk-4


Para usar este tipo de certificados necesitas hacer jailbreak ?


Para que las aplicaciones funcionen con este certificado SI necesitas tener el Jailbreak . El truco es para poder compilarlas en el ordenador y probarlas en un iphone con jailbreak .Sin el ni siquiera las puedes compilar ...
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby mastintin » Wed Dec 22, 2010 9:25 am

User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Antonio Linares » Wed Dec 22, 2010 9:43 am

Manuel,

En la lista no lo tienen claro y de momento nuestra solución funciona :-)

Has podido probar con las DBFs y ver si ya funcionan bien en el simulador ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby mastintin » Wed Dec 22, 2010 10:16 am

Antonio Linares wrote:Manuel,

En la lista no lo tienen claro y de momento nuestra solución funciona :-)

Has podido probar con las DBFs y ver si ya funcionan bien en el simulador ?

DE momento no , estoy fuera de casa ( windows) pero al medio dia lo miro :D .
en un foro de la aplicacion BASS donde tenian el mismo problema el administrador dijo :


Re: BASS for iOS (iPhone/iPad)
« Reply #94 on: 24 Nov '10 - 16:49 »
Reply with quoteQuote
The current BASS builds were created with the iOS 4.1 SDK, which has added the "$UNIX2003" decoration/suffix to several functions in the simulator builds. The iOS 4.2 simulator apparently doesn't like that because those functions don't exist with the decoration on a real device, but device builds don't include the decoration anyway, so the error message does seem a bit unnecessary.

I will post rebuilds of BASS and the add-ons using the iOS 4.2 SDK (which doesn't add the "$UNIX2003" decoration) tomorrow.


asi que tu solucion parece totalmente acertada :D
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Antonio Linares » Wed Dec 22, 2010 11:07 am

Con estas nuevas funciones, File() y MemoRead() ya funcionan correctamente en el simulador :-)

Ya las he subido al repositorio

Code: Select all  Expand view
#import <UIKit/UIKit.h>
#include <dirent.h>
#include <fnmatch.h>
#include <sys/stat.h>

DIR * opendir$INODE64$UNIX2003( char * dirName )
{
    NSLog( @"opendir" );
    return opendir( dirName );
}

struct dirent * readdir$INODE64( DIR * dir )
{
    NSLog( @"readdir" );
    return readdir( dir );
}

BOOL closedir$UNIX2003( DIR * dir )
{
    NSLog( @"closedir" );
    return closedir( dir );
}  

int fnmatch$UNIX2003( const char * pattern, const char * string, int flags )
{
    NSLog( @"fnmatch" );
    return fnmatch( pattern, string, flags );
}

int write$UNIX2003( const void * buffer, size_t size, size_t count, FILE * stream )
{
    NSLog( @"write" );
    return fwrite( buffer, size, count, stream );
}  

FILE * fopen$UNIX2003( const char * fname, const char * mode )
{
    NSLog( @"fopen" );
    return fopen( fname, mode );
}

FILE * open$UNIX2003( const char * fname, const char * mode )
{
    NSLog( @"open" );
    return open( fname, mode );
}

int read$UNIX2003( FILE * fd, char * buffer, unsigned int n )
{
    NSLog( @"read" );
    return read( fd, buffer, n );
}   

int close$UNIX2003( FILE * fd )
{
    NSLog( @"close" );
    return close( fd );
}   

int stat$INODE64( const char * pcc, struct stat * pss )
{
    NSLog( @"stat" );
    return stat( pcc, pss );
}   
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby Antonio Linares » Wed Dec 22, 2010 12:00 pm

Subida una versión actualizada del simulas.m al repositorio y:

USE ( AppPath() + "/test.dbf" )
MsgInfo( FieldGet( 1 ) )

Ya funciona en el simulador! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby mastintin » Wed Dec 22, 2010 12:36 pm

Perfecto . Confirmado , ya he hecho las pruebas y funciona correctamente .
Muy buen Trabajo .
Gracias.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby mastintin » Wed Dec 22, 2010 12:43 pm

Añadida la posibilidad de cargar las imagenes desde una Url :
Code: Select all  Expand view


  local cImage:= "http://forums.fivetechsupport.com/download/file.php?avatar=2_1291048862.jpg"
  local lUrl:= .t.
  local oImage := TImageView():New( oWnd, cImage, 70, 120,,, lUrl )

 


Image
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Antonio Linares » Wed Dec 22, 2010 12:55 pm

Esa cara me suena aunque no tengo muy claro quien es... jajajajaja :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby mastintin » Wed Dec 22, 2010 5:33 pm

añadido el preprocesado asi:
Code: Select all  Expand view


  local cImage:= "http://forums.fivetechsupport.com/download/file.php?avatar=2_1291048862.jpg"
  local oImage

   @70,120 IMAGE oImage NAME cImage FROM oWnd URL

 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

PreviousNext

Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 24 guests