Files
MapLibreParticleLab/platform/darwin/include/mbgl/interface/native_apple_interface.h
m-stephen f9b7284276 [ios, macos]Remove iOS/macOS codes from native codes (#16031)
* add source/header

* add ios files

* add configs

* modify name

* http_file_source

* add interface delegate when map init

* fix name

* fix delegate name

* support mac os

* add mac os support

* make optional delegate when mac os

* mac/ios difference

* add ios change log

* cancel iOS/mac OS judgement

* cancel iOS/mac OS judgement

* cancel judgement in .m

* update

* update

* update http_file_source

* update ios

* update mac os

* add mac os file

* add mac os file to `.cmake`

* change names

* add log & fix format

* reset changelog commit

* update changelog

* rename iOS network manager

* Add a test configuration(same as default configuration) when mac os run tests

* re-add account type into `http_file_source`

* refactor
2019-12-14 13:38:46 +08:00

52 lines
1.1 KiB
Objective-C

#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol MGLNativeNetworkDelegate <NSObject>
@optional
- (NSString *)skuToken;
@required
- (NSURLSessionConfiguration *)sessionConfiguration;
- (void)startDownloadEvent:(NSString *)event type:(NSString *)type;
- (void)cancelDownloadEventForResponse:(NSURLResponse *)response;
- (void)stopDownloadEventForResponse:(NSURLResponse *)response;
- (void)debugLog:(NSString *)format, ...;
- (void)errorLog:(NSString *)format, ...;
@end
#define MGL_APPLE_EXPORT __attribute__((visibility ("default")))
@interface MGLNativeNetworkManager: NSObject
+ (MGLNativeNetworkManager *)sharedManager;
@property (nonatomic, weak) id<MGLNativeNetworkDelegate> delegate;
@property (nonatomic, readonly) NSString *skuToken;
@property (nonatomic, readonly) NSURLSessionConfiguration *sessionConfiguration;
- (void)startDownloadEvent:(NSString *)event type:(NSString *)type;
- (void)cancelDownloadEventForResponse:(NSURLResponse *)response;
- (void)stopDownloadEventForResponse:(NSURLResponse *)response;
- (void)debugLog:(NSString *)format, ...;
- (void)errorLog:(NSString *)format, ...;
@end
NS_ASSUME_NONNULL_END