Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 6.0.0-preview.2
* Fix #181

# 6.0.0-preview.1
* Flutter 版本要求升级到3.38.0或更高
* Dart 版本要求升级到3.10.0或更高
* 支持UISceneDelegate。

# 5.3.4
* 修复5.3.3中iOS编译问题

Expand Down
60 changes: 1 addition & 59 deletions android/consumer-proguard-rules.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
-dontshrink
-dontpreverify
-dontoptimize
-dontusemixedcaseclassnames

-flattenpackagehierarchy
-allowaccessmodification
-printmapping map.txt

-optimizationpasses 7
-verbose
-keepattributes Exceptions,InnerClasses
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-ignorewarnings

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends java.lang.Throwable {*;}
-keep public class * extends java.lang.Exception {*;}

-keep class com.alipay.android.app.IAlixPay{*;}
-keep class com.alipay.android.app.IAlixPay$Stub{*;}
-keep class com.alipay.android.app.IRemoteServiceCallback{*;}
Expand All @@ -42,46 +18,12 @@
-keep class com.ta.utdid2.** { *;}
-keep class com.ut.device.** { *;}


-keepclasseswithmembernames class * {
native <methods>;
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}

-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

# adding this in to preserve line numbers so that the stack traces
# can be remapped
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

## Kotlin

# ServiceLoader support
## Kotlin coroutines
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}

# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembernames class kotlinx.** {
volatile <fields>;
}
8 changes: 4 additions & 4 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
export "FLUTTER_ROOT=/Users/jarvanzhang/Development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/jarvanzhang/StudioProjects/tobias/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_TARGET=/Users/jarvanzhang/StudioProjects/tobias/example/lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=0.1.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_DEFINES=RkxVVFRFUl9WRVJTSU9OPTMuMzguOA==,RkxVVFRFUl9DSEFOTkVMPXN0YWJsZQ==,RkxVVFRFUl9HSVRfVVJMPWh0dHBzOi8vZ2l0aHViLmNvbS9mbHV0dGVyL2ZsdXR0ZXIuZ2l0,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049YmQ3YTRhNmI1NQ==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049ZGIzNzNlYjg1YQ==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My4xMC43"
export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9WRVJTSU9OPTMuMzguMTA=,RkxVVFRFUl9DSEFOTkVMPVt1c2VyLWJyYW5jaF0=,RkxVVFRFUl9HSVRfVVJMPXVua25vd24gc291cmNl,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049YzZmNjdkZWRlMw==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049Y2FmY2RhNTcyMQ==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My4xMC45"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=true"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=/Users/jarvanzhang/StudioProjects/tobias/example/.dart_tool/package_config.json"
2 changes: 1 addition & 1 deletion ios/Classes/TobiasPlugin.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <Flutter/Flutter.h>


@interface TobiasPlugin : NSObject<FlutterPlugin>
@interface TobiasPlugin : NSObject<FlutterPlugin, FlutterSceneLifeCycleDelegate>
+(BOOL)handleOpenURL:(NSURL*)url;
@end
20 changes: 20 additions & 0 deletions ios/Classes/TobiasPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,26 @@ -(BOOL)handleOpenURL:(NSURL*)url{
return NO;
}

- (BOOL)scene:(UIScene*)scene openURLContexts:(NSSet<UIOpenURLContext*>*)URLContexts {
for (UIOpenURLContext *context in URLContexts) {
NSURL *url = context.URL;
if ([url.host isEqualToString:@"safepay"]) {
__weak TobiasPlugin* __self = self;

[[AlipaySDK defaultService] processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) {
[__self onPayResultReceived:resultDic];
}];

[[AlipaySDK defaultService] processAuth_V2Result:url standbyCallback:^(NSDictionary *resultDic) {
[__self onAuthResultReceived:resultDic];
}];

return YES;
}
}
return NO;
}

-(void)onPayResultReceived:(NSDictionary*)resultDic{

if(self.callback!=nil){
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: tobias
description: A Flutter plugin for allowing users to authenticate or pay with native Android/iOS/OpenHarmony AliPay SDKs.
version: 5.3.4
version: 6.0.0-preview.2
homepage: https://github.com/OpenFlutter/tobias

environment:
sdk: '>=2.12.0 <4.0.0'
flutter: ">=1.12.0"
sdk: ^3.10.0
flutter: ">=3.38.0"

dependencies:
flutter:
Expand Down
Loading