Compare commits

...
424 Commits
Author SHA1 Message Date
Diego Waxemberg 83694f8141 Bumping version for v2.6.0 2019-04-29 19:20:46 -07:00
Cameron Gutman a4352aae4d Update common-c to pick up recent performance and bandwidth improvements 2019-04-27 15:01:40 -07:00
Cameron Gutman 2ac19336d6 Rename Multi-Controller Off to Single 2019-04-27 14:25:58 -07:00
Cameron Gutman 63b09c5b27 Remove the old message callbacks 2019-04-27 14:00:58 -07:00
Andrew Scagnelli b2c2f0837a more appletv tweaks (#351)
* redo now playing indicator

- instead of drawing an arrow overlay, add an offset green shadow

* do not show "Connection Terminated" on code 0

if an application quits successfully because it was asked to do so by
the user (errorCode = 0), then do not display an alert -- just go back
to the prior view.

* fix: add missing toggle for mutli-controller support
2019-02-13 21:03:09 -08:00
Cameron Gutman 335b5aef1f Add rumble support 2019-02-11 19:22:18 -08:00
Cameron Gutman 918e1248f2 Store GCController in Controller object to allow us to fetch controller attributes later 2019-02-11 18:21:04 -08:00
Cameron Gutman 442a791e0c Fix SOPS issues when streaming at 120 FPS 2019-02-09 21:03:48 -08:00
Cameron Gutman 573b93329d Merge pull request #354 from eraser2021999/master
Simple solution to solve focus issue on Apple TV.
2019-01-04 20:27:43 -08:00
Cameron Gutman 40359c5e32 Use stun.moonlight-stream.org for STUN 2019-01-04 20:23:46 -08:00
Cameron Gutman 3b01b50503 Update common-c with strict bitrate fix 2019-01-04 20:19:34 -08:00
Bogdan Coticopol 76b55cc230 Simple solution to solve focus issue on Apple TV. 2019-01-02 00:16:26 +02:00
Diego Waxemberg e136cd96c1 Bumping app version for 2.5.0 2018-12-29 10:32:02 -05:00
Cameron Gutman 5028eaed59 Fix crash presenting the loading frame while old one is still dismissing 2018-12-28 20:51:29 -08:00
Cameron Gutman d18c713684 Fix tip display on iPhone SE 2018-12-28 20:32:22 -08:00
Cameron Gutman 08e169eb23 Rewrite loading frame management (again) 2018-12-28 16:45:05 -08:00
Cameron Gutman 611358e35c Fix pairing code that didn't always call one of the pairing completion callbacks 2018-12-28 15:50:13 -08:00
Cameron Gutman 63275130bb Fix duplicate connection termination attempt due to race condition after calling LiInterruptConnection() 2018-12-28 15:31:18 -08:00
Cameron Gutman 7c9313e04d Ensure we don't deadlock if somehow a loading frame ends up under the active view 2018-12-28 02:09:57 -08:00
Cameron Gutman d466a0af07 Only cleanup the stream on termination 2018-12-28 02:03:21 -08:00
Cameron Gutman c8adc184c9 Use a semaphore to ensure the loading frame is safely shown and dismissed 2018-12-28 02:01:40 -08:00
Cameron Gutman d40a29df71 Ensure we can't enter the app grid without having a pinned cert 2018-12-28 01:32:53 -08:00
Cameron Gutman 85820bf812 Use the real online status rather than always assuming YES 2018-12-28 01:24:18 -08:00
Cameron Gutman 5d4d10ac8a Fix displaying GFE error messages for launch and resume 2018-12-28 01:16:56 -08:00
Cameron Gutman eca018ad15 Set host online immediately after using Add PC dialog to update host address 2018-12-28 00:54:26 -08:00
Cameron Gutman 90e582a263 Assert only in the cert untrusted error path 2018-12-28 00:45:32 -08:00
Cameron Gutman 3717228e28 Fix app grid running indicator not being correct immediately after returning from stream 2018-12-28 00:32:19 -08:00
Cameron Gutman 8c0997ddcd Update common-c to fix GFE 3.16 bitrate issue 2018-12-28 00:14:04 -08:00
Cameron Gutman d722c9e18d Use default auth handling if the pinning fails 2018-12-27 21:07:17 -08:00
Cameron Gutman 94c9433b99 Fix running state refresh on app grid 2018-12-27 19:54:27 -08:00
Cameron Gutman befef62b2f Log parsed XML attributes 2018-12-27 19:50:51 -08:00
Cameron Gutman dc00c1e3e7 Fix leak of UIComputerViews that poll forever 2018-12-27 19:50:29 -08:00
Cameron Gutman 3555d60a9b Add a quit tip for iOS and tvOS 2018-12-22 21:43:37 -08:00
Cameron Gutman bd8b9f8bfb Use a shared UID for all Moonlight clients 2018-12-22 21:02:24 -08:00
Cameron Gutman 72dcd76e37 Require cert pinning for HTTPS 2018-12-22 20:39:13 -08:00
Cameron Gutman fbae7f88b5 Add server cert pinning after pairing 2018-12-22 00:05:48 -08:00
Cameron Gutman 791a5b1ea1 Update project with Xcode recommendations 2018-12-07 21:48:54 -08:00
Cameron Gutman 8c5a82573b Update readme to new URL 2018-12-03 21:43:19 -08:00
Cameron Gutman cc56a36bbd Properly set GCSupportedGameControllers and GCSupportsControllerUserInteraction plist values 2018-12-01 15:00:24 -08:00
Cameron Gutman 336dbeed98 Remove loading frame from Add Host dialog flow 2018-11-28 18:43:45 -08:00
Cameron Gutman f8613cdbfd Fix broken app and host taps on iOS 8 2018-11-28 18:43:20 -08:00
Cameron Gutman a5961dd9b5 Use lower MTU for remote streaming and higher MTU for local networks 2018-11-21 21:03:08 -08:00
Cameron Gutman 17a5866fdd Merge pull request #341 from ascagnel/tv-fixes
tvOS app UI/UX fixes
2018-11-19 20:16:50 -08:00
Diego Waxemberg 5e77380636 Bumping app version for 2.4.0 2018-11-17 16:00:51 -08:00
Cameron Gutman 845af246b5 Fix a few cases where the loading frame could be left on-screen 2018-11-16 20:17:03 -08:00
Cameron Gutman 87cac4e562 Fix host long press causing duplicate menus to show up 2018-11-16 20:05:06 -08:00
Cameron Gutman 70eb4fd69d Allow waking non-paired hosts 2018-11-16 19:30:05 -08:00
Cameron Gutman c5120bec37 Remove wait between retries after polling failure 2018-11-16 19:14:00 -08:00
Cameron Gutman 24fc9ac0a9 Change "host already added" message to be more clear 2018-11-16 19:03:23 -08:00
Cameron Gutman 2c0624f1e7 Improve handling of non-local addresses and remote streaming 2018-11-16 19:02:31 -08:00
Cameron Gutman 8b227f28f7 Update common-c to fix NAT64 2018-11-16 00:41:23 -08:00
Cameron Gutman 23e9c3f236 Fix crash when the loading spinner is dismissed before fully presenting 2018-11-15 22:02:05 -08:00
Cameron Gutman eefde316de Fix bug that can cause spinner to get stuck 2018-11-15 21:11:02 -08:00
Cameron Gutman a3cfd787de Update common-c for GFE 3.16 2018-11-15 13:37:28 -08:00
Cameron Gutman 410d0d367b Fix handling of missing L3 and R3 buttons and adjust on-screen controls based on L3/R3 presence 2018-11-03 14:01:32 -07:00
Cameron Gutman 39b04d46a4 Add support for L3 and R3 on iOS 12.1 2018-10-31 18:08:34 -07:00
Andrew Scagnelli 0e8647ad07 feat: added settings bundle 2018-10-28 16:23:24 -04:00
Diego Waxemberg 73091e7e8c Creating build for 2.3.0 2018-10-27 12:55:02 -07:00
Cameron Gutman 16a2ab3941 Fix settings not saving on the first stream if the settings slideout is not closed 2018-10-27 11:57:29 -07:00
Cameron Gutman 39a2e8be78 Log an error if STUN fails 2018-10-26 20:51:31 -07:00
Cameron Gutman 8e6dadfa79 Use STUN to get the WAN address for PCs discovered by mDNS 2018-10-26 20:28:59 -07:00
Andrew Scagnelli c2134585df fix: apply tvos style to missing icon 2018-10-24 00:08:06 -04:00
Andrew Scagnelli dedcbd9d3e feat: update text color
do not apply UIComputerView text color so it uses the theme default
2018-10-23 23:28:07 -04:00
Andrew Scagnelli bd379677a2 feat: updated menu button handling
- on tapping menu once (or chording with LB/RB), behave as
start/select/special
- on doube-tapping menu, quit the stream
2018-10-23 23:18:56 -04:00
Andrew Scagnelli 466ebe2840 disable focus effects on overlay icon 2018-10-22 23:45:17 -04:00
Cameron Gutman 736887b945 Add 120 FPS option for devices with high refresh rate displays 2018-10-22 20:24:51 -07:00
Cameron Gutman 993bfca0ae Allow bitrate slider to go to 100 Mbps 2018-10-22 19:27:49 -07:00
Cameron Gutman 5ad87f7400 Hide the textbox so it doesn't obstruct normal UI controls. Fixes #344. 2018-10-22 19:06:52 -07:00
Andrew Scagnelli e862dbd6b6 adding some basic placeholder icons 2018-10-19 01:05:48 -04:00
Andrew Scagnelli befde5eb28 system theme, tvos icon styling
- using tvos icon styling
- updated to use system theme (light/dark) instead of always being grey
2018-10-19 00:03:14 -04:00
Andrew Scagnelli 7fd3b8df1c on tvOS, do not quit the stream on pressing B
on tvOS (maybe also on other cases where you're using a "real" gamepad?),
use GCEventViewController so the system-level "back" event doesn't quit
the stream
2018-10-18 00:04:04 -04:00
Diego Waxemberg cee501d9b4 Bumping app version for 2.2.0 2018-10-08 21:14:18 -07:00
Cameron Gutman a103c0fd45 Update common-c to use split frame encode on HEVC 2018-10-08 20:26:32 -07:00
Cameron Gutman bf71ae003f Add all modifier flag combinations 2018-10-08 20:25:43 -07:00
Cameron Gutman 5b102ce3d3 Merge pull request #335 from tranchis/ios-keyboard
Improve keyboard support
2018-09-27 21:44:11 -07:00
Sergio Alvarez-Napagao c2012fa195 Improve keyboard support 2018-08-30 21:06:36 +02:00
Cameron Gutman 003fc8c1f8 Improve keyboard handling for unexpected inputs and multi-character input (such as dictation) 2018-08-29 10:02:58 -07:00
Cameron Gutman 9123033bb3 Remove help links from tvOS version due to lack of browser and WebKit 2018-08-29 09:36:51 -07:00
Cameron Gutman 253144188c Purge box art cache on low memory warning 2018-08-29 09:24:47 -07:00
Cameron Gutman 4ccb9bebbf Fix stream cleanup when pressing Menu on tvOS 2018-08-29 09:21:49 -07:00
Cameron Gutman 49f647748c Fix discovery being stopped after returning from Add PC dialog 2018-08-29 07:52:33 -07:00
Cameron Gutman e2e8f0121d Persist the database in NSUserDefaults on tvOS 2018-08-28 17:42:59 -07:00
Cameron Gutman b5ea4c3e50 Change URL timeout to 4 seconds to improve offline behavior 2018-08-27 01:55:34 -07:00
Cameron Gutman 90d47004e7 Avoid storing images in the database 2018-08-27 01:54:58 -07:00
Cameron Gutman 450960eaaf Fix credential storage on tvOS 2018-08-27 00:34:34 -07:00
Diego Waxemberg 44550baaa9 Changing directories for storage on tvOS because tvOS does not allow permanent storage 2018-08-26 21:54:49 -07:00
Cameron Gutman 293dc26b2e Fix the navigation bar look 2018-08-26 19:03:22 -07:00
Cameron Gutman 109fa6f463 Set the title of the view to the selected PC 2018-08-26 17:05:13 -07:00
Cameron Gutman 44f64e1a35 Fix several UI issues 2018-08-26 16:43:45 -07:00
Cameron Gutman 2e479837ed Fix spinners on tvOS and mouse support using the remote 2018-08-26 15:55:39 -07:00
Cameron Gutman 1b681a8730 Allow tvOS to back out from app grid to PC grid 2018-08-26 15:05:32 -07:00
Cameron Gutman f988ce0278 Fix issues with the loading frame colliding with other views 2018-08-26 12:25:22 -07:00
Cameron Gutman 1ef5c87afc Share MainFrameViewController between iOS and tvOS 2018-08-26 11:56:27 -07:00
Diego Waxemberg f5b99b6b9c Can now stream to tvOS 2018-08-26 11:31:20 -07:00
Diego Waxemberg 485dd4b001 Merge branch 'tvOS' of github.com:moonlight-stream/moonlight-ios into tvOS 2018-08-26 11:17:20 -07:00
Diego Waxemberg 92e2c0d7cc app cells are now clickable in tvOS 2018-08-26 11:14:15 -07:00
Cameron Gutman 48ffca57ec Fix infinite loop of loading UI spinners 2018-08-26 11:09:15 -07:00
Cameron Gutman e83a996cd5 Re-port MainFrameViewController to tvOS to fix loading page issues 2018-08-26 10:59:31 -07:00
Diego Waxemberg 57191e3b9a added a highlight state for focused views (can now see what's selected in tvOS) 2018-08-26 10:53:28 -07:00
Diego Waxemberg eadcf3b3eb fixed 'unsafe' requests and can now click stuff 2018-08-26 01:15:53 -07:00
Cameron Gutman 71e0646659 Add code to handle discovery and game controllers 2018-08-26 00:48:29 -07:00
Diego Waxemberg f2edee1669 Merge branch 'tvOS' of github.com:moonlight-stream/moonlight-ios into tvOS 2018-08-26 00:33:43 -07:00
Diego Waxemberg 11948bf618 wip 2018-08-26 00:15:56 -07:00
Cameron Gutman 4a9294a4b7 Remove Roboto fonts, switch to iOS app delegate for tvOS, and add stream view and loading view 2018-08-26 00:14:08 -07:00
Cameron Gutman a9b8f753a2 Remove tvOS-specific data model 2018-08-25 23:32:43 -07:00
Diego Waxemberg 05761c787c working on tvOS UI 2018-08-25 23:22:52 -07:00
Cameron Gutman 9a7b3b1325 Build libopus for tvOS and iOS with bitcode 2018-08-25 21:17:08 -07:00
Cameron Gutman b04a4e72ff Rebuild OpenSSL with bitcode for macOS, iOS, and tvOS 2018-08-25 20:34:36 -07:00
Diego Waxemberg b0b9a614f3 Adding tvOS target 2018-08-25 20:33:03 -07:00
Diego Waxemberg 76ab786e94 Adding keyboard support 2018-08-25 15:22:32 -07:00
Cameron Gutman 8afcdc92d4 Update common-c to fix GFE 3.14.1 audio bitrate issues 2018-08-25 00:32:33 -07:00
Cameron Gutman 907a2cd59b Update README.md 2018-08-24 23:20:16 -07:00
Cameron Gutman a85b931d87 Enable stale and no-response bots to reduce inactive issues 2018-08-12 00:22:30 -07:00
Diego Waxemberg 62f1b3e595 Bumping app version for 2.1.0 2018-06-17 16:43:42 -07:00
Cameron Gutman b9381ad027 Update common-c to fix RTSP handshake error on quick reconnect 2018-06-09 21:54:25 -07:00
Cameron Gutman 98d01f7775 Ensure the C strings stay valid until connection-time. Fixes #228 2018-06-09 20:04:40 -07:00
Cameron Gutman de39c87185 Allow the stream to be inactive for 10 seconds before terminating 2018-06-09 16:29:48 -07:00
Cameron Gutman 10a00b0d28 Avoid leaving application lifetime notifications registered all the time 2018-06-09 16:28:37 -07:00
Diego Waxemberg 4d8788add3 Bumping app version for 2.0.0 2018-06-02 21:31:53 -07:00
Cameron Gutman 9c019be322 Fix subtle database corruption that would cause games common to 2 or more PCs to jump between them based on the last app list fetched 2018-06-02 20:44:12 -07:00
Cameron Gutman 80254513c4 Avoid blocking the main thread when delaying for button presses 2018-06-02 19:19:24 -07:00
Cameron Gutman 5a13e44fdb Use an exponential-ish bitrate slider 2018-06-02 19:09:38 -07:00
Cameron Gutman ec0a462092 Remove custom style on UISegmentedControl, since the default actually looks better 2018-06-02 18:14:20 -07:00
Cameron Gutman 25c7b18147 Add UI settings for HEVC, optimizing games, PC audio, multi-controller. Remove remote setting since it doesn't do much and might confuse users. 2018-06-02 18:13:32 -07:00
Cameron Gutman fb238e0d1d Log launch and resume requests 2018-06-02 17:50:48 -07:00
Cameron Gutman bfc0b89926 Add many new preferences to settings DB. Default HEVC to off due to reference frame invalidation not working 2018-06-02 17:10:52 -07:00
Cameron Gutman 2f0e219726 Always set the stream config from the data from the actual app we're going to start streaming, not just the one selected 2018-06-02 16:38:02 -07:00
Cameron Gutman 2305f33572 Fix scrolling jank on app list 2018-06-02 16:31:16 -07:00
Cameron Gutman d17f2f9dee Plumb multi-controller toggle 2018-06-02 13:52:58 -07:00
Cameron Gutman a28049a58c Plumb several new options into stream config and launch requests: optimizeGameSettings, playAudioOnPC, surround sound, and HDR 2018-06-02 13:25:53 -07:00
Cameron Gutman 2d2f71dcab Parse and persist ServerCodecModeSupport attribute for hosts 2018-06-02 13:10:10 -07:00
Cameron Gutman 59506a2364 Parse and remember the IsHdrSupported app attribute 2018-06-02 12:33:13 -07:00
Cameron Gutman 2cec53ab6b Fix typo in analog stick deadzone area 2018-06-02 01:38:52 -07:00
Cameron Gutman 42ef67d939 Let the spinner spin until video appears 2018-06-02 01:02:10 -07:00
Cameron Gutman 30ec68cd4e Ensure the progress messages aren't obscured by the video layer 2018-06-02 01:01:45 -07:00
Cameron Gutman 941c414930 Fix R2 being improperly sized on 3x DPI 2018-06-01 22:20:37 -07:00
Cameron Gutman b918005555 Improve OSC usability for iPad. Fixes #317 2018-06-01 22:09:24 -07:00
Cameron Gutman c74fa4d5b0 Change manual simple OSC mode to have useful buttons. Fixes #218 2018-06-01 21:18:41 -07:00
Cameron Gutman 1a71e040c0 Fix deadzones to dynamically detect controls on screen and add a deadzone for the analog sticks 2018-06-01 21:17:47 -07:00
Cameron Gutman 236c9d5c6e Use more aggressive mDNS querying for faster PC discovery, particularly in newly online PC scenarios 2018-06-01 20:23:39 -07:00
Cameron Gutman 862b8632e3 Fix DiscoveryManager trying to start discovery again on all machines when any machine is discovered 2018-06-01 19:50:32 -07:00
Cameron Gutman cdb5f51ab8 Quiet down PC discovery logging 2018-06-01 19:38:52 -07:00
Cameron Gutman 314f32388a Use the app name in the "Starting App" text 2018-06-01 19:11:10 -07:00
Cameron Gutman 39b0b429d6 Show loading spinner while waiting for apps to quit 2018-06-01 18:58:25 -07:00
Cameron Gutman 23a12ed101 Actually set CAPABILITY_DIRECT_SUBMIT and fix the bug it hides 2018-06-01 17:00:02 -07:00
Cameron Gutman 653a789110 Refresh app and host state when returning from streaming via error 2018-06-01 00:47:44 -07:00
Cameron Gutman 04b2fccaef Only interact with the AVSampleBufferDisplayLayer on the main thread 2018-06-01 00:31:41 -07:00
Cameron Gutman ec0124e255 Ensure we properly restart discovery after closing Control Center 2018-06-01 00:07:25 -07:00
Cameron Gutman 132a1fc410 Don't attempt to pair on entry to foreground if we've become unpaired 2018-05-31 01:53:09 -07:00
Cameron Gutman 63297c8483 Lan -> LAN 2018-05-31 01:37:13 -07:00
Cameron Gutman 5fd2c29a73 Avoid displaying error dialogs on passive actions like returning to foreground 2018-05-31 01:36:10 -07:00
Cameron Gutman e6e7ec9202 Avoid animating the loading frame 2018-05-31 01:22:03 -07:00
Cameron Gutman fcc770d820 Avoid firing off HTTP requests as we enter the background when entering home from streaming 2018-05-31 00:46:41 -07:00
Cameron Gutman 4243bcd5d1 Ensure double-starting or stopping DiscoveryManager and MDNSManager doesn't cause side-effects, since we do this when Home is pressed while streaming 2018-05-31 00:33:24 -07:00
Cameron Gutman 67b08cd8b9 Use LiInterruptConnection() to terminate connection attempts more quickly 2018-05-30 22:06:20 -07:00
Cameron Gutman e697938afc Re-enable the idle timer when streaming has ended 2018-05-30 22:04:06 -07:00
Cameron Gutman 275f6df8c1 Fix some minor issues with saving CoreData objects 2018-05-30 01:19:46 -07:00
Cameron Gutman aea2067e1c Silence the firehose of debug logging statements 2018-05-29 20:17:48 -07:00
Cameron Gutman b5241a0c30 Ok -> OK 2018-05-28 18:20:59 -07:00
Cameron Gutman 6cac2348b4 Add help button to error dialogs and use default style for non-destructive actions 2018-05-28 18:00:19 -07:00
Cameron Gutman 0293df7748 Rewrite audio playback to simplify code, reduce allocations, and eliminate priority inversion on the queue lock. This completely eliminates clicks and pops in audio for me on my iPhone SE and the emulator. 2018-05-28 17:38:09 -07:00
Cameron Gutman 391872ddb8 Ignore unsupported gamepads 2018-05-28 15:11:23 -07:00
Cameron Gutman 4bafefbe16 streamingRemotely should not be optional 2018-05-28 13:51:00 -07:00
Cameron Gutman 812f3f3717 Add 360p resolution support 2018-05-28 13:50:20 -07:00
Cameron Gutman e498736af6 Fix Moonlight macOS build 2018-05-28 13:25:18 -07:00
Cameron Gutman 1842a11f56 Fix errors saving PCs that were discovered via mDNS 2018-05-28 13:19:49 -07:00
Cameron Gutman 85f81ca8c1 Use CoreData codegen to resolve warnings about missing getters/setters on our DB objects 2018-05-28 12:40:15 -07:00
Cameron Gutman b792629943 Flip the pull arrow when the settings are open 2018-05-28 12:04:38 -07:00
Cameron Gutman 7df76fcd93 Allow the settings view to scroll on smaller iPhones 2018-05-28 11:39:04 -07:00
Cameron Gutman 8b60e79406 Minor common-c update to address a (currently) harmless warning 2018-05-28 10:49:41 -07:00
Cameron Gutman fcb6c7386c Update common-c to receive fixes to lower audio bitrate at low bandwidth settings 2018-05-28 10:36:17 -07:00
Cameron Gutman 2729fad47c Commit IDEWorkspaceChecks.plist 2018-05-28 10:35:36 -07:00
Cameron Gutman 41eb933e11 Update to XCode 9.3 recommended settings and fix "implict retain self" warnings 2018-04-21 22:20:27 -07:00
Felix Kratz f759f719e6 Dark Mode & Stream Overlay [macOS] (#315)
* dark mode & stream overlay

* removed all redundant imports

* update for the new xcode version with fixes for the new 'implicitly retains self warning'

* reworked the overlay view

* cleaning up unused variables

* small corrections
2018-04-22 00:44:22 -04:00
Cameron Gutman 74283a6763 Use HEVC on iOS 11.3 and later. Fixes #296 2018-04-10 18:57:02 -07:00
Cameron Gutman 0a19c5950a Update organization name in both projects 2018-03-27 00:38:47 -07:00
Cameron Gutman e8832ed746 Refactor new macOS code to reduce #ifs, increase shared code, and fix warnings 2018-03-27 00:34:38 -07:00
Felix Kratz 6cc165b589 Port for macOS (#311)
* merged moonlight-mac with moonlight-ios

* reverted to the original project.pbxproj

* cleaned up the code, fixed lots of unnecessary code duplications

* multicontroller support (not tested)

* new class that can be used for further modularization of the MainFrameViewController
2018-03-26 23:50:40 -07:00
Cameron Gutman 1c86c4485d Disable HEVC until iPhone X and other issues can be sorted out. See #296 2018-02-24 21:16:02 -08:00
Cameron Gutman 127e5ed54a Migrate to Swift 4.0 with @objc inferencing fixes for Moonlight build target 2018-02-19 14:43:50 -08:00
Cameron Gutman 3fee5d0a62 Fix build of unit tests 2018-02-19 14:33:20 -08:00
Cameron Gutman c913b3f04f Enable XCode 9 recommended warnings and fix occurrences of them in the code 2018-02-19 14:26:12 -08:00
Cameron Gutman dfd30c0624 Remove some old and unused references from the XCode project 2018-02-19 14:05:03 -08:00
Cameron Gutman 5117a6ede5 Replace dylibs with tbd 2018-02-19 13:56:50 -08:00
Cameron Gutman fb9c071243 Update moonlight-common-c 2018-02-19 00:25:57 -08:00
Cameron Gutman d0a8f0e0f1 Update README.md 2018-01-20 17:03:09 -08:00
Cameron Gutman 6bb6c40bec Report attached gamepads during launch to fix L4D2 2018-01-20 14:37:33 -08:00
Cameron Gutman af3bc82d0f Fix drag cancellation triggering on any movement and other drag bugs. Fixes #288 2018-01-20 01:51:50 -08:00
Cameron Gutman b9d5d94d70 Fix support for IPv6 literals 2018-01-20 01:30:29 -08:00
Cameron Gutman 43f4804194 Fix wake-on-lan failure on LAN after ARP cache expiration of target PC. Fixes #293 2018-01-19 20:18:39 -08:00
Diego Waxemberg be26ce9a8f Bumping app version for v1.7.0 2018-01-10 19:35:41 -08:00
Cameron Gutman ca562e2251 Update common-c to fix streaming on GFE 3.12 2018-01-10 00:45:38 -08:00
Cameron Gutman d7ee0916e9 Avoid crashing on iOS 11 betas released before iPhone X 2017-12-27 23:24:53 -08:00
Cameron Gutman 3bc9e050f1 Update common-c and use codec masks rather than exact formats 2017-12-03 11:33:11 -08:00
Cameron Gutman 4b9bd8398b Update for video decoder API changes 2017-11-18 18:17:22 -08:00
Diego Waxemberg 20a61dd9f4 Bumping app version for v1.6.0 2017-11-12 19:57:36 -08:00
Cameron Gutman dc4ecbf262 Update common-c to address HEVC corruption at 1080p60 2017-11-10 01:36:00 -08:00
Diego Waxemberg 68f55235ec Bumping app version for v1.5.0 2017-10-17 21:28:30 -07:00
Cameron Gutman 5434b653c7 Reduce bitrate when streaming HEVC to reduce bandwidth at better IQ than H.264 2017-10-17 01:07:41 -07:00
Cameron Gutman 25d7af9453 Fix pairing and game quitting issues with GFE 3.10 2017-10-16 23:59:00 -07:00
Diego Waxemberg 5584083809 Bumping app version for 1.4.0 2017-09-23 21:48:22 -07:00
Cameron Gutman 9f9aec70b0 Add 1024x1024 app icon 2017-09-23 21:47:33 -07:00
Cameron Gutman a8d1770871 Fix Main Thread Checker safety issue in DataManager 2017-09-15 00:51:37 -07:00
Cameron Gutman d0d60b8ffc Suppress system gesture detection during streaming 2017-09-15 00:30:51 -07:00
Cameron Gutman 86f7112789 Adjust settings view for iPhone X 2017-09-14 23:12:52 -07:00
Cameron Gutman da1115e529 Disable reference frame invalidation for HEVC 2017-09-14 22:03:20 -07:00
Cameron Gutman 593da7ef3e Merge branch 'hevc' 2017-09-14 21:54:46 -07:00
Cameron Gutman de5377a95d Only use HEVC if the client has hardware-accelerated decoding 2017-09-14 19:50:53 -07:00
Cameron Gutman 7d7500b187 Suppress accidental movements during drags and clicks 2017-09-10 23:14:13 -07:00
Cameron Gutman 45dbd46da1 Fix mouse cursor jumping on right click gesture where only the 2nd finger is lifted to complete the gesture 2017-09-10 22:58:43 -07:00
Cameron Gutman 89d8bc6009 Fix icon changing between launch screen and main view controller 2017-09-10 22:22:32 -07:00
Cameron Gutman b99988836a Implement HEVC decoding for iOS 11 devices 2017-09-10 00:00:40 -07:00
Cameron Gutman 3e94613eb3 Update common-c 2017-09-02 19:48:09 -07:00
Cameron Gutman 832b9189f8 Fix mDNS overriding manually specified addresses 2017-09-02 19:47:47 -07:00
Cameron Gutman 3464539bd3 Make iconography consistent with other Moonlight clients 2017-09-02 14:54:19 -07:00
Cameron Gutman 815592117d Update common-c 2017-06-11 14:54:17 -07:00
Cameron Gutman b51341ef54 Update to latest moonlight-common-c 2017-06-11 13:36:23 -07:00
Cameron Gutman 9ffbb5f155 Update moonlight-common-c with latency and FEC improvements 2017-06-08 21:09:21 -07:00
Cameron Gutman 9716867ade Update moonlight-common-c 2017-06-05 22:27:15 -07:00
Diego Waxemberg 7c141c1fd2 Bumping version for 1.2.0 2017-05-11 22:36:28 -07:00
Cameron Gutman 42c4e7ca58 Enable reference frame invalidation 2017-05-11 20:46:09 -07:00
Cameron Gutman 6a6ea4a79a Update moonlight-common-c 2017-05-11 20:12:06 -07:00
Cameron Gutman 5d0ca8451d Fix active game not being set when returning from streaming 2017-05-07 23:32:31 -07:00
Cameron Gutman 4641f68eb8 Update common-c with critical FEC fixes 2017-05-07 23:16:00 -07:00
Cameron Gutman dd33f57b9a Fix display of pairing failure dialog when machine is streaming 2017-05-07 16:51:57 -07:00
Cameron Gutman f6b225ca9c Update common-c with FEC changes 2017-05-06 16:09:56 -07:00
Cameron Gutman 4ac3f11ff8 Ensure that OSC always has Player 1 reserved 2017-02-06 19:17:27 -08:00
Cameron Gutman 62aaf27293 Update to new common-c to show the correct number of controllers on the host PC 2017-02-04 20:16:18 -08:00
Diego Waxemberg eac2d985e2 Created build v1.1.4 and removed empty icon sets 2016-12-14 22:05:47 -08:00
Cameron Gutman 61ea7f3f1c Update moonlight-common-c with support for GFE 3.2 2016-12-13 21:29:03 -08:00
Cameron Gutman 40f7faa1b1 Update moonlight-common-c project to recommended settings on Xcode 8.1 2016-10-29 19:55:22 -07:00
Diego Waxemberg 9e18b8021b Bumping app version for v1.1.3 2016-10-26 19:08:33 -07:00
Cameron Gutman ce95f2c153 Fix some pairing glitches and add a cancel button 2016-10-21 12:07:29 -07:00
Cameron Gutman fd50b71b16 Fix detection of running apps on GFE 3.1 2016-10-21 11:41:42 -07:00
Diego Waxemberg 39ab472cf6 Updated to use swift 3 2016-10-05 23:45:48 -07:00
Diego Waxemberg 48ba7eb2dc Bump version for v1.1.2 2016-10-05 23:00:46 -07:00
Diego Waxemberg 42edaa1bad Added DerivedData to gitignore 2016-10-05 22:58:38 -07:00
Diego Waxemberg 955fb59156 Merge branch 'master' of github.com:moonlight-stream/moonlight-ios 2016-10-05 22:57:43 -07:00
Diego Waxemberg 2fbc67ef00 Bumped version for v1.1.1 2016-10-05 22:56:40 -07:00
Cameron Gutman 23564a3028 Add support for GFE 3.0.7 2016-10-05 17:32:30 -07:00
Cameron Gutman 9a07d5a33a Display an error if attempting to close another session's app rather than silently failing 2016-09-24 21:26:50 -07:00
Cameron Gutman 84c037f235 Move the pull arrow up to the top of the left side and make it clickable on the PC view page 2016-09-24 20:39:43 -07:00
Cameron Gutman c13df82f5b Update common-c to fix Gen 3 servers 2016-09-24 19:09:21 -07:00
Cameron Gutman b15d61a5bf Allow existing host to be updated via the Add PC dialog 2016-09-24 18:53:52 -07:00
Cameron Gutman 5aff719984 Add message to enable GameStream for GFE 3.0 2016-09-24 18:51:55 -07:00
Cameron Gutman b0c2978405 Update common-c submodule with const char * change 2016-07-31 17:10:32 -07:00
Cameron Gutman 91dcb505de Fix displaying names of custom added apps on GFE 3.0 2016-07-31 14:40:08 -07:00
Cameron Gutman d1f35d938b Apply Xcode 8 recommended project settings 2016-07-31 12:02:35 -07:00
Cameron Gutman 359b822951 Migrate to Swift 2.3 for Xcode 8 2016-07-31 12:00:09 -07:00
Cameron Gutman 39580e4352 Fix wiki link 2016-05-30 12:23:41 -05:00
Cameron Gutman 7b3d099449 Use the same Controller object for player 0 and the on-screen controls so tapping on-screen buttons doesn't reset all physical controller input to 0. Fixes pressing L3 to run in some games. 2016-05-22 17:11:30 -05:00
Cameron Gutman b17c45e9ca Update common-c to include MTU fix for LTE streaming 2016-05-21 21:32:36 -05:00
Cameron Gutman 4c7a2cecdd Allow the user to slide between directions on the d-pad. This closes #222 2016-05-08 15:42:08 -04:00
Cameron Gutman 175074ece8 Tweaks to dragging behavior to match Moonlight Android 2016-05-08 15:09:43 -04:00
Cameron Gutman 8a5ec513bf Update common-c 2016-05-08 14:59:08 -04:00
Cameron Gutman 7cfb7f73a2 Fix some WOL issues including crashes and broken functionality with DNS names 2016-05-08 14:56:22 -04:00
Cameron Gutman c608685737 Update common-c with bugfixes 2016-04-27 02:24:54 -04:00
Cameron Gutman 3beca2fc72 Update moonlight-common-c to fix a couple crashing bugs 2016-04-18 16:46:59 -04:00
Cameron Gutman c59aafb4bb Merge pull request #215 from Mimiste/master
Drag and drop
2016-04-18 14:02:07 -04:00
Mimiste 256e40acdc 1 Second touch for the drag and drop
Changed the timer duration to 1 second to initiate the drag and drop
2016-04-18 19:44:00 +02:00
Mimiste 39b1b65e16 Merge remote-tracking branch 'moonlight-stream/master' 2016-04-16 18:56:02 +02:00
Cameron Gutman 1783abec13 Lock around LiStartConnection() and LiStopConnection() to fix thread-safety issues. This will hopefully address the crashes seen in 1.0.3 and 1.0.4. 2016-04-12 00:50:59 -04:00
David 983c65d399 Rewrote the Controller class in Swift (#216)
* Enabled Defines Modules for swift code

* Created bridge header, created swift Controller

-  Created Controller.swift
-  Created bridge header for use of objc in swift

* Finished porting Controller files to swift

* Added comments, created MoonlightUnitTest

-  Added comments for Controller.swift
-  Created MoonlightUnitTest for testing new class

* Started writing tests for ControllerUnitTests

-  General formatting
-  Wrote helper functions
-  Wrote tests for first four properties

* Finished writing Controller tests

* Removed commented out lines
2016-04-11 20:44:02 -07:00
Mimiste 4caa9672c9 Drag and drop
The drag and drop is now enabled only if touching with one finger.
The tap to drop does not fire another timer
2016-04-10 13:02:00 +02:00
Mimiste 15be6a3f75 Merge remote-tracking branch 'moonlight-stream/master' 2016-04-10 11:48:30 +02:00
Michelle Bergeron d38eb0a3ba s/current/currently 2016-04-09 23:12:59 -07:00
Mimiste e8ea942ad2 Drag and drop
Possibility to initiate a drag and drop

- Touch for 2 second to initiate a drag
- Move the cursor as usual
- Tap top drop
2016-04-08 00:12:59 +02:00
Diego Waxemberg cb68b10475 Removed "Headers" build phase from common and created v1.0.4 2016-03-31 20:36:07 -07:00
Cameron Gutman 11c854ce44 Update common-c to support Gen 7 2016-03-31 11:27:02 -04:00
Cameron Gutman 9636f4742b Implement pairing for Gen 7 servers 2016-03-31 11:20:18 -04:00
Cameron Gutman 5867317526 Move the submodule and subproject to their new locations 2016-03-31 07:59:35 -04:00
Cameron Gutman 8a8f7b6903 Remove old submodule 2016-03-31 07:23:37 -04:00
Diego Waxemberg 61b6e25a91 Bumping app version for 1.0.3 2016-03-08 22:35:06 -08:00
Diego Waxemberg 50cff820de Added app icon for ipad pro 2016-03-08 22:34:15 -08:00
Cameron Gutman 4e586a28c8 Update common-c to fix RTSP timeout issue 2016-03-08 13:15:33 -08:00
Cameron Gutman 0702b4ed57 Fix a performance regression in handling the applist response 2016-03-07 16:12:10 -08:00
Cameron Gutman 4a2132a682 Update common-c to support GFE 2.11 2016-03-07 14:45:05 -08:00
Diego Waxemberg ba81d1d6a9 Bumping version and creating build 1.0.2 2016-02-19 13:08:01 -08:00
Cameron Gutman 402ce4b3ec Update common-c to support Gen 5 servers 2016-02-19 15:09:37 -05:00
Cameron Gutman fc713453ad Merge branch 'master' of github.com:moonlight-stream/moonlight-ios 2016-02-16 10:38:25 -05:00
Cameron Gutman b222ccffbb Fix analysis warning 2016-02-16 10:37:59 -05:00
Michelle Bergeron 56ce7329d2 Point to website, add wiki link. 2016-02-15 22:39:32 -08:00
Michelle Bergeron 99ab6db557 Added note about Apple TV in effort to stave off some emails 2016-02-07 21:53:55 -08:00
Cameron Gutman d7adf96f3a Newer GFE versions don't mind resuming another device's stream 2016-02-06 23:10:36 -05:00
Cameron Gutman 0ae58c61a9 Remove apps from the database when they are removed from the app list 2016-01-21 16:24:02 -05:00
Cameron Gutman 2ec7d1d2f1 Use the main queue for the managed object context as a hack to prevent merge conflicts 2016-01-21 16:17:05 -05:00
Cameron Gutman ad1b9059ee Ensure the host matches for app entries 2016-01-21 15:01:15 -05:00
Cameron Gutman 4439c7cce6 Fix initial app list loading after pairing 2016-01-21 14:14:29 -05:00
Cameron Gutman b8a4093c75 Preserve app art when updating the app list 2016-01-21 14:03:07 -05:00
Cameron Gutman ec3748b26e Implement hash and isEqual for TemporaryApp and TemporaryHost 2016-01-21 13:34:34 -05:00
Cameron Gutman 1c1f22e047 Update the database on each server info poll 2016-01-21 12:09:49 -05:00
Cameron Gutman 9aa9b0fc5a Copy the pair state into the temporary host 2016-01-21 11:42:19 -05:00
Cameron Gutman f8e2ca8500 We can't hold onto managed objects in our temporary objects because they can disappear from under us, so do the lookup when we propagate values 2016-01-21 11:29:17 -05:00
Cameron Gutman 3076e29335 Basic database access is working 2015-12-02 00:25:38 -08:00
Cameron Gutman fe616d86c5 Reduce usage of DataManager 2015-12-01 20:56:08 -08:00
Cameron Gutman bfa4856bbe Move non-CoreData backed fields out of CoreData objects 2015-12-01 20:36:08 -08:00
Cameron Gutman 5ea92a7b48 Stop using CoreData-backed objects in any non-DataManager code 2015-12-01 20:31:24 -08:00
Diego Waxemberg 4ba71db7b2 bumped build version 2015-11-14 13:07:31 -08:00
Diego Waxemberg c1e6aeb43c Merge branch 'master' of github.com:moonlight-stream/moonlight-ios 2015-11-14 12:33:44 -08:00
Diego Waxemberg e3ffb66ef0 bumping version code 2015-11-14 12:33:41 -08:00
Cameron Gutman 5daa82b0ba Show the hosts in alphabetical order rather than in an undefined order 2015-11-13 19:55:18 -08:00
Cameron Gutman a8bcc6afba Split the work into 2 jobs per computer to retrieve assets faster 2015-11-13 19:52:35 -08:00
Cameron Gutman e6aa16ad01 Revert "Fix concurrent modification crash in app asset caching code"
This reverts commit ad0705d126.
2015-11-13 19:07:15 -08:00
Cameron Gutman ad0705d126 Fix concurrent modification crash in app asset caching code 2015-11-13 18:30:12 -08:00
Cameron Gutman 2f31f93bf8 Add support for GFE 2.8 2015-11-11 18:24:36 -08:00
Cameron Gutman ea3be613c5 Try 5 times to get the app list before failing 2015-11-11 18:14:59 -08:00
Cameron Gutman b495246f34 Only mark a PC offline if server info failed after 3 straight tries 2015-11-11 18:14:04 -08:00
Cameron Gutman 814470f4bf Set the default bitrate based on the selected resolution and FPS combo 2015-11-11 18:11:33 -08:00
Cameron Gutman 82293a08b6 Increase the request timeout to 7 seconds to give a bit more time for slow app lists to come in 2015-11-11 17:53:13 -08:00
Cameron Gutman 20d66336a7 Cache decoded UIImage objects for the scroll view to fix janky scrolling 2015-11-10 21:23:00 -08:00
Cameron Gutman c8441ec9fa Rasterize the cell layer to increase scrolling performance 2015-11-10 20:48:39 -08:00
Cameron Gutman f72135c227 Mark collection cells opaque for better performance 2015-11-10 20:47:09 -08:00
Michelle Bergeron 100e6e4ce8 Remove info about the beta 2015-11-09 21:53:58 -08:00
Michelle Bergeron ec8be20d62 Download link 2015-11-09 21:53:24 -08:00
Diego Waxemberg 55d48101ef Bumped build version
This is the first attempt at submission to the App Store
2015-11-01 00:12:39 -07:00
Cameron Gutman c36f4c5f84 Remove abort calls 2015-10-31 23:45:37 -07:00
Diego Waxemberg 06289ac4d2 No longer use IDFA, now generate UUID and persist in Core Data. Bumped version to 1.0.0 2015-10-31 23:04:32 -07:00
Cameron Gutman e6a2d5d425 Update project file after Xcode 7.1 2015-10-31 19:00:44 -07:00
Cameron Gutman ea8db9c4ea Update common with new bitrate logic 2015-10-31 19:00:05 -07:00
Cameron Gutman 3773e841d1 Update common to support GFE 2.7 2015-10-25 13:28:24 -07:00
Diego Waxemberg ad1ddd04f3 no longer allow multiple apps to be selected at the same time 2015-10-18 16:52:14 -07:00
Diego Waxemberg 67a8b232b9 added pull arrow to side of screen 2015-10-17 16:16:13 -07:00
Diego Waxemberg 5293c07fc0 fixed issue where we wouldn't terminate the stream on failure 2015-10-17 03:46:09 -07:00
Diego Waxemberg e3a42db007 On-screen controls revamp
- controls are bigger
- dead zone around buttons to avoid accidental mouse clicks and movement
- finished implementing control setup for AutoGCGamepad
- swiping to close stream requires swipe to 1/4 the screen width
- no longer send mouse movement if delta is too small
2015-10-17 03:02:55 -07:00
Diego Waxemberg 3b1462af22 removed support for native resolution stream 2015-10-16 23:38:14 -07:00
Cameron Gutman 74a0c5b1cd Merge branch 'master' of github.com:moonlight-stream/moonlight-ios 2015-09-30 20:44:26 -07:00
Cameron Gutman 05a5e4fa64 Fix a crash when apps are removed from GFE 2015-09-30 20:44:14 -07:00
Cameron Gutman b6445295a7 Use a temporary app object and database lock to avoid saving while the database is not in a consistent state 2015-09-30 20:34:52 -07:00
Diego Waxemberg 391605ef36 ignored the new xcsmblueprint files 2015-09-30 19:18:21 -07:00
Diego Waxemberg 695499dea9 host and app buttons now have feedback when tapped 2015-09-30 19:13:37 -07:00
Cameron Gutman 9ba7f35444 Require full-screen since the streaming game will be the primary interaction for the device 2015-09-30 18:00:52 -07:00
Cameron Gutman 37dc00735b Enabling bit code is causing linker errors when deploying to real devices for some reason. Turning it back off. 2015-09-29 00:06:27 -07:00
Cameron Gutman 920cbadc91 Add a workaround/hack to fix duplicating machines 2015-09-29 00:04:40 -07:00
Cameron Gutman bc53b4dc32 First stab at fixing on screen controls on various devices 2015-09-28 23:20:27 -07:00
Cameron Gutman 6015c38d17 Only display the native resolution dialog if the user has just chosen native resolution. Make the dialog a little nicer too. 2015-09-28 22:50:54 -07:00
Cameron Gutman 4ea8694a7d Fix status bar hiding while streaming on iPad 2015-09-28 21:49:46 -07:00
Cameron Gutman 00f01196fb Update placeholder app images to be the correct aspect ratio and invert the colors to better show against the new background 2015-09-28 21:40:10 -07:00
Diego Waxemberg 543639c93e Merge branch 'master' of github.com:moonlight-stream/moonlight-ios 2015-09-28 21:19:18 -07:00
Diego Waxemberg 1da877fed7 Changed theme to light/dark gray and updated launch screen. Also added a border and drop shadow to app icons 2015-09-28 21:18:35 -07:00
Cameron Gutman 396b5fc156 Update common 2015-09-28 19:22:28 -07:00
Cameron Gutman 297dfd4159 Update project file
- Change organization name
- Enable bit code
- Update Xcode compatibility version
2015-09-28 19:09:49 -07:00
Cameron Gutman 23e9d48b0d Update common-c and use the new LiInitializeXXX() functions 2015-08-16 12:27:21 -07:00
Cameron Gutman 9ec650a84f Zero audio renderer callbacks before populating 2015-08-12 01:18:22 -07:00
Cameron Gutman 90bdbc4ae0 Update common library 2015-08-12 01:11:38 -07:00
Cameron Gutman dd5f06723b Update common library to get assertions and a GFE 2.5.11 fix 2015-07-20 17:37:13 -07:00
Michelle Bergeron 55b2871b83 Update about beta program 2015-07-16 16:14:28 -07:00
Diego Waxemberg c8b13126d0 Adding build 0.9.2 2015-07-15 20:24:13 -07:00
Diego Waxemberg 96cfe0b70d bumping build number for new beta 2015-07-15 20:21:29 -07:00
Cameron Gutman 6dbb938368 Speed up app icon load time by 2 seconds by only waiting if it failed 2015-07-12 00:43:20 -07:00
Cameron Gutman 46fe7a8aed Don't show error messages if the PC isn't selected anymore 2015-07-12 00:30:44 -07:00
Cameron Gutman 3151ac6bf0 Remove hosts from discovery while they're handling operations the for UI. Sometimes these operations take a while and block the server from responding to our serverinfo queries that determine its online status. 2015-07-12 00:23:48 -07:00
Cameron Gutman dc5210f691 Propagate the running flag to the applist cache 2015-07-12 00:12:53 -07:00
Cameron Gutman 1f02265003 Fix a race condition that could cause an app to be populated with a null host 2015-07-11 23:59:09 -07:00
Cameron Gutman e4af9032e2 Implement a fast path to the app grid for online, paired machines with cached app lists. 2015-07-11 21:59:41 -07:00
Cameron Gutman e8650b2420 Don't use lightweight generics for Xcode 6 compatibility 2015-07-11 21:59:01 -07:00
Diego Waxemberg 9c6b718be2 fixed issue with apps duplicating in app list 2015-07-11 18:47:05 -07:00
Cameron Gutman 8f12114a56 Merge branch 'master' into persist-app-list 2015-07-11 01:38:30 -07:00
Cameron Gutman dc6ebffab1 Allow unpaired computer to be deleted. Remove the unpairing option since it hasn't worked for ages. 2015-07-11 01:29:28 -07:00
Cameron Gutman 13e894e9a3 Refactor app list to be non-static and sorted in alphabetical order 2015-07-11 01:28:52 -07:00
Cameron Gutman 4c95773131 Long clicking hosts that aren't paired doesn't bring up any useful options, so disable it 2015-07-11 00:13:58 -07:00
Cameron Gutman 38776a01e4 Only create an app if an app ID was found 2015-07-11 00:10:13 -07:00
Cameron Gutman b2563e534d Null terminate strings before passing them to BIO_puts 2015-07-10 22:33:09 -07:00
Diego Waxemberg 37f25c1f97 fixed some bugs with saving app list to database 2015-07-10 22:19:25 -07:00
Diego Waxemberg 642085ca32 App lists are now persisted in the database 2015-07-10 21:22:57 -07:00
Cameron Gutman 5dee29a21c Add a play indicator for running apps 2015-07-10 18:09:12 -07:00
Cameron Gutman b01d13976b Improve speed and reliability of host detection 2015-07-10 12:18:09 -07:00
Cameron Gutman ae1c83a011 Fix returning to the host selection screen after a failure 2015-07-10 11:52:27 -07:00
Cameron Gutman e5f962dc3f Perform stricter status checks during pairing to fix a crash when paired=3 2015-07-10 11:43:47 -07:00
Cameron Gutman 54dd79d2dd Remove OK button from pairing PIN dialog, since it dismisses automatically 2015-07-10 11:37:32 -07:00
Cameron Gutman 935fb6ffe3 Fix streaming over the external IP address when discovered via mDNS 2015-07-10 00:28:51 -07:00
Cameron Gutman 48d1c1a080 Commit host removals immediately so they remain if the app is unexpectedly terminated 2015-07-09 23:52:05 -07:00
Cameron Gutman 2d02ce2a1b Change the PC status to offline and return to the host selection screen if server info or applist is unavailable 2015-07-09 23:48:18 -07:00
Cameron Gutman 29fda59a72 Add applist and server info fetching error dialogs. Open the options menu when a user taps an offline PC. 2015-07-09 21:15:52 -07:00
Cameron Gutman 05f0dfd4f5 Replace dispatch_sync with dispatch_async in pairing 2015-07-09 21:02:19 -07:00
Cameron Gutman 0bdc5a83f1 Go directly to the app list after pairing like Android 2015-07-09 20:39:15 -07:00
Cameron Gutman 8688bf1210 Add failure handling for quitting apps 2015-07-09 20:33:23 -07:00
Cameron Gutman bf0858d57e Fix spelling mistake 2015-07-09 20:32:03 -07:00
Cameron Gutman 8d4d391310 For real this time - Update common to pickup Xcode 7 changes 2015-07-08 23:49:34 -07:00
Cameron Gutman 8fb15336c4 Update common to pickup Xcode 7 changes 2015-07-08 23:45:20 -07:00
Cameron Gutman 883385c42b Merge branch 'xcode-7.0' 2015-07-08 23:43:03 -07:00
Cameron Gutman 6d1139796e Cherry pick e58eb5f - Removing LimelightTests target 2015-07-08 23:25:37 -07:00
Cameron Gutman e58eb5f56a Remove LimelightTests target since it's old and unused 2015-07-08 23:21:05 -07:00
Cameron Gutman 2b0ce49646 Merge branch 'master' into xcode-7.0
Conflicts:
	limelight-common-c
2015-07-08 23:13:55 -07:00
Cameron Gutman 73364127d2 Fix pairing with GFE 2.4.5.57+ 2015-07-08 23:03:23 -07:00
Cameron Gutman 84a986bc88 Switch from deprecated NSURLConnection to NSURLSession 2015-07-08 22:35:25 -07:00
Cameron Gutman f13051aa31 Prepare for HTTP requests 2015-07-08 21:31:47 -07:00
Cameron Gutman 6bb559303b Remove executeRequest from HttpManager. It has some show-stopping bugs, like leaking semaphore counts (since it never waited) and being generally thread-unsafe. Implementing it in a way that would be asynchronous and thread-safe is a non-trivial task, so I've opted to remove it and change callers to use executeRequestSynchronously. 2015-07-08 21:26:01 -07:00
Cameron Gutman b7324f9a44 Remove a parameter from LiStartConnection 2015-07-08 19:17:58 -07:00
Cameron Gutman c0b2bbe552 Remove a parameter from LiStartConnection 2015-07-08 19:16:48 -07:00
Cameron Gutman 8c36cf40fd Update common for a leak fix and other minor bugs 2015-07-08 19:16:17 -07:00
Diego Waxemberg 717296269f updating common to xcode 7.0 settings 2015-07-04 11:23:31 -07:00
Diego Waxemberg 4be29abede updated project settings for xcode 7.0 2015-07-04 11:13:05 -07:00
Cameron Gutman 528af9684e Update common-c to fix scrolling issues 2015-06-25 21:54:39 -07:00
Cameron Gutman ff7a4ef190 Update common with better error messages 2015-06-25 00:11:09 -07:00
Cameron Gutman 99a2dbb956 Switch from deprecated UIAlertView to UIAlertController for pairing 2015-06-23 22:23:12 -07:00
Cameron Gutman 280341791a Use non-deprecated NSManagedObjectContext initializer 2015-06-23 22:09:08 -07:00
Cameron Gutman 1759565920 Removed supportedInterfaceOrientations since it didn't do anything and caused a warning on iOS 9 because the prototype seems to have changed 2015-06-23 22:01:59 -07:00
Cameron Gutman f57fa678f6 Escaping the URL strings is not required because no reserved characters are ever sent. Plus it's deprecated in iOS 9. 2015-06-23 21:58:32 -07:00
Cameron Gutman f8b5b16109 Create alert dialogs on the main thread 2015-06-23 21:46:58 -07:00
Cameron Gutman 005a678089 Disable App Transport Security since we need to make requests over HTTP and HTTPS to servers with self-signed certificates 2015-06-20 13:11:49 -07:00
Cameron Gutman 315dd53dcb Disable bitcode until native libraries are rebuilt for it 2015-06-20 13:06:02 -07:00
Cameron Gutman bb24495b3f Warning fix (char* -> const char*) 2015-06-19 20:53:14 -07:00
Cameron Gutman b9f2764990 Update common 2015-06-17 23:48:58 -07:00
Cameron Gutman a9a00629b1 Use API 1.1 common in preparation for IPv6 requirement 2015-06-17 23:32:00 -07:00
Diego Waxemberg 1223a9013f updated libopus and Opus build scrips 2015-06-01 22:25:56 -07:00
Diego Waxemberg ab019eef0f got rid of dumb compiler warnings 2015-06-01 00:36:21 -07:00
Diego Waxemberg 20f82ff739 updated project to Moonlight and created build 0.9.1 2015-05-31 23:57:47 -07:00
Diego Waxemberg 4d55a6a7e9 missed a file in earlier commit, this actually fixes the on screen control issues 2015-05-31 23:57:04 -07:00
Cameron Gutman d7ec41d56e Fix a controller batching bug 2015-06-01 01:30:18 -05:00
Diego Waxemberg a6a1929a43 updated icons to have different resolutions and fixed layout for smaller iPhones 2015-05-31 23:22:20 -07:00
Cameron Gutman 722850ceb6 Fix mouse batching bug 2015-05-29 16:42:00 -05:00
Diego Waxemberg 5a976764c3 now use custom edge swipe detection 2015-05-29 00:46:43 -07:00
Diego Waxemberg f90becb2f6 no longer try to parse responses when a network error occurs 2015-05-29 00:15:48 -07:00
Diego Waxemberg 5296b2eb39 now stop app asset requests before attempting to start a stream 2015-05-28 23:47:30 -07:00
Diego Waxemberg 987a30e15f updated style for moonlight 2015-05-28 23:39:13 -07:00
Diego Waxemberg 0880c3639c Merge branch 'master' of github.com:limelight-stream/limelight-ios 2015-05-28 23:38:09 -07:00
Diego Waxemberg 2972d40d92 added limit to app asset request 2015-05-28 23:37:55 -07:00
Cameron Gutman c4430ef18d Use the new optimizations added to common-c 2015-05-28 15:17:37 -05:00
Cameron Gutman 6b97af13bf Update common-c and remove unused callbacks 2015-05-13 23:13:20 -05:00
Cameron Gutman cd18ca64bb Fix build of tests and a warning in the main app 2015-05-13 23:07:05 -05:00
Diego Waxemberg d3c6302681 bumping common 2015-05-12 21:54:00 -04:00
Diego Waxemberg 58bd3cc706 Merge branch 'master' of github.com:limelight-stream/limelight-ios 2015-05-12 21:49:31 -04:00
Diego Waxemberg 8d3401f962 Changed name from Limelight to Moonlight due to C&D from Limelight
Networks, Inc.
2015-05-12 21:48:30 -04:00
Cameron Gutman dfc86015bd Renaming projects to Moonlight 2015-04-21 21:43:57 -04:00
454 changed files with 38173 additions and 25848 deletions
+8
View File
@@ -0,0 +1,8 @@
# ProBot No Response (https://probot.github.io/apps/no-response/)
daysUntilClose: 7
responseRequiredLabel: 'need more info'
closeComment: >
This issue has been automatically closed because there was no response to a
request for more information from the issue opener. Please leave a comment or
open a new issue if you have additional information related to this issue.
+14
View File
@@ -0,0 +1,14 @@
# ProBot Stale (https://probot.github.io/apps/stale/)
daysUntilStale: 90
daysUntilClose: 7
exemptLabels:
- accepted
- bug
- enhancement
- meta
staleLabel: stale
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
closeComment: false
+2
View File
@@ -1,2 +1,4 @@
**/xcuserdata/
**/Moonlight.xcscmblueprint
Build
DerivedData
+3 -3
View File
@@ -1,3 +1,3 @@
[submodule "limelight-common-c"]
path = limelight-common-c
url = git@github.com:limelight-stream/limelight-common-c.git
[submodule "moonlight-common/moonlight-common-c"]
path = moonlight-common/moonlight-common-c
url = https://github.com/moonlight-stream/moonlight-common-c.git
+27 -11
View File
@@ -31,43 +31,44 @@ do
exit 1
fi
echo "Compiling source for $ARCH in directory $OPUS_DIR"
echo "cd $OPUS_DIR"
cd $OPUS_DIR
DIST_DIR=$DIST_DIR_BASE-$ARCH
echo "mkdir -p $DIST_DIR"
mkdir -p $DIST_DIR
CFLAGS_ARCH=$ARCH
case $ARCH in
armv7)
EXTRA_FLAGS="--with-pic --enable-fixed-point"
EXTRA_CFLAGS="-mcpu=cortex-a8 -mfpu=neon"
EXTRA_CFLAGS="-mcpu=cortex-a8 -mfpu=neon -miphoneos-version-min=7.1"
PLATFORM="${PLATFORMBASE}/iPhoneOS.platform"
IOSSDK=iPhoneOS${IOSSDK_VER}
IOSSDK=iPhoneOS
;;
armv7s)
EXTRA_FLAGS="--with-pic --enable-fixed-point"
EXTRA_CFLAGS="-mcpu=cortex-a9 -mfpu=neon -miphoneos-version-min=6.0"
EXTRA_CFLAGS="-mcpu=cortex-a9 -mfpu=neon -miphoneos-version-min=7.1"
PLATFORM="${PLATFORMBASE}/iPhoneOS.platform"
IOSSDK=iPhoneOS${IOSSDK_VER}
IOSSDK=iPhoneOS
;;
aarch64)
CFLAGS_ARCH="arm64"
EXTRA_FLAGS="--with-pic --enable-fixed-point"
EXTRA_CFLAGS="-miphoneos-version-min=7.1"
PLATFORM="${PLATFORMBASE}/iPhoneOS.platform"
IOSSDK=iPhoneOS${IOSSDK_VER}
IOSSDK=iPhoneOS
;;
x86_64)
EXTRA_FLAGS="--with-pic"
EXTRA_CFLAGS="-miphoneos-version-min=7.1"
PLATFORM="${PLATFORMBASE}/iPhoneSimulator.platform"
IOSSDK=iPhoneSimulator${IOSSDK_VER}
IOSSDK=iPhoneSimulator
;;
i386)
EXTRA_FLAGS="--with-pic"
EXTRA_CFLAGS="-miphoneos-version-min=7.1"
PLATFORM="${PLATFORMBASE}/iPhoneSimulator.platform"
IOSSDK=iPhoneSimulator${IOSSDK_VER}
IOSSDK=iPhoneSimulator
;;
*)
echo "Unsupported architecture ${ARCH}"
@@ -76,7 +77,7 @@ do
esac
echo "Configuring opus for $ARCH..."
echo "./autogen.sh"
./autogen.sh
CFLAGS="-g -O2 -pipe -arch ${CFLAGS_ARCH} \
@@ -86,7 +87,10 @@ do
LDFLAGS="-arch ${CFLAGS_ARCH} \
-isysroot ${PLATFORM}/Developer/SDKs/${IOSSDK}.sdk \
-L${PLATFORM}/Developer/SDKs/${IOSSDK}.sdk/usr/lib"
echo "CFLAGS=$CFLAGS"
echo "LDFLAGS=$LDFLAGS"
export CFLAGS
export LDFLAGS
@@ -100,7 +104,15 @@ do
export NM="/usr/bin/nm"
export RANLIB="/usr/bin/ranlib"
export STRIP="/usr/bin/strip"
echo "./configure \
--prefix=$DIST_DIR \
--host=${ARCH}-apple-darwin \
--with-sysroot=${PLATFORM}/Developer/SDKs/${IOSSDK}.sdk \
--enable-static=yes \
--enable-shared=no \
--disable-doc \
${EXTRA_FLAGS}"
./configure \
--prefix=$DIST_DIR \
--host=${ARCH}-apple-darwin \
@@ -111,10 +123,14 @@ do
${EXTRA_FLAGS}
echo "Installing opus for $ARCH..."
echo "make clean"
make clean
echo "make -j$NJOB V=1"
make -j$NJOB V=1
echo "make install"
make install
echo "cd $SCRIPT_DIR"
cd $SCRIPT_DIR
if [ -d $DIST_DIR/bin ]
-1
View File
@@ -7,7 +7,6 @@ source config.sh
SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
DIST_DIR_BASE=${DIST_DIR_BASE:="$SCRIPT_DIR/dist"}
git submodule update --init opus
cd opus
git checkout master
git pull origin master
Binary file not shown.
+41 -31
View File
@@ -1,41 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="14C81f" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A279b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2014 Limelight Stream. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="22" y="439" width="437" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.070588235294117646" green="0.45490196078431372" blue="0.074509803921568626" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<variation key="widthClass=compact">
<fontDescription key="fontDescription" type="system" pointSize="11"/>
</variation>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Limelight Flat Design Banner" translatesAutoresizingMaskIntoConstraints="NO" id="lr8-1h-ydW">
<rect key="frame" x="-8" y="115" width="496" height="251"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="centerY" secondItem="lr8-1h-ydW" secondAttribute="centerY" id="C8A-9E-cM6"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Gnz-uJ-CDw"/>
<constraint firstAttribute="centerX" secondItem="lr8-1h-ydW" secondAttribute="centerX" id="WCv-Cd-TyR"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="404" y="445"/>
</view>
<navigationController id="vV9-32-ww6">
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="y2P-aE-Haa">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
<color key="barTintColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</navigationBar>
<viewControllers>
<viewController id="l6V-ue-5Om">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="rEZ-vx-akr"/>
<viewControllerLayoutGuide type="bottom" id="gBD-cy-cth"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="6lF-fc-kpK">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="rW0-BH-s7l">
<barButtonItem key="leftBarButtonItem" enabled="NO" id="d9R-Zo-Uml">
<button key="customView" opaque="NO" contentMode="center" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" id="9JC-B5-BAE">
<rect key="frame" x="20" y="-1" width="109" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title="Moonlight" image="Logo">
<color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</state>
<variation key="widthClass=regular" preservesSuperviewLayoutMargins="NO"/>
</button>
</barButtonItem>
</navigationItem>
</viewController>
</viewControllers>
</navigationController>
</objects>
<resources>
<image name="Limelight Flat Design Banner" width="496" height="251"/>
<image name="Logo" width="32" height="32"/>
</resources>
</document>
-18
View File
@@ -1,18 +0,0 @@
//
// App.h
// Limelight
//
// Created by Diego Waxemberg on 10/22/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface App : NSObject
@property NSString* appId;
@property NSString* appName;
@property UIImage* appImage;
@property BOOL isRunning;
@end
-15
View File
@@ -1,15 +0,0 @@
//
// App.m
// Limelight
//
// Created by Diego Waxemberg on 10/22/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
//
#import "App.h"
#import "HttpManager.h"
@implementation App
@synthesize appId, appName, appImage, isRunning;
@end
+13
View File
@@ -0,0 +1,13 @@
//
// AppCollectionView.h
// Moonlight
//
// Created by Diego Waxemberg on 9/30/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppCollectionView : UICollectionView
@end
+28
View File
@@ -0,0 +1,28 @@
//
// AppCollectionView.m
// Moonlight
//
// Created by Diego Waxemberg on 9/30/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import "AppCollectionView.h"
@implementation AppCollectionView
- (BOOL)touchesShouldCancelInContentView:(UIView *)view {
if ([view isKindOfClass:[UIButton class]]) {
return YES;
}
return [super touchesShouldCancelInContentView:view];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
+10 -2
View File
@@ -1,16 +1,24 @@
//
// AppDelegate.h
// Limelight-iOS
// Moonlight
//
// Created by Diego Waxemberg on 1/17/14.
// Copyright (c) 2014 Diego Waxemberg. All rights reserved.
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
//
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
#else
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (readonly, strong) NSPersistentContainer *persistentContainer;
@property (strong, nonatomic) NSWindow *window;
#endif
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
+105 -69
View File
@@ -1,9 +1,9 @@
//
// AppDelegate.m
// Limelight-iOS
// Moonlight
//
// Created by Diego Waxemberg on 1/17/14.
// Copyright (c) 2014 Diego Waxemberg. All rights reserved.
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
//
#import "AppDelegate.h"
@@ -16,35 +16,17 @@
static NSOperationQueue* mainQueue;
#if TARGET_OS_TV
static NSString* DB_NAME = @"Moonlight_tvOS.bin";
#elif TARGET_OS_IPHONE
static NSString* DB_NAME = @"Limelight_iOS.sqlite";
#else
static NSString* DB_NAME = @"moonlight_mac.sqlite";
#endif
#if TARGET_OS_IPHONE
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UILabel appearance] setFont:[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]]];
[[UIButton appearance].titleLabel setFont:[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]]];
// Generate selected segment background image
CGSize borderImageSize = CGSizeMake(1.f, 100.f);
UIGraphicsBeginImageContext(borderImageSize);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(context, [UIColor whiteColor].CGColor);
CGContextFillRect(context, CGRectMake(0.f, borderImageSize.height * 0.8, borderImageSize.width, borderImageSize.height));
UIImage *selectedSegmentBG = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
// Clear default border and background color
[[UISegmentedControl appearance] setBackgroundImage:[[UIImage alloc] init] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UISegmentedControl appearance] setDividerImage:[[UIImage alloc] init] forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// Set selected segment background image
[[UISegmentedControl appearance] setBackgroundImage:[selectedSegmentBG imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
// Change font on UISegmentedControl
[[UISegmentedControl appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], NSForegroundColorAttributeName,
[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]], NSFontAttributeName, nil] forState:UIControlStateNormal];
return YES;
}
@@ -57,7 +39,7 @@ static NSOperationQueue* mainQueue;
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
@@ -76,18 +58,36 @@ static NSOperationQueue* mainQueue;
// Saves changes in the application's managed object context before the application terminates.
[self saveContext];
}
#else
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
}
- (void)applicationWillTerminate:(NSNotification *)aNotification {
// Insert code here to tear down your application
[self saveContext];
}
#endif
- (void)saveContext
{
NSError *error = nil;
NSManagedObjectContext *managedObjectContext = self.managedObjectContext;
NSManagedObjectContext *managedObjectContext = [self managedObjectContext];
if (managedObjectContext != nil) {
if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) {
// Replace this implementation with code to handle the error appropriately.
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
Log(LOG_E, @"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
[managedObjectContext performBlock:^{
if (![managedObjectContext hasChanges]) {
return;
}
NSError *error = nil;
if (![managedObjectContext save:&error]) {
Log(LOG_E, @"Critical database error: %@, %@", error, [error userInfo]);
}
#if TARGET_OS_TV
NSData* dbData = [NSData dataWithContentsOfURL:[[[[NSFileManager defaultManager] URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask] lastObject] URLByAppendingPathComponent:DB_NAME]];
[[NSUserDefaults standardUserDefaults] setObject:dbData forKey:DB_NAME];
#endif
}];
}
}
@@ -103,7 +103,7 @@ static NSOperationQueue* mainQueue;
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
if (coordinator != nil) {
_managedObjectContext = [[NSManagedObjectContext alloc] init];
_managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
[_managedObjectContext setPersistentStoreCoordinator:coordinator];
}
return _managedObjectContext;
@@ -128,40 +128,34 @@ static NSOperationQueue* mainQueue;
return _persistentStoreCoordinator;
}
NSURL *storeURL = [self getStoreURL];
NSError *error = nil;
_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
[NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error]) {
/*
Replace this implementation with code to handle the error appropriately.
abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
Typical reasons for an error here include:
* The persistent store is not accessible;
* The schema for the persistent store is incompatible with current managed object model.
Check the error message to determine what the actual problem was.
If the persistent store is not accessible, there is typically something wrong with the file path. Often, a file URL is pointing into the application's resources directory instead of a writeable directory.
If you encounter schema incompatibility errors during development, you can reduce their frequency by:
* Simply deleting the existing store:
[[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil]
* Performing automatic lightweight migration by passing the following dictionary as the options parameter:
@{NSMigratePersistentStoresAutomaticallyOption:@YES, NSInferMappingModelAutomaticallyOption:@YES}
Lightweight migration will only work for a limited set of schema changes; consult "Core Data Model Versioning and Data Migration Programming Guide" for details.
*/
Log(LOG_E, @"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
NSString* storeType;
#if TARGET_OS_TV
// Use a binary store for tvOS since we will need exclusive access to the file
// to serialize into NSUserDefaults.
storeType = NSBinaryStoreType;
#else
storeType = NSSQLiteStoreType;
#endif
// We must ensure the persistent store is ready to opened
[self preparePersistentStore];
if (![_persistentStoreCoordinator addPersistentStoreWithType:storeType configuration:nil URL:[self getStoreURL] options:options error:&error]) {
// Log the error
Log(LOG_E, @"Critical database error: %@, %@", error, [error userInfo]);
// Drop the database
[self dropDatabase];
// Try again
return [self persistentStoreCoordinator];
}
return _persistentStoreCoordinator;
}
@@ -174,8 +168,50 @@ static NSOperationQueue* mainQueue;
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
- (void) dropDatabase
{
// Delete the file on disk
[[NSFileManager defaultManager] removeItemAtURL:[self getStoreURL] error:nil];
#if TARGET_OS_TV
// Also delete the copy in the NSUserDefaults on tvOS
[[NSUserDefaults standardUserDefaults] removeObjectForKey:DB_NAME];
#endif
}
- (void) preparePersistentStore
{
#if TARGET_OS_TV
// On tvOS, we may need to inflate the DB from NSUserDefaults
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *cacheDirectory = [paths objectAtIndex:0];
NSString *dbPath = [cacheDirectory stringByAppendingPathComponent:DB_NAME];
// Always prefer the on disk version
if (![[NSFileManager defaultManager] fileExistsAtPath:dbPath]) {
// If that is unavailable, inflate it from NSUserDefaults
NSData* data = [[NSUserDefaults standardUserDefaults] dataForKey:DB_NAME];
if (data != nil) {
Log(LOG_I, @"Inflating database from NSUserDefaults");
[data writeToFile:dbPath atomically:YES];
}
else {
Log(LOG_I, @"No database on disk or in NSUserDefaults");
}
}
else {
Log(LOG_I, @"Using cached database");
}
#endif
}
- (NSURL*) getStoreURL {
return [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Limelight_iOS.sqlite"];
#if TARGET_OS_TV
// We use the cache folder to store our database on tvOS
return [[[[NSFileManager defaultManager] URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask] lastObject] URLByAppendingPathComponent:DB_NAME];
#else
return [[self applicationDocumentsDirectory] URLByAppendingPathComponent:DB_NAME];
#endif
}
@end
+13
View File
@@ -0,0 +1,13 @@
//
// ComputerScrollView.h
// Moonlight
//
// Created by Diego Waxemberg on 9/30/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ComputerScrollView : UIScrollView
@end
+28
View File
@@ -0,0 +1,28 @@
//
// ComputerScrollView.m
// Moonlight
//
// Created by Diego Waxemberg on 9/30/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import "ComputerScrollView.h"
@implementation ComputerScrollView
- (BOOL)touchesShouldCancelInContentView:(UIView *)view {
if ([view isKindOfClass:[UIButton class]]) {
return YES;
}
return [super touchesShouldCancelInContentView:view];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
+7 -7
View File
@@ -1,24 +1,24 @@
//
// CryptoManager.h
// Limelight
// Moonlight
//
// Created by Diego Waxemberg on 10/14/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CryptoManager : NSObject
+ (void) generateKeyPairUsingSSl;
+ (NSString*) getUniqueID;
+ (void) generateKeyPairUsingSSL;
+ (NSData*) readCertFromFile;
+ (NSData*) readKeyFromFile;
+ (NSData*) readP12FromFile;
+ (NSData*) getSignatureFromCert:(NSData*)cert;
+ (NSData*) pemToDer:(NSData*)pemCertBytes;
- (NSData*) createAESKeyFromSalt:(NSData*)saltedPIN;
- (NSData*) createAESKeyFromSaltSHA1:(NSData*)saltedPIN;
- (NSData*) createAESKeyFromSaltSHA256:(NSData*)saltedPIN;
- (NSData*) SHA1HashData:(NSData*)data;
- (NSData*) SHA256HashData:(NSData*)data;
- (NSData*) aesEncrypt:(NSData*)data withKey:(NSData*)key;
- (NSData*) aesDecrypt:(NSData*)data withKey:(NSData*)key;
- (bool) verifySignature:(NSData *)data withSignature:(NSData*)signature andCert:(NSData*)cert;
+115 -64
View File
@@ -1,14 +1,13 @@
//
// CryptoManager.m
// Limelight
// Moonlight
//
// Created by Diego Waxemberg on 10/14/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
//
#import "CryptoManager.h"
#import "mkcert.h"
#import <AdSupport/ASIdentifierManager.h>
#include <openssl/aes.h>
#include <openssl/sha.h>
@@ -17,19 +16,31 @@
#include <openssl/evp.h>
@implementation CryptoManager
static const int SHA1_DIGEST_LENGTH = 20;
static const int SHA1_HASH_LENGTH = 20;
static const int SHA256_HASH_LENGTH = 32;
static NSData* key = nil;
static NSData* cert = nil;
static NSData* p12 = nil;
- (NSData*) createAESKeyFromSalt:(NSData*)saltedPIN {
- (NSData*) createAESKeyFromSaltSHA1:(NSData*)saltedPIN {
return [[self SHA1HashData:saltedPIN] subdataWithRange:NSMakeRange(0, 16)];
}
- (NSData*) createAESKeyFromSaltSHA256:(NSData*)saltedPIN {
return [[self SHA256HashData:saltedPIN] subdataWithRange:NSMakeRange(0, 16)];
}
- (NSData*) SHA1HashData:(NSData*)data {
unsigned char sha1[SHA1_DIGEST_LENGTH];
unsigned char sha1[SHA1_HASH_LENGTH];
SHA1([data bytes], [data length], sha1);
NSData* bytes = [NSData dataWithBytes:sha1 length:20];
NSData* bytes = [NSData dataWithBytes:sha1 length:sizeof(sha1)];
return bytes;
}
- (NSData*) SHA256HashData:(NSData*)data {
unsigned char sha256[SHA256_HASH_LENGTH];
SHA256([data bytes], [data length], sha256);
NSData* bytes = [NSData dataWithBytes:sha256 length:sizeof(sha256)];
return bytes;
}
@@ -76,11 +87,28 @@ static NSData* p12 = nil;
return (((int)[data length] + 15) / 16) * 16;
}
- (bool) verifySignature:(NSData *)data withSignature:(NSData*)signature andCert:(NSData*)cert {
const char* buffer = [cert bytes];
+ (NSData*) pemToDer:(NSData*)pemCertBytes {
X509* x509;
BIO* bio = BIO_new(BIO_s_mem());
BIO_puts(bio, buffer);
BIO* bio = BIO_new_mem_buf([pemCertBytes bytes], (int)[pemCertBytes length]);
x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
BIO_free(bio);
bio = BIO_new(BIO_s_mem());
i2d_X509_bio(bio, x509);
BUF_MEM* mem;
BIO_get_mem_ptr(bio, &mem);
NSData* ret = [[NSData alloc] initWithBytes:mem->data length:mem->length];
BIO_free(bio);
return ret;
}
- (bool) verifySignature:(NSData *)data withSignature:(NSData*)signature andCert:(NSData*)cert {
X509* x509;
BIO* bio = BIO_new_mem_buf([cert bytes], (int)[cert length]);
x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
BIO_free(bio);
@@ -105,9 +133,7 @@ static NSData* p12 = nil;
}
- (NSData *)signData:(NSData *)data withKey:(NSData *)key {
const char* buffer = [key bytes];
BIO* bio = BIO_new(BIO_s_mem());
BIO_puts(bio, buffer);
BIO* bio = BIO_new_mem_buf([key bytes], (int)[key length]);
EVP_PKEY* pkey;
pkey = PEM_read_bio_PrivateKey(bio, NULL, NULL, NULL);
@@ -142,57 +168,60 @@ static NSData* p12 = nil;
return signedData;
}
// TODO: these three methods are almost identical, fix the copy-pasta
+ (NSData*) readCryptoObject:(NSString*)item {
#if TARGET_OS_TV
return [[NSUserDefaults standardUserDefaults] dataForKey:item];
#else
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *file = [documentsDirectory stringByAppendingPathComponent:item];
return [NSData dataWithContentsOfFile:file];
#endif
}
+ (void) writeCryptoObject:(NSString*)item data:(NSData*)data {
#if TARGET_OS_TV
[[NSUserDefaults standardUserDefaults] setObject:data forKey:item];
#else
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *file = [documentsDirectory stringByAppendingPathComponent:item];
[data writeToFile:file atomically:NO];
#endif
}
+ (NSData*) readCertFromFile {
if (cert == nil) {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *certFile = [documentsDirectory stringByAppendingPathComponent:@"client.crt"];
cert = [NSData dataWithContentsOfFile:certFile];
cert = [CryptoManager readCryptoObject:@"client.crt"];
}
return cert;
}
+ (NSData*) readP12FromFile {
if (p12 == nil) {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *p12File = [documentsDirectory stringByAppendingPathComponent:@"client.p12"];
p12 = [NSData dataWithContentsOfFile:p12File];
p12 = [CryptoManager readCryptoObject:@"client.p12"];
}
return p12;
}
+ (NSData*) readKeyFromFile {
if (key == nil) {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *keyFile = [documentsDirectory stringByAppendingPathComponent:@"client.key"];
key = [NSData dataWithContentsOfFile:keyFile];
key = [CryptoManager readCryptoObject:@"client.key"];
}
return key;
}
+ (bool) keyPairExists {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *keyFile = [documentsDirectory stringByAppendingPathComponent:@"client.key"];
NSString *p12File = [documentsDirectory stringByAppendingPathComponent:@"client.p12"];
NSString *certFile = [documentsDirectory stringByAppendingPathComponent:@"client.crt"];
bool keyFileExists = [[NSFileManager defaultManager] fileExistsAtPath:keyFile];
bool p12FileExists = [[NSFileManager defaultManager] fileExistsAtPath:p12File];
bool certFileExists = [[NSFileManager defaultManager] fileExistsAtPath:certFile];
bool keyFileExists = [CryptoManager readCryptoObject:@"client.key"] != nil;
bool p12FileExists = [CryptoManager readCryptoObject:@"client.p12"] != nil;
bool certFileExists = [CryptoManager readCryptoObject:@"client.crt"] != nil;
return keyFileExists && p12FileExists && certFileExists;
}
+ (NSData *)getSignatureFromCert:(NSData *)cert {
const char* buffer = [cert bytes];
X509* x509;
BIO* bio = BIO_new(BIO_s_mem());
BIO_puts(bio, buffer);
x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
BIO* bio = BIO_new_mem_buf([cert bytes], (int)[cert length]);
X509* x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
if (!x509) {
Log(LOG_E, @"Unable to parse certificate in memory!");
@@ -201,40 +230,62 @@ static NSData* p12 = nil;
return [NSData dataWithBytes:x509->signature->data length:x509->signature->length];
}
+ (void) generateKeyPairUsingSSl {
+ (NSData*)getKeyFromCertKeyPair:(CertKeyPair*)certKeyPair {
BIO* bio = BIO_new(BIO_s_mem());
PEM_write_bio_PrivateKey(bio, certKeyPair->pkey, NULL, NULL, 0, NULL, NULL);
BUF_MEM* mem;
BIO_get_mem_ptr(bio, &mem);
NSData* data = [NSData dataWithBytes:mem->data length:mem->length];
BIO_free(bio);
return data;
}
+ (NSData*)getP12FromCertKeyPair:(CertKeyPair*)certKeyPair {
BIO* bio = BIO_new(BIO_s_mem());
i2d_PKCS12_bio(bio, certKeyPair->p12);
BUF_MEM* mem;
BIO_get_mem_ptr(bio, &mem);
NSData* data = [NSData dataWithBytes:mem->data length:mem->length];
BIO_free(bio);
return data;
}
+ (NSData*)getCertFromCertKeyPair:(CertKeyPair*)certKeyPair {
BIO* bio = BIO_new(BIO_s_mem());
PEM_write_bio_X509(bio, certKeyPair->x509);
BUF_MEM* mem;
BIO_get_mem_ptr(bio, &mem);
NSData* data = [NSData dataWithBytes:mem->data length:mem->length];
BIO_free(bio);
return data;
}
+ (void) generateKeyPairUsingSSL {
static dispatch_once_t pred;
dispatch_once(&pred, ^{
if (![CryptoManager keyPairExists]) {
Log(LOG_I, @"Generating Certificate... ");
CertKeyPair certKeyPair = generateCertKeyPair();
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* documentsDirectory = [paths objectAtIndex:0];
NSString* certFile = [documentsDirectory stringByAppendingPathComponent:@"client.crt"];
NSString* keyPairFile = [documentsDirectory stringByAppendingPathComponent:@"client.key"];
NSString* p12File = [documentsDirectory stringByAppendingPathComponent:@"client.p12"];
NSData* certData = [CryptoManager getCertFromCertKeyPair:&certKeyPair];
NSData* p12Data = [CryptoManager getP12FromCertKeyPair:&certKeyPair];
NSData* keyData = [CryptoManager getKeyFromCertKeyPair:&certKeyPair];
//Log(LOG_D, @"Writing cert and key to: \n%@\n%@", certFile, keyPairFile);
saveCertKeyPair([certFile UTF8String], [p12File UTF8String], [keyPairFile UTF8String], certKeyPair);
freeCertKeyPair(certKeyPair);
[CryptoManager writeCryptoObject:@"client.crt" data:certData];
[CryptoManager writeCryptoObject:@"client.p12" data:p12Data];
[CryptoManager writeCryptoObject:@"client.key" data:keyData];
Log(LOG_I, @"Certificate created");
}
});
}
+ (NSString*) getUniqueID {
// generate a UUID
NSUUID* uuid = [ASIdentifierManager sharedManager].advertisingIdentifier;
NSString* idString = [NSString stringWithString:[uuid UUIDString]];
// we need a 16byte hex-string so we take the last 17 characters
// and remove the '-' to get a 16 character string
NSMutableString* uniqueId = [NSMutableString stringWithString:[idString substringFromIndex:19]];
[uniqueId deleteCharactersInRange:NSMakeRange(4, 1)];
//Log(LOG_D, @"Unique ID: %@", uniqueId);
return [NSString stringWithString:uniqueId];
}
@end
+13
View File
@@ -0,0 +1,13 @@
//
// IdManager.h
// Moonlight
//
// Created by Diego Waxemberg on 10/31/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
@interface IdManager : NSObject
+ (NSString*) getUniqueId;
@end
+32
View File
@@ -0,0 +1,32 @@
//
// IdManager.m
// Moonlight
//
// Created by Diego Waxemberg on 10/31/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import "IdManager.h"
#import "DataManager.h"
@implementation IdManager
+ (NSString*) getUniqueId {
DataManager* dataMan = [[DataManager alloc] init];
NSString* uniqueId = [dataMan getUniqueId];
if (uniqueId == nil) {
uniqueId = [IdManager generateUniqueId];
[dataMan updateUniqueId:uniqueId];
Log(LOG_I, @"No UUID found. Generated new UUID: %@", uniqueId);
}
return uniqueId;
}
+ (NSString*) generateUniqueId {
UInt64 uuidLong = ((UInt64) arc4random() << 32) | arc4random();
return [NSString stringWithFormat:@"%016llx", uuidLong];
}
@end
+1 -18
View File
@@ -19,7 +19,7 @@ static const int NUM_YEARS = 10;
int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int years);
int add_ext(X509 *cert, int nid, char *value);
struct CertKeyPair generateCertKeyPair() {
struct CertKeyPair generateCertKeyPair(void) {
BIO *bio_err;
X509 *x509 = NULL;
EVP_PKEY *pkey = NULL;
@@ -62,21 +62,6 @@ void freeCertKeyPair(struct CertKeyPair certKeyPair) {
PKCS12_free(certKeyPair.p12);
}
void saveCertKeyPair(const char* certFile, const char* p12File, const char* keyPairFile, CertKeyPair certKeyPair) {
FILE* certFilePtr = fopen(certFile, "w");
FILE* keyPairFilePtr = fopen(keyPairFile, "w");
FILE* p12FilePtr = fopen(p12File, "wb");
//TODO: error check
PEM_write_PrivateKey(keyPairFilePtr, certKeyPair.pkey, NULL, NULL, 0, NULL, NULL);
PEM_write_X509(certFilePtr, certKeyPair.x509);
i2d_PKCS12_fp(p12FilePtr, certKeyPair.p12);
fclose(p12FilePtr);
fclose(certFilePtr);
fclose(keyPairFilePtr);
}
int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int years) {
X509 *x;
EVP_PKEY *pk;
@@ -85,7 +70,6 @@ int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int years) {
if (*pkeyp == NULL) {
if ((pk=EVP_PKEY_new()) == NULL) {
abort();
return(0);
}
} else {
@@ -102,7 +86,6 @@ int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int years) {
rsa = RSA_generate_key(bits, RSA_F4, NULL, NULL);
if (!EVP_PKEY_assign_RSA(pk, rsa)) {
abort();
goto err;
}
+3 -4
View File
@@ -1,9 +1,9 @@
//
// mkcert.h
// Limelight
// Moonlight
//
// Created by Diego Waxemberg on 10/16/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
//
#ifndef Limelight_mkcert_h
@@ -18,8 +18,7 @@ typedef struct CertKeyPair {
PKCS12 *p12;
} CertKeyPair;
struct CertKeyPair generateCertKeyPair();
struct CertKeyPair generateCertKeyPair(void);
void freeCertKeyPair(CertKeyPair);
void saveCertKeyPair(const char* certFile, const char* p12File, const char* keyPairFile, CertKeyPair certKeyPair);
#endif
+26 -12
View File
@@ -1,25 +1,39 @@
//
// DataManager.h
// Limelight
// Moonlight
//
// Created by Diego Waxemberg on 10/28/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Settings.h"
#import "AppDelegate.h"
#import "Host.h"
#import "TemporaryHost.h"
#import "TemporaryApp.h"
#import "TemporarySettings.h"
@interface DataManager : NSObject
@property (strong, nonatomic) AppDelegate* appDelegate;
- (void) saveSettingsWithBitrate:(NSInteger)bitrate
framerate:(NSInteger)framerate
height:(NSInteger)height
width:(NSInteger)width
onscreenControls:(NSInteger)onscreenControls
remote:(BOOL)streamingRemotely
optimizeGames:(BOOL)optimizeGames
multiController:(BOOL)multiController
audioOnPC:(BOOL)audioOnPC
useHevc:(BOOL)useHevc
enableHdr:(BOOL)enableHdr;
- (void) saveSettingsWithBitrate:(NSInteger)bitrate framerate:(NSInteger)framerate height:(NSInteger)height width:(NSInteger)width onscreenControls:(NSInteger)onscreenControls;
- (Settings*) retrieveSettings;
- (NSArray*) retrieveHosts;
- (void) saveHosts;
- (Host*) createHost;
- (void) removeHost:(Host*)host;
- (NSArray*) getHosts;
- (void) updateHost:(TemporaryHost*)host;
- (void) updateAppsForExistingHost:(TemporaryHost *)host;
- (void) removeHost:(TemporaryHost*)host;
- (void) removeApp:(TemporaryApp*)app;
- (TemporarySettings*) getSettings;
- (void) updateUniqueId:(NSString*)uniqueId;
- (NSString*) getUniqueId;
@end
+184 -34
View File
@@ -1,43 +1,149 @@
//
// DataManager.m
// Limelight
// Moonlight
//
// Created by Diego Waxemberg on 10/28/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
//
#import "DataManager.h"
#import "TemporaryApp.h"
#import "TemporarySettings.h"
@implementation DataManager
@implementation DataManager {
NSManagedObjectContext *_managedObjectContext;
AppDelegate *_appDelegate;
}
- (id) init {
self = [super init];
self.appDelegate = [[UIApplication sharedApplication] delegate];
// HACK: Avoid calling [UIApplication delegate] off the UI thread to keep
// Main Thread Checker happy.
if ([NSThread isMainThread]) {
_appDelegate = (AppDelegate *)[[OSApplication sharedApplication] delegate];
}
else {
dispatch_sync(dispatch_get_main_queue(), ^{
self->_appDelegate = (AppDelegate *)[[OSApplication sharedApplication] delegate];
});
}
_managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType];
[_managedObjectContext setParentContext:[_appDelegate managedObjectContext]];
return self;
}
- (void) saveSettingsWithBitrate:(NSInteger)bitrate framerate:(NSInteger)framerate height:(NSInteger)height width:(NSInteger)width onscreenControls:(NSInteger)onscreenControls {
Settings* settingsToSave = [self retrieveSettings];
settingsToSave.framerate = [NSNumber numberWithInteger:framerate];
// Bitrate is persisted in kbps
settingsToSave.bitrate = [NSNumber numberWithInteger:bitrate];
settingsToSave.height = [NSNumber numberWithInteger:height];
settingsToSave.width = [NSNumber numberWithInteger:width];
settingsToSave.onscreenControls = [NSNumber numberWithInteger:onscreenControls];
- (void) updateUniqueId:(NSString*)uniqueId {
[_managedObjectContext performBlockAndWait:^{
[self retrieveSettings].uniqueId = uniqueId;
[self saveData];
}];
}
NSError* error;
if (![[self.appDelegate managedObjectContext] save:&error]) {
Log(LOG_E, @"Unable to save settings to database: %@", error);
}
[self.appDelegate saveContext];
- (NSString*) getUniqueId {
__block NSString *uid;
[_managedObjectContext performBlockAndWait:^{
uid = [self retrieveSettings].uniqueId;
}];
return uid;
}
- (void) saveSettingsWithBitrate:(NSInteger)bitrate
framerate:(NSInteger)framerate
height:(NSInteger)height
width:(NSInteger)width
onscreenControls:(NSInteger)onscreenControls
remote:(BOOL)streamingRemotely
optimizeGames:(BOOL)optimizeGames
multiController:(BOOL)multiController
audioOnPC:(BOOL)audioOnPC
useHevc:(BOOL)useHevc
enableHdr:(BOOL)enableHdr {
[_managedObjectContext performBlockAndWait:^{
Settings* settingsToSave = [self retrieveSettings];
settingsToSave.framerate = [NSNumber numberWithInteger:framerate];
settingsToSave.bitrate = [NSNumber numberWithInteger:bitrate];
settingsToSave.height = [NSNumber numberWithInteger:height];
settingsToSave.width = [NSNumber numberWithInteger:width];
settingsToSave.onscreenControls = [NSNumber numberWithInteger:onscreenControls];
settingsToSave.streamingRemotely = streamingRemotely;
settingsToSave.optimizeGames = optimizeGames;
settingsToSave.multiController = multiController;
settingsToSave.playAudioOnPC = audioOnPC;
settingsToSave.useHevc = useHevc;
settingsToSave.enableHdr = enableHdr;
[self saveData];
}];
}
- (void) updateHost:(TemporaryHost *)host {
[_managedObjectContext performBlockAndWait:^{
// Add a new persistent managed object if one doesn't exist
Host* parent = [self getHostForTemporaryHost:host withHostRecords:[self fetchRecords:@"Host"]];
if (parent == nil) {
NSEntityDescription* entity = [NSEntityDescription entityForName:@"Host" inManagedObjectContext:self->_managedObjectContext];
parent = [[Host alloc] initWithEntity:entity insertIntoManagedObjectContext:self->_managedObjectContext];
}
// Push changes from the temp host to the persistent one
[host propagateChangesToParent:parent];
[self saveData];
}];
}
- (void) updateAppsForExistingHost:(TemporaryHost *)host {
[_managedObjectContext performBlockAndWait:^{
Host* parent = [self getHostForTemporaryHost:host withHostRecords:[self fetchRecords:@"Host"]];
if (parent == nil) {
// The host must exist to be updated
return;
}
NSMutableSet *applist = [[NSMutableSet alloc] init];
NSArray *appRecords = [self fetchRecords:@"App"];
for (TemporaryApp* app in host.appList) {
// Add a new persistent managed object if one doesn't exist
App* parentApp = [self getAppForTemporaryApp:app withAppRecords:appRecords];
if (parentApp == nil) {
NSEntityDescription* entity = [NSEntityDescription entityForName:@"App" inManagedObjectContext:self->_managedObjectContext];
parentApp = [[App alloc] initWithEntity:entity insertIntoManagedObjectContext:self->_managedObjectContext];
}
[app propagateChangesToParent:parentApp withHost:parent];
[applist addObject:parentApp];
}
parent.appList = applist;
[self saveData];
}];
}
- (TemporarySettings*) getSettings {
__block TemporarySettings *tempSettings;
[_managedObjectContext performBlockAndWait:^{
tempSettings = [[TemporarySettings alloc] initFromSettings:[self retrieveSettings]];
}];
return tempSettings;
}
- (Settings*) retrieveSettings {
NSArray* fetchedRecords = [self fetchRecords:@"Settings"];
if (fetchedRecords.count == 0) {
// create a new settings object with the default values
NSEntityDescription* entity = [NSEntityDescription entityForName:@"Settings" inManagedObjectContext:[self.appDelegate managedObjectContext]];
Settings* settings = [[Settings alloc] initWithEntity:entity insertIntoManagedObjectContext:[self.appDelegate managedObjectContext]];
NSEntityDescription* entity = [NSEntityDescription entityForName:@"Settings" inManagedObjectContext:_managedObjectContext];
Settings* settings = [[Settings alloc] initWithEntity:entity insertIntoManagedObjectContext:_managedObjectContext];
return settings;
} else {
@@ -46,40 +152,84 @@
}
}
- (Host*) createHost {
NSEntityDescription* entity = [NSEntityDescription entityForName:@"Host" inManagedObjectContext:[self.appDelegate managedObjectContext]];
Host* host = [[Host alloc] initWithEntity:entity insertIntoManagedObjectContext:[self.appDelegate managedObjectContext]];
return host;
- (void) removeApp:(TemporaryApp*)app {
[_managedObjectContext performBlockAndWait:^{
App* managedApp = [self getAppForTemporaryApp:app withAppRecords:[self fetchRecords:@"App"]];
if (managedApp != nil) {
[self->_managedObjectContext deleteObject:managedApp];
[self saveData];
}
}];
}
- (void) removeHost:(Host*)host {
[[self.appDelegate managedObjectContext] deleteObject:host];
- (void) removeHost:(TemporaryHost*)host {
[_managedObjectContext performBlockAndWait:^{
Host* managedHost = [self getHostForTemporaryHost:host withHostRecords:[self fetchRecords:@"Host"]];
if (managedHost != nil) {
[self->_managedObjectContext deleteObject:managedHost];
[self saveData];
}
}];
}
- (void) saveHosts {
- (void) saveData {
NSError* error;
if (![[self.appDelegate managedObjectContext] save:&error]) {
if ([_managedObjectContext hasChanges] && ![_managedObjectContext save:&error]) {
Log(LOG_E, @"Unable to save hosts to database: %@", error);
}
[self.appDelegate saveContext];
[_appDelegate saveContext];
}
- (NSArray*) retrieveHosts {
return [self fetchRecords:@"Host"];
- (NSArray*) getHosts {
__block NSMutableArray *tempHosts = [[NSMutableArray alloc] init];
[_managedObjectContext performBlockAndWait:^{
NSArray *hosts = [self fetchRecords:@"Host"];
for (Host* host in hosts) {
[tempHosts addObject:[[TemporaryHost alloc] initFromHost:host]];
}
}];
return tempHosts;
}
// Only call from within performBlockAndWait!!!
- (Host*) getHostForTemporaryHost:(TemporaryHost*)tempHost withHostRecords:(NSArray*)hosts {
for (Host* host in hosts) {
if ([tempHost.uuid isEqualToString:host.uuid]) {
return host;
}
}
return nil;
}
// Only call from within performBlockAndWait!!!
- (App*) getAppForTemporaryApp:(TemporaryApp*)tempApp withAppRecords:(NSArray*)apps {
for (App* app in apps) {
if ([app.id isEqualToString:tempApp.id] &&
[app.host.uuid isEqualToString:tempApp.host.uuid]) {
return app;
}
}
return nil;
}
- (NSArray*) fetchRecords:(NSString*)entityName {
NSArray* fetchedRecords;
NSFetchRequest* fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription* entity = [NSEntityDescription entityForName:entityName inManagedObjectContext:[self.appDelegate managedObjectContext]];
NSEntityDescription* entity = [NSEntityDescription entityForName:entityName inManagedObjectContext:_managedObjectContext];
[fetchRequest setEntity:entity];
[fetchRequest setAffectedStores:[NSArray arrayWithObjects:[[self.appDelegate persistentStoreCoordinator] persistentStoreForURL:[self.appDelegate getStoreURL]], nil]];
NSError* error;
NSArray* fetchedRecords = [[self.appDelegate managedObjectContext] executeFetchRequest:fetchRequest error:&error];
fetchedRecords = [_managedObjectContext executeFetchRequest:fetchRequest error:&error];
//TODO: handle errors
return fetchedRecords;
}
@end
-24
View File
@@ -1,24 +0,0 @@
//
// Host.h
// Limelight
//
// Created by Diego Waxemberg on 10/28/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import "Utils.h"
@interface Host : NSManagedObject
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * address;
@property (nonatomic, retain) NSString * localAddress;
@property (nonatomic, retain) NSString * externalAddress;
@property (nonatomic, retain) NSString * uuid;
@property (nonatomic, retain) NSString * mac;
@property (nonatomic) BOOL online;
@property (nonatomic) PairState pairState;
@end
-23
View File
@@ -1,23 +0,0 @@
//
// Host.m
// Limelight
//
// Created by Diego Waxemberg on 10/28/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
//
#import "Host.h"
@implementation Host
@dynamic name;
@dynamic address;
@dynamic localAddress;
@dynamic externalAddress;
@dynamic uuid;
@dynamic mac;
@dynamic pairState;
@synthesize online;
@end
-21
View File
@@ -1,21 +0,0 @@
//
// Settings.h
// Limelight
//
// Created by Diego Waxemberg on 10/28/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface Settings : NSManagedObject
@property (nonatomic, retain) NSNumber * bitrate;
@property (nonatomic, retain) NSNumber * framerate;
@property (nonatomic, retain) NSNumber * height;
@property (nonatomic, retain) NSNumber * width;
@property (nonatomic, retain) NSNumber * onscreenControls;
@end
-20
View File
@@ -1,20 +0,0 @@
//
// Settings.m
// Limelight
//
// Created by Diego Waxemberg on 10/28/14.
// Copyright (c) 2014 Limelight Stream. All rights reserved.
//
#import "Settings.h"
@implementation Settings
@dynamic bitrate;
@dynamic framerate;
@dynamic height;
@dynamic width;
@dynamic onscreenControls;
@end
+29
View File
@@ -0,0 +1,29 @@
//
// TemporaryApp.h
// Moonlight
//
// Created by Cameron Gutman on 9/30/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import "TemporaryHost.h"
#import "App+CoreDataClass.h"
@interface TemporaryApp : NSObject
@property (nullable, nonatomic, retain) NSString *id;
@property (nullable, nonatomic, retain) NSString *name;
@property (nonatomic) BOOL hdrSupported;
@property (nullable, nonatomic, retain) TemporaryHost *host;
NS_ASSUME_NONNULL_BEGIN
- (id) initFromApp:(App*)app withTempHost:(TemporaryHost*)tempHost;
- (NSComparisonResult)compareName:(TemporaryApp *)other;
- (void) propagateChangesToParent:(App*)parent withHost:(Host*)host;
NS_ASSUME_NONNULL_END
@end
+52
View File
@@ -0,0 +1,52 @@
//
// TemporaryApp.m
// Moonlight
//
// Created by Cameron Gutman on 9/30/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import "TemporaryApp.h"
@implementation TemporaryApp
- (id) initFromApp:(App*)app withTempHost:(TemporaryHost*)tempHost {
self = [self init];
self.id = app.id;
self.name = app.name;
self.hdrSupported = app.hdrSupported;
self.host = tempHost;
return self;
}
- (void) propagateChangesToParent:(App*)parent withHost:(Host*)host {
parent.id = self.id;
parent.name = self.name;
parent.hdrSupported = self.hdrSupported;
parent.host = host;
}
- (NSComparisonResult)compareName:(TemporaryApp *)other {
return [self.name caseInsensitiveCompare:other.name];
}
- (NSUInteger)hash {
return [self.host.uuid hash] * 31 + [self.id intValue];
}
- (BOOL)isEqual:(id)object {
if (self == object) {
return YES;
}
if (![object isKindOfClass:[App class]]) {
return NO;
}
return [self.host.uuid isEqualToString:((App*)object).host.uuid] &&
[self.id isEqualToString:((App*)object).id];
}
@end
+40
View File
@@ -0,0 +1,40 @@
//
// TemporaryHost.h
// Moonlight
//
// Created by Cameron Gutman on 12/1/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import "Utils.h"
#import "Host+CoreDataClass.h"
@interface TemporaryHost : NSObject
@property (nonatomic) BOOL online;
@property (nonatomic) PairState pairState;
@property (nonatomic, nullable) NSString * activeAddress;
@property (nonatomic, nullable) NSString * currentGame;
@property (nonatomic, nullable, retain) NSData *serverCert;
@property (nonatomic, nullable, retain) NSString *address;
@property (nonatomic, nullable, retain) NSString *externalAddress;
@property (nonatomic, nullable, retain) NSString *localAddress;
@property (nonatomic, nullable, retain) NSString *mac;
@property (nonatomic) int serverCodecModeSupport;
NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSString *uuid;
@property (nonatomic, retain) NSMutableSet *appList;
- (id) initFromHost:(Host*)host;
- (NSComparisonResult)compareName:(TemporaryHost *)other;
- (void) propagateChangesToParent:(Host*)host;
NS_ASSUME_NONNULL_END
@end
+95
View File
@@ -0,0 +1,95 @@
//
// TemporaryHost.m
// Moonlight
//
// Created by Cameron Gutman on 12/1/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import "DataManager.h"
#import "TemporaryHost.h"
#import "TemporaryApp.h"
@implementation TemporaryHost
- (id) init {
self = [super init];
self.appList = [[NSMutableSet alloc] init];
self.currentGame = @"0";
return self;
}
- (id) initFromHost:(Host*)host {
self = [self init];
self.address = host.address;
self.externalAddress = host.externalAddress;
self.localAddress = host.localAddress;
self.mac = host.mac;
self.name = host.name;
self.uuid = host.uuid;
self.serverCodecModeSupport = host.serverCodecModeSupport;
self.serverCert = host.serverCert;
// Ensure we don't use a stale cached pair state if we haven't pinned the cert yet
self.pairState = host.serverCert ? [host.pairState intValue] : PairStateUnpaired;
NSMutableSet *appList = [[NSMutableSet alloc] init];
for (App* app in host.appList) {
TemporaryApp *tempApp = [[TemporaryApp alloc] initFromApp:app withTempHost:self];
[appList addObject:tempApp];
}
self.appList = appList;
return self;
}
- (void) propagateChangesToParent:(Host*)parentHost {
// Avoid overwriting existing data with nil if
// we don't have everything populated in the temporary
// host.
if (self.address != nil) {
parentHost.address = self.address;
}
if (self.externalAddress != nil) {
parentHost.externalAddress = self.externalAddress;
}
if (self.localAddress != nil) {
parentHost.localAddress = self.localAddress;
}
if (self.mac != nil) {
parentHost.mac = self.mac;
}
if (self.serverCert != nil) {
parentHost.serverCert = self.serverCert;
}
parentHost.name = self.name;
parentHost.uuid = self.uuid;
parentHost.serverCodecModeSupport = self.serverCodecModeSupport;
parentHost.pairState = [NSNumber numberWithInt:self.pairState];
}
- (NSComparisonResult)compareName:(TemporaryHost *)other {
return [self.name caseInsensitiveCompare:other.name];
}
- (NSUInteger)hash {
return [self.uuid hash];
}
- (BOOL)isEqual:(id)object {
if (self == object) {
return YES;
}
if (![object isKindOfClass:[Host class]]) {
return NO;
}
return [self.uuid isEqualToString:((Host*)object).uuid];
}
@end
+30
View File
@@ -0,0 +1,30 @@
//
// TemporarySettings.h
// Moonlight
//
// Created by Cameron Gutman on 12/1/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import "Settings+CoreDataClass.h"
@interface TemporarySettings : NSObject
@property (nonatomic, retain) Settings * parent;
@property (nonatomic, retain) NSNumber * bitrate;
@property (nonatomic, retain) NSNumber * framerate;
@property (nonatomic, retain) NSNumber * height;
@property (nonatomic, retain) NSNumber * width;
@property (nonatomic, retain) NSNumber * onscreenControls;
@property (nonatomic, retain) NSString * uniqueId;
@property (nonatomic) BOOL streamingRemotely;
@property (nonatomic) BOOL useHevc;
@property (nonatomic) BOOL multiController;
@property (nonatomic) BOOL playAudioOnPC;
@property (nonatomic) BOOL optimizeGames;
@property (nonatomic) BOOL enableHdr;
- (id) initFromSettings:(Settings*)settings;
@end
+76
View File
@@ -0,0 +1,76 @@
//
// TemporarySettings.m
// Moonlight
//
// Created by Cameron Gutman on 12/1/15.
// Copyright © 2015 Moonlight Stream. All rights reserved.
//
#import "TemporarySettings.h"
#import "OnScreenControls.h"
@implementation TemporarySettings
- (id) initFromSettings:(Settings*)settings {
self = [self init];
self.parent = settings;
#if TARGET_OS_TV
NSInteger _bitrate = [[NSUserDefaults standardUserDefaults] integerForKey:@"bitrate"];
NSInteger _framerate = [[NSUserDefaults standardUserDefaults] integerForKey:@"framerate"];
if (_bitrate) {
self.bitrate = [NSNumber numberWithInteger:_bitrate];
} else {
self.bitrate = [NSNumber numberWithInteger:20000];
}
if (_framerate) {
self.framerate = [NSNumber numberWithInteger:_framerate];
} else {
self.framerate = [NSNumber numberWithInteger:60];
}
self.useHevc = [[NSUserDefaults standardUserDefaults] boolForKey:@"useHevc"] || NO;
self.playAudioOnPC = [[NSUserDefaults standardUserDefaults] boolForKey:@"audioOnPC"] || NO;
self.enableHdr = [[NSUserDefaults standardUserDefaults] boolForKey:@"enableHdr"] || NO;
self.optimizeGames = [[NSUserDefaults standardUserDefaults] boolForKey:@"optimizeGames"] || YES;
self.multiController = [[NSUserDefaults standardUserDefaults] boolForKey:@"multipleControllers"] || YES;
NSInteger _screenSize = [[NSUserDefaults standardUserDefaults] integerForKey:@"streamResolution"];
switch (_screenSize) {
case 0:
self.height = [NSNumber numberWithInteger:720];
self.width = [NSNumber numberWithInteger:1280];
break;
case 2:
self.height = [NSNumber numberWithInteger:2160];
self.width = [NSNumber numberWithInteger:3840];
break;
case 1:
default:
self.height = [NSNumber numberWithInteger:1080];
self.width = [NSNumber numberWithInteger:1920];
break;
}
self.onscreenControls = (NSInteger)OnScreenControlsLevelOff;
#else
self.bitrate = settings.bitrate;
self.framerate = settings.framerate;
self.height = settings.height;
self.width = settings.width;
self.useHevc = settings.useHevc;
self.playAudioOnPC = settings.playAudioOnPC;
self.enableHdr = settings.enableHdr;
self.optimizeGames = settings.optimizeGames;
self.multiController = settings.multiController;
self.onscreenControls = settings.onscreenControls;
#endif
self.uniqueId = settings.uniqueId;
self.streamingRemotely = settings.streamingRemotely;
return self;
}
@end
-203
View File
@@ -1,203 +0,0 @@
Font data copyright Google 2012
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5 -6
View File
@@ -2,18 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "a_button.png"
"filename" : "a_button_80x80@2x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "a_button-1.png"
"filename" : "a_button_120x120@3x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "a_button-2.png"
"scale" : "3x"
}
],
"info" : {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

@@ -2,79 +2,111 @@
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"size" : "29x29",
"scale" : "2x",
"filename" : "Icon-Small@2x.png"
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x",
"filename" : "Icon-Small@3x.png"
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x",
"filename" : "Icon-40@2x.png"
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x",
"filename" : "Icon-40@3x.png"
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x",
"filename" : "Icon-60@2x.png"
},
{
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"scale" : "3x",
"filename" : "Icon-60@3x.png"
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"size" : "29x29",
"scale" : "1x",
"filename" : "Icon-Small.png"
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x",
"filename" : "Icon-Small@2x.png"
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x-1.png",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x",
"filename" : "Icon-40.png"
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x",
"filename" : "Icon-40@2x.png"
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x-1.png",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x",
"filename" : "Icon-76.png"
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x",
"filename" : "Icon-76@2x.png"
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "1024x icon.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "makeappicon"
"author" : "xcode"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

+5 -6
View File
@@ -2,18 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "b_button.png"
"filename" : "b_button_80x80@2x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "b_button-1.png"
"filename" : "b_button_120x120@3x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "b_button-2.png"
"scale" : "3x"
}
],
"info" : {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

+6
View File
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -2,18 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "down.png"
"filename" : "down_61x75@2x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "down-1.png"
"filename" : "down_93x114@3x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "down-2.png"
"scale" : "3x"
}
],
"info" : {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 B

Before

Width:  |  Height:  |  Size: 455 B

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

+3 -3
View File
@@ -3,17 +3,17 @@
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "L1-1.png"
"filename" : "L1_40x40@1x.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "L1.png"
"filename" : "L1_80x80@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "L1-2.png"
"filename" : "L1_120x120@3x.png"
}
],
"info" : {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

+5 -6
View File
@@ -2,18 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "L2.png"
"filename" : "L2_60x60@1x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "L2-1.png"
"filename" : "L2_120x120@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "L2-2.png"
"scale" : "3x"
}
],
"info" : {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

+3 -3
View File
@@ -3,17 +3,17 @@
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "L3.png"
"filename" : "L3_80x80@1x.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "L3-1.png"
"filename" : "L3_160x160@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "L3-2.png"
"filename" : "L3_240x240@3x.png"
}
],
"info" : {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Some files were not shown because too many files have changed in this diff Show More