Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
appframe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 459b4252
authored
2026-02-12 10:55:06 +0800
by
Administrator
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ios推送调整
1 parent
76e48012
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
15 deletions
ios/Runner/Base.lproj/Info.plist
ios/Runner/Info.plist
ios/Runner/en.lproj/Info.plist
ios/Runner/zh-Hans.lproj/Info.plist
lib/config/constant.dart
lib/config/env_config.dart
lib/services/im_service.dart
pub_ios.sh
ios/Runner/Base.lproj/Info.plist
View file @
459b425
...
@@ -90,8 +90,8 @@
...
@@ -90,8 +90,8 @@
</array>
</array>
<key>
io.flutter.embedded_views_preview
</key>
<key>
io.flutter.embedded_views_preview
</key>
<true/>
<true/>
<
!-- <key>NSLocalNetwork
UsageDescription</key>
<
key>
NSLocationWhenInUse
UsageDescription
</key>
<string>
此应用需要访问本地网络以发现和连接智能设备</string> --
>
<string>
提交打卡签到信息中需要使用当前的位置信息
</string
>
<key>
NSBonjourServices
</key>
<key>
NSBonjourServices
</key>
<array>
<array>
<string>
_dartvm._tcp
</string>
<string>
_dartvm._tcp
</string>
...
...
ios/Runner/Info.plist
View file @
459b425
...
@@ -90,8 +90,8 @@
...
@@ -90,8 +90,8 @@
</array>
</array>
<key>
io.flutter.embedded_views_preview
</key>
<key>
io.flutter.embedded_views_preview
</key>
<true/>
<true/>
<
!-- <key>NSLocalNetwork
UsageDescription</key>
<
key>
NSLocationWhenInUse
UsageDescription
</key>
<string>
此应用需要访问本地网络以发现和连接智能设备</string> --
>
<string>
提交打卡签到信息中需要使用当前的位置信息
</string
>
<key>
NSBonjourServices
</key>
<key>
NSBonjourServices
</key>
<array>
<array>
<string>
_dartvm._tcp
</string>
<string>
_dartvm._tcp
</string>
...
...
ios/Runner/en.lproj/Info.plist
View file @
459b425
...
@@ -90,8 +90,8 @@
...
@@ -90,8 +90,8 @@
</array>
</array>
<key>
io.flutter.embedded_views_preview
</key>
<key>
io.flutter.embedded_views_preview
</key>
<true/>
<true/>
<
!-- <key>NSLocalNetwork
UsageDescription</key>
<
key>
NSLocationWhenInUse
UsageDescription
</key>
<string>
此应用需要访问本地网络以发现和连接智能设备</string> --
>
<string>
提交打卡签到信息中需要使用当前的位置信息
</string
>
<key>
NSBonjourServices
</key>
<key>
NSBonjourServices
</key>
<array>
<array>
<string>
_dartvm._tcp
</string>
<string>
_dartvm._tcp
</string>
...
...
ios/Runner/zh-Hans.lproj/Info.plist
View file @
459b425
...
@@ -90,8 +90,8 @@
...
@@ -90,8 +90,8 @@
</array>
</array>
<key>
io.flutter.embedded_views_preview
</key>
<key>
io.flutter.embedded_views_preview
</key>
<true/>
<true/>
<
!-- <key>NSLocalNetwork
UsageDescription</key>
<
key>
NSLocationWhenInUse
UsageDescription
</key>
<string>
此应用需要访问本地网络以发现和连接智能设备</string> --
>
<string>
提交打卡签到信息中需要使用当前的位置信息
</string
>
<key>
NSBonjourServices
</key>
<key>
NSBonjourServices
</key>
<array>
<array>
<string>
_dartvm._tcp
</string>
<string>
_dartvm._tcp
</string>
...
...
lib/config/constant.dart
View file @
459b425
...
@@ -91,10 +91,18 @@ class Constant {
...
@@ -91,10 +91,18 @@ class Constant {
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
///
/// IM SDK
/// IM SDK
static
const
int
imSdkAppId
=
EnvConfig
.
env
==
'dev'
?
1400310691
:
1600117207
;
// static const int imSdkAppId = EnvConfig.env == 'dev' ? 1400310691 : 1600117207;
static
const
String
imClientSecure
=
EnvConfig
.
env
==
'dev'
// static const String imClientSecure = EnvConfig.env == 'dev'
?
'kM4yqbehB3io9UiLvH6eHvM7xAhfYxoyyaO1tLoHgKltcaI7MZXkUbpFaWdeQIqe'
// ? 'kM4yqbehB3io9UiLvH6eHvM7xAhfYxoyyaO1tLoHgKltcaI7MZXkUbpFaWdeQIqe'
:
'GkMkhAnrCThYrZxApCBdFidcAC8USwVnhoqMGzqmSvmcegRCvETtDR2Te9btarnG'
;
// : 'GkMkhAnrCThYrZxApCBdFidcAC8USwVnhoqMGzqmSvmcegRCvETtDR2Te9btarnG';
static
const
int
imSdkAppId
=
1600117207
;
// 线上只保留这个实例
static
const
String
imClientSecure
=
'GkMkhAnrCThYrZxApCBdFidcAC8USwVnhoqMGzqmSvmcegRCvETtDR2Te9btarnG'
;
// 苹果是根据发布环境来确定是采用什么推送
static
const
int
apnsCertificateID
=
EnvConfig
.
apnsEnv
==
'product'
?
47803
:
47802
;
/// Key
/// Key
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
...
...
lib/config/env_config.dart
View file @
459b425
...
@@ -3,6 +3,8 @@ class EnvConfig {
...
@@ -3,6 +3,8 @@ class EnvConfig {
static
const
String
version
=
String
.
fromEnvironment
(
'version'
,
defaultValue:
'0.0.0'
);
static
const
String
version
=
String
.
fromEnvironment
(
'version'
,
defaultValue:
'0.0.0'
);
static
const
String
apnsEnv
=
String
.
fromEnvironment
(
'apns'
,
defaultValue:
'product'
);
static
bool
isDev
()
{
static
bool
isDev
()
{
return
env
==
'dev'
;
return
env
==
'dev'
;
}
}
...
...
lib/services/im_service.dart
View file @
459b425
...
@@ -374,7 +374,7 @@ class ImService {
...
@@ -374,7 +374,7 @@ class ImService {
onNotificationClicked:
_onNotificationClicked
,
onNotificationClicked:
_onNotificationClicked
,
sdkAppId:
Constant
.
imSdkAppId
,
sdkAppId:
Constant
.
imSdkAppId
,
appKey:
Constant
.
imClientSecure
,
appKey:
Constant
.
imClientSecure
,
apnsCertificateID:
47801
,
apnsCertificateID:
Constant
.
apnsCertificateID
,
);
);
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
debugPrint
(
'注册推送成功--------'
);
debugPrint
(
'注册推送成功--------'
);
...
...
pub_ios.sh
View file @
459b425
...
@@ -52,13 +52,13 @@ cd ios
...
@@ -52,13 +52,13 @@ cd ios
#flutter build ipa --export-method ad-hoc --dart-define=env=$env --dart-define=version=$_main_ver$_ver
#flutter build ipa --export-method ad-hoc --dart-define=env=$env --dart-define=version=$_main_ver$_ver
if
[
"
$env
"
==
'pub'
]
;
then
if
[
"
$env
"
==
'pub'
]
;
then
flutter build ipa --release --dart-define
=
env
=
$env
--dart-define
=
version
=
$_main_ver$_ver
flutter build ipa --release --dart-define
=
env
=
$env
--dart-define
=
version
=
$_main_ver$_ver
--dart-define
=
apns
=
product
cd
$base_root
cd
$base_root
mkdir -p dist
mkdir -p dist
cp -f build/ios/ipa/banxiaoer.ipa dist/
'banxiaoer_release_'
$env
'_'
$_ver
'.ipa'
cp -f build/ios/ipa/banxiaoer.ipa dist/
'banxiaoer_release_'
$env
'_'
$_ver
'.ipa'
echo
'build and publish release package is done '
$env
echo
'build and publish release package is done '
$env
else
else
flutter build ipa --export-method ad-hoc --dart-define
=
env
=
$env
--dart-define
=
version
=
$_main_ver$_ver
flutter build ipa --export-method ad-hoc --dart-define
=
env
=
$env
--dart-define
=
version
=
$_main_ver$_ver
--dart-define
=
apns
=
product
cd
$base_root
cd
$base_root
mkdir -p dist
mkdir -p dist
cp -f build/ios/ipa/banxiaoer.ipa dist/
'banxiaoer_adhoc_'
$env
'_'
$_ver
'.ipa'
cp -f build/ios/ipa/banxiaoer.ipa dist/
'banxiaoer_adhoc_'
$env
'_'
$_ver
'.ipa'
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment