It is not particularly busy and idle to have nothing recently, study, get online a good tutorial, but it is not the latest, and sit down according to the tutorial on the net is not good at all, directly on the official website, success. Record it!!

1. Establish a connection. There are two methods to establish a connection: reveal and Xcode

The first one. (Developed by myself, this method requires everyone to have reveal during team development, which is not convenient for static loading.)

Open reveal to reveal your Xcode project

reveal – help –Show Reveal Library in Finder







(2) Add reveal. Framework to the project








(3) Build Settings -Other Linker Flag – add -ObjC – lZ – Framework Reveal








(4) If it is Xcode 7, note that Framework Search Paths should have reveal Paths. For example FRAMEWORK_SEARCH_PATHS = $(inherited) “$(SYSTEM_APPS_DIR)/pass Reveal. App/Contents/SharedSupport/iOS – Libraries”, if not add







(5) Run the project and open reveal. If all the above methods are correct, the connection is successful. Now you can choose the emulator.







The second method (dynamic loading, do not call this method in a release build, make sure you only load libReveal. Dylib in a debug build of your application.)

Step (1) is the same

(2) Add libreveal. Dylib to the project







In the Add to Targets dialog box, deselect all targets. This ensures that Xcode does not connect dynamic library files at compile time. Optional: Check Copy items if needed to Copy libReveal. Dylib to your project — if you do this, remember to update the library again when you update Reveal to a new version.







(3) Target-bulid Phase – Copy Buldle Resurces add Libreveal. Dylib

Adding a dependency library

Libz.tbd, CFNetwork. Framework, quartzCore. framework, coreGraphics.framework







(4), libreveal. Dylib is required as part of the build process for dynamically loading library applications running on debugger peripherals.

set -e

if [ -n “${CODE_SIGN_IDENTITY}” ]; then

codesign -fs “${CODE_SIGN_IDENTITY}” “${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}/libReveal.dylib”







(5) Add code to your class (UIapplicationdelegate, for example) and modify it accordingly

Note: This method is used to dynamically connect third party libraries

You need to introduce dynamic linking

#include

– (void)loadReveal

if (NSClassFromString(@”IBARevealLoader”) == nil)

NSString *revealLibName = @”libReveal”; // or @”libReveal-tvOS” for tvOS targets

NSString *revealLibExtension = @”dylib”;

NSString *error;

NSString *dyLibPath = [[NSBundle mainBundle] pathForResource:revealLibName ofType:revealLibExtension];

if (dyLibPath ! = nil)

NSLog(@”Loading dynamic library: %@”, dyLibPath);

void *revealLib = dlopen([dyLibPath cStringUsingEncoding:NSUTF8StringEncoding], RTLD_NOW);

if (revealLib == NULL)

error = [NSString stringWithUTF8String:dlerror()];

else

error = @”File not found.”;

if (error ! = nil)

NSString *message = [NSString stringWithFormat:@”%@.%@ failed to load with error: %@”, revealLibName, revealLibExtension, error];

UIAlertController *alert = [UIAlertController alertControllerWithTitle:@”Reveal library could not be loaded”

message:message

preferredStyle:UIAlertControllerStyleAlert];

[alert addAction:[UIAlertAction actionWithTitle:@”OK” style:UIAlertActionStyleDefault handler:nil]];

[[[[[UIApplication sharedApplication] windows] firstObject] rootViewController] presentViewController:alert animated:YES completion:nil];

(6) is a simple way of integration, in – [UIApplicationDelegate applicationDidBecomeActive:] method calls the – (void) loadReveal method statement above, to ensure that pass Reveal library is loaded in as early as possible.


– (void)applicationDidBecomeActive:(UIApplication *)application

[self loadReveal];

Pass reveal the deletion of

Remove Reveal from your Xcode project

Perform the following steps to remove the Reveal integration mode based on your actual selection.

Once the library file has been successfully removed, the following contents will no longer appear on the Xcode console when your application starts:

INFO: Reveal Server started (Protocol Version X).

Static connection

Open your Xcode project. Remove the reveal.framework reference from the Project Navigator. Select your Project in Xcode’s Project Navigator. For each target that incorporates Reveal, select the Build Settings TAB and remove the following from the OtherLinked Flags setting in the Debug configuration:

– Framework reveal-objc and -lz (Before deleting this configuration, ensure that it is only used for Reveal.) Done. – Run the app and make sure Reveal is not connected to the app.

Dynamic connection

Open your Xcode project. Remove the reference to libReveal. Dylib from the Project Navigator. Select your Project in Xcode’s Project Navigator, and select the Build Phases TAB for each target that incorporates Reveal. If the following libraries are only available to Reveal, select the Build Phases TAB. Please remove them from the Link Binary With Libraries configuration:

Libz.dylib CFNetwork. Framework Quartzcore. framework coreGraphics. framework takes the custom CoDesign content from the Build Phases Run Script Removed. Remove the loadReveal/startReveal method from your code. Done. – Run the app and make sure Reveal is not connected to the app.

Successful connection as follows







Reveal Function Introduction







Click on one of the images in the screen







When modifying properties, you can even see the results visually in the emulator, but the code needs to be modified in Xcode itself







Back to the home screen













Ok simple use is like this!!