-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tvOS Support #549
tvOS Support #549
Conversation
…ons to be able to use "source" type elements to provide a list of source files.
…rame" natively using CADisplayLink.
…bed the shaders in the code.
…pportedInterfaceOrientations" instead of "UIInterfaceOrientation"
…pportedInterfaceOrientations" instead of "UIInterfaceOrientation"
# By Dominic Szablewski (19) and Dario Segura (2) # Via Dominic Szablewski * 'master' of github.com:phoboslab/Ejecta: (21 commits) Embed GL shaders in source; close phoboslab#444 Cosmetics: clean up Canvas Context creation Removed contentScale warning; see phoboslab#441 Removed obsolete section about architectures in README Compile for arm64 as well by default; new fat JSC lib Use NSData's base64 encoder for DataURIs Added support for gradient & pattern strokes; close phoboslab#455 Cosmetics -[ORIENTATION] Solves crash caused by Info.plist file using the "UISupportedInterfaceOrientations" key instead of "UIInterfaceOrientation" Fixed deprecations for GameCenter Fixed various deprecated stuff Removed deprecated volume property for Videos Update SocketRocket lib Added .playbackRate property for Audio; close phoboslab#388 Update Deployment Target to iOS 8 to silence launch screen warning Allow 3x retina scaling for iPhone6; fix phoboslab#453 Use XIB for launch screen; close phoboslab#420 Make xhr response and responseText enumerable; see phoboslab#448 Cosmetics Properly release WebGL extensions. See phoboslab#442 ...
* 'master' of github.com:TrompoGames/Ejecta: -[ORIENTATION] Solves crash caused by Info.plist file using the "UISupportedInterfaceOrientations" instead of "UIInterfaceOrientation"
# By Dominic Szablewski (8) and Dario Segura (2) # Via Dario Segura (4) and Dominic Szablewski (2) * 'master' of github.com:TrompoGames/Ejecta: Embed GL shaders in source; close phoboslab#444 Cosmetics: clean up Canvas Context creation Removed contentScale warning; see phoboslab#441 Removed obsolete section about architectures in README Compile for arm64 as well by default; new fat JSC lib Use NSData's base64 encoder for DataURIs Added support for gradient & pattern strokes; close phoboslab#455 Cosmetics -[ORIENTATION] Solves crash caused by Info.plist file using the "UISupportedInterfaceOrientations" key instead of "UIInterfaceOrientation" -[ORIENTATION] Solves crash caused by Info.plist file using the "UISupportedInterfaceOrientations" instead of "UIInterfaceOrientation" Conflicts: Ejecta.xcodeproj/project.pbxproj Source/Ejecta/EJCanvas/2D/EJGLProgram2D.h Source/Ejecta/EJSharedOpenGLContext.m
# By Dominic Szablewski (14) and finscn (1) # Via Dominic Szablewski * 'master' of github.com:phoboslab/Ejecta: Fix phoboslab#509 - make sure the final view render buffer is bound when resizing Fix phoboslab#514 - crash on failed IAP purchase Fix phoboslab#502 for WebGL Screen Canvas Fix phoboslab#498 - add 'target' property to touches Check if file exits before triggering image onload callback Cosmetics Resolve special paths for resources; close phoboslab#491 Fix phoboslab#502 - don't resize context when it doesn't yet have a framebuffer Silence warning for EJTexture return type Fix phoboslab#400 - cyclic reference of Canvas and CanvasContext Fix KeyInput delete; see phoboslab#484 Cosmetics Fix phoboslab#473 - Text Middle Baseline Calculation Update SRWebSocket.m Attempt to fix black screen on context creation; see phoboslab#462
…null to avoid crash.
# By Dominic Szablewski (3) and Michael Cornell (1) # Via Dominic Szablewski * 'master' of github.com:phoboslab/Ejecta: Return empty string when we have no response headers; fix phoboslab#533 Allow sending array buffers for XMLHttpRequest; close phoboslab#531 support EJJavascriptViews placed inside of XIBs of other view controllers Assume local files requested with XHR are UTF8; close phoboslab#523
Great work! I'll go through this in the coming days and merge what I think is appropriate. Can you explain your changes to I think the UIPress stuff would be better of in its own event, rather than piggybacking on the touch events. Also, I don't think the changes for |
Awesome. The audio changes were made because web browsers support different sources for a single sound, this allows the browser to select the best source to play at run time based on compatibility, for example:
The most obvious use case for this is The Please ignore the changes to As you can probably figure from my commits and PRs, I usually create branches for my pull requests but this time the changes got out of hand in my master branch and had to do this. I apologize :/ |
Also, I am going to leave this here. I modified Colloquy's CQJavaScriptBridge to work on iOS, even using the built in JSC, take a look at the gist here: Add it to your project and use it as follows:
At this point you can instantiate and use
This class can be improved and if misused, very dangerous. So beware. |
So, I just downloaded the XCode 7.1 Beta and tried to compile for tvOS, but can't because I don't have a provisioning profile. Do I really need a real tvOS device to check if compiling works? |
hmm. not sure. But you should be able to compile and test on the simulator. |
I am working on getting JavaScriptCore for tvOS, which is not a problem now but will be in the future... I am also going to test if the built in JSC can be used instead of having tu bundle our own version every time. |
Well, XCode says I need a provisioning profile for a tvOS device - which I can only create if I have a UDID for it, I believe. Send me yours, maybe? :) Regarding JSC: Ejecta still can't use the built-in version because it has no API to read/write TypedArrays. See https://bugs.webkit.org/show_bug.cgi?id=120112 |
I am able to run on the tvOS Simulator without a provisioning profile by changing the Team to None under General project settings. |
Thanks @williammalone, this works! However, I still can't compile: So, this means we would either need to compile JavaScriptCore with bitcode enabled (which I would guess is a nightmare) or use the JSC version provided by the OS and lose the Typed Array API, which would make WebGL and some Canvas2D stuff unbearably slow :/ Thoughts? |
I have compiled JSC with bitcode enabled and added iOS 9 compatibility. See PR I can upload the compiled version somewhere if you wish (since it takes about 30 min to compile) Also, this same PR has the bitcode flag enabled for Ejecta. |
Oh, wow! I'm sorry I missed that. I'll have a look – probably merge it into my repo tomorrow. Thank you! |
Great work! Thank you. |
@darionco I merged your JSC pr (phoboslab/JavaScriptCore-iOS#30) I'm almost able to compile this now for tvOS (added a bunch of Any ideas? |
Yeah I get a lot of those, but they are warnings that state that they will become errors in the future... maybe the future is now? :) I am using Xcode Version 7.1 beta (7B75), is yours different? |
Well, it's an error for me. Version 7.1 beta 3 (7B85) :/ |
The solution for this is to create a tvOS target in JSC and compile it for it. I can take a look at this later on today if you want. |
I am experiencing the same error. Version 7.1 Beta 3 (7B85). |
Ok I have added tvOS support to JSC in PR phoboslab/JavaScriptCore-iOS#31 Tested with the newest Xcode and AppleTV firmware. Let me know if it works for you. |
Conflicts: Source/Ejecta/EJBindingEjectaCore.m
So, the above commit includes a separate JSC Framework, compiled for tvOS, adds a new build target for tvOS devices and omits building some APIs (e.g. devicemotion) that are not available on tvOS. Compilation for tvOS works now! I'm leaving this issue open, since the input events for the AppleTV remote are not yet included. I'll use this PR as a guide. Thanks again @darionco! |
Conflicts: Source/Ejecta/EJBindingEjectaCore.m Source/Ejecta/EJCanvas/EAGLView.m Source/Ejecta/EJUtils/EJBindingAdBanner.h Source/Ejecta/EJUtils/EJBindingAdBanner.m Source/Ejecta/EJUtils/EJBindingDeviceMotion.h Source/Ejecta/EJUtils/EJBindingDeviceMotion.m Source/Ejecta/EJUtils/EJBindingGameCenter.m Source/Ejecta/EJUtils/EJBindingImagePicker.h Source/Ejecta/EJUtils/EJBindingImagePicker.m
I am closing this pull request as this is my main dev branch and will get cluttered with unnecessary commits fast. I will, however, open another pull request once I am happy with the tvOS input changes. |
I am experiencing an with error with the new tvOS JSC Framework when trying to archive in Xcode:
It works great both on the Apple TV Simulator and on the Apple TV. Anyone else experiencing this error when archiving? |
Fixed in 4d44b74 :) |
I am opening this just as a reference because my fork has too many unmanaged changes.
974b31e, 5769290, d4d2e5f, ea81316 add tvOS support to ejecta and the methods to forward the remote control input events to JavaScript through the events:
each remote button press event contains a
pressType
property that can contain any of the following values:I will delete this pull request once the changes have been acknowledged, rejected or accepted by @phoboslab