Skip to content

Commit 0ebbbf8

Browse files
authored
Merge pull request #2 from jpush/dev
ios完成功能
2 parents 195c047 + 73f8590 commit 0ebbbf8

File tree

11 files changed

+220
-111
lines changed

11 files changed

+220
-111
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# NOTE: This podspec is NOT to be published. It is only used as a local source!
3+
#
4+
5+
Pod::Spec.new do |s|
6+
s.name = 'Flutter'
7+
s.version = '1.0.0'
8+
s.summary = 'High-performance, high-fidelity mobile apps.'
9+
s.description = <<-DESC
10+
Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS.
11+
DESC
12+
s.homepage = 'https://flutter.io'
13+
s.license = { :type => 'MIT' }
14+
s.author = { 'Flutter Dev Team' => '[email protected]' }
15+
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
16+
s.ios.deployment_target = '8.0'
17+
s.vendored_frameworks = 'Flutter.framework'
18+
end
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/sh
22
# This is a generated file; do not edit or check into version control.
3-
export "FLUTTER_ROOT=/Applications/flutter"
4-
export "FLUTTER_APPLICATION_PATH=/Users/raoxudong/JPush/jpush-github/jverify-flutter-plugin/example"
5-
export "FLUTTER_TARGET=lib/main.dart"
3+
export "FLUTTER_ROOT=/Users/allan/Documents/flutter"
4+
export "FLUTTER_APPLICATION_PATH=/Users/allan/Documents/GitHub/jverify-flutter-plugin/example"
5+
export "FLUTTER_TARGET=/Users/allan/Documents/GitHub/jverify-flutter-plugin/example/lib/main.dart"
66
export "FLUTTER_BUILD_DIR=build"
77
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
8-
export "FLUTTER_FRAMEWORK_DIR=/Applications/flutter/bin/cache/artifacts/engine/ios"
8+
export "FLUTTER_FRAMEWORK_DIR=/Users/allan/Documents/flutter/bin/cache/artifacts/engine/ios"
99
export "FLUTTER_BUILD_NAME=1.0.0"
1010
export "FLUTTER_BUILD_NUMBER=1"
11+
export "TRACK_WIDGET_CREATION=true"

example/ios/Podfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
PODS:
22
- Flutter (1.0.0)
33
- JCore (2.1.8)
4-
- JVerification (2.5.3):
5-
- JCore (< 3.0.0, >= 1.2.6)
4+
- JVerification (2.6.0):
5+
- JCore (< 3.0.0, >= 2.1.6)
66
- jverify (0.0.1):
77
- Flutter
8-
- JCore
9-
- JVerification
8+
- JCore (~> 2.1.6)
9+
- JVerification (~> 2.6.0)
1010

1111
DEPENDENCIES:
1212
- Flutter (from `.symlinks/flutter/ios`)
@@ -26,9 +26,9 @@ EXTERNAL SOURCES:
2626
SPEC CHECKSUMS:
2727
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
2828
JCore: a7f1dead960d77a97717c73ea8b0aa5b33706491
29-
JVerification: 0d0b4474a250f19ef2bc45da7bd0d0e151350012
30-
jverify: 39f3e355cdb0d7c03fd2f8497ea11b273339547f
29+
JVerification: c2b96de0379b9e6f9ec2f91f2ba5fc9499ddc203
30+
jverify: b7e7417c622468c2fcf7483c3a2bb82f1ef5a9b2
3131

3232
PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09
3333

34-
COCOAPODS: 1.8.4
34+
COCOAPODS: 1.9.1

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
97C146EC1CF9000F007C117D /* Resources */,
179179
9705A1C41CF9048500538489 /* Embed Frameworks */,
180180
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
181-
000280B1279B4171F5DDD7DA /* [CP] Embed Pods Frameworks */,
181+
D166C758B9692330C07C5D0D /* [CP] Embed Pods Frameworks */,
182182
);
183183
buildRules = (
184184
);
@@ -240,24 +240,6 @@
240240
/* End PBXResourcesBuildPhase section */
241241

242242
/* Begin PBXShellScriptBuildPhase section */
243-
000280B1279B4171F5DDD7DA /* [CP] Embed Pods Frameworks */ = {
244-
isa = PBXShellScriptBuildPhase;
245-
buildActionMask = 2147483647;
246-
files = (
247-
);
248-
inputPaths = (
249-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
250-
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
251-
);
252-
name = "[CP] Embed Pods Frameworks";
253-
outputPaths = (
254-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
255-
);
256-
runOnlyForDeploymentPostprocessing = 0;
257-
shellPath = /bin/sh;
258-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
259-
showEnvVarsInLog = 0;
260-
};
261243
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
262244
isa = PBXShellScriptBuildPhase;
263245
buildActionMask = 2147483647;
@@ -308,6 +290,24 @@
308290
shellPath = /bin/sh;
309291
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
310292
};
293+
D166C758B9692330C07C5D0D /* [CP] Embed Pods Frameworks */ = {
294+
isa = PBXShellScriptBuildPhase;
295+
buildActionMask = 2147483647;
296+
files = (
297+
);
298+
inputPaths = (
299+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
300+
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
301+
);
302+
name = "[CP] Embed Pods Frameworks";
303+
outputPaths = (
304+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
305+
);
306+
runOnlyForDeploymentPostprocessing = 0;
307+
shellPath = /bin/sh;
308+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
309+
showEnvVarsInLog = 0;
310+
};
311311
/* End PBXShellScriptBuildPhase section */
312312

