Skip to content

Commit

Permalink
Merge pull request #385 from dropbox/prep-for-xcode-16
Browse files Browse the repository at this point in the history
Bump deployment targets and fix openUrl calls
  • Loading branch information
julianlocke authored Aug 1, 2024
2 parents 2e44b6c + 0cd7707 commit 0fd63ac
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion ObjectiveDropboxOfficial.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.requires_arc = true

s.osx.deployment_target = '10.13'
s.ios.deployment_target = '11.0'
s.ios.deployment_target = '12.0'

s.public_header_files = 'Source/ObjectiveDropboxOfficial/Shared/**/*.h', 'Source/ObjectiveDropboxOfficial/Headers/Umbrella/*.h'
s.osx.public_header_files = 'Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_macOS/**/*.h'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ Please ensure that the supplied view controller is the top-most controller, so t
[DBClientsManager authorizeFromControllerV2:[UIApplication sharedApplication]
controller:[[self class] topMostController]
loadingStatusDelegate:nil
openURL:^(NSURL *url) { [[UIApplication sharedApplication] openURL:url]; }
openURL:^(NSURL *url) { [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; }
scopeRequest:scopeRequest];
}

Expand Down
4 changes: 2 additions & 2 deletions TestObjectiveDropbox/Podfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use_frameworks!

target "TestObjectiveDropbox_iOS" do
platform :ios, '11.0'
platform :ios, '12.0'
pod 'ObjectiveDropboxOfficial', :path => '../'
target "TestObjectiveDropbox_iOSTests" do
pod 'ObjectiveDropboxOfficial', :path => '../'
end
end

target "TestObjectiveDropbox_macOS" do
platform :osx, '10.10'
platform :osx, '10.13'
pod 'ObjectiveDropboxOfficial', :path => '../'
target "TestObjectiveDropbox_macOSTests" do
pod 'ObjectiveDropboxOfficial', :path => '../'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = TestObjectiveDropbox_macOSTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.getdropbox.TestObjectiveDropbox-macOSTests";
Expand All @@ -726,7 +726,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = TestObjectiveDropbox_macOSTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.getdropbox.TestObjectiveDropbox-macOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -793,7 +793,7 @@
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = TestObjectiveDropbox_macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = "com.dropbox.TestObjectiveDropbox-macOS-Test";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
Expand All @@ -811,7 +811,7 @@
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = TestObjectiveDropbox_macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = "com.dropbox.TestObjectiveDropbox-macOS-Test";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
Expand Down Expand Up @@ -935,7 +935,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = NX6T6UBSFF;
INFOPLIST_FILE = TestObjectiveDropbox_iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dropbox.TestObjectiveDropbox-iOS-Test";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -953,7 +953,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = NX6T6UBSFF;
INFOPLIST_FILE = TestObjectiveDropbox_iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dropbox.TestObjectiveDropbox-iOS-Test";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
19 changes: 10 additions & 9 deletions TestObjectiveDropbox/TestObjectiveDropbox_iOS/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
return YES;
}

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
BOOL urlHandled = NO;
if ([[url absoluteString] containsString:@"openWith"]) {
NSLog(@"Successfully retrieved openWith url");
Expand All @@ -85,17 +86,17 @@ - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {

for (NSString *pair in pairs) {
NSArray *kv = [pair componentsSeparatedByString:@"="];
NSString *unEscapedValue = [[kv objectAtIndex:1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *unEscapedValue = [[kv objectAtIndex:1] stringByRemovingPercentEncoding];
[urlData setObject:unEscapedValue forKey:[kv objectAtIndex:0]];
}

DBOfficialAppConnector *connector = [[DBOfficialAppConnector alloc] initWithAppKey:[TestData new].fullDropboxAppKey
canOpenURLWrapper:^BOOL(NSURL *url) {
return [[UIApplication sharedApplication] canOpenURL:url];
}
openURLWrapper:^(NSURL *url) {
[[UIApplication sharedApplication] openURL:url];
}];
DBOfficialAppConnector *connector = [[DBOfficialAppConnector alloc] initWithAppKey:[TestData new].fullDropboxAppKey
canOpenURLWrapper:^BOOL(NSURL *url) {
return [[UIApplication sharedApplication] canOpenURL:url];
}
openURLWrapper:^(NSURL *url) {
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
}];

DBOpenWithInfo *openWithInfo = [connector openWithInfoFromURL:url];
[((ViewController *)self.window.rootViewController) setOpenWithInfoNSURL:openWithInfo];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ - (IBAction)codeFlowlinkButton:(id)sender {
[DBClientsManager authorizeFromControllerV2:[UIApplication sharedApplication]
controller:self
loadingStatusDelegate:nil
openURL:^(NSURL *url) { [[UIApplication sharedApplication] openURL:url]; }
openURL:^(NSURL *url) {
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
}
scopeRequest:scopeRequest];
}

Expand Down Expand Up @@ -91,7 +93,7 @@ - (IBAction)openWithButtonPressedRunTests:(id)sender {
return [[UIApplication sharedApplication] canOpenURL:url];
}
openURLWrapper:^(NSURL *url) {
[[UIApplication sharedApplication] openURL:url];
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
}];
DBOpenWithInfo *openWithInfo = [DBOfficialAppConnector retriveOfficialDropboxAppOpenWithInfo];

Expand All @@ -107,7 +109,7 @@ - (IBAction)openWithButtonPressedRunTests:(id)sender {
return [[UIApplication sharedApplication] canOpenURL:url];
}
openURLWrapper:^(NSURL *url) {
[[UIApplication sharedApplication] openURL:url];
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
}];
[appConnector returnToDropboxApp:s_openWithInfoNSURL changesPending:NO];
} else {
Expand Down

0 comments on commit 0fd63ac

Please sign in to comment.