Commit 97dabba2 authored by Alf Watt's avatar Alf Watt

Add [NSBundle trashLiveBundles]

Rename & move Info.plist
parent e594b50f
......@@ -26,7 +26,7 @@
7578313F20F5783800159E5F /* LiveBundle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LiveBundle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7578314120F5786300159E5F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
75E666CB1A36E4C2001E7DC4 /* LiveBundle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LiveBundle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
75E666CF1A36E4C2001E7DC4 /* LiveBundle.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = LiveBundle.plist; sourceTree = "<group>"; };
75E666CF1A36E4C2001E7DC4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
75E666D01A36E4C2001E7DC4 /* LiveBundle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LiveBundle.h; sourceTree = "<group>"; };
75E666F01A36E4E9001E7DC4 /* NSBundle+LiveBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+LiveBundle.h"; sourceTree = "<group>"; };
75E666F11A36E4E9001E7DC4 /* NSBundle+LiveBundle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+LiveBundle.m"; sourceTree = "<group>"; };
......@@ -68,7 +68,6 @@
isa = PBXGroup;
children = (
75E666F41A36E56E001E7DC4 /* README.md */,
75E666CF1A36E4C2001E7DC4 /* LiveBundle.plist */,
75E666CD1A36E4C2001E7DC4 /* LiveBundle */,
75E666CC1A36E4C2001E7DC4 /* Products */,
7578310220F54F8300159E5F /* Frameworks */,
......@@ -87,6 +86,7 @@
75E666CD1A36E4C2001E7DC4 /* LiveBundle */ = {
isa = PBXGroup;
children = (
75E666CF1A36E4C2001E7DC4 /* Info.plist */,
75E666D01A36E4C2001E7DC4 /* LiveBundle.h */,
75E666F01A36E4E9001E7DC4 /* NSBundle+LiveBundle.h */,
75E666F11A36E4E9001E7DC4 /* NSBundle+LiveBundle.m */,
......@@ -238,7 +238,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = LiveBundle.plist;
INFOPLIST_FILE = LiveBundle/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.istumbler.labs.$(PRODUCT_NAME:rfc1034identifier)";
......@@ -258,7 +258,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = LiveBundle.plist;
INFOPLIST_FILE = LiveBundle/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.istumbler.labs.$(PRODUCT_NAME:rfc1034identifier)";
......@@ -381,7 +381,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = LiveBundle.plist;
INFOPLIST_FILE = LiveBundle/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.istumbler.labs.$(PRODUCT_NAME:rfc1034identifier)";
......@@ -401,7 +401,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = LiveBundle.plist;
INFOPLIST_FILE = LiveBundle/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.istumbler.labs.$(PRODUCT_NAME:rfc1034identifier)";
......
......@@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 iStumbler. All rights reserved.</string>
<string>Copyright © 2015-2018 Alf Watt - All rights reserved</string>
</dict>
</plist>
......@@ -17,6 +17,11 @@ extern NSString* const ILPlistType;
/*! @returns the NSBundle of a Framework in the current applicaiton with the named resource of the type provided */
+ (NSBundle*) frameworkWithResource:(NSString*) name ofType:(NSString*) extension;
/*! @returns YES if the applications LiveBundles directoryw as moved to the trash */
+ (BOOL) trashLiveBundles;
#pragma mark -
/*! @returns the local path for the live bundle in the user's Application Support directory */
- (NSString*) liveBundlePath;
......
......@@ -34,6 +34,13 @@ NSString* const ILPlistType = @"plist";
return firstMatch;
}
+ (BOOL) trashLiveBundles
{
NSArray* searchPaths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
NSURL* liveBundlesURL = [NSURL fileURLWithPath:[searchPaths.lastObject stringByAppendingPathComponent:ILLiveBundles]];
return [NSFileManager.defaultManager trashItemAtURL:liveBundlesURL resultingItemURL:nil error:nil];
}
#pragma mark -
- (NSString*) liveBundlePath
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment