Skip to content

Commit

Permalink
Minor fixes to Ads & ML
Browse files Browse the repository at this point in the history
  • Loading branch information
cagdasmer committed Sep 7, 2020
1 parent 75bf276 commit c74a573
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 0 deletions.
37 changes: 37 additions & 0 deletions flutter-hms-ads/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.idea/
.vagrant/
.sconsign.dblite
.svn/

.DS_Store
*.swp
profile

DerivedData/
build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m

.generated/

*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3

!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3

xcuserdata

*.moved-aside

*.pyc
*sync/
Icon?
.tags*

/Flutter/Generated.xcconfig
/Flutter/flutter_export_environment.sh
Empty file.
4 changes: 4 additions & 0 deletions flutter-hms-ads/ios/Classes/HmsAdsPlugin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#import <Flutter/Flutter.h>

@interface HmsAdsPlugin : NSObject<FlutterPlugin>
@end
20 changes: 20 additions & 0 deletions flutter-hms-ads/ios/Classes/HmsAdsPlugin.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#import "HmsAdsPlugin.h"

@implementation HmsAdsPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
FlutterMethodChannel* channel = [FlutterMethodChannel
methodChannelWithName:@"ads"
binaryMessenger:[registrar messenger]];
HmsAdsPlugin* instance = [[HmsAdsPlugin alloc] init];
[registrar addMethodCallDelegate:instance channel:channel];
}

- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
if ([@"getPlatformVersion" isEqualToString:call.method]) {
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
} else {
result(FlutterMethodNotImplemented);
}
}

@end
23 changes: 23 additions & 0 deletions flutter-hms-ads/ios/huawei_ads.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint ads.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'huawei_ads'
s.version = '13.4.32'
s.summary = 'HUAWEI Ads Kit plugin for Flutter.'
s.description = <<-DESC
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.
DESC
s.homepage = 'https://www.huawei.com'
s.license = { :type => 'Apache 2.0', :file => '../LICENSE' }
s.author = { 'Huawei Technologies' => '[email protected]' }
s.source = { :git => 'https://github.com/HMS-Core/hms-flutter-plugin/tree/master/flutter-hms-ads' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.platform = :ios, '8.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
end
37 changes: 37 additions & 0 deletions flutter-hms-ml/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.idea/
.vagrant/
.sconsign.dblite
.svn/

.DS_Store
*.swp
profile

DerivedData/
build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m

.generated/

*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3

!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3

xcuserdata

*.moved-aside

*.pyc
*sync/
Icon?
.tags*

/Flutter/Generated.xcconfig
/Flutter/flutter_export_environment.sh
Empty file.
4 changes: 4 additions & 0 deletions flutter-hms-ml/ios/Classes/HuaweiMlPlugin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#import <Flutter/Flutter.h>

@interface HuaweiMlPlugin : NSObject<FlutterPlugin>
@end
20 changes: 20 additions & 0 deletions flutter-hms-ml/ios/Classes/HuaweiMlPlugin.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#import "HuaweiMlPlugin.h"

@implementation HuaweiMlPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
FlutterMethodChannel* channel = [FlutterMethodChannel
methodChannelWithName:@"huawei_ml"
binaryMessenger:[registrar messenger]];
HuaweiMlPlugin* instance = [[HuaweiMlPlugin alloc] init];
[registrar addMethodCallDelegate:instance channel:channel];
}

- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
if ([@"getPlatformVersion" isEqualToString:call.method]) {
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
} else {
result(FlutterMethodNotImplemented);
}
}

@end
22 changes: 22 additions & 0 deletions flutter-hms-ml/ios/huawei_ml.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint huawei_ml.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'huawei_ml'
s.version = '2.0.1+300'
s.summary = 'HUAWEI Ml Kit plugin for Flutter.'
s.author = { 'Huawei Technologies' => '[email protected]' }
s.description = <<-DESC
HUAWEI Ml Kit plugin for Flutter. It provides diversified leading machine learning capabilities that are easy to use, helping you develop various AI apps.
DESC
s.homepage = 'https://www.huawei.com'
s.license = { :type => 'Apache 2.0', :file => '../LICENSE' }
s.source = { :git => 'https://github.com/HMS-Core/hms-flutter-plugin/tree/master/flutter-hms-ml' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '8.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
end

0 comments on commit c74a573

Please sign in to comment.