1603090800

# The Importance of Hypothesis Testing

Hypothesis tests are significant for evaluating answers to questions concerning samples of data.

statistical Hypothesis is a belief made about a population parameter. This belief may or might not be right. In other words, hypothesis testing is a proper technique utilized by scientist to support or reject statistical hypotheses. The foremost ideal approach to decide if a statistical hypothesis is correct is to examine the whole population.

Since that’s frequently impractical, we normally take a random sample from the population and inspect the equivalent. Within the event sample data set isn’t steady with the statistical hypothesis, the hypothesis is refused.

### Types of hypothesis

There are two sorts of hypothesis and both the **Null Hypothesis **(Ho) and Alternative Hypothesis (Ha) must be totally mutually exclusive events.

• Null hypothesis is usually the hypothesis that the event won’t happen.
• Alternative hypothesis is a hypothesis that the event will happen.

### Why we need Hypothesis Testing?

Suppose a company needs to launch a new bicycle in the market. For this situation, they will follow Hypothesis Testing all together decide the success of the new product in the market.

Where the likelihood of the product being ineffective in the market is undertaken as the Null Hypothesis and the likelihood of the product being profitable is undertaken as an Alternative Hypothesis. By following the process of Hypothesis testing they will foresee the accomplishment.

#statistics #simulation-hypothesis #hypothesis #testing #data-science #data #statistical-fallacy #big-data

1656981060

## 1.新しいreactネイティブアプリを作成し、ターミナルを開いて実行します

``npx react-native init NativeModules``

## 3.C++側での作業

まず、「`Cpp_to_RN.hpp`ファイルを開き、本体のない関数を含むクラスを作成します。

``````#ifndef Cpp_to_RN_hpp
#define Cpp_to_RN_hpp#include <stdio.h>
#include <string>class Cpp_to_RN {
public:
std::string sayHello();
};#endif /* Cpp_to_RN_hpp */``````

``````#include "Cpp_to_RN.hpp"
std::string Cpp_to_RN::sayHello(){
return "Hello from CPP";
}``````

## 4.C++ファイルのラッピングに取り組んでいます。

C ++ファイルをラップしてIOS（swift）側にエクスポートするには

a。ObjectiveCファイルを作成して名前を付けます`Cpp_to_RN.m`

b。ファイルを開き、C++ファイルから`WrapCpp_to_RN.mm` 関数をラップする本文のコンテンツを記述します。`sayHello`

``````#import <Foundation/Foundation.h>
#import "WrapCpp_to_RN.h"
#import "Cpp_to_RN.hpp"@implementation WrapCpp_to_RN- (NSString *) sayHello {
Cpp_to_RN fromCPP;
std::string helloWorldMessage = fromCPP.sayHello();
return [NSString
stringWithCString:helloWorldMessage.c_str()
encoding:NSUTF8StringEncoding];
}
@end``````

c。ヘッダーファイルを作成し、名前を付けます`WrapCpp_to_RN.h`

`wrapSayHello`関数をSwiftファイルにエクスポートします

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

## 5. iOS（Swift）側での作業

C++関数をReactNativeにエクスポートするには

a。Swiftファイルを作成し、名前を付けます`SendCpp_to_RN.swift`

クラス`SendCpp_to_RN`を作成し、次のように宣言します`NSObject`

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

`requiresMainQueueSetup()`アプリケーション実行時の警告を防ぐ関数を作成する

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

`WrapCpp_to_RN()`fromをラップする関数を記述します`WrapCpp_to_RN.mm`

``````import Foundation@objc(SendCpp_to_RN)
class SendCpp_to_RN : NSObject {

@objc static func requiresMainQueueSetup() -> Bool {
return false
}

@objc func fromCpp(_ successCallback: RCTResponseSenderBlock) -> Void {
successCallback([NSNull(), WrapCpp_to_RN().wrapSayHello() as Any])
}}``````

b。Swiftファイルのラップ関数をReactNativeにエクスポートします

を使用してSwiftクラスとその関数をエクスポートするObjectiveCファイルを作成します`Callback`

