Một mục tập trung di động trong kho dữ liệu GitHub của TopGit: johnno1962/HotReloading, 610 sao, nhóm Mobile, Swift. Hot reloading as a Swift Package
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Note: While this was once a way of using the InjectionIII.app on real devices
and for its development you would not normally need to use this repo any
more as you can use the pre-built bundles using the copy_bundle.sh
script. It has also been largely superseded by the newer and simpler
InjectionNext project.
You should only add the HotReloading product to your main target.
This project is the InjectionIII app
for live code updates available as a Swift Package. i.e.:
Then, you can inject function implementations without having to rebuild your app...
To try out an example project that is already set-up, clone this fork of
SwiftUI-Kit.
To use on your project, add this repo as a Swift Package and add
"Other Linker Flags": -Xlinker -interposable. You no longer need
to add a "Run Script" build phase. If want to inject on a device,
see the notes below on how to configure the InjectionIII app.
Note however, on an M1/M2 Mac this project only works with
an iOS/tvOS 14 or later simulator. Also, due to a quirk of how
Xcode how enables a DEBUG build of Swift Packages, your
"configuration" needs to contain the string "Debug".
Remember not to release your app with this package configured.
You should see a message that the app is watching for source file
changes in your home directory. You can change this scope by
adding comma separated list in the environment variable
INJECTION_DIRECTORIES. Should you want to connect to the
InjectionIII.app when using the simulator, add the environment
variable INJECTION_DAEMON to your scheme.
Consult the README of the InjectionIII
project for more information in particular how to use it to inject SwiftUI using the
HotSwiftUI protocol extension.
HotReloading using VSCode
It's possible to use HotReloading from inside the VSCode editor and realise a
form of "VScode Previews". Consult this project for the setup required.
Device Injection
This version of the HotReloading project and it's dependencies now support
injection on a real iOS or tvOS device.
Device injection now connects to the InjectionIII.app
(github release
4.6.0 or above) and requires you type the following commands into a Terminal
then restart the app to opt into receiving remote connections from a device:
$ rm ~/Library/Containers/com.johnholdsworth.InjectionIII/Data/Library/Preferences/com.johnholdsworth.InjectionIII.plist
$ defaults write com.johnholdsworth.InjectionIII deviceUnlock any
Note, if you've used the App Store version of InjectionIII in the past,
the binary releases have a different preferences file and the two can
get confused and prevent writing this preference from taking effect.
This is why the first rm command above can be necessary. If your
device doesn't connect check the app is listening on port 8899:
If your device still doesn't connect either add an INJECTION_HOST
environment variable to your scheme containg the WiFi IP address of
the host you're running the InjectionIII.app on or clone this project and
code your mac's IP address into the hostname variable in Package.swift.
Then, drag the clone onto your project to have it take the place of the
configured Swift Package as outlined in these instructions.
Note: as the HotReloading package needs to connect a network
socket to your Mac to receive commands and new versions of code, expect
a message the first time you run your app after adding the package
asking you to "Trust" that your app should be allowed to do this.
Likewise, at the Mac end (as the InjectionIII app needs to open
a network port to accept this connection) you may be prompted for
permission if you have the macOS firewall turned on.
For SwiftUI you can force screen updates by following the conventions
outlined in the HotSwiftUI
project then you can experience something like "Xcode Previews", except
for a fully functional app on an actual device!
Vapor injection
To use injection with Vapor web server, it is now possible to just
download the InjectionIII.app
and add the following line to be called as the server configures
(when running Vapor from inside Xcode):
As an alternative, you can add this Swift package as a dependency to Vapor's
Package.swift of the "App" target.
Thanks to...
The App Tracing functionality uses the OliverLetterer/imp_implementationForwardingToSelector trampoline implementation
via the SwiftTrace project under an MIT license.
SwiftTrace uses the very handy https://github.com/facebook/fishhook
as an alternative to the dyld_dynamic_interpose dynamic loader private api. See the
project source and header file included in the framework for licensing details.
The "Remote" server in this project which
allows you to capture videos from your device includes code adapted from
acj/TimeLapseBuilder-Swift
This release includes a very slightly modified version of the excellent
canviz library to render "dot" files
in an HTML canvas which is subject to an MIT license. The changes are to pass
through the ID of the node to the node label tag (line 212), to reverse
the rendering of nodes and the lines linking them (line 406) and to
store edge paths so they can be coloured (line 66 and 303) in "canviz-0.1/canviz.js".
It also includes CodeMirror JavaScript editor for
the code to be evaluated in the Xprobe browser under an MIT license.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/johnno1962/HotReloading là nguồn chính thức.
johnno1962/HotReloading có bao nhiêu sao?
johnno1962/HotReloading có 610 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/johnno1962/HotReloading. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
johnno1962/HotReloading có những chủ đề gì?
GitHub topics của johnno1962/HotReloading: "hot-reload", "swift", "swiftui". TopGit xếp repo vào nhóm Mobile.
johnno1962/HotReloading có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho johnno1962/HotReloading. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
johnno1962/HotReloading còn đang phát triển không?
Commit gần nhất trên johnno1962/HotReloading là 2 tháng trước (theo timestamp GitHub). Repo có 55 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
johnno1962/HotReloading dùng license gì?
johnno1962/HotReloading phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
johnno1962/HotReloading viết bằng ngôn ngữ gì?
johnno1962/HotReloading chủ yếu viết bằng Swift. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về HotReloading?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về HotReloading.