Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions BranchMonsterFactory.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.2;
MARKETING_VERSION = 1.6.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = io.branch.Branchsters.Clip;
Expand Down Expand Up @@ -962,7 +962,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.2;
MARKETING_VERSION = 1.6.3;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = io.branch.Branchsters.Clip;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1238,7 +1238,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.2;
MARKETING_VERSION = 1.6.3;
PRODUCT_BUNDLE_IDENTIFIER = "io.branch.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Branchsters;
PROVISIONING_PROFILE = "";
Expand Down Expand Up @@ -1271,7 +1271,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.2;
MARKETING_VERSION = 1.6.3;
PRODUCT_BUNDLE_IDENTIFIER = "io.branch.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Branchsters;
PROVISIONING_PROFILE = "";
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions BranchMonsterFactory/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ - (BOOL)application:(UIApplication *)application
[FBSDKApplicationDelegate.sharedInstance application:application didFinishLaunchingWithOptions:launchOptions];

Branch *branch = [Branch getInstance];
[branch checkPasteboardOnInstall];

// NativeLink
if (@available(iOS 16.0, *)) {
// Don't check pasteboard on install, instead utilize UIPasteControl
} else if (@available(iOS 15.0, *)) {
[branch checkPasteboardOnInstall];
}

[branch setAppClipAppGroup:@"group.io.branch"];
[branch registerFacebookDeepLinkingClass:[FBSDKAppLinkUtility class]];

// Enable this to track Apple Search Ad attribution:
[branch delayInitToCheckForSearchAds];

/*
* Initalize Branch and register the deep link handler:
*
Expand Down
6 changes: 3 additions & 3 deletions BranchMonsterFactory/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="aDv-gc-D2h">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="aDv-gc-D2h">
<device id="retina3_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -12,7 +12,7 @@
<objects>
<navigationController id="aDv-gc-D2h" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="VW4-Bk-I27">
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ @implementation MonsterViewerViewController

static CGFloat MONSTER_HEIGHT = 0.4f;


@synthesize pasteConfiguration;

- (void)viewDidLoad {
[super viewDidLoad];
Expand Down Expand Up @@ -89,6 +89,21 @@ - (void)viewDidLoad {

[self.progressBar hide];
[self setViewingMonster:self.viewingMonster]; //not awesome, but it triggers the setter

if (@available(iOS 16.0, *)) {

UIPasteControlConfiguration *pcConfig = [UIPasteControlConfiguration new];
pcConfig.baseBackgroundColor = [UIColor colorWithRed:81.0f/255.0f green:131.0f/255.0f blue:212.0f/255.0f alpha:1.0f];
pcConfig.displayMode = UIPasteControlDisplayModeLabelOnly;

CGRect rectPC = CGRectMake(15, (self.view.bounds.size.height - 53), 68, 34);
UIPasteControl *pc = [[UIPasteControl alloc] initWithConfiguration:pcConfig];
pc.frame = rectPC;
pc.target = self;
[self.view addSubview:pc];

pasteConfiguration = [[UIPasteConfiguration alloc] initWithAcceptableTypeIdentifiers:@[UTTypeURL.identifier]];
}
}

- (void) viewDidAppear:(BOOL)animated {
Expand All @@ -101,6 +116,22 @@ - (void) viewDidAppear:(BOOL)animated {
}];

}

- (void)pasteItemProviders:(NSArray<NSItemProvider *> *)itemProviders {
if (@available(iOS 16, *)) {
[[Branch getInstance] passPasteItemProviders:itemProviders];
}
}

- (BOOL)canPasteItemProviders:(NSArray<NSItemProvider *> *)itemProviders {
for (NSItemProvider* item in itemProviders)
if (@available(iOS 14.0, *)) {
if ( [item hasItemConformingToTypeIdentifier: UTTypeURL.identifier] )
return true;
}
return false;
}

-(void) setViewingMonster: (BranchUniversalObject *)monster {
_viewingMonster = monster;

Expand Down