Skip to content

Commit

Permalink
Merge pull request #175 from antonargunov/master
Browse files Browse the repository at this point in the history
version 0.6.1
  • Loading branch information
antonargunov authored Feb 7, 2020
2 parents bc41469 + 770ca08 commit bc85f0f
Show file tree
Hide file tree
Showing 19 changed files with 78 additions and 91 deletions.
Binary file modified AndroidWrapperProject/.idea/caches/build_file_checksums.ser
Binary file not shown.

This file was deleted.

92 changes: 36 additions & 56 deletions AndroidWrapperProject/.idea/workspace.xml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion AndroidWrapperProject/app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="Gradle: androidx.annotation:annotation:1.1.0@jar" level="project" />
<orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/antonarhunou/BranchMetrics/unity-branch-deep-linking/AndroidWrapperProject/app/libs/Unity.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="Gradle: io.branch.sdk.android:library:4.2.1@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: io.branch.sdk.android:library:4.3.2@aar" level="project" />
<orderEntry type="library" exported="" name="Gradle: com.android.installreferrer:installreferrer:1.0@aar" level="project" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BranchUnityApp extends Application {
public void onCreate() {
super.onCreate();
BranchUtil.setPluginType(BranchUtil.PluginType.Unity);
BranchUtil.setPluginVersion("0.6.0");
BranchUtil.setPluginVersion("0.6.1");
Branch.getAutoInstance(this.getApplicationContext());
Branch.disableInstantDeepLinking(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static void setBranchKey(String branchKey) {
public static void getAutoInstance() {
Activity unityActivity = UnityPlayer.currentActivity;
BranchUtil.setPluginType(BranchUtil.PluginType.Unity);
BranchUtil.setPluginVersion("0.6.0");
BranchUtil.setPluginVersion("0.6.1");
Branch.getAutoInstance(unityActivity.getApplicationContext());
}

Expand Down
4 changes: 2 additions & 2 deletions BranchUnityTestBed/.vs/BranchUnityTestBed/xs/UserPrefs.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Properties StartupConfiguration="{67E3F5FC-88EF-55B2-4156-39D21A59D4E6}|">
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Branch/Branch.cs">
<Files>
<File FileName="Assets/Branch/Branch.cs" Line="22" Column="5" />
<File FileName="Assets/Branch/Branch.cs" Line="10" Column="44" />
<File FileName="Assets/Branch/Demo/Scripts/BranchDemo.cs" />
</Files>
<Pads>
Expand All @@ -23,7 +23,7 @@
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="5f92c370-2112-4aef-a0a5-515e50a4df59" />
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="64a10375-48a5-4b46-90b1-105c9e935102" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
Expand Down
2 changes: 1 addition & 1 deletion BranchUnityTestBed/Assets/Branch/Branch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class Branch : MonoBehaviour {

public static string sdkVersion = "0.6.0";
public static string sdkVersion = "0.6.1";

public delegate void BranchCallbackWithParams(Dictionary<string, object> parameters, string error);
public delegate void BranchCallbackWithUrl(string url, string error);
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
BOOL const BNC_API_PINNED = NO;
NSString * const BNC_API_VERSION = @"v1";
NSString * const BNC_LINK_URL = @"https://bnc.lt";
NSString * const BNC_SDK_VERSION = @"0.31.3";
NSString * const BNC_SDK_VERSION = @"0.31.4";
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#pragma mark - Blocks and Threads

static inline dispatch_time_t BNCDispatchTimeFromSeconds(NSTimeInterval seconds) {
return dispatch_time(DISPATCH_TIME_NOW, seconds * NSEC_PER_SEC);
return dispatch_time(DISPATCH_TIME_NOW, (int64_t)seconds * NSEC_PER_SEC);
}

static inline void BNCAfterSecondsPerformBlockOnMainThread(NSTimeInterval seconds, dispatch_block_t block) {
Expand All @@ -30,7 +30,7 @@ static inline void BNCPerformBlockOnMainThreadAsync(dispatch_block_t block) {
}

static inline uint64_t BNCNanoSecondsFromTimeInterval(NSTimeInterval interval) {
return interval * ((NSTimeInterval) NSEC_PER_SEC);
return (uint64_t)(interval * ((NSTimeInterval) NSEC_PER_SEC));
}

static inline void BNCSleepForTimeInterval(NSTimeInterval seconds) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ Presents a UIActivityViewController that shares the Branch link.
///The title for the share sheet.
@property (nonatomic, strong) NSString*_Nullable title;

///Share text for the item.
// Override the default placeholder URL
// iOS 13+ fetches a preview header icon, text and domain name from this URL.
// By default, we use the Branch bnc.lt link, but if you wish more control override it here.
@property (nonatomic, strong, nullable) NSURL *placeholderURL;

///Share text for the item. This is not the text in the iOS 13+ preview header.
///This text can be changed later when the `branchShareSheetWillShare:` delegate method is called.
@property (nonatomic, strong) NSString*_Nullable shareText;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,29 @@ - (void) shareDidComplete:(BOOL)completed activityError:(NSError*)error {
[_activityItems addObject:item];
}

NSString *URLString =
[[Branch getInstance]
getLongURLWithParams:self.serverParameters
andChannel:self.linkProperties.channel
andTags:self.linkProperties.tags
andFeature:self.linkProperties.feature
andStage:self.linkProperties.stage
andAlias:self.linkProperties.alias];
self.shareURL = [[NSURL alloc] initWithString:URLString];
if (self.returnURL)
if (self.placeholderURL) {
// use user provided placeholder url
self.shareURL = self.placeholderURL;
} else {

// use long link as the placeholder url
NSString *URLString =
[[Branch getInstance]
getLongURLWithParams:self.serverParameters
andChannel:self.linkProperties.channel
andTags:self.linkProperties.tags
andFeature:self.linkProperties.feature
andStage:self.linkProperties.stage
andAlias:self.linkProperties.alias];
self.shareURL = [[NSURL alloc] initWithString:URLString];
}

if (self.returnURL) {
item = [[BranchShareActivityItem alloc] initWithPlaceholderItem:self.shareURL];
else
} else {
item = [[BranchShareActivityItem alloc] initWithPlaceholderItem:self.shareURL.absoluteString];
}

item.itemType = BranchShareActivityItemTypeBranchURL;
item.parent = self;
[_activityItems addObject:item];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static callbackWithShareCompletion callbackWithShareCompletionForCallbackId(char

void _setBranchKey(char *branchKey) {
_branchKey = CreateNSString(branchKey);
[[Branch getInstance:_branchKey] registerPluginName:@"unity.ios" version:@"0.5.15"];
[[Branch getInstance:_branchKey] registerPluginName:@"unity.ios" version:@"0.6.1"];
}

#pragma mark - InitSession methods
Expand Down
2 changes: 1 addition & 1 deletion BranchUnityTestBed/BranchUnityTestBed.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio for Mac
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{67E3F5FC-88EF-55B2-4156-39D21A59D4E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{820AEC7C-7F93-71C7-A37D-1CC603106BE6}"
Expand Down
Binary file modified BranchUnityTestBed/ProjectSettings/GraphicsSettings.asset
Binary file not shown.
Binary file modified BranchUnityWrapper.unitypackage
Binary file not shown.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Branch Unity SDK change log

- 0.6.1
* Updating Branch to iOS version 0.31.4

- 0.6.0
* Updating Branch to Android version 4.3.2
* Fix missing refrring params
Expand Down

0 comments on commit bc85f0f

Please sign in to comment.