GithubHelp home page GithubHelp logo

facebook / flipper Goto Github PK

View Code? Open in Web Editor NEW
12.2K 166.0 873.0 196.09 MB

A desktop debugging platform for mobile developers.

Home Page: https://fbflipper.com/

License: MIT License

JavaScript 1.74% Shell 0.31% CSS 1.00% HTML 0.24% Java 11.33% C++ 5.25% Objective-C 3.25% Objective-C++ 5.15% C 0.02% Ruby 7.24% CMake 0.09% Swift 0.31% Haskell 0.32% Kotlin 3.89% TypeScript 59.31% Batchfile 0.01% Rust 0.38% Less 0.16%

flipper's Introduction

logo

Flipper

Android Maven Badge iOS

Flipper (formerly Sonar) is a platform for debugging mobile apps on iOS and Android and, recently, even JS apps in your browser or in Node.js. Visualize, inspect, and control your apps from a simple desktop interface. Use Flipper as is or extend it using the plugin API.

Flipper

Table of Contents

Mobile development

Flipper aims to be your number one companion for mobile app development on iOS and Android. Therefore, we provide a bunch of useful tools, including a log viewer, interactive layout inspector, and network inspector.

Extending Flipper

Flipper is built as a platform. In addition to using the tools already included, you can create your own plugins to visualize and debug data from your mobile apps. Flipper takes care of sending data back and forth, calling functions, and listening for events on the mobile app.

Contributing to Flipper

Both Flipper's desktop app, native mobile SDKs, JS SDKs are open-source and MIT licensed. This enables you to see and understand how we are building plugins, and of course, join the community and help to improve Flipper. We are excited to see what you will build on this platform.

In this repo

This repository includes all parts of Flipper. This includes:

  • Flipper's desktop app built using Electron (/desktop)
  • native Flipper SDKs for iOS (/iOS)
  • native Flipper SDKs for Android (/android)
  • React Native Flipper SDK (/react-native)
  • JS Flipper SDK (/js)
  • Plugins:
    • Logs (/desktop/plugins/public/logs)
    • Layout inspector (/desktop/plugins/public/layout)
    • Network inspector (/desktop/plugins/public/network)
    • Shared Preferences/NSUserDefaults inspector (/desktop/plugins/public/shared_preferences)
  • website and documentation (/website / /docs)

Getting started

Please refer to our Getting Started guide to set up Flipper. Or, (still experimental) run npx flipper-server for a browser based version of Flipper.

Requirements

  • node >= 8
  • yarn >= 1.5
  • iOS developer tools (for developing iOS plugins)
  • Android SDK and adb

Building from Source

Desktop

Running from source

git clone https://github.com/facebook/flipper.git
cd flipper/desktop
yarn
yarn start

NOTE: If you're on Windows, you need to use Yarn 1.5.1 until this issue is resolved.

Building standalone application

Provide either --mac, --win, --linux or any combination of them to yarn build to build a release zip file for the given platform(s). E.g.

yarn build --mac --version $buildNumber

You can find the resulting artifact in the dist/ folder.

iOS SDK + Sample App

cd iOS/Sample
rm -f Podfile.lock
pod install --repo-update
open Sample.xcworkspace
<Run app from xcode>

You can omit --repo-update to speed up the installation, but watch out as you may be building against outdated dependencies.

Android SDK + Sample app

Start up an android emulator and run the following in the project root:

./gradlew :sample:installDebug

React Native SDK + Sample app

Requires RN 0.69+!

cd react-native/ReactNativeFlipperExample
yarn
yarn android

Note that the first 2 steps need to be done only once.

Alternatively, the app can be started on iOS by running yarn ios.

If this is the first time running, you will also need to run pod install --repo-update from the react-native/ReactNativeFlipperExample/ios folder.

React Native Windows (Experimental)

An experimental version of Flipper for React Native Windows is available. The following steps prepare the React Native Flipper project:

cd react-native/react-native-flipper
vcpkg install openssl:x64-uwp openssl:arm-uwp
vcpkg integrate install
yarn install
cd windows
nuget install ReactNativeFlipper/packages.config

In a nutshell, vcpkg is used to install OpenSSL. Nuget is used to install Boost.

Then, the sample application can be built and run as follows:

cd ../../ReactNativeFlipperExample
yarn install
yarn relative-deps
npx react-native run-windows

At the moment there's no available package for React Native Flipper. This means that to integrate Flipper with any other existing applications, an explicit reference to the project needs to be added just as is done with the sample application.

JS SDK + Sample React app

cd js/react-flipper-example
yarn
yarn start

Troubleshooting

Older yarn versions might show an error / hang with the message 'Waiting for the other yarn instance to finish'. If that happens, run the command yarn first separately in the directory react-native/react-native-flipper.

Documentation

Find the full documentation for this project at fbflipper.com.

Our documentation is built with Docusaurus. You can build it locally by running this:

cd website
yarn
yarn start

Contributing

See the CONTRIBUTING file for how to help out.

License

