Unable to submit BGProcessingTaskRequest in a Custom Framework

am building a Framework which has to do some network call and data flush in the background. when I try to submit BGTaskScheduler.shared.submit(request) getting Error Domain=BGTaskSchedulerErrorDomain Code=1. In the Framework am not getting option to add Background Mode Capabilities. but I added them in the info plist file of the framework Permitted background task scheduler identifiers and 'Required background modes'. even after making these changes am getting error which I use it in the App. I also tried adding the Capabilities, task schedule identifiers in the Host App even then getting the same error