This file contains hidden or 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
token_file=~/.mapbox | |
token=`cat $token_file` | |
info_plist=$TARGET_BUILD_DIR/$INFOPLIST_PATH | |
current_token=`/usr/libexec/PlistBuddy -c "Print :MGLMapboxAccessToken" $info_plist` | |
if [ "$current_token" ]; then | |
exit 0 | |
elif [ "$token" ]; then | |
plutil -replace MGLMapboxAccessToken -string $token $info_plist | |
else |
This file contains hidden or 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
// Eric Wolfe: Added support for checking if mobile radios are enabled on the device | |
// Original source: http://www.enigmaticape.com/blog/determine-wifi-enabled-ios-one-weird-trick | |
#import <Foundation/Foundation.h> | |
#import <ifaddrs.h> | |
#import <net/if.h> | |
#import <SystemConfiguration/CaptiveNetwork.h> | |
@interface ERWNetworkStatus : NSObject |