Commit 15ffb230 authored by xgz's avatar xgz

修改ios

parent 7c02f11b
4ee6262d6df4eae39aef50da3587f661
\ No newline at end of file
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
# source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
......
......@@ -15,8 +15,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
jdsdk: 2ca38c7e3a2dfb0f3641425f8fd1e8d20357693f
jdsdk: 33a8f56cd92bebbe1fece516e092aa22bd0e6a8b
PODFILE CHECKSUM: 5f3453128823cf0ac1f2bf98c4325c586526ba0b
PODFILE CHECKSUM: 1e5bdb5d3f5df2396887ecffd613804a61b33078
COCOAPODS: 1.8.4
COCOAPODS: 1.10.1
......@@ -9,10 +9,6 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
......@@ -35,8 +31,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -48,7 +42,6 @@
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
6D9FEBBE040E60612181279B /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
6EE548F39D08AC87D8ABAFA7 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
......@@ -56,7 +49,6 @@
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
......@@ -84,8 +76,6 @@
A31FE9912495149300FEDE87 /* UIKit.framework in Frameworks */,
A31FE98F2495148000FEDE87 /* libsqlite3.0.tbd in Frameworks */,
A31FE98D2495146800FEDE87 /* libz.tbd in Frameworks */,
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
FDB4D935BBFBFD2B2A89CD19 /* libPods-Runner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -106,9 +96,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
......@@ -275,7 +263,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
......@@ -350,7 +338,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
......@@ -425,7 +412,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
......@@ -481,7 +467,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
......
#import "FlutterKeplerHandler.h"
#import <jdsdk/JDKeplerSDK.h>
#import <JDKeplerSDK/JDKeplerSDK.h>
@implementation FlutterKeplerHandler
//初始化开普勒
- (void)initKepler:(FlutterMethodCall *)call result:(FlutterResult)result {
......@@ -27,13 +28,15 @@
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 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}");
}
......
#import "JdsdkPlugin.h"
#import <jdsdk/JDKeplerSDK.h>
#import "FlutterKeplerHandler.h"
@interface JdsdkPlugin()
......
//
// KeplerApiManager.h
// KeplerApp
// 提供Kepler服务
// Created by JD.K on 16/6/20.
// Copyright © 2016年 JD.K. All rights reserved.
// version 3.0.1
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
/** 初始化成功回调 */
typedef void (^initSuccessCallback)();
/** 初始化失败回调 */
typedef void (^initFailedCallback)(NSError * _Nonnull error);
/**
打开成功回调
*/
typedef void(^OpenSuccessBlock)();
/**
* 响应失败的错误回调,返回一个错误的链接或信息
*/
typedef void(^OpenFailedBlock)(NSInteger code, NSString * _Nonnull url);
typedef enum {
KeplerErrorCodeUnInstalled = 422, //未安装京东app
KeplerErrorCodeWhited, //本地url不在白名单中
KeplerErrorCodeResponsed, //本地呼起open协议失败
KeplerErrorCodeNoSid, //sid为空
KeplerErrorCodeInValidApp //应用不合法
} KeplerErrorCode;
@interface KeplerApiManager : NSObject
/**
分佣的 AppKey2
*/
@property (nonatomic, copy) NSString *secondAppKey;
//********************************* 通过京东APP打开链接相关参数 ************************************
/**
当isOpenByH5为 NO 时,准备跳转到JD APP时会调用这些代码。可以把开启 Loading动画的代码放到这里
为避免造成混乱,在关闭Kepler界面时,会置为nil。因此需要在每次打开Kepler之前单独设置。
*/
@property (nonatomic, copy) void(^startOpenJDAppBlock)();
/**
当isOpenByH5为 NO 时,跳转JD APP准备工作完成时会调用这些代码,success为YES表示成功,可以打开JD APP,为NO时表示打开失败。
为避免造成混乱,在关闭Kepler界面时,会置为nil。因此需要在每次打开Kepler之前单独设置。
update: success为NO且错误码等于-1005时,安全id为空
*/
@property (nonatomic, copy) void(^finishOpenJDAppBlock)(BOOL success,NSError *error);
/**
* 京东达人内容ID 关闭kepler界面时会清除 如果需要此值 再次打开需要再次设置
**/
@property (nonatomic, copy) NSString *actId;
/**
* 京东达人 内容渠道扩展字段 关闭kepler界面时会清除 如果需要此值 再次打开需要再次设置
**/
@property (nonatomic, copy) NSString *ext;
/**
* 是否走服务端的渠道,默认走本地渠道
*/
@property (nonatomic, assign) BOOL isServerChannel;
/**
打开京东超时时间设置 关闭 Kepler 界面时不会重置 默认为60
*/
@property (nonatomic, assign) NSTimeInterval openJDTimeout;
//*******************************************************************************************************
/**
* KeplerApiManager 单例
*
* @return KeplerApiManager 单例
*/
+ (KeplerApiManager *)sharedKPService;
/**
* 注册Kepler 服务
*
* @param appKey 注册的appKey
* @param appSecret 注册的secretKey
*/
- (void)asyncInitSdk:(NSString *)appKey
secretKey:(NSString *)appSecret
sucessCallback:(initSuccessCallback)sucessCallback
failedCallback:(initFailedCallback)failedCallback;
/**
跳转京东app
@param url 调用方传入的URl参数
@param userInfo 调用sdk时传入的kepler自定义参数
@param failedCallback code 表示错误编码, url 引起调用失败的url
*/
- (void)openKeplerPageWithURL:(NSString *)url
userInfo:(NSDictionary *)userInfo
successCallback:(OpenSuccessBlock _Nullable)success
failedCallback:(OpenFailedBlock _Nonnull)failure;
@end
......@@ -15,6 +15,6 @@ FOUNDATION_EXPORT double JDKeplerSDKVersionNumber;
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<JDSDK/KeplerApiManager.h>
#import<JDKeplerSDK/KeplerApiManager.h>
This diff is collapsed.
8Ns95
\ No newline at end of file
......@@ -18,10 +18,13 @@ A new Flutter plugin.
s.dependency 'Flutter'
# 京东导入
s.vendored_frameworks = 'Framework/*.framework'
# s.vendored_frameworks = 'Framework/*.framework'
s.vendored_frameworks ="JDKepler/*.framework"
# s.resource = ''
s.platform = :ios, '8.0'
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' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment