Is it ok to keep `import HealthKit` in my library code if HK functionality is optional?

Hello,

I bumped into an issue where HealthKit functionality is optional for my library 1 only if users also add another of my libraries (library 2)

library 1: has basic functionality and using HealthKit types for some of the functions that are universal for library 1 and library 2 and using conditional checks. requirements are solid to keep it as is; library 1 also calling functions from library 2 that have HK parameters

library 2: using basic library as a base and extending on it with HealthKit functions that library 1 can call

Is it ok to keep import HealthKit in library 1? won't it cause troubles for apps that use my library and post to AppStore?