I am new to developing the Framework on iOS.
I developed one structure using sqlite3, where I perform all the operations of this structure in the background, which uses
dispatch_async(Queue, ^{
[self syncWithServer];
});
the above code is written in the syncToServer method, which is called from the application
I added 8 methods for this structure, which, like in FACADE Layer, so I can access it from my application,
like [myFramework syncToServer]
I used SQlite as Framework modal (database), which is created programmatically in iOS, which looks like this
-(void)createDatabaseForFramework{
DBConnectionManager *connectionManager=[[DBConnectionManager alloc] init];
const char *databasePath = [[connectionManager getDatabasePath] UTF8String];
if (sqlite3_open(databasePath, &mDatabase) == SQLITE_OK)
{
char *errorMessage;
const char *createStatement = [createApplicationTableQuery UTF8String];
if (sqlite3_exec(mDatabase, applicationCreateStatement, NULL, NULL, &errorMessage)!= SQLITE_OK)
{
NSLog(@"errorMessage");
}
sqlite3_close(mDatabase);
}}
I do this in my structure, where to catch some data and synchronize everything I do in the background with the server
even I added the entire state of the application to the framework where I synchronize and store data.
myFramework , , EXEC_BAD_ACCESS,
* thread
- - , , ,
sqlite framework, myApplication
()
- sqlite ( myFramework)
- (iPad).
- .
- . DB, DB Iam