Flipper is MIT licensed, as found in the LICENSE file.

flipper's People

Contributors

adamjernst avatar aigoncharov avatar andrey-mishanin avatar antonk52 avatar appden avatar bizzguy avatar bnelo12 avatar cekkaewnumchai avatar daniel9z avatar danielbuechele avatar dependabot-preview[bot] avatar dependabot[bot] avatar facebook-flipper-bot avatar greenkeeper[bot] avatar jknoxville avatar kevinstrider avatar lawrencelomax avatar lblasa avatar lukedefeo avatar mihaelao avatar mweststrate avatar nikoant avatar pakoito avatar passy avatar priteshrnandgaonkar avatar simek avatar timur-valiev avatar web-flow avatar xiphirx avatar zertosh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flipper's Issues

Feature Request Adding Support for SqlLite DB browser and Shared Preference

As sonar on the path of replacing Stetho, there are some functionalities in Stetho that is currently not supported by Sonar. There are 2 main functionalities that would be awesome to add as a plugin.

  1. Support to browse SQLlite DB and run raw queries on it.
  2. Support to browse App's Shared Preference and option to edit them.

This functionalities already exist in Stetho and super easy to use.

Minor issues in Getting Started guide (Android section)

There are a couple of issue with the Getting Started guide (Android section). Specifically in this snippet:

if (BuildConfig.DEBUG && SonarUtils.isMainProcess(mApplicationContext)) {
    final SonarClient client = AndroidSonarClient.getInstance(this);
    client.addPlugin(new MySonarPlugin());
    client.start();
}

isMainProcess is a private method. Should this be shouldEnableSonar instead?

Also, MySonarPlugin obviously does not exist. Maybe this could be replaced with an actual plugin and a comment, e.g.:

    // Add plugins here, for example
    client.addPlugin(new NetworkSonarPlugin());

That way, you can simply copy+paste from the Getting Started guide and immediately have a working app.

Android Build Fails On MultiDex Project

App fails to build if I add the gradle dependency to my already multi-dex project.

Android Studio 3.1.3
Build #AI-173.4819257, built on June 4, 2018
JRE: 1.8.0_152-release-1024-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.4
Gradle Tools: 3.1.3


AGPBI: {"kind":"error","text":"Program type already present: android.support.v4.app.BackStackRecord$Op","sources":[{}],"tool":"D8"}
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /..../app/build/intermediates/transforms/dexBuilder/debug/13.jar,
/…./app/build/intermediates/transforms/dexBuilder/debug/14.jar, 

The above error with debug/14.jar happens dozens of times with different numbered jars

When I run it from the command line with —stacktrace added I get the below exception

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
        at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:94)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:89)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:70)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.access$100(LifecycleProjectEvaluator.java:34)
        at org.gradle.configuration.project.LifecycleProjectEvaluator$ConfigureProject.run(LifecycleProjectEvaluator.java:110)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)
        at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:666)
        at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:135)
        at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
        at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62)
        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
        at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:249)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
        at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:167)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:126)
        at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:109)
        at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78)
        at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
        at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100)
        at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40)
        at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
        at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
        at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:57)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
        at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
        at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:69)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:30)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44)
        at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:45)
        at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
        at org.gradle.util.Swapper.swap(Swapper.java:38)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
        at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.NullPointerException
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:782)
        at com.google.common.base.Splitter.split(Splitter.java:376)
        at com.android.utils.PathUtils.getClassPathItems(PathUtils.java:84)
        at com.android.build.gradle.internal.transforms.FixStackFramesTransform.<init>(FixStackFramesTransform.java:151)
        at com.android.build.gradle.internal.TaskManager.maybeCreateDesugarTask(TaskManager.java:2425)
        at com.android.build.gradle.internal.TaskManager.createPostCompilationTasks(TaskManager.java:2248)
        at com.android.build.gradle.internal.ApplicationTaskManager.addCompileTask(ApplicationTaskManager.java:295)
        at com.android.build.gradle.internal.ApplicationTaskManager.lambda$createTasksForVariantScope$12(ApplicationTaskManager.java:229)
        at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
        at com.android.build.gradle.internal.ApplicationTaskManager.createTasksForVariantScope(ApplicationTaskManager.java:225)
        at com.android.build.gradle.internal.VariantManager.createTasksForVariantData(VariantManager.java:530)
        at com.android.build.gradle.internal.VariantManager.lambda$createAndroidTasks$1(VariantManager.java:352)
        at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
        at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:348)
        at com.android.build.gradle.BasePlugin.lambda$createAndroidTasks$6(BasePlugin.java:751)
        at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
        at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:746)
        at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:652)
        at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
        at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:648)
        at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91)
        at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80)
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
        at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
        at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
        at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
        at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
        at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
        at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
        at com.sun.proxy.$Proxy26.afterEvaluate(Unknown Source)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:76)
        ... 81 more

Cannot compile Android project with D8 Compiler

I can't seem to build the project after adding Sonar and enabling d8 compiler in gradle.properties with
android.enableD8=true. I got the following error when I run with gradlew clean assemble

> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
D8: Program type already present: android.support.v4.app.BackStackRecord$Op

Removing Sonar dependency in gradle and running again works. Happening on Android Studio 3.2 with SDK Version of 28

DexArchiveBuilderException

I followed the Getting Started guide for my project. After trying to build (with clean) I get the following issue:

com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/pkwiecinski/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.9.1/84b4b7d1c4a238e7899972b7446c250691e65f1f/okhttp-3.9.1.jar
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
        at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
        at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
        at com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:146)
        at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.transform(DexArchiveBuilderTransform.java:405)
        at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:239)
        at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:235)
        at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
        at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:230)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$ExecuteTaskAction.execute(DefaultTaskExecutionGraph.java:262)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$ExecuteTaskAction.execute(DefaultTaskExecutionGraph.java:246)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:136)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.execute(DefaultTaskPlanExecutor.java:201)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.executeWithTask(DefaultTaskPlanExecutor.java:192)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/pkwiecinski/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.9.1/84b4b7d1c4a238e7899972b7446c250691e65f1f/okhttp-3.9.1.jar
        at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:900)
        at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.lambda$convertToDexArchive$6(DexArchiveBuilderTransform.java:825)
        at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
        at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:124)
        at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:101)
        at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:895)
        ... 6 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
        at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:72)
        at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:45)
        at com.android.tools.r8.D8.run(D8.java:89)
        at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:99)
        ... 7 more
Caused by: com.android.tools.r8.utils.AbortException: Error: Type okhttp3.internal.tls.TrustRootIndex is referenced as an interface from `okhttp3.internal.tls.BasicTrustRootIndex`.
        at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:93)
        at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:64)
        at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:66)
        ... 10 more


> Task :app:transformClassesWithDexBuilderForDevDebug FAILED

Building from command line.
Gradle 4.8,
compileSdkVersion 27,
androidTools = "3.2.0-alpha17",
kotlin = "1.2.41",
sonar = "0.0.1".

Crash on launch, no mention of SoLoader in getting started

When following the Android getting started guide I'm running into the following exception when launching the app

AndroidRuntime	FATAL EXCEPTION: SonarEventBaseThread
Process: com.example.sonartest, PID: 11228
java.lang.ExceptionInInitializerError
	at com.facebook.sonar.android.SonarThread.run(SonarThread.java:25)
Caused by: java.lang.RuntimeException: SoLoader.init() not yet called
	at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java:746)
	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:476)
	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:455)
	at com.facebook.jni.HybridData.<clinit>(HybridData.java:34)
	... 1 more

Looking at the sample application it seems necessary to call SoLoader.init() prior to creating a Sonar client, if this is the case the getting started guide should be updated to reflect this.

Pod installed failed when Run the sample code on iOS or on my own project.

Pod installed failed when Run the sample code on iOS or on my own project.

RT.

➜  Sample pod install
Analyzing dependencies
[!] A dependency with an external source may not specify version requirements (Yoga).

Build On macOS 10.13.3 (17D102),

➜  Sample swift --version
Apple Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)
Target: x86_64-apple-darwin17.4.0

build error for :' Execution failed for task ':app:transformNative_libsWithMergeJniLibsForDev_21Debug'.'

Execution failed for task ':app:transformNative_libsWithMergeJniLibsForDev_21Debug'.

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK lib/armeabi-v7a/libgnustl_shared.so
File1: ../app/build/intermediates/exploded-aar/com.facebook.react/react-native/0.42.3/jni
File2: ../app/build/intermediates/exploded-aar/com.facebook.sonar/sonar/0.0.1/jni

Any iOS SDK released?

Pod install failed, too more errors....

CocoaPods could not find compatible versions for pod "PeerTalk":

Or

CocoaPods could not find compatible versions for pod "ComponentKit":

Or

** /xxxxx/Pods/Sonar/xplat/Sonar/SonarWebSocketImpl.cpp:102:8: No member named 'delayedUnsafe' in 'folly::Futurefolly::Unit' **

..............

Add iOS physical device support

Sonar.app iOS not found, any help?

my code:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   ......
       SonarClient *client = [SonarClient sharedClient];
    SKDescriptorMapper *mapper = [[SKDescriptorMapper alloc] initWithDefaults];
    [client addPlugin:[[SonarKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:mapper]];
    [client start];
   ......
}

Support Desktop app on Linux

