У меня 2 файла.
"CodeInjection.m"
#import <Foundation/Foundation.h>
#import "BiplovCodeInjection-Swift.h"
@interface CodeInjection: NSObject
@end
@implementation CodeInjection
static void __attribute__((constructor)) initialize(void){
NSLog(@"==== Code Injection in Action==== with sniffer");
[[CodeInjectionSwift shared] performTask];
}
@end
Мой второй файл.
"BiplovCodeInjectionSwift.swift"
import Foundation
import NetworkInterceptor
@objc class CodeInjectionSwift: NSObject {
@objc public static let shared = CodeInjectionSwift()
override private init(){}
@objc func performTask(){
let requestSniffers: [RequestSniffer] = [
RequestSniffer(requestEvaluator: AnyHttpRequestEvaluator(), handlers: [
SniffableRequestHandlerRegistrable.console(logginMode: .nslog).requestHandler()
])
]
let requestRedirectors: [RequestRedirector] = [
RequestRedirector(requestEvaluator: DomainHttpRequestEvaluator(domain: "www.antennahouse.com"), redirectableRequestHandler: AlternateUrlRequestRedirector(url: URL(string: "https://www.rhodeshouse.ox.ac.uk/media/1002/sample-pdf-file.pdf")!))
]
let networkConfig = NetworkInterceptorConfig(requestSniffers: requestSniffers,
requestRedirectors: requestRedirectors)
NetworkInterceptor.shared.setup(config: networkConfig)
NetworkInterceptor.shared.startRecording()
}
}
Ошибка на линии "#import "BiplovCodeInjection-Swift.h"
Я построил новый проект> framework.
Вот моя структура файлов
Почему я не могу импортировать файл заголовка?