forked from organicmaps/organicmaps
Merge pull request #3989 from igrechuhin/team
[ios] Moved to new development team.
This commit is contained in:
commit
be59715dc8
5 changed files with 38 additions and 157 deletions
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.my.maps-beta-enterprise</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.mapsme.watchkit</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.mapsme.watchkit.production</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -125,7 +125,6 @@
|
|||
34679F3D1C92FE3700114F20 /* MWMWhatsNewDownloaderEditorController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34679F3C1C92FE3700114F20 /* MWMWhatsNewDownloaderEditorController.mm */; };
|
||||
34679F3E1C92FE3700114F20 /* MWMWhatsNewDownloaderEditorController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34679F3C1C92FE3700114F20 /* MWMWhatsNewDownloaderEditorController.mm */; };
|
||||
346EDADB1B9F0E35004F8DB5 /* MWMMultilineLabel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 346EDADA1B9F0E35004F8DB5 /* MWMMultilineLabel.mm */; };
|
||||
347274731B0F4EE000756B37 /* me.maps.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 347274721B0F4EE000756B37 /* me.maps.entitlements */; };
|
||||
3472EC051B4D44BE0085CB79 /* UIFont+MapsMeFonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3472EC041B4D44BE0085CB79 /* UIFont+MapsMeFonts.mm */; };
|
||||
34751E9E1BFB8E73005299B7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C9864B186C5EAA00AF7E9E /* MediaPlayer.framework */; };
|
||||
3476B8CC1BFDCB6700874594 /* MWMTTSSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */; };
|
||||
|
@ -377,7 +376,6 @@
|
|||
6741A9571BF340DE002C974C /* 03_jomolhari-id-a3d.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EEA615E7134C4968003A9827 /* 03_jomolhari-id-a3d.ttf */; };
|
||||
6741A9581BF340DE002C974C /* 04_padauk.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EEA615E8134C4968003A9827 /* 04_padauk.ttf */; };
|
||||
6741A9591BF340DE002C974C /* 05_khmeros.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EEA615E9134C4968003A9827 /* 05_khmeros.ttf */; };
|
||||
6741A95A1BF340DE002C974C /* me.maps.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 347274721B0F4EE000756B37 /* me.maps.entitlements */; };
|
||||
6741A95B1BF340DE002C974C /* 06_code2000.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EE164810135CEE49003B8A3E /* 06_code2000.ttf */; };
|
||||
6741A95C1BF340DE002C974C /* categories.txt in Resources */ = {isa = PBXBuildFile; fileRef = FAAFD696139D9BE2000AE70C /* categories.txt */; };
|
||||
6741A95D1BF340DE002C974C /* types.txt in Resources */ = {isa = PBXBuildFile; fileRef = FA64D9A813F975AD00350ECF /* types.txt */; };
|
||||
|
@ -606,7 +604,6 @@
|
|||
6B9978351C89A316003B8AA0 /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 6B9978341C89A316003B8AA0 /* editor.config */; };
|
||||
6B9978361C89A316003B8AA0 /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 6B9978341C89A316003B8AA0 /* editor.config */; };
|
||||
6BA0BCD11B74DDBA00CC9969 /* MWMCustomFacebookEvents.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6BA0BCD01B74DDBA00CC9969 /* MWMCustomFacebookEvents.mm */; };
|
||||
845C891F1C78748000940D7F /* me.maps.enterprise.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 845C891E1C78748000940D7F /* me.maps.enterprise.entitlements */; };
|
||||
845C892C1C8981CE00940D7F /* HockeySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89291C8981CE00940D7F /* HockeySDK.framework */; };
|
||||
845C892D1C8981CE00940D7F /* HockeySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89291C8981CE00940D7F /* HockeySDK.framework */; };
|
||||
845C892E1C8981CE00940D7F /* HockeySDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 845C892B1C8981CE00940D7F /* HockeySDKResources.bundle */; };
|
||||
|
@ -1010,8 +1007,6 @@
|
|||
346F27941BD12AA80092D801 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
346F27951BD12AA80092D801 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
346F27961BD12AA80092D801 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
347274721B0F4EE000756B37 /* me.maps.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = me.maps.entitlements; sourceTree = "<group>"; };
|
||||
3472747A1B0F4FF100756B37 /* me.maps.production.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = me.maps.production.entitlements; sourceTree = "<group>"; };
|
||||
3472EC031B4D44BE0085CB79 /* UIFont+MapsMeFonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIFont+MapsMeFonts.h"; sourceTree = "<group>"; };
|
||||
3472EC041B4D44BE0085CB79 /* UIFont+MapsMeFonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIFont+MapsMeFonts.mm"; sourceTree = "<group>"; };
|
||||
3476B8D51BFDD30B00874594 /* tts-how-to-set-up-voice.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = "tts-how-to-set-up-voice.html"; path = "../../data/tts-how-to-set-up-voice.html"; sourceTree = "<group>"; };
|
||||
|
@ -1286,7 +1281,6 @@
|
|||
772923C9184E0440008C1EDC /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
7794829519A4E66A005F57B9 /* sk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk; path = sk.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
77DDA9A116D504F900804BDB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
845C891E1C78748000940D7F /* me.maps.enterprise.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = me.maps.enterprise.entitlements; sourceTree = "<group>"; };
|
||||
845C89291C8981CE00940D7F /* HockeySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HockeySDK.framework; sourceTree = "<group>"; };
|
||||
845C892B1C8981CE00940D7F /* HockeySDKResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = HockeySDKResources.bundle; sourceTree = "<group>"; };
|
||||
845C89301C89837900940D7F /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
|
||||
|
@ -1801,7 +1795,6 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
6B653B931C7F2DE4007BEFC5 /* cuisine-strings */,
|
||||
347274711B0F4EB300756B37 /* Entitlements */,
|
||||
97D40C09184D031900A1D572 /* Images.xcassets */,
|
||||
4A300ED31C6DCFD400140018 /* countries-strings */,
|
||||
34C659451BD12A77009DC20A /* InfoPlist.strings */,
|
||||
|
@ -2093,16 +2086,6 @@
|
|||
path = Components;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
347274711B0F4EB300756B37 /* Entitlements */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
845C891E1C78748000940D7F /* me.maps.enterprise.entitlements */,
|
||||
347274721B0F4EE000756B37 /* me.maps.entitlements */,
|
||||
3472747A1B0F4FF100756B37 /* me.maps.production.entitlements */,
|
||||
);
|
||||
path = Entitlements;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
347FD8491C60B2CE002FB65E /* Cells */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -3204,10 +3187,10 @@
|
|||
ORGANIZATIONNAME = MapsWithMe;
|
||||
TargetAttributes = {
|
||||
1D6058900D05DD3D006BFB54 = {
|
||||
DevelopmentTeam = XMK5825GXK;
|
||||
DevelopmentTeam = 3T6FSDE8C7;
|
||||
SystemCapabilities = {
|
||||
com.apple.ApplicationGroups.iOS = {
|
||||
enabled = 1;
|
||||
enabled = 0;
|
||||
};
|
||||
com.apple.BackgroundModes = {
|
||||
enabled = 1;
|
||||
|
@ -3215,7 +3198,7 @@
|
|||
};
|
||||
};
|
||||
6741A93D1BF340DE002C974C = {
|
||||
DevelopmentTeam = XMK5825GXK;
|
||||
DevelopmentTeam = 3T6FSDE8C7;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3312,7 +3295,6 @@
|
|||
341F99E31C6B1165001C67B8 /* MWMMapDownloaderTableViewCell.xib in Resources */,
|
||||
341F99D71C6B1165001C67B8 /* MWMMapDownloaderLargeCountryTableViewCell.xib in Resources */,
|
||||
EEA61605134C496A003A9827 /* 05_khmeros.ttf in Resources */,
|
||||
347274731B0F4EE000756B37 /* me.maps.entitlements in Resources */,
|
||||
3476B8E01BFDD33A00874594 /* tts-how-to-set-up-voice-img in Resources */,
|
||||
347FD88B1C60B2CE002FB65E /* MWMOpeningHoursTimeSpanTableViewCell.xib in Resources */,
|
||||
A367C93B1B17334800E2B6E7 /* resources-default in Resources */,
|
||||
|
@ -3372,7 +3354,6 @@
|
|||
F6FE2C111B03A016009814AA /* PlacePageNavigationBar.xib in Resources */,
|
||||
34B646C01CEB6FE000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */,
|
||||
F61579361AC2CEB60032D8E9 /* MWMRateAlert.xib in Resources */,
|
||||
845C891F1C78748000940D7F /* me.maps.enterprise.entitlements in Resources */,
|
||||
F6B97B291CD0CB170009B612 /* MWMBookmarkNameCell.xib in Resources */,
|
||||
347FD8791C60B2CE002FB65E /* MWMOpeningHoursDaysSelectorTableViewCell.xib in Resources */,
|
||||
34CD81D31C92AD4D007D2A60 /* Welcome.storyboard in Resources */,
|
||||
|
@ -3459,7 +3440,6 @@
|
|||
6741A9581BF340DE002C974C /* 04_padauk.ttf in Resources */,
|
||||
6741A9591BF340DE002C974C /* 05_khmeros.ttf in Resources */,
|
||||
677A2DE21C0DD50900635A00 /* resources-default in Resources */,
|
||||
6741A95A1BF340DE002C974C /* me.maps.entitlements in Resources */,
|
||||
3406FA191C6E0D8F00E9FAD2 /* MWMMapDownloadDialog.xib in Resources */,
|
||||
4A300ED51C6DCFD400140018 /* countries-strings in Resources */,
|
||||
3476B8E11BFDD33A00874594 /* tts-how-to-set-up-voice-img in Resources */,
|
||||
|
@ -4157,7 +4137,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4186,7 +4165,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4218,7 +4196,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4247,7 +4224,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4279,7 +4255,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.production.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4306,7 +4281,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_IDENTIFIER = me.maps.simulator.debug;
|
||||
BUNDLE_IDENTIFIER = mapsme.debug;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
@ -4402,7 +4377,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4425,7 +4399,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_IDENTIFIER = me.maps.debug;
|
||||
BUNDLE_IDENTIFIER = mapsme.debug;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
@ -4522,7 +4496,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4646,7 +4619,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.enterprise.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4770,7 +4742,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.production.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4793,7 +4764,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_IDENTIFIER = me.maps.release;
|
||||
BUNDLE_IDENTIFIER = mapsme.release;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
@ -4892,7 +4863,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
@ -4915,7 +4885,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_IDENTIFIER = me.maps.simulator.release;
|
||||
BUNDLE_IDENTIFIER = mapsme.release;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
@ -5014,7 +4984,6 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = Entitlements/me.maps.entitlements;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/PushNotifications",
|
||||
|
|
|
@ -10,15 +10,15 @@
|
|||
|
||||
#include <mach/mach.h>
|
||||
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if !defined(IFT_ETHER)
|
||||
#define IFT_ETHER 0x6 /* Ethernet CSMACD */
|
||||
#define IFT_ETHER 0x6 /* Ethernet CSMACD */
|
||||
#endif
|
||||
|
||||
#import "../iphone/Maps/Classes/Common.h"
|
||||
|
@ -35,52 +35,8 @@
|
|||
#import <SystemConfiguration/SystemConfiguration.h>
|
||||
#import <netinet/in.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
void migrateFromSharedGroupIfRequired()
|
||||
{
|
||||
NSUserDefaults * settings =
|
||||
[[NSUserDefaults alloc] initWithSuiteName:kApplicationGroupIdentifier()];
|
||||
if (![settings boolForKey:kHaveAppleWatch])
|
||||
return;
|
||||
|
||||
NSFileManager * fileManager = [NSFileManager defaultManager];
|
||||
NSURL * privateURL =
|
||||
[fileManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask].firstObject;
|
||||
NSURL * sharedURL =
|
||||
[fileManager containerURLForSecurityApplicationGroupIdentifier:kApplicationGroupIdentifier()];
|
||||
|
||||
NSDirectoryEnumerator * dirEnum =
|
||||
[fileManager enumeratorAtURL:sharedURL
|
||||
includingPropertiesForKeys:nil
|
||||
options:NSDirectoryEnumerationSkipsSubdirectoryDescendants |
|
||||
NSDirectoryEnumerationSkipsPackageDescendants |
|
||||
NSDirectoryEnumerationSkipsHiddenFiles
|
||||
errorHandler:nil];
|
||||
|
||||
NSURL * sourceURL = nil;
|
||||
while ((sourceURL = [dirEnum nextObject]))
|
||||
{
|
||||
NSString * fileName = [sourceURL lastPathComponent];
|
||||
NSURL * destinationURL = [privateURL URLByAppendingPathComponent:fileName];
|
||||
NSError * error = nil;
|
||||
[fileManager moveItemAtURL:sourceURL toURL:destinationURL error:&error];
|
||||
if (error && [error.domain isEqualToString:NSCocoaErrorDomain] &&
|
||||
error.code == NSFileWriteFileExistsError)
|
||||
{
|
||||
[fileManager removeItemAtURL:destinationURL error:nil];
|
||||
[fileManager moveItemAtURL:sourceURL toURL:destinationURL error:nil];
|
||||
}
|
||||
}
|
||||
|
||||
[settings setBool:NO forKey:kHaveAppleWatch];
|
||||
[settings synchronize];
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Platform::Platform()
|
||||
{
|
||||
migrateFromSharedGroupIfRequired();
|
||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
m_isTablet = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
|
||||
|
@ -90,7 +46,8 @@ Platform::Platform()
|
|||
m_resourcesDir = [path UTF8String];
|
||||
m_resourcesDir += "/";
|
||||
|
||||
NSArray * dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
NSArray * dirPaths =
|
||||
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
NSString * docsDir = [dirPaths firstObject];
|
||||
m_writableDir = [docsDir UTF8String];
|
||||
m_writableDir += "/";
|
||||
|
@ -106,7 +63,8 @@ Platform::Platform()
|
|||
}
|
||||
|
||||
UIDevice * device = [UIDevice currentDevice];
|
||||
NSLog(@"Device: %@, SystemName: %@, SystemVersion: %@", device.model, device.systemName, device.systemVersion);
|
||||
NSLog(@"Device: %@, SystemName: %@, SystemVersion: %@", device.model, device.systemName,
|
||||
device.systemVersion);
|
||||
|
||||
[pool release];
|
||||
}
|
||||
|
@ -137,20 +95,12 @@ bool Platform::GetFileSizeByName(string const & fileName, uint64_t & size) const
|
|||
|
||||
unique_ptr<ModelReader> Platform::GetReader(string const & file, string const & searchScope) const
|
||||
{
|
||||
return make_unique<FileReader>(ReadPathForFile(file, searchScope),
|
||||
READER_CHUNK_LOG_SIZE, READER_CHUNK_LOG_COUNT);
|
||||
}
|
||||
|
||||
int Platform::VideoMemoryLimit() const
|
||||
{
|
||||
return 8 * 1024 * 1024;
|
||||
}
|
||||
|
||||
int Platform::PreCachingDepth() const
|
||||
{
|
||||
return 2;
|
||||
return make_unique<FileReader>(ReadPathForFile(file, searchScope), READER_CHUNK_LOG_SIZE,
|
||||
READER_CHUNK_LOG_COUNT);
|
||||
}
|
||||
|
||||
int Platform::VideoMemoryLimit() const { return 8 * 1024 * 1024; }
|
||||
int Platform::PreCachingDepth() const { return 2; }
|
||||
static string GetDeviceUid()
|
||||
{
|
||||
NSString * uid = @"";
|
||||
|
@ -170,27 +120,22 @@ static string GetMacAddress()
|
|||
ifaddrs * currentAddr = addresses;
|
||||
do
|
||||
{
|
||||
if (currentAddr->ifa_addr->sa_family == AF_LINK
|
||||
&& ((const struct sockaddr_dl *) currentAddr->ifa_addr)->sdl_type == IFT_ETHER)
|
||||
if (currentAddr->ifa_addr->sa_family == AF_LINK &&
|
||||
((const struct sockaddr_dl *)currentAddr->ifa_addr)->sdl_type == IFT_ETHER)
|
||||
{
|
||||
const struct sockaddr_dl * dlAddr = (const struct sockaddr_dl *) currentAddr->ifa_addr;
|
||||
const struct sockaddr_dl * dlAddr = (const struct sockaddr_dl *)currentAddr->ifa_addr;
|
||||
const char * base = &dlAddr->sdl_data[dlAddr->sdl_nlen];
|
||||
result.assign(base, dlAddr->sdl_alen);
|
||||
break;
|
||||
}
|
||||
currentAddr = currentAddr->ifa_next;
|
||||
}
|
||||
while (currentAddr->ifa_next);
|
||||
} while (currentAddr->ifa_next);
|
||||
freeifaddrs(addresses);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
string Platform::UniqueClientId() const
|
||||
{
|
||||
return HashUniqueID(GetMacAddress() + GetDeviceUid());
|
||||
}
|
||||
|
||||
string Platform::UniqueClientId() const { return HashUniqueID(GetMacAddress() + GetDeviceUid()); }
|
||||
static void PerformImpl(void * obj)
|
||||
{
|
||||
Platform::TFunctor * f = reinterpret_cast<Platform::TFunctor *>(obj);
|
||||
|
@ -202,16 +147,14 @@ string Platform::GetMemoryInfo() const
|
|||
{
|
||||
struct task_basic_info info;
|
||||
mach_msg_type_number_t size = sizeof(info);
|
||||
kern_return_t const kerr = task_info(mach_task_self(),
|
||||
TASK_BASIC_INFO,
|
||||
(task_info_t)&info,
|
||||
&size);
|
||||
kern_return_t const kerr =
|
||||
task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)&info, &size);
|
||||
stringstream ss;
|
||||
if (kerr == KERN_SUCCESS)
|
||||
{
|
||||
ss << "Memory info: Resident_size = " << info.resident_size / 1024
|
||||
<< "KB; virtual_size = " << info.resident_size / 1024 << "KB; suspend_count = " << info.suspend_count
|
||||
<< " policy = " << info.policy;
|
||||
<< "KB; virtual_size = " << info.resident_size / 1024
|
||||
<< "KB; suspend_count = " << info.suspend_count << " policy = " << info.policy;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -230,10 +173,10 @@ void Platform::RunAsync(TFunctor const & fn, Priority p)
|
|||
int priority = DISPATCH_QUEUE_PRIORITY_DEFAULT;
|
||||
switch (p)
|
||||
{
|
||||
case EPriorityBackground: priority = DISPATCH_QUEUE_PRIORITY_BACKGROUND; break;
|
||||
case EPriorityDefault: priority = DISPATCH_QUEUE_PRIORITY_DEFAULT; break;
|
||||
case EPriorityHigh: priority = DISPATCH_QUEUE_PRIORITY_HIGH; break;
|
||||
case EPriorityLow: priority = DISPATCH_QUEUE_PRIORITY_LOW; break;
|
||||
case EPriorityBackground: priority = DISPATCH_QUEUE_PRIORITY_BACKGROUND; break;
|
||||
case EPriorityDefault: priority = DISPATCH_QUEUE_PRIORITY_DEFAULT; break;
|
||||
case EPriorityHigh: priority = DISPATCH_QUEUE_PRIORITY_HIGH; break;
|
||||
case EPriorityLow: priority = DISPATCH_QUEUE_PRIORITY_LOW; break;
|
||||
}
|
||||
dispatch_async_f(dispatch_get_global_queue(priority, 0), new TFunctor(fn), &PerformImpl);
|
||||
}
|
||||
|
@ -244,7 +187,8 @@ Platform::EConnectionType Platform::ConnectionStatus()
|
|||
bzero(&zero, sizeof(zero));
|
||||
zero.sin_len = sizeof(zero);
|
||||
zero.sin_family = AF_INET;
|
||||
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)&zero);
|
||||
SCNetworkReachabilityRef reachability =
|
||||
SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)&zero);
|
||||
if (!reachability)
|
||||
return EConnectionType::CONNECTION_NONE;
|
||||
SCNetworkReachabilityFlags flags;
|
||||
|
@ -252,7 +196,8 @@ Platform::EConnectionType Platform::ConnectionStatus()
|
|||
CFRelease(reachability);
|
||||
if (!gotFlags || ((flags & kSCNetworkReachabilityFlagsReachable) == 0))
|
||||
return EConnectionType::CONNECTION_NONE;
|
||||
SCNetworkReachabilityFlags userActionRequired = kSCNetworkReachabilityFlagsConnectionRequired | kSCNetworkReachabilityFlagsInterventionRequired;
|
||||
SCNetworkReachabilityFlags userActionRequired = kSCNetworkReachabilityFlagsConnectionRequired |
|
||||
kSCNetworkReachabilityFlagsInterventionRequired;
|
||||
if ((flags & userActionRequired) == userActionRequired)
|
||||
return EConnectionType::CONNECTION_NONE;
|
||||
if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN)
|
||||
|
@ -266,19 +211,16 @@ void Platform::SetupMeasurementSystem() const
|
|||
auto units = measurement_utils::Units::Metric;
|
||||
if (settings::Get(settings::kMeasurementUnits, units))
|
||||
return;
|
||||
BOOL const isMetric = [[[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleUsesMetricSystem] boolValue];
|
||||
BOOL const isMetric =
|
||||
[[[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleUsesMetricSystem] boolValue];
|
||||
units = isMetric ? measurement_utils::Units::Metric : measurement_utils::Units::Imperial;
|
||||
settings::Set(settings::kMeasurementUnits, units);
|
||||
}
|
||||
|
||||
void Platform::SendPushWooshTag(string const & tag)
|
||||
{
|
||||
SendPushWooshTag(tag, vector<string>{ "1" });
|
||||
}
|
||||
|
||||
void Platform::SendPushWooshTag(string const & tag) { SendPushWooshTag(tag, vector<string>{"1"}); }
|
||||
void Platform::SendPushWooshTag(string const & tag, string const & value)
|
||||
{
|
||||
SendPushWooshTag(tag, vector<string>{ value });
|
||||
SendPushWooshTag(tag, vector<string>{value});
|
||||
}
|
||||
|
||||
void Platform::SendPushWooshTag(string const & tag, vector<string> const & values)
|
||||
|
|
Loading…
Add table
Reference in a new issue