Skip to content

Commit c74a573

Browse files
committed
Minor fixes to Ads & ML
1 parent 75bf276 commit c74a573

File tree

10 files changed

+167
-0
lines changed

10 files changed

+167
-0
lines changed

flutter-hms-ads/ios/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.idea/
2+
.vagrant/
3+
.sconsign.dblite
4+
.svn/
5+
6+
.DS_Store
7+
*.swp
8+
profile
9+
10+
DerivedData/
11+
build/
12+
GeneratedPluginRegistrant.h
13+
GeneratedPluginRegistrant.m
14+
15+
.generated/
16+
17+
*.pbxuser
18+
*.mode1v3
19+
*.mode2v3
20+
*.perspectivev3
21+
22+
!default.pbxuser
23+
!default.mode1v3
24+
!default.mode2v3
25+
!default.perspectivev3
26+
27+
xcuserdata
28+
29+
*.moved-aside
30+
31+
*.pyc
32+
*sync/
33+
Icon?
34+
.tags*
35+
36+
/Flutter/Generated.xcconfig
37+
/Flutter/flutter_export_environment.sh

flutter-hms-ads/ios/Assets/.gitkeep

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#import <Flutter/Flutter.h>
2+
3+
@interface HmsAdsPlugin : NSObject<FlutterPlugin>
4+
@end
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#import "HmsAdsPlugin.h"
2+
3+
@implementation HmsAdsPlugin
4+
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
5+
FlutterMethodChannel* channel = [FlutterMethodChannel
6+
methodChannelWithName:@"ads"
7+
binaryMessenger:[registrar messenger]];
8+
HmsAdsPlugin* instance = [[HmsAdsPlugin alloc] init];
9+
[registrar addMethodCallDelegate:instance channel:channel];
10+
}
11+
12+
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
13+
if ([@"getPlatformVersion" isEqualToString:call.method]) {
14+
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
15+
} else {
16+
result(FlutterMethodNotImplemented);
17+
}
18+
}
19+
20+
@end
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
3+
# Run `pod lib lint ads.podspec' to validate before publishing.
4+
#
5+
Pod::Spec.new do |s|
6+
s.name = 'huawei_ads'
7+
s.version = '13.4.32'
8+
s.summary = 'HUAWEI Ads Kit plugin for Flutter.'
9+
s.description = <<-DESC
10+
HUAWEI Ads Kit plugin for Flutter utilizes Huawei&#x27;s vast user base and extensive data capabilities to deliver targeted, high quality ad content to users.
11+
DESC
12+
s.homepage = 'https://www.huawei.com'
13+
s.license = { :type => 'Apache 2.0', :file => '../LICENSE' }
14+
s.author = { 'Huawei Technologies' => '[email protected]' }
15+
s.source = { :git => 'https://github.com/HMS-Core/hms-flutter-plugin/tree/master/flutter-hms-ads' }
16+
s.source_files = 'Classes/**/*'
17+
s.public_header_files = 'Classes/**/*.h'
18+
s.dependency 'Flutter'
19+
s.platform = :ios, '8.0'
20+
21+
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
22+
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
23+
end

flutter-hms-ml/ios/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.idea/
2+
.vagrant/
3+
.sconsign.dblite
4+
.svn/
5+
6+
.DS_Store
7+
*.swp
8+
profile
9+
10+
DerivedData/
11+
build/
12+
GeneratedPluginRegistrant.h
13+
GeneratedPluginRegistrant.m
14+
15+
.generated/
16+
17+
*.pbxuser
18+
*.mode1v3
19+
*.mode2v3
20+
*.perspectivev3
21+
22+
!default.pbxuser
23+
!default.mode1v3
24+
!default.mode2v3
25+
!default.perspectivev3
26+
27+
xcuserdata
28+
29+
*.moved-aside
30+
31+
*.pyc
32+
*sync/
33+
Icon?
34+
.tags*
35+
36+
/Flutter/Generated.xcconfig
37+
/Flutter/flutter_export_environment.sh

flutter-hms-ml/ios/Assets/.gitkeep

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#import <Flutter/Flutter.h>
2+
3+
@interface HuaweiMlPlugin : NSObject<FlutterPlugin>
4+
@end
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#import "HuaweiMlPlugin.h"
2+
3+
@implementation HuaweiMlPlugin
4+
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
5+
FlutterMethodChannel* channel = [FlutterMethodChannel
6+
methodChannelWithName:@"huawei_ml"
7+
binaryMessenger:[registrar messenger]];
8+
HuaweiMlPlugin* instance = [[HuaweiMlPlugin alloc] init];
9+
[registrar addMethodCallDelegate:instance channel:channel];
10+
}
11+
12+
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
13+
if ([@"getPlatformVersion" isEqualToString:call.method]) {
14+
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
15+
} else {
16+
result(FlutterMethodNotImplemented);
17+
}
18+
}
19+
20+
@end

flutter-hms-ml/ios/huawei_ml.podspec

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
3+
# Run `pod lib lint huawei_ml.podspec' to validate before publishing.
4+
#
5+
Pod::Spec.new do |s|
6+
s.name = 'huawei_ml'
7+
s.version = '2.0.1+300'
8+
s.summary = 'HUAWEI Ml Kit plugin for Flutter.'
9+
s.author = { 'Huawei Technologies' => '[email protected]' }
10+
s.description = <<-DESC
11+
HUAWEI Ml Kit plugin for Flutter. It provides diversified leading machine learning capabilities that are easy to use, helping you develop various AI apps.
12+
DESC
13+
s.homepage = 'https://www.huawei.com'
14+
s.license = { :type => 'Apache 2.0', :file => '../LICENSE' }
15+
s.source = { :git => 'https://github.com/HMS-Core/hms-flutter-plugin/tree/master/flutter-hms-ml' }
16+
s.source_files = 'Classes/**/*'
17+
s.dependency 'Flutter'
18+
s.platform = :ios, '8.0'
19+
20+
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
21+
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
22+
end

0 commit comments

Comments
 (0)