Skyglow File Picker is a static UIKit library that functions like `UIDocumentPicker` now does, but pre iOS 8 devices. It gives you a browseable file picker and includes a lightweight HTTP upload view so users can import files from another device on the same network.
- A
UITableViewController-based file picker rooted at/var/mobileby default - Filename, extension, and full-path filtering
- Hidden-file toggling
- Symlink-aware browsing and selection
- A small embedded HTTP upload server UI for importing files into the current directory
The releases ZIP produced by the build script contains:
lib/SFPFilePicker.ainclude/SFPFilePicker.h
Add the root extracted folder to your project, copy the header into your include path, or reference it manually from where you use the API, and link against UIKit and CoreGraphics.
Normal integrations only need one header:
SFPFilePicker/SFPFilePicker.h
The upload view controller and HTTP server headers stay in the source tree as implementation details, but the release package is meant to be consumed through the main picker API.
Create a picker, wrap it in a UINavigationController, and present it modally.
#import <SFPFilePicker/SFPFilePicker.h>
@interface MyController : UIViewController <SFPFilePickerDelegate>
@end
@implementation MyController
- (void)showPicker {
SFPFilePickerFilter *filter = [[[SFPFilePickerFilter alloc] init] autorelease];
filter.allowedExtensions = [NSArray arrayWithObjects:@"plist", @"txt", nil];
SFPFilePickerViewController *picker =
[SFPFilePickerViewController pickerWithFilter:filter delegate:self];
picker.showsHiddenFiles = NO;
picker.showsCancelButton = YES;
UINavigationController *navigationController =
[[[UINavigationController alloc] initWithRootViewController:picker] autorelease];
[self presentModalViewController:navigationController animated:YES];
}
- (void)filePicker:(SFPFilePickerViewController *)picker
didSelectFileAtPath:(NSString *)path {
NSLog(@"Selected file: %@", path);
[self dismissModalViewControllerAnimated:YES];
}
- (void)filePickerDidCancel:(SFPFilePickerViewController *)picker {
[self dismissModalViewControllerAnimated:YES];
}
@endSFPFilePickerFilter supports three optional match lists:
allowedExtensionsUse extensions without a leading dot, such as@"deb"or@"plist".allowedFilenamesUse exact filenames such as@"Info.plist".allowedPathsUse absolute paths when you want to explicitly allow only specific files.
If every filter array is nil or empty, the picker allows all regular files.
Directories and symlinks to directories stay browseable so the user can keep navigating, but only regular files and symlinks to files are returned through the delegate.
Use the designated initializer when you do not want to start at /var/mobile.
SFPFilePickerViewController *picker =
[[[SFPFilePickerViewController alloc] initWithPath:@"/var/root"
filter:nil
delegate:self] autorelease];Refreshing and Hidden Files
The picker exposes:
showsHiddenFilesSet this before presentation or toggle it later.showsCancelButtonControls whether the picker shows a cancel control.allowsHTTPUploadEnables or hides the built-in HTTP upload action.httpUploadStartPortSets the first port the built-in upload server should try. The default is8080.reloadDirectoryForces the current directory to be re-read from disk.
On iPhoneOS 2, where UINavigationController toolbars are not available, the picker automatically falls back to a navigation-bar action sheet so refresh, hidden-file toggling, and HTTP upload still remain accessible.
The picker includes an upload action that presents the built-in HTTP importer for the current directory. It shows the local upload URL and updates a progress bar as the incoming file is received.
You can configure that behavior entirely from SFPFilePickerViewController:
picker.allowsHTTPUpload = YES;
picker.httpUploadStartPort = 8080;If you do not want the importer exposed in your integration, set allowsHTTPUpload to NO.
The project ships with a build script:
./build.shThe script runs these builds:
armv6withTARGET="iphone:clang:5.1:2.0"armv7 armv7swithTARGET="iphone:clang:6.0:3.0"arm64withTARGET="iphone:clang:7.0:7.0"
That means your Theos setup needs these SDKs installed:
iPhoneOS5.1.sdkiPhoneOS6.0.sdkiPhoneOS7.0.sdk
After building, the script:
- creates
SFPFilePicker.a - copies the public headers into a release layout
- produces
SFPFilePicker-Release.zip
- The library is built AND meant to work without Automatic Reference Counting.
- The HTTP uploader is intentionally small and aimed at local import convenience, not large-file transfer or internet exposure, and is not exhaustively tested against common attacks or vulnerabilities (why would you expose this to the interntet anyways?).


