Created
June 5, 2014 02:17
-
-
Save HBehrens/bb4a52b1d8d57ba4b661 to your computer and use it in GitHub Desktop.
Install pbw with UIDocumentInteractionController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)deployToPebbleControl:(UIView *)control delegate:(id<UIDocumentInteractionControllerDelegate>)delegate { | |
NSString *baseName = @"peebhole-1_x"; | |
#if !TARGET_IPHONE_SIMULATOR | |
PBFirmwareVersion *version = PEBAppDelegate.instance.watch.versionInfo.runningFirmwareMetadata.version; | |
if(version.os >= 2) { | |
baseName = @"peebhole-2_x"; | |
} | |
#endif | |
NSURL *url = [NSBundle.mainBundle URLForResource:baseName withExtension:@"pbw" subdirectory:@"PebbleBuild"]; | |
if (url) { | |
PEBNSLog(@"url: %@", url); | |
_documentController = [UIDocumentInteractionController interactionControllerWithURL:url]; | |
_documentController.delegate = delegate; | |
[_documentController presentOpenInMenuFromRect:control.frame inView:control.superview animated:YES]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment