I am creating a visualforce page from apex, using the metadata api. To call the metadata api I am using https://github.com/financialforcedev/apex-mdapi
MetadataService.MetadataPort service = createService();
MetadataService.ApexPage apexPage = new MetadataService.ApexPage();
apexPage.apiVersion = 25;
apexPage.fullName = getPageName(objectName);
apexPage.label = 'myprefix'+ objectName;
apexPage.content = EncodingUtil.base64Encode(Blob.valueOf(getPageMarkup(objectName)));
List<MetadataService.SaveResult> results = service.createMetadata(
new MetadataService.Metadata[] { apexPage });
This creates the page succesfully, but it is only available to System administrator profile(creator). I want the page to be available to all profiles. How to do this?