-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6d1653
commit 69a8768
Showing
11 changed files
with
69 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// ALDataNetworkConnection.h | ||
// Applozic | ||
// | ||
// Created by devashish on 02/12/2015. | ||
// Copyright © 2015 applozic Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface ALDataNetworkConnection : UIViewController | ||
|
||
+(BOOL)checkDataNetworkAvailable; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// ALDataNetworkConnection.m | ||
// Applozic | ||
// | ||
// Created by devashish on 02/12/2015. | ||
// Copyright © 2015 applozic Inc. All rights reserved. | ||
// | ||
|
||
#import "ALDataNetworkConnection.h" | ||
#import <SystemConfiguration/SCNetworkReachability.h> | ||
|
||
@interface ALDataNetworkConnection () | ||
|
||
@end | ||
|
||
@implementation ALDataNetworkConnection | ||
|
||
+(BOOL)checkDataNetworkAvailable | ||
{ | ||
SCNetworkReachabilityFlags flags; | ||
SCNetworkReachabilityRef address; | ||
address = SCNetworkReachabilityCreateWithName(NULL, "www.google.com" ); | ||
Boolean success = SCNetworkReachabilityGetFlags(address, &flags); | ||
CFRelease(address); | ||
|
||
bool canReach = success | ||
&& !(flags & kSCNetworkReachabilityFlagsConnectionRequired) | ||
&& (flags & kSCNetworkReachabilityFlagsReachable); | ||
|
||
if(canReach) | ||
{ | ||
NSLog(@"NETWORK AVAILABLE"); | ||
} | ||
else | ||
{ | ||
NSLog(@"NETWORK ISN'T AVAILABLE"); | ||
} | ||
|
||
return canReach; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-44.4 KB
sample-with-framework/applozicdemo/Assets.xcassets/imagesssss/02.imageset/02.jpg
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
sample-with-framework/applozicdemo/Assets.xcassets/imagesssss/02.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-47.1 KB
sample-with-framework/applozicdemo/Assets.xcassets/imagesssss/3.imageset/3.jpg
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
sample-with-framework/applozicdemo/Assets.xcassets/imagesssss/3.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-47.9 KB
sample-with-framework/applozicdemo/Assets.xcassets/imagesssss/4.imageset/4.jpg
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
sample-with-framework/applozicdemo/Assets.xcassets/imagesssss/4.imageset/Contents.json
This file was deleted.
Oops, something went wrong.