Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
xffruit
Commits
a374661b
Commit
a374661b
authored
Oct 28, 2015
by
zhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本更新
parent
8140cbe6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
ICRAppDelegate.m
XFFruit/AppDelegate/ICRAppDelegate.m
+9
-12
No files found.
XFFruit/AppDelegate/ICRAppDelegate.m
View file @
a374661b
...
...
@@ -34,7 +34,7 @@
[
NSURLProtocol
registerClass
:[
ICRURLProtocol
class
]];
NSString
*
path
=
[
NSSearchPathForDirectoriesInDomains
(
NSDocumentationDirectory
,
NSUserDomainMask
,
YES
)
lastObject
];
CLog
(
@"%@"
,
path
);
// Required
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_1
...
...
@@ -63,14 +63,11 @@
categories
:
nil
];
}
[
APService
setupWithOption
:
launchOptions
];
[
self
setupBMKMapMgr
];
_m_appViewControllerMgr
=
[
ICRAppViewControllerManager
getAppViewControllerManager
];
#pragma 版本更新
[
self
enterpriseUpdate
];
[
self
.
window
makeKeyAndVisible
];
return
YES
;
}
#pragma mark enterprise alertView 企业版提示
...
...
@@ -81,9 +78,9 @@
NSString
*
version
=
[
content
valueForKey
:
@"CFBundleVersion"
]
;
self
.
version
=
version
;
// 获取服务器更新信息
// 获取服务器更新信息
[
self
getDataFromServer
];
}
//请求服务器更新信息
-
(
void
)
getDataFromServer
{
...
...
@@ -124,7 +121,7 @@
-
(
void
)
comperVersion
{
NSComparisonResult
comResult
=
[
self
p_compareVersions
:
self
.
version
betweenVersion2
:
self
.
severVersion
];
if
(
comResult
==
NSOrderedAscending
)
{
//299企业版的更新 @"有新的版本可供下载"
// NSOrderedAscending self.version<self.severVersion
...
...
@@ -132,8 +129,8 @@
// NSOrderedSame self.version==self.severVersion
if
(
self
.
severForceUpdate
)
{
//强制更新
UIAlertView
*
alertV
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"新版本告知"
message
:
@"有新版本发布请您下载最新版本"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"去下载"
,
nil
];
alertV
.
tag
=
1001
;
UIAlertView
*
alertV
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"新版本告知"
message
:
@"有新版本发布请您下载最新版本"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"去下载"
,
nil
];
alertV
.
tag
=
1001
;
[
alertV
show
];
}
else
{
...
...
@@ -141,7 +138,7 @@
alertV
.
tag
=
1002
;
[
alertV
show
];
}
}
else
{
[
IBTLoadingView
showProgressLabel
:
@"暂无新版本"
];
...
...
@@ -154,7 +151,7 @@
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
alertView
.
tag
==
1001
)
{
[[
UIApplication
sharedApplication
]
openURL
:[
NSURL
URLWithString
:
self
.
severUrl
]];
[[
UIApplication
sharedApplication
]
openURL
:[
NSURL
URLWithString
:
self
.
severUrl
]];
}
else
if
(
alertView
.
tag
==
1002
)
{
if
(
buttonIndex
==
1
)
{
...
...
@@ -206,7 +203,7 @@ clickedButtonAtIndex:(NSInteger)buttonIndex {
[
application
cancelAllLocalNotifications
];
}
-
(
void
)
application
:
(
UIApplication
*
)
application
didRegisterForRemoteNotificationsWithDeviceToken
:
(
NSData
*
)
deviceToken
{
CLog
(
@"%@"
,
[
NSString
stringWithFormat
:
@"Device Token: %@"
,
deviceToken
]);
[
APService
registerDeviceToken
:
deviceToken
];
}
...
...
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