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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include theos/makefiles/common.mk

TOOL_NAME = open
open_FILES = open.m
open_PRIVATE_FRAMEWORKS = SpringBoardServices
open_PRIVATE_FRAMEWORKS = SpringBoardServices MobileCoreServices
open_CODESIGN_FLAGS = -SEntitlements.plist
open_FRAMEWORKS = UIKit

include $(THEOS_MAKE_PATH)/tool.mk
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: com.conradkramer.open
Version: 1.1.1
Version: 1.1.2
Architecture: iphoneos-arm
Maintainer: BigBoss <bigboss@thebigboss.org>
Author: Conrad Kramer <support@kramerapps.com>
Expand Down
8 changes: 8 additions & 0 deletions open.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <CoreFoundation/CoreFoundation.h>
#include <stdio.h>
#include <MobileCoreServices/LSApplicationWorkspace.h>

#ifndef SPRINGBOARDSERVICES_H_
extern int SBSLaunchApplicationWithIdentifier(CFStringRef identifier, Boolean suspended);
Expand All @@ -23,6 +24,13 @@ int main(int argc, char **argv, char **envp)
if (ret != 0) {
fprintf(stderr, "Couldn't open application: %s. Reason: %i, ", argv[1], ret);
CFShow(SBSApplicationLaunchingErrorString(ret));

NSURL *url = [NSURL URLWithString:(NSString*)identifier];
if (![[LSApplicationWorkspace defaultWorkspace] openURL:url]) {
fprintf(stderr, "openURL %s also failed.\n", [[url absoluteString] UTF8String]);
} else {
ret = 0;
}
}

CFRelease(identifier);
Expand Down
1 change: 0 additions & 1 deletion theos
Submodule theos deleted from a05354
1 change: 1 addition & 0 deletions theos