Latest 1.0.0
Homepage https://github.com/NinjasCL/IsInChina
License MIT
Platforms ios 8.0
Authors

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, [email protected]

Licence

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

Latest podspec

{
    "name": "IsInChina",
    "version": "1.0.0",
    "summary": "Provides utility methods for knowing if the device is operating inside China.",
    "description": "If you need to know if the user is inside China. Mainly because the Chinese Golden Shield could cause some issues when accesing servers outside China.",
    "homepage": "https://github.com/NinjasCL/IsInChina",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Camilo Castro": "[email protected]"
    },
    "source": {
        "git": "https://github.com/NinjasCL/IsInChina.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://twitter.com/camcasc",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "IsInChina/Classes/**/*"
}

Pin It on Pinterest

Share This