Skip to content

NinjasCL-archive/IsInChina

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IsInChina

Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Call the following method inside App Delegate or other place that you want

+ (BOOL) deviceIsRunningInChina;

Requirements

This plugin depends on geoplugin.com servers. Please add geoplugin.net to your NSAppTransportSecurity plist.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>geoplugin.net</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSExceptionMinimumTLSVersion</key>
            <string>TLSv1.1</string>
            <key>NSIncludesSubdomains</key>
            <true/>
        </dict>
    </dict>
</dict>

Installation

IsInChina is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "IsInChina"

Author

Camilo Castro, camilo@ninjas.cl

Licence

IsInChina is available under the MIT license. See the LICENCE file for more info.

About

[UNMAINTAINED] Tells if the current device is running inside China

Resources

License

Stars

Watchers

Forks

Packages

No packages published