static int callback (NSDictionary * dict, id result)
{
NSArray * currentlist = [dict objectForKey: @ "CurrentList"];
if (currentlist)
{
for (NSDictionary * appinfo in currentlist)
{
[(NSMutableArray *) result addObject: [appinfo copy]];
}
}
return 0;
}
- (IBAction) btnGetApp: (UIButton *) sender
{
NSMutableArray * result = [NSMutableArray new];
MobileInstallationBrowse ([NSDictionary dictionaryWithObject: @ "Any" forKey: @ "ApplicationType"], & callback, result); / / Any representative of all programs, where you can a "System" "User" to distinguish the system and the general software
}
Why run the red line of code that prompts:
error: address doesn't contain a section that points to a section in a object file
Reply:
Because that MobileInstallationBrowse just a function pointer, can not be directly used to point to a function that implements
Plus realized on OK
int (* MobileInstallationBrowse) (NSDictionary * options, int (* callback) (NSDictionary * dict, id value), id value);
int MobileInstallationBrowseImplementation (NSDictionary * options, int (* callback) (NSDictionary * dict, id value), id value)
{
NSLog (@ "MobileInstallationBrowseImplementation");
return 0;
}
static int callback (NSDictionary * dict, id result)
{
NSArray * currentlist = [dict objectForKey: @ "CurrentList"];
if (currentlist)
{
for (NSDictionary * appinfo in currentlist)
{
[(NSMutableArray *) result addObject: [appinfo copy]];
}
}
return 0;
}
- (Void) btnGetApp
{
NSMutableArray * result = [NSMutableArray new];
MobileInstallationBrowse = MobileInstallationBrowseImplementation;
MobileInstallationBrowse ([NSDictionary dictionaryWithObject: @ "Any" forKey: @ "ApplicationType"], callback, result); / / Any representative of all programs, where you can use the "System" "User" to distinguish between systems and common software
}
Reply:
int (* MobileInstallationBrowse) (NSDictionary * options, int (* callback) (NSDictionary * dict, id value), id value);
int MobileInstallationBrowseImplementation (NSDictionary * options, int (* callback) (NSDictionary * dict, id value), id value)
{
NSLog (@ "MobileInstallationBrowseImplementation");
return 0;
}
static int callback (NSDictionary * dict, id result)
{
NSArray * currentlist = [dict objectForKey: @ "CurrentList"];
if (currentlist)
{
for (NSDictionary * appinfo in currentlist)
{
[(NSMutableArray *) result addObject: [appinfo copy]];
}
}
return 0;
}
- (Void) btnGetApp
{
NSMutableArray * result = [NSMutableArray new];
MobileInstallationBrowse = MobileInstallationBrowseImplementation;
MobileInstallationBrowse ([NSDictionary dictionaryWithObject: @ "Any" forKey: @ "ApplicationType"], callback, result); / / Any representative of all programs, where you can use the "System" "User" to distinguish between systems and common software
}
Reply:
Halo, made a mistake, look at the red piece of code
int (* MobileInstallationBrowse) (NSDictionary * options, int (* callback) (NSDictionary * dict, id value), id value);
int MobileInstallationBrowseImplementation (NSDictionary * options, int (* callback) (NSDictionary * dict, id value), id value)
{
NSLog (@ "MobileInstallationBrowseImplementation");
return 0;
}
static int callback (NSDictionary * dict, id result)
{
NSArray * currentlist = [dict objectForKey: @ "CurrentList"];
if (currentlist)
{
for (NSDictionary * appinfo in currentlist)
{
[(NSMutableArray *) result addObject: [appinfo copy]];
}
}
return 0;
}
- (Void) btnGetApp
{
NSMutableArray * result = [NSMutableArray new];
MobileInstallationBrowse = MobileInstallationBrowseImplementation;
MobileInstallationBrowse ([NSDictionary dictionaryWithObject: @ "Any" forKey: @ "ApplicationType"], callback, result); / / Any representative of all programs, where you can use the "System" "User" to distinguish between systems and common software
}
No comments:
Post a Comment