Do you have any plan to make this app runnable on Linux system ( for me, I'm using Ubuntu 18.04 ).

Curl 7.60.0
Yarn 1.7.0

I tried to run it then got this error.

yarn
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "[email protected]^7.2.3".
[4/4] Building fresh packages...
$ node node_modules/electron/install.js && node scripts/yarn-install.js
warning "metro > @babel/[email protected]" has incorrect peer dependency "@babel/[email protected]".
📦 Installed all dependencies!
Done in 62.17s.

yarn start
Error: watch Sonar/node_modules/handlebars/dist/cjs/handlebars/helpers ENOSPC
at _errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at NodeWatcher.watchdir (Sonar/static/node_modules/sane/src/node_watcher.js:175:20)
at Walker. (Sonar/static/node_modules/sane/src/common.js:127:12)
at emitTwo (events.js:126:13)
at Walker.emit (events.js:214:7)
at Sonar/static/node_modules/walker/lib/walker.js:69:16
at FSReqWrap.oncomplete (fs.js:135:15)
error Command failed with exit code 1

SonarKit podspec validation fails

Currently pod spec lint SonarKit.podspec fails and its blocking us to release it on cocoapods. It fails the following error

-> SonarKit (0.0.1)
    - WARN  | source: Git sources should specify a tag.
    - WARN  | url: The URL (https://github.com/facebook/Sonar) is not reachable.
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] swift: The validator used Swift 3.2 by default because no Swift version was specified. To specify a Swift version during validation, add the `swift_version` attribute in your podspec. Note that usage of the `--swift-version` parameter or a `.swift-version` file is now deprecated.
    - ERROR | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | [SonarKit/SonarKitLayoutComponentKitSupport] xcodebuild:  warning: no rule to process file 'ComponentKit/ComponentKit/ComponentKit.xcconfig' of type text.xcconfig for architecture i386
    - NOTE  | [SonarKit/SonarKitLayoutComponentKitSupport] xcodebuild:  warning: no rule to process file 'ComponentKit/ComponentKit/ComponentKit.xcconfig' of type text.xcconfig for architecture x86_64
    - WARN  | [SonarKit/SonarKitLayoutPlugin,SonarKit/SonarKitNetworkPlugin] xcodebuild:  glog/src/demangle.cc:343:18: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
    - WARN  | [SonarKit/SonarKitLayoutPlugin,SonarKit/SonarKitLayoutComponentKitSupport] xcodebuild:  DoubleConversion/double-conversion/strtod.cc:209:7: warning: code will never be executed [-Wunreachable-code]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:70:81: warning: 'dispatch_get_current_queue' is deprecated: first deprecated in iOS 6.0 - unsupported interface [-Wdeprecated-declarations]
    - NOTE  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/usr/include/dispatch/queue.h:343:1: note: 'dispatch_get_current_queue' has been explicitly marked deprecated here
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:90:68: warning: 'dispatch_get_current_queue' is deprecated: first deprecated in iOS 6.0 - unsupported interface [-Wdeprecated-declarations]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:200:7: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:204:9: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:205:8: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:207:5: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:265:9: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:266:35: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:267:8: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:268:7: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:345:53: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:351:5: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:353:9: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:354:8: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:354:54: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:355:7: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:395:37: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:397:9: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:462:7: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:477:33: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:478:22: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:479:19: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:483:23: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:484:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:493:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:499:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:504:15: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:506:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTProtocol.m:79:38: warning: 'dispatch_get_current_queue' is deprecated: first deprecated in iOS 6.0 - unsupported interface [-Wdeprecated-declarations]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTProtocol.m:314:69: warning: 'dispatch_get_current_queue' is deprecated: first deprecated in iOS 6.0 - unsupported interface [-Wdeprecated-declarations]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:217:29: warning: 'dispatch_get_current_queue' is deprecated: first deprecated in iOS 6.0 - unsupported interface [-Wdeprecated-declarations]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:324:28: warning: 'dispatch_get_current_queue' is deprecated: first deprecated in iOS 6.0 - unsupported interface [-Wdeprecated-declarations]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:416:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:416:26: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:417:6: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:441:16: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:444:57: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:446:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:454:9: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:472:7: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:492:22: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:492:64: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:498:7: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:492:54: warning: implicit conversion loses integer precision: 'long long' to 'size_t' (aka 'unsigned long') [-Wshorten-64-to-32]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:567:62: warning: implicit conversion loses integer precision: 'unsigned long' to 'socklen_t' (aka 'unsigned int') [-Wshorten-64-to-32]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTChannel.m:589:60: warning: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:88:49: warning: implicit conversion loses integer precision: 'NSUInteger' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
    - WARN  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  PeerTalk/peertalk/PTUSBHub.m:385:33: warning: implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'USBMuxReplyCode' (aka 'unsigned int') [-Wshorten-64-to-32]
    - NOTE  | [SonarKit/SonarKitLayoutPlugin, SonarKit/SonarKitLayoutComponentKitSupport, SonarKit/SonarKitNetworkPlugin, and more...] xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:135:1: warning: implicit conversion loses integer precision: 'long' to 'google::int32' (aka 'int') [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:137:1: warning: implicit conversion loses integer precision: 'long' to 'google::int32' (aka 'int') [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:141:1: warning: implicit conversion loses integer precision: 'long' to 'google::int32' (aka 'int') [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:143:1: warning: implicit conversion loses integer precision: 'long' to 'google::int32' (aka 'int') [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:170:1: warning: implicit conversion loses integer precision: 'long' to 'google::int32' (aka 'int') [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:624:33: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:757:65: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:782:33: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:792:33: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:1073:47: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'const int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:1334:19: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'const int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:1406:40: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'const int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:1507:67: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:1520:67: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:1887:21: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/logging.cc:1888:16: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/signalhandler.cc:95:50: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/vlog_is_on.cc:52:1: warning: implicit conversion loses integer precision: 'long' to 'google::int32' (aka 'int') [-Wshorten-64-to-32]
    - WARN  | [iOS] [SonarKit/SonarKitLayoutPlugin] xcodebuild:  glog/src/vlog_is_on.cc:163:27: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'const int' [-Wshorten-64-to-32]

'iosfwd' file not found

After importing <Sonar/SonarClient.h>, 'iosfwd' cannot be found in json.h. This is a mixed Obj-C & Swift project.

Swift support for Sonar

Currently Sonar doesn't build with Swift projects due to its dependecies being written in c++.
There are few files which are referenced by sonar's Objective-C wrapper which has reference to header with C++ code. We can either get rid off those references from header files to support swift.

Unable to use library with AS 3.2 Preview 18

Unable to compile an Android app with Sonar 0.0.1. dependency, using R8/D8:

Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/andrei/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.10.0/7ef0f1d95bf4c0b3ba30bbae25e0e562b05cf75e/okhttp-3.10.0.jar
	at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:900)
	at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.lambda$convertToDexArchive$6(DexArchiveBuilderTransform.java:825)
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
	at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:124)
	at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:101)
	at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:895)
	... 6 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
	at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:65)
	at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:43)
	at com.android.tools.r8.D8.run(D8.java:89)
	at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:99)
	... 7 more
