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
BOOL InitInstance() | |
{ | |
m_hMutex = ::CreateMutex(NULL, FALSE, APP_MUTEX_NAME); | |
if (NULL == m_hMutex) | |
{ | |
Suicide(); | |
return FALSE; | |
} |
In iOS8, Apple has changed how geo location permissions work. This gist outlines an approach to fix this so Geo will continue to work in iOS8.
Before getting started with the code change, we need to update the tiapp.xml with a few keys.
If you wish to have Geo always run, you need to add the below key. The key NSLocationAlwaysUsageDescription is used when requesting permission to use location services whenever the app is running. To enable this, add the below to the tiapp.xml:
NSLocationAlwaysUsageDescription Reason that appears in the authorization prompt
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
/** | |
* Link against MobileGestalt | |
*/ | |
OBJC_EXTERN CFStringRef MGCopyAnswer(CFStringRef property) WEAK_IMPORT_ATTRIBUTE; | |
void someFunction() { | |
CFStringRef udid = MGCopyAnswer(CFSTR("UniqueDeviceID")); | |
/* |
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
function doClick(e) { | |
alert('Clicked!'); | |
} | |
// Remove the event listener like this: | |
// $.myWidget.off("click", doClick); | |
$.index.open(); |