You cannot listen system camera opens or not but you can listen changes in photos library which means that something happend through camera app. It may be selfie, screenshot and so on...
App should be in background and long running task as well.
You can do this with Photos Framework which is announced iOS8 release.
Read Documentation about change observer https://developer.apple.com/documentation/photos
Apple sample https://developer.apple.com/library/content/samplecode/UsingPhotosFramework/Introduction/Intro.html
Change observing. Use the shared PHPhotoLibrary object to register a change handler for the assets and collections you fetch. Photos tells your app whenever another app or device changes the content or metadata of an asset or the list of assets in a collection. PHChange objects provide information about object state before and after each change with semantics that make it easy to update a collection view or similar interface
You can take photos if any update on photos app, by using photos framework
To register
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
if (status == PHAuthorizationStatusAuthorized) {
[PHPhotoLibrary.sharedPhotoLibrary registerChangeObserver:self];
}
}];
To Unregister
[[PHPhotoLibrary sharedPhotoLibrary] unregisterChangeObserver:self];
Relevant delegate
- (void)photoLibraryDidChange:(PHChange *)changeInstance {
}
For more info Link