Skip to content

Commit

Permalink
Merge pull request #7 from Microsoft/sdk-api-change
Browse files Browse the repository at this point in the history
Updated to use 0.3.0 Mobile Center SDKs and
  • Loading branch information
BretJohnson authored Nov 16, 2016
2 parents 7622ce0 + b33a333 commit 336d32c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions DemoApp/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ allprojects {
maven {
url 'http://microsoftsonoma.bintray.com/sonoma'
credentials {
username 'sonoma-beta'
password 'cbaf881993ad1ab4128f71da716d060e8590906a'
username 'mobile-center'
password '9263658ba66b541c798b704723cc020cb40c6f78'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions RNMobileCenter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

// NOTE: Do not place your application dependencies here; they belong
Expand Down Expand Up @@ -123,5 +123,5 @@ repositories {

dependencies {
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.microsoft.azure.mobile:mobile-center:0.2.+'
compile 'com.microsoft.azure.mobile:mobile-center:0.3.+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class RNMobileCenter {
private static Application application;
private static WrapperSdk wrapperSdk = new WrapperSdk();

public static void initializeMobileCenter(Application application) {
if (MobileCenter.isInitialized()) {
public static void configureMobileCenter(Application application) {
if (MobileCenter.isConfigured()) {
return;
}
RNMobileCenter.application = application;
Expand All @@ -24,7 +24,7 @@ public static void initializeMobileCenter(Application application) {
RNMobileCenter.wrapperSdk.setWrapperSdkName(com.microsoft.azure.mobile.react.mobilecenter.BuildConfig.SDK_NAME);

MobileCenter.setWrapperSdk(wrapperSdk);
MobileCenter.initialize(application, RNMobileCenter.getAppSecret());
MobileCenter.configure(application, RNMobileCenter.getAppSecret());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion RNMobileCenter/ios/RNMobileCenter/RNMobileCenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

+ (NSString *) getAppSecret;

+ (void) initializeMobileCenter;
+ (void) configureMobileCenter;

+ (void) setEnabled:(BOOL) enabled;

Expand Down
6 changes: 3 additions & 3 deletions RNMobileCenter/ios/RNMobileCenter/RNMobileCenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ + (NSString *) getAppSecret
return appSecret;
}

+ (void) initializeMobileCenter
+ (void) configureMobileCenter
{
if (![MSMobileCenter isInitialized]) {
if (![MSMobileCenter isConfigured]) {
MSWrapperSdk * wrapperSdk =
[[MSWrapperSdk alloc]
initWithWrapperSdkVersion:@"0.1.0"
Expand All @@ -34,7 +34,7 @@ + (void) initializeMobileCenter
liveUpdateDeploymentKey:nil
liveUpdatePackageHash:nil];
[self setWrapperSdk:wrapperSdk];
[MSMobileCenter start:[RNMobileCenter getAppSecret]];
[MSMobileCenter configureWithAppSecret:[RNMobileCenter getAppSecret]];
}
}

Expand Down

0 comments on commit 336d32c

Please sign in to comment.