313313
/* Begin PBXSourcesBuildPhase section */
@@ -412,7 +412,7 @@
412412
"$(PROJECT_DIR)/Flutter",
413413
"$(PROJECT_DIR)/Runner",
414414
);
415-
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.xxx;
415+
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.verification;
416416
PRODUCT_NAME = "$(TARGET_NAME)";
417417
PROVISIONING_PROFILE_SPECIFIER = JVerificationDemo_dev;
418418
VERSIONING_SYSTEM = "apple-generic";
@@ -543,7 +543,7 @@
543543
"$(PROJECT_DIR)/Flutter",
544544
"$(PROJECT_DIR)/Runner",
545545
);
546-
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.xxx;
546+
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.verification;
547547
PRODUCT_NAME = "$(TARGET_NAME)";
548548
PROVISIONING_PROFILE_SPECIFIER = JVerificationDemo_dev;
549549
VERSIONING_SYSTEM = "apple-generic";
@@ -571,7 +571,7 @@
571571
"$(PROJECT_DIR)/Flutter",
572572
"$(PROJECT_DIR)/Runner",
573573
);
574-
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.xxx;
574+
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.verification;
575575
PRODUCT_NAME = "$(TARGET_NAME)";
576576
PROVISIONING_PROFILE_SPECIFIER = JVerificationDemo_dev;
577577
VERSIONING_SYSTEM = "apple-generic";

example/ios/Runner/Info.plist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CFBundleDisplayName</key>
6+
<string></string>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>en</string>
79
<key>CFBundleExecutable</key>
@@ -45,6 +47,6 @@
4547
<string>UIInterfaceOrientationLandscapeRight</string>
4648
</array>
4749
<key>UIViewControllerBasedStatusBarAppearance</key>
48-
<false/>
50+
<true/>
4951
</dict>
5052
</plist>

example/lib/main.dart

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,19 @@ class _MyAppState extends State<MyApp> {
138138
width: double.infinity,
139139
),
140140
margin: EdgeInsets.fromLTRB(40, 5, 40, 5),
141-
)
141+
),
142+
new Container(
143+
child: SizedBox(
144+
child: new CustomButton(
145+
onPressed: () {
146+
getSMSCode();
147+
},
148+
title: "获取验证码",
149+
),
150+
width: double.infinity,
151+
),
152+
margin: EdgeInsets.fromLTRB(40, 5, 40, 5),
153+
),
142154
],
143155
mainAxisAlignment: MainAxisAlignment.start,
144156
),
@@ -200,15 +212,18 @@ class _MyAppState extends State<MyApp> {
200212
});
201213
}
202214
/// 获取短信验证码
203-
void getSMSCode(String phoneNum,{String signId,String tempId}){
215+
void getSMSCode(){
204216
setState(() {
205217
_loading = true;
206218
});
207-
219+
String phoneNum = controllerPHone.text;
220+
if(phoneNum == null){
221+
//TODO: 提示
222+
}
208223
jverify.checkVerifyEnable().then((map) {
209224
bool result = map[f_result_key];
210225
if (result) {
211-
jverify.getSMSCode(phoneNum,signId,tempId).then((map) {
226+
jverify.getSMSCode(phoneNum: phoneNum).then((map) {
212227
print("获取短信验证码:${map.toString()}");
213228
int code = map[f_code_key];
214229
String message = map[f_msg_key];
@@ -231,7 +246,6 @@ class _MyAppState extends State<MyApp> {
231246
setState(() {
232247
_loading = true;
233248
});
234-
235249
jverify.checkVerifyEnable().then((map) {
236250
bool result = map[f_result_key];
237251
if (result) {
@@ -258,7 +272,6 @@ class _MyAppState extends State<MyApp> {
258272
setState(() {
259273
_loading = true;
260274
});
261-
262275
jverify.checkVerifyEnable().then((map) {
263276
bool result = map[f_result_key];
264277
if (result) {
@@ -282,7 +295,7 @@ class _MyAppState extends State<MyApp> {
282295
uiConfig.navReturnImgPath = "return_bg";//图片必须存在
283296

284297
uiConfig.logoWidth = 100;
285-
uiConfig.logoHeight = 100;
298+
uiConfig.logoHeight = 80;
286299
//uiConfig.logoOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.logoWidth/2).toInt();
287300
uiConfig.logoOffsetY = 10;
288301
uiConfig.logoVerticalLayoutItem = JVIOSLayoutItem.ItemSuper;
@@ -301,6 +314,7 @@ class _MyAppState extends State<MyApp> {
301314
uiConfig.sloganVerticalLayoutItem = JVIOSLayoutItem.ItemNumber;
302315
uiConfig.sloganTextColor = Colors.black.value;
303316
uiConfig.sloganTextSize = 15;
317+
// uiConfig.slogan
304318
//uiConfig.sloganHidden = 0;
305319

306320
uiConfig.logBtnWidth = 220;
@@ -336,7 +350,8 @@ class _MyAppState extends State<MyApp> {
336350
uiConfig.privacyTextSize = 13;
337351
//uiConfig.privacyWithBookTitleMark = true;
338352
//uiConfig.privacyTextCenterGravity = false;
339-
353+
uiConfig.authStatusBarStyle = JVIOSBarStyle.StatusBarStyleDarkContent;
354+
uiConfig.privacyStatusBarStyle = JVIOSBarStyle.StatusBarStyleDefault;
340355

341356
uiConfig.statusBarColorWithNav = true;
342357
uiConfig.virtualButtonTransparent = true;
@@ -508,4 +523,6 @@ class CustomButton extends StatelessWidget {
508523
padding: EdgeInsets.fromLTRB(10, 5, 10, 5),
509524
);
510525
}
511-
}
526+
}
527+
528+

0 commit comments

Comments
 (0)