Tanner Bennett лет назад: 6
Родитель
Сommit
e862b81734
2 измененных файлов с 46 добавлено и 29 удалено
  1. BIN
      README-images/flex-exclusion-carthage.jpg
  2. 46 29
      README.md

BIN
README-images/flex-exclusion-carthage.jpg


+ 46 - 29
README.md

@@ -8,7 +8,7 @@
 
 FLEX (Flipboard Explorer) is a set of in-app debugging and exploration tools for iOS development. When presented, FLEX shows a toolbar that lives in a window above your application. From this toolbar, you can view and modify nearly every piece of state in your running application.
 
-![View Hierarchy Exploration](https://engineering.flipboard.com/assets/flex/basic-view-exploration.gif)
+<img alt="Demo" width=36% height=36% src=https://user-images.githubusercontent.com/8371943/70185687-e842c800-16af-11ea-8ef9-9e071380a462.gif>
 
 
 ## Give Yourself Debugging Superpowers
@@ -71,52 +71,61 @@ More complete version:
 ### Modify Views
 Once a view is selected, you can tap on the info bar below the toolbar to present more details about the view. From there, you can modify properties and call methods.
 
-![View Modification](https://engineering.flipboard.com/assets/flex/advanced-view-editing.gif)
+<img alt="Modify Views" width=36% height=36% src=https://user-images.githubusercontent.com/8371943/70271816-c5c2b480-176c-11ea-8bf4-2c5a755bc392.gif>
 
 ### Network History
 When enabled, network debugging allows you to view all requests made using NSURLConnection or NSURLSession. Settings allow you to adjust what kind of response bodies get cached and the maximum size limit of the response cache. You can choose to have network debugging enabled automatically on app launch. This setting is persisted across launches.
 
-![Network History](https://engineering.flipboard.com/assets/flex/network-history.gif)
+<img alt="Network History" width=36% height=36% src=https://user-images.githubusercontent.com/8371943/70271876-e5f27380-176c-11ea-98ef-24170205b706.gif>
 
 ### All Objects on the Heap
 FLEX queries malloc for all the live allocated memory blocks and searches for ones that look like objects. You can see everything from here.
 
-![Heap Exploration](https://engineering.flipboard.com/assets/flex/heap-browser.gif)
+<img alt="Heap/Live Objects Explorer" width=36% height=36% src=https://user-images.githubusercontent.com/8371943/70271850-d83cee00-176c-11ea-9750-ee3a479c6769.gif>
+
+### Explore-at-address
+
+If you get your hands on an arbitrary address, you can try explore the object at that address, and FLEX will open it if it can verify the address points to a valid object. If FLEX isn't sure, it'll warn you and refuse to dereference the pointer. If you know better, however, you can choose to explore it anyway by choosing "Unsafe Explore"
+
+<img alt="Address Explorer" width=36% height=36% src=https://user-images.githubusercontent.com/8371943/70271798-bb081f80-176c-11ea-806d-9d74ac293641.gif>
 
 ### Simulator Keyboard Shortcuts
 Default keyboard shortcuts allow you to activate the FLEX tools, scroll with the arrow keys, and close modals using the escape key. You can also add custom keyboard shortcuts via `-[FLEXManager registerSimulatorShortcutWithKey:modifiers:action:description]`
 
-![Simulator Shortcuts](https://cloud.githubusercontent.com/assets/1422245/10002927/1106fd32-6067-11e5-8e21-57a357c259b6.png)
+<img alt="Simulator Keyboard Shortcuts" width=40% height=40% src="https://user-images.githubusercontent.com/8371943/70272984-d3793980-176e-11ea-89a2-66d187d71b4c.png">
 
 ### File Browser
-View the file system within your app's sandbox. FLEX shows file sizes, image previews, and pretty prints `.json` and `.plist` files. You can copy text and image files to the pasteboard if you want to inspect them outside of your app.
+View the file system within your app's bundle or sandbox container. FLEX shows file sizes, image previews, and pretty prints `.json` and `.plist` files. You can rename and delete files and folders. You can "share" any file if you want to inspect them outside of your app.
 
-![File Browser](https://engineering.flipboard.com/assets/flex/file-browser.gif)
+<img alt="File Browser" width=36% height=36% src=https://user-images.githubusercontent.com/8371943/70271831-d115e000-176c-11ea-8078-ada291f980f3.gif>
 
 ### SQLite Browser
 SQLite database files (with either `.db` or `.sqlite` extensions), or [Realm](https://realm.io) database files can be explored using FLEX. The database browser lets you view all tables, and individual tables can be sorted by tapping column headers.
 
-![Database Browser](https://cloud.githubusercontent.com/assets/1422245/11786700/d0ab95dc-a23c-11e5-80ce-0e1b4dba2b6b.png)
+<img alt="SQLite Browser" width=36% height=36% src=https://user-images.githubusercontent.com/8371943/70271881-ea1e9100-176c-11ea-9a42-01618311c869.gif>
 
 ### 3D Touch in the Simulator
 Using a combination of the command, control, and shift keys, you can simulate different levels of 3D touch pressure in the simulator. Each key contributes 1/3 of maximum possible force. Note that you need to move the touch slightly to get pressure updates.
 
-![Simulator 3D Touch](https://cloud.githubusercontent.com/assets/1422245/11786615/5d4ef96c-a23c-11e5-975e-67275341e439.gif)
+<img alt="Simulator 3D Touch" width=36% height=36% src=https://cloud.githubusercontent.com/assets/1422245/11786615/5d4ef96c-a23c-11e5-975e-67275341e439.gif>
 
-### System Library Exploration
-Go digging for all things public and private. To learn more about a class, you can create an instance of it and explore its default state.
+### Explore Loaded Libraries
+Go digging for all things public and private. To learn more about a class, you can create an instance of it and explore its default state. You can also type in a class name to jump to that class directly if you know which class you're looking for.
 
-![System Libraries Browser](https://engineering.flipboard.com/assets/flex/system-libraries-browser.gif)
+<img alt="Loaded Libraries Exploration" width=36% height=36% src=https://user-images.githubusercontent.com/8371943/70271868-dffc9280-176c-11ea-8704-a0c05b75cc5f.gif>
 
 ### NSUserDefaults Editing
 FLEX allows you to edit defaults that are any combination of strings, numbers, arrays, and dictionaries. The input is parsed as `JSON`. If other kinds of objects are set for a defaults key (i.e. `NSDate`), you can view them but not edit them.
 
-![NSUserDefaults Editor](https://engineering.flipboard.com/assets/flex/nsuserdefaults-editor.gif)
+<img alt="NSUserDefaults Editing" width=36% height=36% src=https://user-images.githubusercontent.com/8371943/70271889-edb21800-176c-11ea-92b4-71e07d2b6ce7.gif>
 
 ### Learning from Other Apps
 The code injection is left as an exercise for the reader. :innocent:
 
-![Springboard Lock Screen](https://engineering.flipboard.com/assets/flex/flex-readme-reverse-1.png) ![Springboard Home Screen](https://engineering.flipboard.com/assets/flex/flex-readme-reverse-2.png)
+<p float="left">
+    <img alt="Springboard Lock Screen" width=25% height=25% src= https://engineering.flipboard.com/assets/flex/flex-readme-reverse-1.png>
+    <img alt="Springboard Home Screen" width=25% height=25% src= https://engineering.flipboard.com/assets/flex/flex-readme-reverse-2.png>
+</p>
 
 
 ## Installation
@@ -128,7 +137,7 @@ FLEX requires an app that targets iOS 9 or higher.
 FLEX is available on [CocoaPods](https://cocoapods.org/pods/FLEX). Simply add the following line to your podfile:
 
 ```ruby
-pod 'FLEX', '~> 3.0', :configurations => ['Debug']
+pod 'FLEX', :configurations => ['Debug']
 ```
 
 ### Carthage
@@ -136,27 +145,39 @@ pod 'FLEX', '~> 3.0', :configurations => ['Debug']
 Add the following to your Cartfile:
 
 ```
-github "flipboard/FLEX" ~> 3.0
+github "flipboard/FLEX"
 ```
 
+### Buck
+
+If you're using Buck, you may want to silence some of the warnings emitted by FLEX. You will need to build FLEX as an `apple_library` and pass the `-Wno-unsupported-availability-guard` flag, as well as the flags to disable any other warnings FLEX may have.
+
 ### Manual
 
-Manually add the files in `Classes/` to your Xcode project.
+Manually add the files in `Classes/` to your Xcode project, or just drag in the entire `FLEX/` folder. Be sure to exclude FLEX from `Release` builds or your app will be rejected.
+
+##### Silencing warnings
+
+Add the following flags to  to **Other Warnings Flags** in **Build Settings:** 
 
+- `-Wno-deprecated-declarations`
+- `-Wno-unsupported-availability-guard`
 
 ## Excluding FLEX from Release (App Store) Builds
 
 FLEX makes it easy to explore the internals of your app, so it is not something you should expose to your users. Fortunately, it is easy to exclude FLEX files from Release builds. The strategies differ depending on how you integrated FLEX in your project, and are described below.
 
-At the places in your code where you integrate FLEX, do a `#if DEBUG` check to ensure the tool is only accessible in your `Debug` builds and to avoid errors in your `Release` builds. For more help with integrating FLEX, see the example project.
+Wrap the places in your code where you integrate FLEX with an `#if DEBUG` statement to ensure the tool is only accessible in your `Debug` builds and to avoid errors in your `Release` builds. For more help with integrating FLEX, see the example project.
 
-### FLEX added with CocoaPods
+### CocoaPods
 
-CocoaPods automatically excludes FLEX from release builds if you only specify the Debug configuration for FLEX in your Podfile.
+CocoaPods automatically excludes FLEX from release builds if you only specify the Debug configuration for FLEX in your Podfile:
 
-### FLEX added with Carthage
+```ruby
+pod 'FLEX', :configurations => ['Debug']
+```
 
-If you are using Carthage, only including the `FLEX.framework` in debug builds is easy:
+### Carthage
 
 1. Do NOT add `FLEX.framework` to the embedded binaries of your target, as it would otherwise be included in all builds (therefore also in release ones).
 1. Instead, add `$(PROJECT_DIR)/Carthage/Build/iOS` to your target _Framework Search Paths_ (this setting might already be present if you already included other frameworks with Carthage). This makes it possible to import the FLEX framework from your source files. It does not harm if this setting is added for all configurations, but it should at least be added for the debug one. 
@@ -170,17 +191,13 @@ If you are using Carthage, only including the `FLEX.framework` in debug builds i
 	
 	Finally, add `$(SRCROOT)/Carthage/Build/iOS/FLEX.framework` as input file of this script phase.
 	
-<p align="center"><img src="README-images/flex-exclusion-carthage.jpg"/></p>
+<img width=75% height=75% src=https://user-images.githubusercontent.com/8371943/70274062-0d4b3f80-1771-11ea-94ea-ca7e7b5ca244.jpg>
 
 ### FLEX files added manually to a project
 
-In Xcode, navigate to the "Build Settings" tab of your project. Click the plus and select `Add User-Defined Setting`.
-
-![Add User-Defined Setting](https://engineering.flipboard.com/assets/flex/flex-readme-exclude-1.png)
-
-Name the setting `EXCLUDED_SOURCE_FILE_NAMES`. For your `Release` configuration, set the value to `FLEX*`. This will exclude all files with the prefix FLEX from compilation. Leave the value blank for your `Debug` configuration.
+In Xcode, navigate to `Build Settings > Build Options > Excluded Source File Names`. For your `Release` configuration, set it to `FLEX*` like this to exclude all files with the `FLEX` prefix:
 
-![EXCLUDED_SOURCE_FILE_NAMES](https://engineering.flipboard.com/assets/flex/flex-readme-exclude-2.png)
+<img width=75% height=75% src=https://user-images.githubusercontent.com/8371943/70281926-e21d1c00-1781-11ea-92eb-aee340791da8.png>
 
 ## Additional Notes