Caused by: com.android.tools.r8.utils.AbortException: Error: Type okhttp3.internal.tls.TrustRootIndex is referenced as an interface from `okhttp3.internal.tls.BasicTrustRootIndex`.
	at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:116)
	at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:74)
	at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:59)
	... 10 more

Feature request: scroll to end

Currently the log pane maintains the current scroll position even if scrolled to the bottom. Ideally, the pane could optionally remain scrolled to the end if positioned there, similar to other developer tools.

Error while building gradle #android

Error: Program type already present: android.arch.lifecycle.LifecycleRegistry$ObserverWithState

at com.android.tools.r8.utils.ProgramClassCollection.resolveClassConflictImpl(ProgramClassCollection.java:64)
at com.android.tools.r8.utils.ProgramClassCollection.lambda$create$0(ProgramClassCollection.java:25)
at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990)
at com.android.tools.r8.utils.ProgramClassCollection.create(ProgramClassCollection.java:24)
at com.android.tools.r8.graph.LazyLoadedDexApplication$Builder.build(LazyLoadedDexApplication.java:121)
at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:122)
at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:86)
at com.android.tools.r8.GenerateMainDexList.run(GenerateMainDexList.java:40)
at com.android.tools.r8.GenerateMainDexList.run(GenerateMainDexList.java:110)
at com.android.builder.multidex.D8MainDexList.generate(D8MainDexList.java:83)

No use of below one,

debugImplementation ('com.facebook.sonar:sonar:0.0.1'){
exclude group: 'android'
exclude group: 'javax'
exclude group: 'jsr-305'
exclude group: 'okhttp3'
exclude group: 'okio'
exclude group: 'org'
exclude group: 'com.google'
}

Looking forward ....

Failed to install with CocoaPods

Console says:
[!] A dependency with an external source may not specify version requirements (Yoga).

A part of Podfile:

  pod 'RSocket', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/RSocket.podspec?token=ADr9NE_I05Vu8g7oq_g6g_9FLx784NFmks5bJ5LvwA%3D%3D'
  pod 'DoubleConversion', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/DoubleConversion.podspec?token=ADr9NOxtIEmr5ODP9PWq6-sht-Ye6UYGks5bJ5MjwA%3D%3D'
  pod 'glog', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/glog.podspec?token=ADr9NBHbrlbkFR3DQTPzj0CnZdria4jvks5bJ5M3wA%3D%3D'
  pod 'Folly', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/Folly.podspec?token=ADr9NNTjwJ8xqLFwc3Qz3xB3GsCk-Esmks5bJ5NGwA%3D%3D'
  pod 'PeerTalk', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/PeerTalk.podspec?token=ADr9NB8frQTrUWytsMXtdv_P8km7jV_Mks5bJ5NbwA%3D%3D'
  pod 'Yoga','~> 1.8.1', :modular_headers => true
  pod 'Sonar', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/xplat/Sonar/Sonar.podspec?token=ADr9NFO7byH9uAuhGAIEYuoJeBNyBxf6ks5bJ5N8wA%3D%3D'
  pod 'SonarKit', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/SonarKit.podspec'
  pod 'SonarKit/SonarKitLayoutComponentKitSupport', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/SonarKit.podspec'
  pod 'SonarKit/SKIOSNetworkPlugin', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/SonarKit.podspec'
  pod 'ComponentKit', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/ComponentKit.podspec?token=ADr9NNV9gqkpFTUKaHpCiYOZIG3Ev-Hyks5bJ5O-wA%3D%3D'

  post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '4.0'
        end
     end
  end