``````#import <React/RCTBridgeModule.h>
#import <Foundation/Foundation.h>
#import "UIKit/UIKit.h"
@interface RCT_EXTERN_MODULE(SendCpp_to_RN, NSObject)RCT_EXTERN_METHOD(fromCpp:(RCTResponseSenderBlock)successCallback)@end``````

c。SwiftをReactNativeに接続し、`NativeModules-Bridging-Header.h` ファイルを開きます

``#import <React/RCTBridgeModule.h>#import <React/RCTViewManager.h>#import "WrapCpp_to_RN.h"``

## 6.ReactNative側での作業

Swiftクラスとその関数を呼び出す

``````import React from 'react';
import {StyleSheet, Text, View, NativeModules, Button} from 'react-native';const App = () => {
const onPress = () => {
const {SendCpp_to_RN} = NativeModules;
SendCpp_to_RN.fromCpp((_err, res) => console.log(res));
};
return (
<View style={styles.container}>
<Text> Practice !</Text>
<Button title="C++ to React Native" color="#841584" onPress={onPress} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});
export default App;``````

これで完了です。アプリケーションを実行するだけです。

``react-native run-ios``

または、Xcodeの「実行」ボタンをクリックして、実行内容を確認してください。

1656982800

## Como Exportar Uma Função De C++ Para React Native

Hoje, continuo compartilhando minha experiência com o Módulo Nativo e C++.

Como veremos muitas bibliotecas C/C++ escrevendo para plataformas móveis, precisamos implementá-las em nosso aplicativo iOS ou React Native. É por isso que quero escrever um artigo sobre como exportar uma função de C++ para React Native, que é fácil de entender e economiza tempo para iniciantes. Vou começar com um novo aplicativo nativo de reação

## 1. Crie um novo aplicativo nativo de reação, abra seu terminal e execute

``npx react-native init NativeModules``

## 3. Trabalhando no lado C++

Crie um novo arquivo C++ e nomeie-o`Cpp_to_RN.cpp`

Quando criamos um novo arquivo C++, o Xcode criará um arquivo de cabeçalho `Cpp_to_RN.hpp` para nós

Primeiro, abra o arquivo “ `Cpp_to_RN.hpp` e crie uma classe que inclua uma função sem o corpo.

``````#ifndef Cpp_to_RN_hpp
#define Cpp_to_RN_hpp#include <stdio.h>
#include <string>class Cpp_to_RN {
public:
std::string sayHello();
};#endif /* Cpp_to_RN_hpp */``````

Em seguida, abra o `Cpp_to_RN.cpp`arquivo e escreva uma função simples “ `sayHello()`

``````#include "Cpp_to_RN.hpp"
std::string Cpp_to_RN::sayHello(){
return "Hello from CPP";
}``````

## 4. Trabalhando no arquivo C++ de encapsulamento.

Para encapsular os arquivos C++ e exportá-los para o lado IOS (swift)

uma. Crie um arquivo Objective C e nomeie-o`Cpp_to_RN.m`

Renomeie o `Cpp_to_RN.m` para `Cpp_to_RN.mm`

b. Abra o `WrapCpp_to_RN.mm` arquivo e escreva o conteúdo do corpo que envolverá a função `sayHello`do arquivo C++.

``````#import <Foundation/Foundation.h>
#import "WrapCpp_to_RN.h"
#import "Cpp_to_RN.hpp"@implementation WrapCpp_to_RN- (NSString *) sayHello {
Cpp_to_RN fromCPP;
std::string helloWorldMessage = fromCPP.sayHello();
return [NSString
stringWithCString:helloWorldMessage.c_str()
encoding:NSUTF8StringEncoding];
}
@end``````

c. Crie um arquivo de cabeçalho e nomeie-o`WrapCpp_to_RN.h`

Exporte a `wrapSayHello`função para o arquivo Swift

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

## 5. Trabalhando no lado iOS (Swift)

Para exportar a função C++ para React Native

uma. Crie um arquivo Swift e nomeie-o`SendCpp_to_RN.swift`

Observação: o Xcode nos pedirá para criar um `NativeModules-Bridging-Header.h`arquivo para nós.

Crie uma classe `SendCpp_to_RN`e declare-a como`NSObject`

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

Escreva uma função `requiresMainQueueSetup()`para evitar avisos quando executamos o aplicativo

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

Escreva uma função para envolver o `WrapCpp_to_RN()`from`WrapCpp_to_RN.mm`

``````import Foundation@objc(SendCpp_to_RN)
class SendCpp_to_RN : NSObject {

@objc static func requiresMainQueueSetup() -> Bool {
return false
}

@objc func fromCpp(_ successCallback: RCTResponseSenderBlock) -> Void {
successCallback([NSNull(), WrapCpp_to_RN().wrapSayHello() as Any])
}}``````

b. Exporte uma função wrap no arquivo Swift para React Native

Crie um arquivo Objective C para exportar a classe Swift e sua função usando`Callback`

``````#import <React/RCTBridgeModule.h>
#import <Foundation/Foundation.h>
#import "UIKit/UIKit.h"
@interface RCT_EXTERN_MODULE(SendCpp_to_RN, NSObject)RCT_EXTERN_METHOD(fromCpp:(RCTResponseSenderBlock)successCallback)@end``````

c. Conecte o Swift ao React Native, abra o `NativeModules-Bridging-Header.h` arquivo

``#import <React/RCTBridgeModule.h>#import <React/RCTViewManager.h>#import "WrapCpp_to_RN.h"``

## 6. Trabalhando no lado React Native

Chame a classe Swift e suas funções

``````import React from 'react';
import {StyleSheet, Text, View, NativeModules, Button} from 'react-native';const App = () => {
const onPress = () => {
const {SendCpp_to_RN} = NativeModules;
SendCpp_to_RN.fromCpp((_err, res) => console.log(res));
};
return (
<View style={styles.container}>
<Text> Practice !</Text>
<Button title="C++ to React Native" color="#841584" onPress={onPress} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});
export default App;``````

E pronto, basta executar o aplicativo

``react-native run-ios``

Ou apenas clique no botão “executar” no Xcode e veja o que fizemos.

Espero que meu artigo seja útil para você, obrigado pelo tempo de leitura.

1656981000

## Cách Xuất Một Hàm Từ C ++ Sang React Native

Hôm nay, tôi tiếp tục chia sẻ kinh nghiệm của mình với Native Module và C ++.

Vì chúng ta sẽ thấy rất nhiều thư viện C / C ++ viết cho nền tảng di động, chúng ta cần triển khai chúng cho ứng dụng iOS hoặc React Native của mình. Đó là lý do mình muốn viết một bài hướng dẫn cách export một hàm từ C ++ sang React Native dễ hiểu và tiết kiệm thời gian cho người mới bắt đầu. Tôi sẽ bắt đầu với một ứng dụng gốc phản ứng mới

## 1. Tạo một ứng dụng gốc phản ứng mới, mở thiết bị đầu cuối của bạn và chạy

``npx react-native init NativeModules``

## 3. Làm việc trên C ++

Tạo một tệp C ++ mới và đặt tên cho nó`Cpp_to_RN.cpp`

Khi chúng tôi tạo tệp C ++ mới, Xcode sẽ tạo tệp tiêu đề `Cpp_to_RN.hpp` cho chúng tôi

Đầu tiên, mở tệp `Cpp_to_RN.hpp`“” và tạo một lớp bao gồm một hàm không có phần thân.

``````#ifndef Cpp_to_RN_hpp
#define Cpp_to_RN_hpp#include <stdio.h>
#include <string>class Cpp_to_RN {
public:
std::string sayHello();
};#endif /* Cpp_to_RN_hpp */``````

Sau đó, mở `Cpp_to_RN.cpp`tệp và viết một hàm đơn giản “ `sayHello()`

``````#include "Cpp_to_RN.hpp"
std::string Cpp_to_RN::sayHello(){
return "Hello from CPP";
}``````

## 4. Thao tác trên Wrapping C ++ file.

Để bọc các tệp C ++ và xuất chúng sang phía IOS (nhanh chóng)

một. Tạo một tệp Objective C và đặt tên cho nó`Cpp_to_RN.m`

Đổi tên `Cpp_to_RN.m` thành `Cpp_to_RN.mm`

b. Mở `WrapCpp_to_RN.mm` tệp và viết nội dung phần nội dung sẽ bọc hàm `sayHello`từ tệp C ++.

``````#import <Foundation/Foundation.h>
#import "WrapCpp_to_RN.h"
#import "Cpp_to_RN.hpp"@implementation WrapCpp_to_RN- (NSString *) sayHello {
Cpp_to_RN fromCPP;
std::string helloWorldMessage = fromCPP.sayHello();
return [NSString
stringWithCString:helloWorldMessage.c_str()
encoding:NSUTF8StringEncoding];
}
@end``````

c. Tạo một tệp tiêu đề và đặt tên cho nó`WrapCpp_to_RN.h`

Xuất `wrapSayHello`hàm sang tệp Swift

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

## 5. Làm việc trên iOS (Swift)

Để xuất hàm C ++ sang React Native

một. Tạo một tệp Swift và đặt tên cho nó`SendCpp_to_RN.swift`

Lưu ý: Xcode sẽ yêu cầu chúng tôi tạo một `NativeModules-Bridging-Header.h`tệp cho chúng tôi.

Tạo một lớp `SendCpp_to_RN`và khai báo nó là`NSObject`

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

Viết một hàm `requiresMainQueueSetup()`để ngăn cảnh báo khi chúng tôi chạy ứng dụng

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

Viết một hàm để bọc `WrapCpp_to_RN()`từ`WrapCpp_to_RN.mm`

``````import Foundation@objc(SendCpp_to_RN)
class SendCpp_to_RN : NSObject {

@objc static func requiresMainQueueSetup() -> Bool {
return false
}

@objc func fromCpp(_ successCallback: RCTResponseSenderBlock) -> Void {
successCallback([NSNull(), WrapCpp_to_RN().wrapSayHello() as Any])
}}``````

b. Xuất một hàm bọc trong tệp Swift sang React Native

Tạo một tệp Objective C để xuất lớp Swift và chức năng của nó bằng cách sử dụng`Callback`

``````#import <React/RCTBridgeModule.h>
#import <Foundation/Foundation.h>
#import "UIKit/UIKit.h"
@interface RCT_EXTERN_MODULE(SendCpp_to_RN, NSObject)RCT_EXTERN_METHOD(fromCpp:(RCTResponseSenderBlock)successCallback)@end``````

c. Kết nối Swift với React Native, mở `NativeModules-Bridging-Header.h` tệp

``#import <React/RCTBridgeModule.h>#import <React/RCTViewManager.h>#import "WrapCpp_to_RN.h"``

## 6. Làm việc ở phía React Native

Gọi lớp Swift và các chức năng của nó

``````import React from 'react';
import {StyleSheet, Text, View, NativeModules, Button} from 'react-native';const App = () => {
const onPress = () => {
const {SendCpp_to_RN} = NativeModules;
SendCpp_to_RN.fromCpp((_err, res) => console.log(res));
};
return (
<View style={styles.container}>
<Text> Practice !</Text>
<Button title="C++ to React Native" color="#841584" onPress={onPress} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});
export default App;``````

Và chúng tôi đã hoàn tất, chỉ cần chạy ứng dụng

``react-native run-ios``

Hoặc chỉ cần nhấp vào nút “chạy” trên Xcode và xem những gì chúng tôi đã làm.

Tôi hy vọng bài viết của tôi hữu ích cho bạn, cảm ơn bạn đã dành thời gian đọc.

1656979200

## Comment Exporter Une Fonction De C++ Vers React Native

Aujourd'hui, je continue à partager mon expérience avec le module natif et C++.

Comme nous verrons beaucoup de bibliothèques C/C++ écrire pour les plates-formes mobiles, nous devons les implémenter dans notre application iOS ou React Native. C'est pourquoi je souhaite écrire un article sur la façon d'exporter une fonction de C++ vers React Native, ce qui est facile à comprendre et fait gagner du temps aux débutants. Je vais commencer avec une nouvelle application native réactive

## 1. Créez une nouvelle application native React, ouvrez votre terminal et exécutez

``npx react-native init NativeModules``

## 3. Travailler du côté C++

Créez un nouveau fichier C++ et nommez-le`Cpp_to_RN.cpp`

Lorsque nous créons un nouveau fichier C++, Xcode créera un fichier d'en-tête `Cpp_to_RN.hpp` pour nous

Tout d'abord, ouvrez le fichier " `Cpp_to_RN.hpp`" et créez une classe qui inclut une fonction sans le corps.

``````#ifndef Cpp_to_RN_hpp
#define Cpp_to_RN_hpp#include <stdio.h>
#include <string>class Cpp_to_RN {
public:
std::string sayHello();
};#endif /* Cpp_to_RN_hpp */``````

Ouvrez ensuite le `Cpp_to_RN.cpp`fichier et écrivez une fonction simple " `sayHello()`"

``````#include "Cpp_to_RN.hpp"
std::string Cpp_to_RN::sayHello(){
return "Hello from CPP";
}``````

## 4. Travail sur l'encapsulation du fichier C++.

Pour envelopper les fichiers C++ et les exporter vers le côté IOS (swift)

un. Créez un fichier Objective C et nommez-le`Cpp_to_RN.m`

Renommez le `Cpp_to_RN.m` en `Cpp_to_RN.mm`

b. Ouvrez le `WrapCpp_to_RN.mm` fichier et écrivez le contenu du corps qui encapsulera la fonction `sayHello`à partir du fichier C++.

``````#import <Foundation/Foundation.h>
#import "WrapCpp_to_RN.h"
#import "Cpp_to_RN.hpp"@implementation WrapCpp_to_RN- (NSString *) sayHello {
Cpp_to_RN fromCPP;
std::string helloWorldMessage = fromCPP.sayHello();
return [NSString
stringWithCString:helloWorldMessage.c_str()
encoding:NSUTF8StringEncoding];
}
@end``````

c. Créez un fichier d'en-tête et nommez-le`WrapCpp_to_RN.h`

Exporter la `wrapSayHello`fonction vers le fichier Swift

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

## 5. Travailler du côté iOS (Swift)

Pour exporter la fonction C++ vers React Native

un. Créez un fichier Swift et nommez-le`SendCpp_to_RN.swift`

Remarque : Xcode nous demandera de créer un `NativeModules-Bridging-Header.h`fichier pour nous.

Créez une classe `SendCpp_to_RN`et déclarez-la comme`NSObject`

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

Écrire une fonction `requiresMainQueueSetup()`pour empêcher l'avertissement lorsque nous exécutons l'application

``````#import <Foundation/Foundation.h>
@interface WrapCpp_to_RN : NSObject
- (NSString *) wrapSayHello;
@end``````

Ecrire une fonction pour envelopper le `WrapCpp_to_RN()`from`WrapCpp_to_RN.mm`

``````import Foundation@objc(SendCpp_to_RN)
class SendCpp_to_RN : NSObject {

@objc static func requiresMainQueueSetup() -> Bool {
return false
}

@objc func fromCpp(_ successCallback: RCTResponseSenderBlock) -> Void {
successCallback([NSNull(), WrapCpp_to_RN().wrapSayHello() as Any])
}}``````

b. Exporter une fonction wrap dans un fichier Swift vers React Native

Créez un fichier Objective C pour exporter la classe Swift et sa fonction à l'aide de`Callback`

``````#import <React/RCTBridgeModule.h>
#import <Foundation/Foundation.h>
#import "UIKit/UIKit.h"
@interface RCT_EXTERN_MODULE(SendCpp_to_RN, NSObject)RCT_EXTERN_METHOD(fromCpp:(RCTResponseSenderBlock)successCallback)@end``````

c. Connectez Swift à React Native, ouvrez le `NativeModules-Bridging-Header.h` fichier

``#import <React/RCTBridgeModule.h>#import <React/RCTViewManager.h>#import "WrapCpp_to_RN.h"``

## 6. Travailler du côté React Native

Appelez la classe Swift et ses fonctions

``````import React from 'react';
import {StyleSheet, Text, View, NativeModules, Button} from 'react-native';const App = () => {
const onPress = () => {
const {SendCpp_to_RN} = NativeModules;
SendCpp_to_RN.fromCpp((_err, res) => console.log(res));
};
return (
<View style={styles.container}>
<Text> Practice !</Text>
<Button title="C++ to React Native" color="#841584" onPress={onPress} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});
export default App;``````

Et nous avons terminé, il suffit de lancer l'application

``react-native run-ios``

Ou cliquez simplement sur le bouton "exécuter" sur Xcode et voyez ce que nous avons fait.

J'espère que mon article vous sera utile, merci pour le temps de lecture.

1675797780

## LLDebugtool

A debugging tool for developers and testers that can help you analyze and manipulate data in non-xcode situations.

## Introduction

LLDebugTool is a debugging tool for developers and testers that can help you analyze and manipulate data in non-xcode situations.

LLDebugToolSwift is the extension of LLDebugTool, it provide swift interface for LLDebugTool, LLDebugToolSwift will release with LLDebugTool at same time.

If your project is a Objective-C project, you can use `LLDebugTool`, if your project is a Swift project or contains swift files, you can use `LLDebugToolSwift`.

Choose LLDebugTool for your next project, or migrate over your existing projects—you'll be happy you did! 🎊🎊🎊

## What's new in 1.3.8.1

### Remove auto check version.

• Too many visits to the website `cocoadocs.org` cause `cocoadocs.org` to disable the access to `LLDebugTool`, so this function is removed.

## What can you do with LLDebugTool?

Always check the network request or view log information for certain events without having to run under XCode. This is useful in solving the testers' problems.

Easier filtering and filtering of useful information.

Easier analysis of occasional problems.

Easier analysis of the cause of the crash.

Easier sharing, previewing, or removing sandbox files, which can be very useful in the development stage.

Easier observe app's memory, CPU, FPS and other information.

Take screenshots, tag and share.

More intuitive view of view structure and dynamic modify properties.

Determine UI elements and colors in your App more accurately.

Quick entry for html.

Mock location at anytime.

### CocoaPods

CocoaPods is the recommended way to add `LLDebugTool` to your project.

Objective - C

1. Add a pod entry for LLDebugTool to your Podfile `pod 'LLDebugTool' , '~> 1.0'`.
2. If only you want to use it only in Debug mode, Add a pod entry for LLDebugTool to your Podfile `pod 'LLDebugTool' , '~> 1.0' ,:configurations => ['Debug']`, Details also see Wiki/Use in Debug environment. If you want to specify the version, use as `pod 'LLDebugTool' , '1.3.8.1' ,:configurations => ['Debug']`.
3. The recommended approach is to use multiple targets and only add `pod 'LLDebugTool', '~> 1.0'` to Debug Target. This has the advantage of not contamiling the code in the Product environment and can be integrated into the App in the Archive Debug environment (if `:configurations => ['Debug']`, it can only run through XCode. It is not possible to Archive as an App).
4. Install the pod(s) by running `pod install`. If you can't search `LLDebugTool` or you can't find the newest release version, running `pod repo update` before `pod install`.
5. Include LLDebugTool wherever you need it with `#import "LLDebug.h"` or you can write `#import "LLDebug.h"` in your .pch in your .pch file.

Swift

1. Add a pod entry for LLDebugToolSwift to your Podfile `pod 'LLDebugToolSwift' , '~> 1.0'`.
2. If only you want to use it only in Debug mode, Add a pod entry for LLDebugToolSwift to your Podfile `pod 'LLDebugToolSwift' , '~> 1.0' ,:configurations => ['Debug']`, Details also see Wiki/Use in Debug environment. If you want to specify the version, use as `pod 'LLDebugToolSwift' , '1.3.8.1' ,:configurations => ['Debug']`.
3. The recommended approach is to use multiple targets and only add `pod 'LLDebugToolSwift', '~> 1.0'` to Debug Target. This has the advantage of not contamiling the code in the Product environment and can be integrated into the App in the Archive Debug environment (if `:configurations => ['Debug']`, it can only run through XCode. It is not possible to Archive as an App).
4. Must be added in the Podfile `use_frameworks!`.
5. Install the pod(s) by running `pod install`. If you can't search `LLDebugToolSwift` or you can't find the newest release version, running `pod repo update` before `pod install`.
6. Include LLDebugTool wherever you need it with `import "LLDebugToolSwift`.

### Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

Objective - C

To integrate LLDebugTool into your Xcode project using Carthage, specify it in your `Cartfile`:

`github "LLDebugTool"`

Run `carthage` to build the framework and drag the built `LLDebugTool.framework` into your Xcode project.

Swift

To integrate LLDebugToolSwift into your Xcode project using Carthage, specify it in your `Cartfile`:

`github "LLDebugToolSwift"`

Run `carthage` to build the framework and drag the built `LLDebugToolSwift.framework` into your Xcode project.

### Source files

Alternatively you can directly add the source folder named LLDebugTool. to your project.

Objective - C

2. Open your project in Xcode, then drag and drop the source folder named `LLDebugTool`. When you are prompted to "Choose options for adding these files", be sure to check the "Copy items if needed".
3. Integrated FMDB to your project,FMDB is an Objective-C wrapper around SQLite.
4. Integrated Masonry to your project, Masonry is an Objective-C constraint library. There are no specific version requirements, but it is recommended that you use the latest version.
5. Include LLDebugTool wherever you need it with `#import "LLDebug.h"` or you can write `#import "LLDebug.h"` in your .pch in your .pch file.

Swift

3. Open your project in Xcode, then drag and drop the source folder named `LLDebugTool` and `LLDebugToolSwift`. When you are prompted to "Choose options for adding these files", be sure to check the "Copy items if needed".
4. Integrated FMDB to your project,FMDB is an Objective-C wrapper around SQLite.
5. Integrated Masonry to your project, Masonry is an Objective-C constraint library. There are no specific version requirements, but it is recommended that you use the latest version.
6. Include LLDebugTool wherever you need it with `import LLDebugToolSwift"`.

## Usage

### Get Started

You need to start LLDebugTool at "application:(UIApplication * )application didFinishLaunchingWithOptions:(NSDictionary * )launchOptions", Otherwise you will lose some information.

If you want to configure some parameters, must configure before "startWorking". More config details see LLConfig.h.

• `Quick Start`

In Objective-C

``````#import "AppDelegate.h"
#import "LLDebug.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// The default color configuration is green background and white text color.

// Start working.
[[LLDebugTool sharedTool] startWorking];

// Write your project code here.
return YES;
}
``````

In Swift

``````import LLDebugToolSwift

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// ####################### Start LLDebugTool #######################//
// Use this line to start working.
LLDebugTool.shared().startWorking()

// Write your project code here.

return true
}
``````
• `Start With Custom Config`

In Objective-C

``````#import "AppDelegate.h"
#import "LLDebug.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

// Start working with config.
[[LLDebugTool sharedTool] startWorkingWithConfigBlock:^(LLConfig * _Nonnull config) {

//####################### Color Style #######################//
// Uncomment one of the following lines to change the color configuration.
// config.colorStyle = LLConfigColorStyleSystem;
// [config configBackgroundColor:[UIColor orangeColor] primaryColor:[UIColor whiteColor] statusBarStyle:UIStatusBarStyleDefault];

//####################### User Identity #######################//
// Use this line to tag user. More config please see "LLConfig.h".
config.userIdentity = @"Miss L";

//####################### Window Style #######################//
// Uncomment one of the following lines to change the window style.
// config.entryWindowStyle = LLConfigEntryWindowStyleNetBar;

}];

return YES;
}
``````

In Swift

``````import LLDebugToolSwift

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

// Start working with config.
LLDebugTool.shared().startWorking { (config) in
//####################### Color Style #######################//
// Uncomment one of the following lines to change the color configuration.
// config.colorStyle = .system
// config.configBackgroundColor(.orange, textColor: .white, statusBarStyle: .default)

//####################### User Identity #######################//
// Use this line to tag user. More config please see "LLConfig.h".
config.userIdentity = "Miss L";

//####################### Window Style #######################//
// Uncomment one of the following lines to change the window style.
// config.windowStyle = .netBar

//####################### Features #######################//
// Uncomment this line to change the available features.
// config.availables = .noneAppInfo
}

return true
}
``````

### Network Request

You don't need to do anything, just call the "startWorking" will monitoring most of network requests, including the use of NSURLSession, NSURLConnection and AFNetworking. If you find that you can't be monitored in some cases, please open an issue and tell me.

### Log

Print and save a log. More log macros details see LLDebugToolMacros.h.

• `Save Log`

In Objective-C

``````#import "LLDebug.h"

- (void)testNormalLog {
// Insert an LLog where you want to print.
LLog(@"Message you want to save or print.");
}
``````

In Swift

``````import LLDebugToolSwift

func testNormalLog() {
// Insert an LLog where you want to print.
LLog.log(message: "Message you want to save or print.")
}
``````
• `Save Log with event and level`

In Objective-C

``````#import "LLDebug.h"

- (void)testEventErrorLog {
// Insert an LLog_Error_Event where you want to print an event and level log.
LLog_Error_Event(@"The event that you want to mark. such as bugA, taskB or processC.",@"Message you want to save or print.");
}
``````

In Swift

``````import LLDebugToolSwift

func testEventErrorLog() {
// Insert an LLog_Error_Event where you want to print an event and level log.
LLog.errorLog(message: "Message you want to save or print.", event: "The event that you want to mark. such as bugA, taskB or processC.")
}
``````

### Crash

You don't need to do anything, just call the "startWorking" to intercept the crash, store crash information, cause and stack informations, and also store the network requests and log informations at the this time.

### AppInfo

LLDebugTool monitors the app's CPU, memory, and FPS. At the same time, you can also quickly check the various information of the app.

### Sandbox

LLDebugTool provides a quick way to view and manipulate sandbox, you can easily delete the files/folders inside the sandbox, or you can share files/folders by airdrop elsewhere. As long as apple supports this file format, you can preview the files directly in LLDebugTool.

### Screenshots

LLDebugTool provides a screenshot and allows for simple painting and marking that can be easily recorded during testing or while the UI designers debugs the App.

### Hierarchy

LLDebugTool provides a view structure tool for viewing or modify elements' properties and information in non-debug mode.

### Magnifier

LLDebugTool provides a magnify tool for magnifying local uis and viewing color values at specified pixel.

### Ruler

LLDebugTool provides a convenient tools to display touch point information.

### Widget Border

LLDebugTool provides a function to display element border, convenient to see the view's frame.

### HTML

LLDebugTool can debug HTML pages through `WKWebView`, `UIWebView` or your customized `ViewController` in your app at any time.

### Location

LLDebugTool provides a function to mock location at anytime.

### More Usage

• You can get more help by looking at the Wiki.
• You can download and run the LLDebugToolDemo or LLDebugToolSwiftDemo to find more use with LLDebugTool. The demo is build under MacOS 10.15.1, XCode 11.2.1, iOS 13.2.2, CocoaPods 1.8.4. If there is any version compatibility problem, please let me know.

## Requirements

LLDebugTool works on iOS 8+ and requires ARC to build. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

`UIKit`

`Foundation`

`SystemConfiguration`

`Photos`

`QuickLook`

`CoreTelephony`

`CoreLocation`

`MapKit`

`AVKit`

## Architecture

`LLDebug.h`

Public header file. You can refer it to the pch file.

`DebugTool`

`LLDebugTool` Used to start and stop LLDebugTool, you need to look at it.

`LLConfig` Used for the custom color , size , identification and other information. If you want to configure anything, you need to focus on this file.

`LLDebugToolMacros.h` Quick macro definition file.

`Components`

• `Network` Used to monitoring network request.
• `Log` Used to quick print and save log.
• `Crash` Used to collect crash information when an App crashes.
• `AppInfo` Use to monitoring app's properties.
• `Sandbox` Used to view and operate sandbox files.
• `Screenshot` Used to process and display screenshots.
• `Hierarchy` Used to process and present the view structure.
• `Magnifier` Used for magnifying glass function.
• `Ruler` Used to ruler function.
• `Widget Border` User to widget border function.
• `Function` Used to show functions.
• `Html` Used to dynamic test web view.
• `Location` Used to mock location.
• `Setting` Used to dynamically set configs.

## Communication

• If you need help, open an issue.
• If you'd like to ask a general question, open an issue.
• If you found a bug, and can provide steps to reliably reproduce it, open an issue.
• If you have a feature request, open an issue.
• If you find anything wrong or anything dislike, open an issue.
• If you have some good ideas or some requests, send mail(llworkinggroup1992@gmail.com) to me.
• If you want to contribute, submit a pull request.

## Change-log

A brief summary of each LLDebugTool release can be found in the CHANGELOG.