Renaming Core module
This commit is contained in:
Родитель
45d9ff4c4d
Коммит
6ee14b58fd
|
@ -15,7 +15,7 @@
|
|||
|
||||
static NSString *const kMSCustomSelectorPrefix = @"custom_";
|
||||
static NSString *const kMSReturnedValueSelectorPart = @"returnedValue:";
|
||||
static NSString *const kMSIsAppDelegateForwarderEnabledKey = @"MobileCenterAppDelegateForwarderEnabled";
|
||||
static NSString *const kMSIsAppDelegateForwarderEnabledKey = @"AppCenterAppDelegateForwarderEnabled";
|
||||
|
||||
// Original selectors with special handling.
|
||||
static NSString *const kMSDidReceiveRemoteNotificationFetchHandler =
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
@implementation MSKeychainUtil
|
||||
|
||||
static NSString *MobileCenterKeychainServiceName(void) {
|
||||
static NSString *AppCenterKeychainServiceName(void) {
|
||||
static NSString *serviceName = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
serviceName = [NSString stringWithFormat:@"%@.MobileCenter", [MS_APP_MAIN_BUNDLE bundleIdentifier]];
|
||||
serviceName = [NSString stringWithFormat:@"%@.AppCenter", [MS_APP_MAIN_BUNDLE bundleIdentifier]];
|
||||
});
|
||||
return serviceName;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ static NSString *MobileCenterKeychainServiceName(void) {
|
|||
+ (BOOL)clear {
|
||||
NSMutableDictionary *item = [NSMutableDictionary new];
|
||||
item[(__bridge id)kSecClass] = (__bridge id)kSecClassGenericPassword;
|
||||
item[(__bridge id)kSecAttrService] = MobileCenterKeychainServiceName();
|
||||
item[(__bridge id)kSecAttrService] = AppCenterKeychainServiceName();
|
||||
|
||||
OSStatus status = SecItemDelete((__bridge CFDictionaryRef)item);
|
||||
return status == noErr;
|
||||
|
@ -60,7 +60,7 @@ static NSString *MobileCenterKeychainServiceName(void) {
|
|||
+ (NSMutableDictionary *)generateItem:(NSString *)key {
|
||||
NSMutableDictionary *item = [NSMutableDictionary new];
|
||||
item[(__bridge id)kSecClass] = (__bridge id)kSecClassGenericPassword;
|
||||
item[(__bridge id)kSecAttrService] = MobileCenterKeychainServiceName();
|
||||
item[(__bridge id)kSecAttrService] = AppCenterKeychainServiceName();
|
||||
item[(__bridge id)kSecAttrAccount] = key;
|
||||
return item;
|
||||
}
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
@interface MSUtility : NSObject
|
||||
|
||||
/**
|
||||
* Get the name of MobileCenter SDK.
|
||||
* Get the name of AppCenter SDK.
|
||||
*/
|
||||
+ (NSString *)sdkName;
|
||||
|
||||
/**
|
||||
* Get the current version of MobileCenter SDK.
|
||||
* Get the current version of AppCenter SDK.
|
||||
*/
|
||||
+ (NSString *)sdkVersion;
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ typedef struct {
|
|||
// SDK versioning.
|
||||
static ms_info_t mobilecenter_library_info
|
||||
__attribute__((section("__TEXT,__ms_ios,regular,no_dead_strip"))) = {.info_version = 1,
|
||||
.ms_name = MOBILE_CENTER_C_NAME,
|
||||
.ms_version = MOBILE_CENTER_C_VERSION,
|
||||
.ms_build = MOBILE_CENTER_C_BUILD};
|
||||
.ms_name = APP_CENTER_C_NAME,
|
||||
.ms_version = APP_CENTER_C_VERSION,
|
||||
.ms_build = APP_CENTER_C_BUILD};
|
||||
|
||||
@implementation MSUtility
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
+ (void)setLogUrl:(NSString *)logUrl;
|
||||
|
||||
/**
|
||||
* Enable or disable the SDK as a whole. In addition to MobileCenter resources, it will also enable or
|
||||
* Enable or disable the SDK as a whole. In addition to AppCenter resources, it will also enable or
|
||||
* disable all registered services.
|
||||
*
|
||||
* @param isEnabled YES to enable, NO to disable.
|
||||
|
@ -117,7 +117,7 @@
|
|||
* should be disabled if you or one of your third party SDK is doing message forwarding on the application delegate.
|
||||
* Message forwarding usually implies the implementation of @see NSObject#forwardingTargetForSelector: or @see
|
||||
* NSObject#forwardInvocation: methods.
|
||||
* To disable the application delegate forwarder just add the `MobileCenterAppDelegateForwarderEnabled` tag to your
|
||||
* To disable the application delegate forwarder just add the `AppCenterAppDelegateForwarderEnabled` tag to your
|
||||
* Info.plist
|
||||
* file and set it to `0`. Then you will have to forward any application delegate needed by the SDK manually.
|
||||
*/
|
||||
|
@ -139,9 +139,9 @@
|
|||
+ (BOOL)isDebuggerAttached;
|
||||
|
||||
/**
|
||||
* Get the current version of MobileCenter SDK.
|
||||
* Get the current version of AppCenter SDK.
|
||||
*
|
||||
* @return The current version of MobileCenter SDK.
|
||||
* @return The current version of AppCenter SDK.
|
||||
*/
|
||||
+ (NSString *)sdkVersion;
|
||||
|
||||
|
|
|
@ -26,10 +26,10 @@ static dispatch_once_t onceToken;
|
|||
static NSString *const kMSDefaultBaseUrl = @"https://in.mobile.azure.com";
|
||||
|
||||
// Service name for initialization.
|
||||
static NSString *const kMSServiceName = @"MobileCenter";
|
||||
static NSString *const kMSServiceName = @"AppCenter";
|
||||
|
||||
// The group Id for storage.
|
||||
static NSString *const kMSGroupId = @"MobileCenter";
|
||||
static NSString *const kMSGroupId = @"AppCenter";
|
||||
|
||||
@implementation MSAppCenter
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#import "MSAppCenterErrors.h"
|
||||
|
||||
#define MS_MOBILE_CENTER_BASE_DOMAIN @"com.Microsoft.Azure.Mobile.MobileCenter."
|
||||
#define MS_APP_CENTER_BASE_DOMAIN @"com.Microsoft.AppCenter."
|
||||
|
||||
#pragma mark - Domain
|
||||
|
||||
NSString *const kMSMCErrorDomain = MS_MOBILE_CENTER_BASE_DOMAIN @"ErrorDomain";
|
||||
NSString *const kMSMCErrorDomain = MS_APP_CENTER_BASE_DOMAIN @"ErrorDomain";
|
||||
|
||||
#pragma mark - Log
|
||||
|
||||
|
@ -18,4 +18,4 @@ NSString const *kMSMCConnectionHttpErrorDesc = @"An HTTP error occured.";
|
|||
NSString const *kMSMCConnectionSuspendedErrorDesc = @"Cancelled, connection suspended with log deletion.";
|
||||
|
||||
// Error user info keys
|
||||
NSString const *kMSMCConnectionHttpCodeErrorKey = MS_MOBILE_CENTER_BASE_DOMAIN "HttpCodeKey";
|
||||
NSString const *kMSMCConnectionHttpCodeErrorKey = MS_APP_CENTER_BASE_DOMAIN "HttpCodeKey";
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
@synchronized([self sharedInstance]) {
|
||||
if ([[self sharedInstance] canBeUsed]) {
|
||||
if (![MSAppCenter isEnabled] && ![MSAppCenter sharedInstance].enabledStateUpdating) {
|
||||
MSLogError([MSAppCenter logTag], @"The SDK is disabled. Re-enable the whole SDK from MobileCenter "
|
||||
MSLogError([MSAppCenter logTag], @"The SDK is disabled. Re-enable the whole SDK from AppCenter "
|
||||
@"first before enabling %@ service.",
|
||||
MS_CLASS_NAME_WITHOUT_PREFIX);
|
||||
} else {
|
||||
|
|
|
@ -148,7 +148,7 @@ static NSString *const kMSNullifiedInstallIdString = @"00000000-0000-0000-0000-0
|
|||
}
|
||||
|
||||
- (void)testSdkVersion {
|
||||
NSString *version = [NSString stringWithUTF8String:MOBILE_CENTER_C_VERSION];
|
||||
NSString *version = [NSString stringWithUTF8String:APP_CENTER_C_VERSION];
|
||||
XCTAssertTrue([[MSAppCenter sdkVersion] isEqualToString:version]);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
- (void)testInitNewChannel {
|
||||
|
||||
// If
|
||||
NSString *groupId = @"MobileCenter";
|
||||
NSString *groupId = @"AppCenter";
|
||||
MSPriority priority = MSPriorityDefault;
|
||||
float flushInterval = 1.0;
|
||||
NSUInteger batchSizeLimit = 10;
|
||||
|
@ -65,7 +65,7 @@
|
|||
|
||||
// If
|
||||
MSPriority priority = MSPriorityDefault;
|
||||
NSString *groupId = @"MobileCenter";
|
||||
NSString *groupId = @"AppCenter";
|
||||
MSLogManagerDefault *sut = [[MSLogManagerDefault alloc] initWithSender:OCMProtocolMock(@protocol(MSSender))
|
||||
storage:OCMProtocolMock(@protocol(MSStorage))];
|
||||
id mockDelegate = OCMProtocolMock(@protocol(MSLogManagerDelegate));
|
||||
|
@ -89,7 +89,7 @@
|
|||
- (void)testDelegatesConcurrentAccess {
|
||||
|
||||
// If
|
||||
NSString *groupId = @"MobileCenter";
|
||||
NSString *groupId = @"AppCenter";
|
||||
MSLogManagerDefault *sut = [[MSLogManagerDefault alloc] initWithSender:OCMProtocolMock(@protocol(MSSender))
|
||||
storage:OCMProtocolMock(@protocol(MSStorage))];
|
||||
MSAbstractLog *log = [MSAbstractLog new];
|
||||
|
|
|
@ -176,12 +176,12 @@
|
|||
}
|
||||
|
||||
- (void)testSdkName {
|
||||
NSString *name = [NSString stringWithUTF8String:MOBILE_CENTER_C_NAME];
|
||||
NSString *name = [NSString stringWithUTF8String:APP_CENTER_C_NAME];
|
||||
XCTAssertTrue([[MSUtility sdkName] isEqualToString:name]);
|
||||
}
|
||||
|
||||
- (void)testSdkVersion {
|
||||
NSString *version = [NSString stringWithUTF8String:MOBILE_CENTER_C_VERSION];
|
||||
NSString *version = [NSString stringWithUTF8String:APP_CENTER_C_VERSION];
|
||||
XCTAssertTrue([[MSUtility sdkVersion] isEqualToString:version]);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ static MSMockService *sharedInstance = nil;
|
|||
}
|
||||
|
||||
+ (NSString *)logTag {
|
||||
return @"MobileCenterTest";
|
||||
return @"AppCenterTest";
|
||||
}
|
||||
|
||||
- (void)applyEnabledState:(BOOL) __unused isEnabled {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#import "MSSender.h"
|
||||
#import "MSServiceInternal.h"
|
||||
|
||||
#define MOBILE_CENTER_DISTRIBUTE_BUNDLE @"AppCenterDistributeResources.bundle"
|
||||
#define APP_CENTER_DISTRIBUTE_BUNDLE @"AppCenterDistributeResources.bundle"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ NSBundle *MSDistributeBundle(void) {
|
|||
|
||||
// The resource bundle is part of the main app bundle, e.g. .../Puppet.app/AppCenterDistribute.bundle
|
||||
NSString *mainBundlePath = [[NSBundle bundleForClass:[MSDistribute class]] resourcePath];
|
||||
NSString *frameworkBundlePath = [mainBundlePath stringByAppendingPathComponent:MOBILE_CENTER_DISTRIBUTE_BUNDLE];
|
||||
NSString *frameworkBundlePath = [mainBundlePath stringByAppendingPathComponent:APP_CENTER_DISTRIBUTE_BUNDLE];
|
||||
bundle = [NSBundle bundleWithPath:frameworkBundlePath];
|
||||
|
||||
// Log to console in case the bundle is nil.
|
||||
|
|
|
@ -62,7 +62,7 @@ OTHER_CFLAGS[config=Release][sdk=appletvos*] = $(OTHER_CFLAGS) -fembed-bitcode
|
|||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
|
||||
// :Mark: GCC_PREPROCESSOR_DEFINITIONS
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(XCODEBUILD_GCC_PREPROCESSOR_DEFINITIONS) MOBILE_CENTER_CONFIGURATION_$(CONFIGURATION) MOBILE_CENTER_NAME="@\""$(SDK_NAME)"\"" MOBILE_CENTER_VERSION="@\""$(VERSION_STRING)"\"" MOBILE_CENTER_BUILD="@\""$(BUILD_NUMBER)"\"" MOBILE_CENTER_C_NAME="\""$(SDK_NAME)"\"" MOBILE_CENTER_C_VERSION="\""$(VERSION_STRING)"\"" MOBILE_CENTER_C_BUILD="\""$(BUILD_NUMBER)"\""
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(XCODEBUILD_GCC_PREPROCESSOR_DEFINITIONS) APP_CENTER_CONFIGURATION_$(CONFIGURATION) APP_CENTER_NAME="@\""$(SDK_NAME)"\"" APP_CENTER_VERSION="@\""$(VERSION_STRING)"\"" APP_CENTER_BUILD="@\""$(BUILD_NUMBER)"\"" APP_CENTER_C_NAME="\""$(SDK_NAME)"\"" APP_CENTER_C_VERSION="\""$(VERSION_STRING)"\"" APP_CENTER_C_BUILD="\""$(BUILD_NUMBER)"\""
|
||||
|
||||
// :Mark: Configuration of warnings. We're listing every warning that we disabled and explain the reason why.
|
||||
//
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../Vendor/$(MOBILECENTER_BUILD_PLATFORM)"/**
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/../Vendor/$(MOBILECENTER_BUILD_PLATFORM)"/**
|
||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../Vendor/$(MOBILECENTER_BUILD_PLATFORM)"/**
|
||||
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../Vendor/$(APPCENTER_BUILD_PLATFORM)"/**
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/../Vendor/$(APPCENTER_BUILD_PLATFORM)"/**
|
||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../Vendor/$(APPCENTER_BUILD_PLATFORM)"/**
|
||||
|
||||
APPLICATION_EXTENSION_API_ONLY = NO
|
||||
INFOPLIST_FILE = $(PROJECT_NAME)Tests/Info.plist
|
||||
|
||||
OTHER_CFLAGS = $(inherited) -iframework "$(SRCROOT)/../Vendor/$(MOBILECENTER_BUILD_PLATFORM)/OCMock" -iframework "$(SRCROOT)/../Vendor/$(MOBILECENTER_BUILD_PLATFORM)/OCHamcrest" -iframework "$(SRCROOT)/../Vendor/$(MOBILECENTER_BUILD_PLATFORM)/OHHTTPStubs" -iframework "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||
OTHER_CFLAGS = $(inherited) -iframework "$(SRCROOT)/../Vendor/$(APPCENTER_BUILD_PLATFORM)/OCMock" -iframework "$(SRCROOT)/../Vendor/$(APPCENTER_BUILD_PLATFORM)/OCHamcrest" -iframework "$(SRCROOT)/../Vendor/$(APPCENTER_BUILD_PLATFORM)/OHHTTPStubs" -iframework "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||
|
|
|
@ -6,4 +6,4 @@ VALID_ARCHS = $(ARCHS)
|
|||
VALID_ARCHS[sdk=iphonesimulator*] = $(MS_SIM_ARCHS)
|
||||
SKIP_INSTALL = YES
|
||||
|
||||
MOBILECENTER_BUILD_PLATFORM = iOS
|
||||
APPCENTER_BUILD_PLATFORM = iOS
|
||||
|
|
|
@ -4,4 +4,4 @@ ARCHS = x86_64
|
|||
VALID_ARCHS = $(ARCHS) i386
|
||||
SKIP_INSTALL = YES
|
||||
|
||||
MOBILECENTER_BUILD_PLATFORM = macOS
|
||||
APPCENTER_BUILD_PLATFORM = macOS
|
||||
|
|
|
@ -6,4 +6,4 @@ VALID_ARCHS = $(ARCHS)
|
|||
VALID_ARCHS[sdk=appletvsimulator*] = $(MS_SIM_ARCHS)
|
||||
SKIP_INSTALL = YES
|
||||
|
||||
MOBILECENTER_BUILD_PLATFORM = tvOS
|
||||
APPCENTER_BUILD_PLATFORM = tvOS
|
||||
|
|
Загрузка…
Ссылка в новой задаче