SonarKitNetworkPlugin Not work?

Add Plugin:

[client addPlugin: [SonarKitNetworkPlugin new]];

Test Code:

    dispatch_async(dispatch_get_global_queue(0, 0), ^{
       
        while (1)
        {
            NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://www.apple.com/"]];
            [[[NSURLSession sharedSession] dataTaskWithRequest:req completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
                
                
            }] resume];
            
            NSData *data1 = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"https://www.apple.com/"]];
            [NSThread sleepForTimeInterval:0.5];
        }

    });

Sonar.app nothing showing ............

temp

Docs translation

Is there any plans for internationalisation ?
I would love to help translate the docs

Unable to build Android Project

Can't build the android project because the fb directory is not present.

This causes the following files to not be found:

fb/visibility.h
fb/fbjni.h
fb/**

Open source BUCK files used to build

Seems as if this was built with Buck, rather than the Gradle buildscripts that are included here. Can you add them to the repo? It might help figure out why the Android build doesn't work.

Fails install to Swift project with CocoaPods?

Hi,

Can I install Sonar to Swift-Project with CocoaPods?
I faced following installing error.
I think use_frameworks! flag causes it.

A workaround is here.
react-native-maps/react-native-maps#1923

[!] The 'Pods-App' target has transitive dependencies that include static binaries: (/Users/muukii/dev/MyProject/Pods/CocoaLibEvent/lib/libevent.a, /Users/muukii/dev/MyProject/Pods/CocoaLibEvent/lib/libevent_core.a, /Users/muukii/dev/MyProject/Pods/CocoaLibEvent/lib/libevent_extra.a, /Users/muukii/dev/MyProject/Pods/CocoaLibEvent/lib/libevent_pthreads.a, /Users/muukii/dev/MyProject/Pods/OpenSSL-Static/lib-ios/libcrypto.a, and /Users/muukii/dev/MyProject/Pods/OpenSSL-Static/lib-ios/libssl.a)
Command failed with status (1): [bundle exec pod install --repo-update...]

Failed to fetch podspec for `SonarKit`

[!] Failed to fetch podspec for SonarKit at https://raw.githubusercontent.com/facebook/Sonar/master/SonarKit.podspec?token=ADr9NBuYoodM_NeysQg899hkxXw0WZ7Xks5bJ5OVwA%3D%3D.
Error: 404 Not Found

Sonar keep crash on startup

I followed the getting started guide, and set up in my application as follows:

if (BuildConfig.DEBUG && SonarUtils.shouldEnableSonar(this)) {
     val client = AndroidSonarClient.getInstance(this)
     client.start()
}

Now whenever my app starts, it crashes with following exception

FATAL EXCEPTION: SonarEventBaseThread
    Process: com.anitime.schedule, PID: 13943
    java.lang.ExceptionInInitializerError
        at com.facebook.sonar.android.SonarThread.run(SonarThread.java:25)
     Caused by: java.lang.RuntimeException: SoLoader.init() not yet called
        at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java:746)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:476)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:455)
        at com.facebook.jni.HybridData.<clinit>(HybridData.java:34)
        at com.facebook.sonar.android.SonarThread.run(SonarThread.java:25) 

I'm on Android SDK of 28, and on Android Studio of 3.2, and testing on Phone with OS version of 8.0.0

Support library classes are packaged into AAR

screen shot 2018-06-12 at 11 46 55 am

Support library classes are packaged with aar instead of resolving it dynamically. And the included support library version is 26.x.x and I'm using 28.0.0-alpha3. There are some breaking changes in 26 to 27 and I can't build my app because of that.

Ex: For fragments, requireContext method is added in 27 and above which is not available in 26 versions.

Due to some reasons, all my support library method calls points to the bundled version of sonar instead of actual library. Please remove the bundled version so that user can customize the version that suits them.

Fix `Getting Started` docs Android

Getting Started Android docs is using an internal private method to check if Sonar should be used.
As per GH-14 comment, it should point to SonarUtils.shouldEnableClient(this)

'SonarKit/SonarClient.h' file not found

hello 👍

iOS pod
#import <SonarKit/SonarClient.h>
show
'SonarKit/SonarClient.h' file not found

platform :ios, '9.0'
swift_version = "4.1"

target 'demo' do
  pod 'RSocket', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/iOS/third-party-podspecs/RSocket.podspec'
  pod 'DoubleConversion', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/iOS/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/iOS/third-party-podspecs/glog.podspec'
  # pod 'CocoaLibEvent', '~> 1.0'
  #:podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/glog.podspec?token=ADr9NImskgi8eZGAADCQH2_PXtgB7-b-ks5bIDrowA%3D%3D'
  pod 'Folly', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/iOS/third-party-podspecs/Folly.podspec'
  pod 'PeerTalk', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/iOS/third-party-podspecs/PeerTalk.podspec'
  pod 'Yoga','~>1.8.1', :modular_headers => true
  pod 'Sonar', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/xplat/Sonar/Sonar.podspec'
  pod 'SonarKit', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/iOS/SonarKit.podspec'
  pod 'SonarKit/SonarKitLayoutComponentKitSupport', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/iOS/SonarKit.podspec'
  pod 'SonarKit/SKIOSNetworkPlugin', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/iOS/SonarKit.podspec'
  pod 'ComponentKit', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/Fix-Broken-iOS-OSS/iOS/third-party-podspecs/ComponentKit.podspec'
  post_install do |installer|
        installer.pods_project.targets.each do |target|
            if ['YogaKit'].include? target.name
                target.build_configurations.each do |config|
                    config.build_settings['SWIFT_VERSION'] = swift_version
                end
            end
        end
    end

end

Handle unset $ANDROID_HOME env variable

When I launch sonar desktop app in mac pro, it show 'no devices running', but I can see the logs keep printing. Besides, I find these abnormal logs:

sonar: Requesting new client certificate from Sonar
sonar: ERROR: Unable to open ifstream: /data/user/0/xxxx/files/sonar/sonarCA.crt
sonar: ERROR: Unable to open ifstream: /data/user/0/xxxx/files/sonar/device.crt
sonar: Starting certificate exchange
sonar: Requesting new client certificate from Sonar
sonar: ERROR: Unable to open ifstream: /data/user/0/xxxx/files/sonar/sonarCA.crt
sonar: ERROR: Unable to open ifstream: /data/user/0/xxxx/files/sonar/device.crt
sonar: Starting certificate exchange

Pod installed failed when Run the sample code on iOS or on my own project.

Pod installed failed when Run the sample code on iOS or on my own project.

RT.

➜  Sample pod install
Analyzing dependencies
[!] A dependency with an external source may not specify version requirements (Yoga).

Build On macOS 10.13.3 (17D102),

➜  Sample swift --version
Apple Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)
Target: x86_64-apple-darwin17.4.0 

can't running on windows

i cloned this repo to my computer.and run command:

cd Sonar
yarn

yarn runned a while,then aborted.this is some info in yarn-err.log:

Arguments: 
  D:\Nodejs\node.exe D:\Yarn\bin\yarn.js


Yarn version: 
  1.5.1

Node version: 
  8.11.1

Platform: 
  win32 x64

Trace: 
  Error: Command failed.
  Exit code: 1
  Command: C:\WINDOWS\system32\cmd.exe
  Arguments: /d /s /c node node_modules/electron/install.js && node scripts/yarn-install.js
  Directory: F:\github\Sonar
  Output:
  
      at ProcessTermError.MessageError (D:\Yarn\lib\cli.js:186:110)
      at new ProcessTermError (D:\Yarn\lib\cli.js:226:113)
      at ChildProcess.<anonymous> (D:\Yarn\lib\cli.js:30281:17)
      at emitTwo (events.js:126:13)
      at ChildProcess.emit (events.js:214:7)
      at maybeClose (internal/child_process.js:925:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

Android compilation error using it with React Native module libgnustl_shared.so, libfb.so duplication

When integrating Sonar on a project with React Native as a dependency, I get a lot of DuplicateRelativeFileException with libgnustl_shared, libfb etc.

This is happening due to the dependency of our app on React Native. I was able to fix this issue by putting this in our gradle file

android {
        packagingOptions {
            pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'
            pickFirst 'lib/x86/libgnustl_shared.so'
            pickFirst 'lib/armeabi-v7a/libfb.so'
            pickFirst 'lib/x86/libfb.so'
            pickFirst 'lib/armeabi-v7a/libglog.so'
            pickFirst 'lib/x86/libglog.so'
        }
    }

Submitting the issue so others can fix it.

Broken Android gradle build system

Currently android build system is broken.
./gradlew :android:build builds the android side of sonar. This will download all the native dependencies and will build it for all the platforms.
Currently ./gradlew :android:build fails as it doesn't have RSocket, OpenSSL and LibEvent native dependencies. We will have to add this dependencies to ./gradlew :android:build.

Gradle error when building

I'm trying to test Sonar with android, I created a new application with android studio, and added the dependency to the build.gradle

dependencies {
    // ...
    debugImplementation 'com.facebook.sonar:sonar:0.0.1'
}

When I try to build the app, I get the following error:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
	at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/0.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/62.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/90.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/96.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/97.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/98.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/99.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/100.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/101.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/102.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/103.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/104.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/105.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/106.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/107.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/108.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/109.jar
	at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
	at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:212)
	at sun.reflect.GeneratedMethodAccessor465.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
	at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
	... 32 more
Caused by: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/0.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/62.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/90.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/96.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/97.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/98.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/99.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/100.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/101.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/102.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/103.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/104.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/105.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/106.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/107.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/108.jar, /Users/rigor789/Code/SonarTest/app/build/intermediates/transforms/dexBuilder/debug/109.jar
	at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:124)
	at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:109)
	at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:101)
	at com.android.build.gradle.internal.transforms.ExternalLibsMergerTransform.transform(ExternalLibsMergerTransform.kt:123)
	at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:221)
	at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:217)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
	... 47 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
	at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:76)
	at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:45)
	at com.android.tools.r8.D8.run(D8.java:67)
	at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:107)
	... 52 more
Caused by: com.android.tools.r8.utils.AbortException
	at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:77)
	at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:58)
	at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:67)
	... 55 more

In the Android Issues section this error appears as well:

Program type already present: android.support.v4.app.BackStackState$1
Message{kind=ERROR, text=Program type already present: android.support.v4.app.BackStackState$1, sources=[Unknown source file], tool name=Optional.of(D8)}

POD SonarKit failed, HELP!

pod install failed

-> Fetching podspec for `SonarKit` from `https://raw.githubusercontent.com/facebook/Sonar/master/SonarKit.podspec?token=ADr9NBuYoodM_NeysQg899hkxXw0WZ7Xks5bJ5OVwA%3D%3D`
[!] Failed to fetch podspec for `SonarKit` at `https://raw.githubusercontent.com/facebook/Sonar/master/SonarKit.podspec?token=ADr9NBuYoodM_NeysQg899hkxXw0WZ7Xks5bJ5OVwA%3D%3D`.
 Error: 404 Not Found

My Podfile is (copy from https://fbsonar.com/docs/getting-started.html)

platform :ios, '8.0'
swift_version = '4.1'

target 'SonarDemo' do

  pod 'RSocket', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/RSocket.podspec?token=ADr9NE_I05Vu8g7oq_g6g_9FLx784NFmks5bJ5LvwA%3D%3D'
  pod 'DoubleConversion', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/DoubleConversion.podspec?token=ADr9NOxtIEmr5ODP9PWq6-sht-Ye6UYGks5bJ5MjwA%3D%3D'
  pod 'glog', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/glog.podspec?token=ADr9NBHbrlbkFR3DQTPzj0CnZdria4jvks5bJ5M3wA%3D%3D'
  pod 'Folly', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/Folly.podspec?token=ADr9NNTjwJ8xqLFwc3Qz3xB3GsCk-Esmks5bJ5NGwA%3D%3D'
  pod 'PeerTalk', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/PeerTalk.podspec?token=ADr9NB8frQTrUWytsMXtdv_P8km7jV_Mks5bJ5NbwA%3D%3D'
  pod 'Yoga','~>1.8.1', :modular_headers => true
  pod 'Sonar', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/xplat/Sonar/Sonar.podspec?token=ADr9NFO7byH9uAuhGAIEYuoJeBNyBxf6ks5bJ5N8wA%3D%3D'
  pod 'SonarKit', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/SonarKit.podspec?token=ADr9NBuYoodM_NeysQg899hkxXw0WZ7Xks5bJ5OVwA%3D%3D'
  pod 'SonarKit/SonarKitLayoutComponentKitSupport', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/SonarKit.podspec?token=ADr9NBuYoodM_NeysQg899hkxXw0WZ7Xks5bJ5OVwA%3D%3D'
  pod 'SonarKit/SKIOSNetworkPlugin', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/SonarKit.podspec?token=ADr9NBuYoodM_NeysQg899hkxXw0WZ7Xks5bJ5OVwA%3D%3D'
  pod 'ComponentKit', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/ComponentKit.podspec?token=ADr9NNV9gqkpFTUKaHpCiYOZIG3Ev-Hyks5bJ5O-wA%3D%3D'
  post_install do |installer|
        installer.pods_project.targets.each do |target|
            if ['YogaKit'].include? target.name
                target.build_configurations.each do |config|
                    config.build_settings['SWIFT_VERSION'] = swift_version
                end
            end
        end
    end
end

Extract UI components to separate module

It would be nice to have UI components usable outside Sonar or Sonar plugins particularly in web apps.

I've created web app with create-react-app and moved ui, utils, fb-stubs folders to this application.

To use few components in this application I made following changes:

  • add flow support to my react app
  • add import React from "react" to some of the components
  • move imports to start of the file
  • comment out functionality related to electron (clipboard)

Error: No such module 'SonarKit'

Environmental setting

Xcode9.4
Swift4.1
CocoaPods 1.5.2

Situation

I tried to make workspace by CocoaPods.
screenshot

I would like to try out the tutorial.

https://fbsonar.com/docs/getting-started.html

#import <SonarKit/SonarClient.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#if DEBUG
  SonarClient *client = [SonarClient sharedClient];
  [client addPlugin:[MySonarPlugin new]];
  [client start];
#endif
  ...
}
@end

I converted to Swift

import SonarKit

class AppDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
#if DEBUG
        let client = SonarClient.shared() as? SonarClient
        client?.add(MySonarPlugin())
        client?.start()
#endif
    }
}

I tried Command + B but I could not import SonarKit

screenshot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.