Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_jdsdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
flutter_jdsdk
Commits
4365b06d
Commit
4365b06d
authored
Mar 06, 2021
by
xgz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉京东sdkios部分
parent
1de50ba2
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2 additions
and
414 deletions
+2
-414
ios/Classes/Handler/FlutterKeplerHandler.h
ios/Classes/Handler/FlutterKeplerHandler.h
+0
-18
ios/Classes/Handler/FlutterKeplerHandler.m
ios/Classes/Handler/FlutterKeplerHandler.m
+0
-46
ios/Classes/JdsdkPlugin.m
ios/Classes/JdsdkPlugin.m
+1
-20
ios/JDKepler/JDKeplerSDK.framework/Headers/JDKeplerSDK.h
ios/JDKepler/JDKeplerSDK.framework/Headers/JDKeplerSDK.h
+0
-20
ios/JDKepler/JDKeplerSDK.framework/Headers/KeplerApiManager.h
...JDKepler/JDKeplerSDK.framework/Headers/KeplerApiManager.h
+0
-297
ios/JDKepler/JDKeplerSDK.framework/Info.plist
ios/JDKepler/JDKeplerSDK.framework/Info.plist
+0
-0
ios/JDKepler/JDKeplerSDK.framework/JDKeplerSDK
ios/JDKepler/JDKeplerSDK.framework/JDKeplerSDK
+0
-0
ios/JDKepler/JDKeplerSDK.framework/Modules/module.modulemap
ios/JDKepler/JDKeplerSDK.framework/Modules/module.modulemap
+0
-6
ios/JDKepler/JDSDK.bundle/safe.jpg
ios/JDKepler/JDSDK.bundle/safe.jpg
+0
-1
ios/jdsdk.podspec
ios/jdsdk.podspec
+1
-6
No files found.
ios/Classes/Handler/FlutterKeplerHandler.h
deleted
100644 → 0
View file @
1de50ba2
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface
FlutterKeplerHandler
:
NSObject
//初始化
-
(
void
)
initKepler
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
;
// * 通过URL打开任意商品页面
-
(
void
)
keplerPageWithURL
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
;
//设置进度条颜色
-
(
void
)
setKeplerProgressBarColor
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
;
@end
NS_ASSUME_NONNULL_END
ios/Classes/Handler/FlutterKeplerHandler.m
deleted
100644 → 0
View file @
1de50ba2
#import "FlutterKeplerHandler.h"
#import <JDKeplerSDK/JDKeplerSDK.h>
@implementation
FlutterKeplerHandler
//初始化开普勒
-
(
void
)
initKepler
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
NSString
*
appKey
=
call
.
arguments
[
@"appKey"
];
NSString
*
appSecret
=
call
.
arguments
[
@"appSecret"
];
NSLog
(
@"appKey is :%@"
,
appKey
);
NSLog
(
@"appSecret is :%@"
,
appSecret
);
[[
KeplerApiManager
sharedKPService
]
asyncInitSdk
:
appKey
secretKey
:
appSecret
sucessCallback
:^
(){
NSLog
(
@"success"
);
result
(
@"{status:1}"
);
}
failedCallback
:^
(
NSError
*
error
){
NSLog
(
@"fail"
);
result
(
@"{status:0}"
);
}];
}
-
(
void
)
keplerPageWithURL
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
NSString
*
url
=
call
.
arguments
[
@"url"
];
// NSInteger jumpType = [call.arguments[@"jumpType"] integerValue];
NSInteger
jumpType
=
[[
NSNumber
numberWithInt
:
1
]
integerValue
];
// NSDictionary *userInfo = [FlutterKeplerTools nullToNil:call.arguments[@"userInfo"]];
UIViewController
*
rootViewController
=
[
UIApplication
sharedApplication
].
delegate
.
window
.
rootViewController
;
if
([[
UIApplication
sharedApplication
]
canOpenURL
:[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"openapp.jdmobile://"
]]])
{
//判断是否安装京东app
// [ [KeplerApiManager sharedKPService]openKeplerPageWithURL:url userInfo:nil successCallback:^{
// NSLog (@"success");
// result(@"{status:1}");
// } failedCallback:^(NSInteger code, NSString * _Nonnull url) {
// NSLog (@"fail");
// result(@"{status:0}");
// }];
[[
KeplerApiManager
sharedKPService
]
openKeplerPageWithURL
:
url
userInfo
:
nil
hiddenNavigationBar
:
true
];
result
(
@"{status:1}"
);
}
else
{
result
(
@"{status:0}"
);
}
}
@end
ios/Classes/JdsdkPlugin.m
View file @
4365b06d
#import "JdsdkPlugin.h"
#import "FlutterKeplerHandler.h"
@interface
JdsdkPlugin
()
@property
(
nonatomic
,
strong
)
FlutterKeplerHandler
*
keplerHandler
;
@end
...
...
@@ -18,27 +16,10 @@
[
registrar
addMethodCallDelegate
:
instance
channel
:
channel
];
}
-
(
instancetype
)
initWithRegistrar
:(
NSObject
<
FlutterPluginRegistrar
>
*
)
registrar
{
NSLog
(
@"initWithRegistrar"
);
self
=
[
super
init
];
if
(
self
)
{
self
.
keplerHandler
=
[[
FlutterKeplerHandler
alloc
]
init
];
}
return
self
;
}
-
(
void
)
handleMethodCall
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
if
([
@"getPlatformVersion"
isEqualToString
:
call
.
method
])
{
result
([
@"iOS "
stringByAppendingString
:[[
UIDevice
currentDevice
]
systemVersion
]]);
}
else
if
([
@"init"
isEqualToString
:
call
.
method
])
{
NSLog
(
@"init flutter"
);
[
_keplerHandler
initKepler
:
call
result
:
result
];
}
else
if
([
@"openUrl"
isEqualToString
:
call
.
method
])
{
[
_keplerHandler
keplerPageWithURL
:
call
result
:
result
];
}
else
{
}
else
{
result
(
FlutterMethodNotImplemented
);
}
}
...
...
ios/JDKepler/JDKeplerSDK.framework/Headers/JDKeplerSDK.h
deleted
100755 → 0
View file @
1de50ba2
//
// JDKeplerSDK.h
// JDKeplerSDK
//
// Created by JD.K on 16/3/15.
// Copyright © 2016年 JD.K. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for JDKeplerSDK.
FOUNDATION_EXPORT
double
JDKeplerSDKVersionNumber
;
//! Project version string for JDKeplerSDK.
FOUNDATION_EXPORT
const
unsigned
char
JDKeplerSDKVersionString
[];
// In this header, you should import all the public headers of your framework using statements like #import <JDKeplerSDK/PublicHeader.h>
#import<JDKeplerSDK/KeplerApiManager.h>
ios/JDKepler/JDKeplerSDK.framework/Headers/KeplerApiManager.h
deleted
100755 → 0
View file @
1de50ba2
This diff is collapsed.
Click to expand it.
ios/JDKepler/JDKeplerSDK.framework/Info.plist
deleted
100755 → 0
View file @
1de50ba2
File deleted
ios/JDKepler/JDKeplerSDK.framework/JDKeplerSDK
deleted
100755 → 0
View file @
1de50ba2
File deleted
ios/JDKepler/JDKeplerSDK.framework/Modules/module.modulemap
deleted
100755 → 0
View file @
1de50ba2
framework module JDKeplerSDK {
umbrella header "JDKeplerSDK.h"
export *
module * { export * }
}
ios/JDKepler/JDSDK.bundle/safe.jpg
deleted
100644 → 0
View file @
1de50ba2
8Ns95
\ No newline at end of file
ios/jdsdk.podspec
View file @
4365b06d
...
...
@@ -18,13 +18,8 @@ A new Flutter plugin.
s
.
dependency
'Flutter'
# 京东导入
# s.vendored_frameworks = 'Framework/*.framework'
s
.
vendored_frameworks
=
"JDKepler/*.framework"
# s.resource = ''
s
.
platform
=
:ios
,
'10.0'
s
.
static_framework
=
true
# 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'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment