@@ -10,7 +10,9 @@ target 'SonarKit' do
|
|||||||
# Pods for SonarKit
|
# Pods for SonarKit
|
||||||
|
|
||||||
# Third party deps podspec link
|
# Third party deps podspec link
|
||||||
pod 'EasyWSClient', :podspec => 'third-party-podspecs/EasyWSClient.podspec'
|
#pod 'EasyWSClient', :podspec => 'third-party-podspecs/EasyWSClient.podspec'
|
||||||
|
pod 'RSocket', :podspec => 'third-party-podspecs/RSocket.podspec'
|
||||||
|
pod 'LibEvent', :podspec => 'third-party-podspecs/LibEvent.podspec'
|
||||||
pod 'DoubleConversion', :podspec => 'third-party-podspecs/DoubleConversion.podspec'
|
pod 'DoubleConversion', :podspec => 'third-party-podspecs/DoubleConversion.podspec'
|
||||||
pod 'glog', :podspec => 'third-party-podspecs/glog.podspec'
|
pod 'glog', :podspec => 'third-party-podspecs/glog.podspec'
|
||||||
pod 'Folly', :podspec => 'third-party-podspecs/Folly.podspec'
|
pod 'Folly', :podspec => 'third-party-podspecs/Folly.podspec'
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ swift_version = "4.1"
|
|||||||
|
|
||||||
target 'Sample' do
|
target 'Sample' do
|
||||||
|
|
||||||
|
pod 'RSocket', :podspec => '../third-party-podspecs/RSocket.podspec'
|
||||||
pod 'EasyWSClient', :podspec => '../third-party-podspecs/EasyWSClient.podspec'
|
pod 'EasyWSClient', :podspec => '../third-party-podspecs/EasyWSClient.podspec'
|
||||||
pod 'DoubleConversion', :podspec => '../third-party-podspecs/DoubleConversion.podspec'
|
pod 'DoubleConversion', :podspec => '../third-party-podspecs/DoubleConversion.podspec'
|
||||||
pod 'glog', :podspec => '../third-party-podspecs/glog.podspec'
|
pod 'glog', :podspec => '../third-party-podspecs/glog.podspec'
|
||||||
@@ -17,7 +18,8 @@ target 'Sample' do
|
|||||||
pod 'SonarKit', :podspec => '../SonarKit.podspec'
|
pod 'SonarKit', :podspec => '../SonarKit.podspec'
|
||||||
pod 'SonarKit/SonarKitLayoutComponentKitSupport', :podspec => '../SonarKit.podspec'
|
pod 'SonarKit/SonarKitLayoutComponentKitSupport', :podspec => '../SonarKit.podspec'
|
||||||
pod 'SonarKit/SKIOSNetworkPlugin', :podspec => '../SonarKit.podspec'
|
pod 'SonarKit/SKIOSNetworkPlugin', :podspec => '../SonarKit.podspec'
|
||||||
|
pod 'OpenSSL-Universal', '~> 1.0'
|
||||||
|
pod 'CocoaLibEvent', '~> 1.0'
|
||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
installer.pods_project.targets.each do |target|
|
installer.pods_project.targets.each do |target|
|
||||||
if ['YogaKit'].include? target.name
|
if ['YogaKit'].include? target.name
|
||||||
|
|||||||
@@ -1,22 +1,27 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- boost-for-react-native (1.63.0)
|
- boost-for-react-native (1.63.0)
|
||||||
- CocoaAsyncSocket (7.6.3)
|
- CocoaAsyncSocket (7.6.3)
|
||||||
|
- CocoaLibEvent (1.0.0)
|
||||||
- ComponentKit (0.21):
|
- ComponentKit (0.21):
|
||||||
- Yoga
|
- Yoga
|
||||||
- DoubleConversion (3.0.0)
|
- DoubleConversion (3.0.0)
|
||||||
- EasyWSClient (1.0.0)
|
- EasyWSClient (1.0.0)
|
||||||
- Folly (2018.05.07.00):
|
- Folly (2018.05.28.00):
|
||||||
- boost-for-react-native
|
- boost-for-react-native
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- glog
|
- glog
|
||||||
- glog (0.3.5)
|
- glog (0.3.5)
|
||||||
|
- OpenSSL-Universal (1.0.2.13)
|
||||||
- PeerTalk (0.0.2)
|
- PeerTalk (0.0.2)
|
||||||
- Sonar (1.0.0):
|
- RSocket (0.10.0):
|
||||||
- EasyWSClient
|
|
||||||
- Folly
|
- Folly
|
||||||
|
- Sonar (1.0.0):
|
||||||
|
- Folly
|
||||||
|
- RSocket
|
||||||
- SonarKit (1.0.0):
|
- SonarKit (1.0.0):
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Universal (~> 1.0)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- SonarKit/SKIOSNetworkPlugin (= 1.0.0)
|
- SonarKit/SKIOSNetworkPlugin (= 1.0.0)
|
||||||
@@ -27,6 +32,7 @@ PODS:
|
|||||||
- SonarKit/SKIOSNetworkPlugin (1.0.0):
|
- SonarKit/SKIOSNetworkPlugin (1.0.0):
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Universal (~> 1.0)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- SonarKit/SonarKitNetworkPlugin
|
- SonarKit/SonarKitNetworkPlugin
|
||||||
@@ -34,6 +40,7 @@ PODS:
|
|||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- ComponentKit
|
- ComponentKit
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Universal (~> 1.0)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- SonarKit/SonarKitLayoutPlugin
|
- SonarKit/SonarKitLayoutPlugin
|
||||||
@@ -41,6 +48,7 @@ PODS:
|
|||||||
- SonarKit/SonarKitLayoutPlugin (1.0.0):
|
- SonarKit/SonarKitLayoutPlugin (1.0.0):
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Universal (~> 1.0)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- Yoga (= 1.8.1)
|
- Yoga (= 1.8.1)
|
||||||
@@ -48,6 +56,7 @@ PODS:
|
|||||||
- SonarKit/SonarKitNetworkPlugin (1.0.0):
|
- SonarKit/SonarKitNetworkPlugin (1.0.0):
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Universal (~> 1.0)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- Yoga (1.8.1)
|
- Yoga (1.8.1)
|
||||||
@@ -55,12 +64,15 @@ PODS:
|
|||||||
- Yoga (~> 1.8.1)
|
- Yoga (~> 1.8.1)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
|
- CocoaLibEvent (~> 1.0)
|
||||||
- ComponentKit (from `../third-party-podspecs/ComponentKit.podspec`)
|
- ComponentKit (from `../third-party-podspecs/ComponentKit.podspec`)
|
||||||
- DoubleConversion (from `../third-party-podspecs/DoubleConversion.podspec`)
|
- DoubleConversion (from `../third-party-podspecs/DoubleConversion.podspec`)
|
||||||
- EasyWSClient (from `../third-party-podspecs/EasyWSClient.podspec`)
|
- EasyWSClient (from `../third-party-podspecs/EasyWSClient.podspec`)
|
||||||
- Folly (from `../third-party-podspecs/Folly.podspec`)
|
- Folly (from `../third-party-podspecs/Folly.podspec`)
|
||||||
- glog (from `../third-party-podspecs/glog.podspec`)
|
- glog (from `../third-party-podspecs/glog.podspec`)
|
||||||
|
- OpenSSL-Universal (~> 1.0)
|
||||||
- PeerTalk (from `https://github.com/rsms/peertalk`)
|
- PeerTalk (from `https://github.com/rsms/peertalk`)
|
||||||
|
- RSocket (from `../third-party-podspecs/RSocket.podspec`)
|
||||||
- Sonar (from `../../xplat/Sonar/SonarKitCPP.podspec`)
|
- Sonar (from `../../xplat/Sonar/SonarKitCPP.podspec`)
|
||||||
- SonarKit (from `../SonarKit.podspec`)
|
- SonarKit (from `../SonarKit.podspec`)
|
||||||
- SonarKit/SKIOSNetworkPlugin (from `../SonarKit.podspec`)
|
- SonarKit/SKIOSNetworkPlugin (from `../SonarKit.podspec`)
|
||||||
@@ -71,6 +83,8 @@ SPEC REPOS:
|
|||||||
https://github.com/cocoapods/specs.git:
|
https://github.com/cocoapods/specs.git:
|
||||||
- boost-for-react-native
|
- boost-for-react-native
|
||||||
- CocoaAsyncSocket
|
- CocoaAsyncSocket
|
||||||
|
- CocoaLibEvent
|
||||||
|
- OpenSSL-Universal
|
||||||
- Yoga
|
- Yoga
|
||||||
- YogaKit
|
- YogaKit
|
||||||
|
|
||||||
@@ -87,6 +101,8 @@ EXTERNAL SOURCES:
|
|||||||
:podspec: "../third-party-podspecs/glog.podspec"
|
:podspec: "../third-party-podspecs/glog.podspec"
|
||||||
PeerTalk:
|
PeerTalk:
|
||||||
:git: https://github.com/rsms/peertalk
|
:git: https://github.com/rsms/peertalk
|
||||||
|
RSocket:
|
||||||
|
:podspec: "../third-party-podspecs/RSocket.podspec"
|
||||||
Sonar:
|
Sonar:
|
||||||
:podspec: "../../xplat/Sonar/SonarKitCPP.podspec"
|
:podspec: "../../xplat/Sonar/SonarKitCPP.podspec"
|
||||||
SonarKit:
|
SonarKit:
|
||||||
@@ -94,7 +110,7 @@ EXTERNAL SOURCES:
|
|||||||
|
|
||||||
CHECKOUT OPTIONS:
|
CHECKOUT OPTIONS:
|
||||||
ComponentKit:
|
ComponentKit:
|
||||||
:commit: f801317e71f88fbb5a398cd726fc0375255f43ba
|
:commit: 663f97614c4b398b029bbc0f6b31330e426c6aa7
|
||||||
:git: https://github.com/facebook/ComponentKit.git
|
:git: https://github.com/facebook/ComponentKit.git
|
||||||
EasyWSClient:
|
EasyWSClient:
|
||||||
:commit: 9b87dc488048900a8cd684f51ddc98143682dbc3
|
:commit: 9b87dc488048900a8cd684f51ddc98143682dbc3
|
||||||
@@ -102,27 +118,33 @@ CHECKOUT OPTIONS:
|
|||||||
PeerTalk:
|
PeerTalk:
|
||||||
:commit: 588303b43efa5082d654b6f75d1b84a6ba4b5b9e
|
:commit: 588303b43efa5082d654b6f75d1b84a6ba4b5b9e
|
||||||
:git: https://github.com/rsms/peertalk
|
:git: https://github.com/rsms/peertalk
|
||||||
|
RSocket:
|
||||||
|
:commit: 804eabc02afdec8756a16517e4513ec9301a3315
|
||||||
|
:git: https://github.com/rsocket/rsocket-cpp.git
|
||||||
Sonar:
|
Sonar:
|
||||||
:commit: 26c298ad3401157ac2b7336218c1dde63260dc0c
|
:commit: 9a6f612923b435846c62a96b9ef33f9128b7e9ae
|
||||||
:git: https://github.com/facebook/Sonar.git
|
:git: https://github.com/facebook/Sonar.git
|
||||||
SonarKit:
|
SonarKit:
|
||||||
:commit: 26c298ad3401157ac2b7336218c1dde63260dc0c
|
:commit: 9a6f612923b435846c62a96b9ef33f9128b7e9ae
|
||||||
:git: https://github.com/facebook/Sonar.git
|
:git: https://github.com/facebook/Sonar.git
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
||||||
CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987
|
CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987
|
||||||
|
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
|
||||||
ComponentKit: 7bd0ad508946aeb68dd52ed8739ced9846ff3671
|
ComponentKit: 7bd0ad508946aeb68dd52ed8739ced9846ff3671
|
||||||
DoubleConversion: 310ccd7cdf00175c32883664f84fe026025604df
|
DoubleConversion: 310ccd7cdf00175c32883664f84fe026025604df
|
||||||
EasyWSClient: 7ec8effe7d86f6061a47d19a55355769c9edfd2f
|
EasyWSClient: 7ec8effe7d86f6061a47d19a55355769c9edfd2f
|
||||||
Folly: 2d29ed217455246ae583ff1980f9ce882af31e80
|
Folly: 6a1cc25ddcc61d794309b9eb69e1e7c5343f4a98
|
||||||
glog: f175af2df1f453be65bd355b287a07c842927a99
|
glog: f175af2df1f453be65bd355b287a07c842927a99
|
||||||
|
OpenSSL-Universal: 401888162f11c33ebbd46f782d9229da35c61327
|
||||||
PeerTalk: f5389c286e4d477e59b73dfbf25c5c70a2464761
|
PeerTalk: f5389c286e4d477e59b73dfbf25c5c70a2464761
|
||||||
Sonar: 815b6c6357c78564d9132f6389605b285a06f052
|
RSocket: 0b49004a22945bbf00a5760d9fd9e7e57be5478d
|
||||||
SonarKit: 29b45073b54d7f5db13e53b7afe6fb6f36c6bea7
|
Sonar: 059d1cf14e9cfa67a7103c666f875e62e8c285d7
|
||||||
|
SonarKit: eb72de3f8ec9fa7a2610b6ef1f6a480b99317fdc
|
||||||
Yoga: e6f1fed82138c17da5332e15e5770abf0e9cc386
|
Yoga: e6f1fed82138c17da5332e15e5770abf0e9cc386
|
||||||
YogaKit: bb90d11e297e06abef7e0cfb20e035a6bd00cdc4
|
YogaKit: bb90d11e297e06abef7e0cfb20e035a6bd00cdc4
|
||||||
|
|
||||||
PODFILE CHECKSUM: cab936292346d86ef8900c8f67d3c707dc421709
|
PODFILE CHECKSUM: 1904a24f0191377e3743dc726e5d7e52455b7ff4
|
||||||
|
|
||||||
COCOAPODS: 1.5.2
|
COCOAPODS: 1.5.2
|
||||||
|
|||||||
@@ -342,6 +342,7 @@
|
|||||||
"\"${PODS_ROOT}/Headers/Public/boost-for-react-native\"",
|
"\"${PODS_ROOT}/Headers/Public/boost-for-react-native\"",
|
||||||
"\"${PODS_ROOT}/Headers/Public/glog\"/**",
|
"\"${PODS_ROOT}/Headers/Public/glog\"/**",
|
||||||
"\"${PODS_ROOT}/SonarKit\"/**",
|
"\"${PODS_ROOT}/SonarKit\"/**",
|
||||||
|
"/usr/local/include\\ /usr/local/Cellar/openssl/1.0.2o_1/include",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
|
||||||
@@ -409,6 +410,7 @@
|
|||||||
"\"${PODS_ROOT}/Headers/Public/boost-for-react-native\"",
|
"\"${PODS_ROOT}/Headers/Public/boost-for-react-native\"",
|
||||||
"\"${PODS_ROOT}/Headers/Public/glog\"/**",
|
"\"${PODS_ROOT}/Headers/Public/glog\"/**",
|
||||||
"\"${PODS_ROOT}/SonarKit\"/**",
|
"\"${PODS_ROOT}/SonarKit\"/**",
|
||||||
|
"/usr/local/include\\ /usr/local/Cellar/openssl/1.0.2o_1/include",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
|
||||||
|
|||||||
@@ -11,14 +11,16 @@ Pod::Spec.new do |spec|
|
|||||||
spec.authors = 'Facebook'
|
spec.authors = 'Facebook'
|
||||||
# spec.prepare_command = 'mv src double-conversion'
|
# spec.prepare_command = 'mv src double-conversion'
|
||||||
spec.source = { :git => 'https://github.com/facebook/Sonar.git',
|
spec.source = { :git => 'https://github.com/facebook/Sonar.git',
|
||||||
:branch=> "master" }
|
:branch=> "iOS-RSocket" }
|
||||||
spec.module_name = 'SonarKit'
|
spec.module_name = 'SonarKit'
|
||||||
spec.dependency 'Folly'
|
spec.dependency 'Folly'
|
||||||
spec.dependency 'Sonar'
|
spec.dependency 'Sonar'
|
||||||
spec.dependency 'CocoaAsyncSocket', '~> 7.6'
|
spec.dependency 'CocoaAsyncSocket', '~> 7.6'
|
||||||
spec.dependency 'PeerTalk'
|
spec.dependency 'PeerTalk'
|
||||||
spec.source_files = 'iOS/FBDefines/*.{h,cpp,m,mm}', 'iOS/SonarKit/**/*.{h,cpp,m,mm}'
|
spec.dependency 'OpenSSL-Universal', '~> 1.0'
|
||||||
|
spec.source_files = 'iOS/FBDefines/*.{h,cpp,m,mm}', 'iOS/SonarKit/**/*.{h,cpp,m,mm}', 'iOS/SonarKit/FBCxxUtils/*.{h, mm}',
|
||||||
spec.public_header_files = 'iOS/SonarKit/CppBridge/*.{h}',
|
spec.public_header_files = 'iOS/SonarKit/CppBridge/*.{h}',
|
||||||
|
'iOS/SonarKit/FBCxxUtils/*.{h}',
|
||||||
'iOS/SonarKit/SonarClient.h',
|
'iOS/SonarKit/SonarClient.h',
|
||||||
'iOS/SonarKit/SonarDeviceData.h',
|
'iOS/SonarKit/SonarDeviceData.h',
|
||||||
'iOS/SonarKit/SonarPlugin.h',
|
'iOS/SonarKit/SonarPlugin.h',
|
||||||
@@ -30,7 +32,7 @@ Pod::Spec.new do |spec|
|
|||||||
spec.compiler_flags = '-DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0'
|
spec.compiler_flags = '-DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0'
|
||||||
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
||||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"/** \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/ComponentKit\"/**" }
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"/** \"$(PODS_ROOT)/boost-for-react-native\" \"/usr/local/include\" \"/usr/local/Cellar/openssl/1.0.2o_1/include\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/ComponentKit\"/**" }
|
||||||
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
|
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
|
||||||
|
|
||||||
spec.subspec "SonarKitLayoutPlugin" do |ss|
|
spec.subspec "SonarKitLayoutPlugin" do |ss|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
14
iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.h
Normal file
14
iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.h
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
#include <folly/dynamic.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace cxxutils {
|
||||||
|
|
||||||
|
folly::dynamic convertIdToFollyDynamic(id json);
|
||||||
|
id convertFollyDynamicToId(const folly::dynamic &dyn);
|
||||||
|
|
||||||
|
} }
|
||||||
110
iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.mm
Normal file
110
iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.mm
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
|
||||||
|
#import "FBCxxFollyDynamicConvert.h"
|
||||||
|
|
||||||
|
#import <objc/runtime.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace cxxutils {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The implementation is taken from RCTFollyConvert(https://fburl.com/vzw8ql2q)
|
||||||
|
*/
|
||||||
|
|
||||||
|
id convertFollyDynamicToId(const folly::dynamic &dyn) {
|
||||||
|
// I could imagine an implementation which avoids copies by wrapping the
|
||||||
|
// dynamic in a derived class of NSDictionary. We can do that if profiling
|
||||||
|
// implies it will help.
|
||||||
|
|
||||||
|
switch (dyn.type()) {
|
||||||
|
case folly::dynamic::NULLT:
|
||||||
|
return (id)kCFNull;
|
||||||
|
case folly::dynamic::BOOL:
|
||||||
|
return dyn.getBool() ? @YES : @NO;
|
||||||
|
case folly::dynamic::INT64:
|
||||||
|
return @(dyn.getInt());
|
||||||
|
case folly::dynamic::DOUBLE:
|
||||||
|
return @(dyn.getDouble());
|
||||||
|
case folly::dynamic::STRING:
|
||||||
|
return [[NSString alloc] initWithBytes:dyn.c_str() length:dyn.size()
|
||||||
|
encoding:NSUTF8StringEncoding];
|
||||||
|
case folly::dynamic::ARRAY: {
|
||||||
|
NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:dyn.size()];
|
||||||
|
for (auto &elem : dyn) {
|
||||||
|
[array addObject:convertFollyDynamicToId(elem)];
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
case folly::dynamic::OBJECT: {
|
||||||
|
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:dyn.size()];
|
||||||
|
for (auto &elem : dyn.items()) {
|
||||||
|
dict[convertFollyDynamicToId(elem.first)] = convertFollyDynamicToId(elem.second);
|
||||||
|
}
|
||||||
|
return dict;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
folly::dynamic convertIdToFollyDynamic(id json)
|
||||||
|
{
|
||||||
|
if (json == nil || json == (id)kCFNull) {
|
||||||
|
return nullptr;
|
||||||
|
} else if ([json isKindOfClass:[NSNumber class]]) {
|
||||||
|
const char *objCType = [json objCType];
|
||||||
|
switch (objCType[0]) {
|
||||||
|
// This is a c++ bool or C99 _Bool. On some platforms, BOOL is a bool.
|
||||||
|
case _C_BOOL:
|
||||||
|
return (bool) [json boolValue];
|
||||||
|
case _C_CHR:
|
||||||
|
// On some platforms, objc BOOL is a signed char, but it
|
||||||
|
// might also be a small number. Use the same hack JSC uses
|
||||||
|
// to distinguish them:
|
||||||
|
// https://phabricator.intern.facebook.com/diffusion/FBS/browse/master/fbobjc/xplat/third-party/jsc/safari-600-1-4-17/JavaScriptCore/API/JSValue.mm;b8ee03916489f8b12143cd5c0bca546da5014fc9$901
|
||||||
|
if ([json isKindOfClass:[@YES class]]) {
|
||||||
|
return (bool) [json boolValue];
|
||||||
|
} else {
|
||||||
|
return [json longLongValue];
|
||||||
|
}
|
||||||
|
case _C_UCHR:
|
||||||
|
case _C_SHT:
|
||||||
|
case _C_USHT:
|
||||||
|
case _C_INT:
|
||||||
|
case _C_UINT:
|
||||||
|
case _C_LNG:
|
||||||
|
case _C_ULNG:
|
||||||
|
case _C_LNG_LNG:
|
||||||
|
case _C_ULNG_LNG:
|
||||||
|
return [json longLongValue];
|
||||||
|
|
||||||
|
case _C_FLT:
|
||||||
|
case _C_DBL:
|
||||||
|
return [json doubleValue];
|
||||||
|
|
||||||
|
// default:
|
||||||
|
// fall through
|
||||||
|
}
|
||||||
|
} else if ([json isKindOfClass:[NSString class]]) {
|
||||||
|
NSData *data = [json dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
return std::string(reinterpret_cast<const char*>(data.bytes),
|
||||||
|
data.length);
|
||||||
|
} else if ([json isKindOfClass:[NSArray class]]) {
|
||||||
|
folly::dynamic array = folly::dynamic::array;
|
||||||
|
for (id element in json) {
|
||||||
|
array.push_back(convertIdToFollyDynamic(element));
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
} else if ([json isKindOfClass:[NSDictionary class]]) {
|
||||||
|
__block folly::dynamic object = folly::dynamic::object();
|
||||||
|
|
||||||
|
[json enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, __unused BOOL *stop) {
|
||||||
|
object.insert(convertIdToFollyDynamic(key),
|
||||||
|
convertIdToFollyDynamic(value));
|
||||||
|
}];
|
||||||
|
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
} }
|
||||||
24
iOS/SonarKit/Info.plist
Normal file
24
iOS/SonarKit/Info.plist
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
Pod::Spec.new do |spec|
|
Pod::Spec.new do |spec|
|
||||||
spec.name = 'Folly'
|
spec.name = 'Folly'
|
||||||
spec.version = '2018.05.07.00'
|
spec.version = '2018.05.28.00'
|
||||||
spec.license = { :type => 'Apache License, Version 2.0' }
|
spec.license = { :type => 'Apache License, Version 2.0' }
|
||||||
spec.homepage = 'https://github.com/facebook/folly'
|
spec.homepage = 'https://github.com/facebook/folly'
|
||||||
spec.summary = 'An open-source C++ library developed and used at Facebook.'
|
spec.summary = 'An open-source C++ library developed and used at Facebook.'
|
||||||
@@ -11,7 +11,7 @@ Pod::Spec.new do |spec|
|
|||||||
spec.dependency 'boost-for-react-native'
|
spec.dependency 'boost-for-react-native'
|
||||||
spec.dependency 'DoubleConversion'
|
spec.dependency 'DoubleConversion'
|
||||||
spec.dependency 'glog'
|
spec.dependency 'glog'
|
||||||
spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0 -frtti
|
spec.compiler_flags = '-DFOLLY_HAVE_PTHREAD=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0 -frtti
|
||||||
-fexceptions
|
-fexceptions
|
||||||
-std=c++14
|
-std=c++14
|
||||||
-Wno-error
|
-Wno-error
|
||||||
@@ -25,10 +25,27 @@ Pod::Spec.new do |spec|
|
|||||||
'folly/memory/detail/MallocImpl.cpp',
|
'folly/memory/detail/MallocImpl.cpp',
|
||||||
'folly/String.cpp',
|
'folly/String.cpp',
|
||||||
'folly/*.cpp',
|
'folly/*.cpp',
|
||||||
|
'folly/detail/*.cpp',
|
||||||
|
'folly/hash/*.cpp',
|
||||||
|
'folly/portability/*.cpp',
|
||||||
'folly/ScopeGuard.h',
|
'folly/ScopeGuard.h',
|
||||||
'folly/lang/ColdClass.cpp',
|
'folly/lang/ColdClass.cpp',
|
||||||
'folly/lang/Assume.h',
|
'folly/lang/Assume.h',
|
||||||
'folly/lang/Assume.cpp'
|
'folly/lang/Assume.cpp',
|
||||||
|
'folly/io/async/*.cpp',
|
||||||
|
'folly/io/async/ssl/*.cpp',
|
||||||
|
'folly/io/*.cpp',
|
||||||
|
'folly/synchronization/*.cpp',
|
||||||
|
'folly/lang/*.cpp',
|
||||||
|
'folly/memory/*.cpp',
|
||||||
|
'folly/futures/*.cpp',
|
||||||
|
'folly/futures/detail/*.cpp',
|
||||||
|
'folly/experimental/hazptr/*.cpp',
|
||||||
|
'folly/executors/*.cpp',
|
||||||
|
'folly/concurrency/*.cpp',
|
||||||
|
'folly/ssl/*.cpp',
|
||||||
|
'folly/ssl/detail/*.cpp',
|
||||||
|
'folly/system/*.cpp'
|
||||||
|
|
||||||
# workaround for https://github.com/facebook/react-native/issues/14326
|
# workaround for https://github.com/facebook/react-native/issues/14326
|
||||||
spec.preserve_paths = 'folly/*.h',
|
spec.preserve_paths = 'folly/*.h',
|
||||||
@@ -38,16 +55,16 @@ Pod::Spec.new do |spec|
|
|||||||
'folly/detail/*.h',
|
'folly/detail/*.h',
|
||||||
'folly/hash/*.h',
|
'folly/hash/*.h',
|
||||||
'folly/memory/*.h',
|
'folly/memory/*.h',
|
||||||
'folly/**/*.h'
|
'folly/**/*.h',
|
||||||
|
'folly/futures/detail/*.h',
|
||||||
|
'folly/futures/*.h'
|
||||||
|
|
||||||
spec.header_mappings_dir = 'folly'
|
spec.header_mappings_dir = 'folly'
|
||||||
spec.header_dir = 'folly'
|
spec.header_dir = 'folly'
|
||||||
spec.libraries = "stdc++"
|
spec.libraries = "stdc++"
|
||||||
spec.private_header_files = 'folly/portability/Stdlib.h',
|
spec.private_header_files = 'folly/portability/Stdlib.h',
|
||||||
'folly/portability/Malloc.h',
|
'folly/portability/Stdio.h'
|
||||||
'folly/portability/Stdlib.h',
|
|
||||||
'folly/portability/Stdio.h',
|
|
||||||
'folly/portability/PThread.h'
|
|
||||||
spec.public_header_files = 'folly/portability/Config.h',
|
spec.public_header_files = 'folly/portability/Config.h',
|
||||||
'folly/Executor.h',
|
'folly/Executor.h',
|
||||||
'folly/Function.h',
|
'folly/Function.h',
|
||||||
@@ -81,14 +98,18 @@ Pod::Spec.new do |spec|
|
|||||||
'folly/FBString.h',
|
'folly/FBString.h',
|
||||||
'folly/hash/Hash.h',
|
'folly/hash/Hash.h',
|
||||||
'folly/memory/Malloc.h',
|
'folly/memory/Malloc.h',
|
||||||
|
'folly/io/async/AsyncTimeout.h',
|
||||||
'folly/**/*.h',
|
'folly/**/*.h',
|
||||||
'folly/memory/detail/MallocImpl.h',
|
'folly/memory/detail/MallocImpl.h',
|
||||||
'folly/String.h',
|
'folly/String.h',
|
||||||
'folly/*.h'
|
'folly/*.h',
|
||||||
|
'folly/portability/PThread.h',
|
||||||
|
'folly/futures/*.h',
|
||||||
|
'folly/futures/detail/*.h'
|
||||||
|
|
||||||
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++11",
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++11",
|
||||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\"" }
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"/usr/local/include\" \"/usr/local/Cellar/openssl/1.0.2o_1/include\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\"" }
|
||||||
|
|
||||||
# Pinning to the same version as React.podspec.
|
# Pinning to the same version as React.podspec.
|
||||||
spec.platforms = { :ios => "8.0", :tvos => "10.0" }
|
spec.platforms = { :ios => "8.0", :tvos => "10.0" }
|
||||||
|
|||||||
29
iOS/third-party-podspecs/LibEvent.podspec
Normal file
29
iOS/third-party-podspecs/LibEvent.podspec
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
Pod::Spec.new do |s|
|
||||||
|
|
||||||
|
s.name = "libevent"
|
||||||
|
s.version = "1.0"
|
||||||
|
s.summary = "Unofficial libevent mirror for Cocoapods"
|
||||||
|
|
||||||
|
s.description = <<-DESC
|
||||||
|
This is a binary distribution of the libevent library built for iOS.
|
||||||
|
The library uses configure which makes it a bit tricky to cross compile.
|
||||||
|
DESC
|
||||||
|
|
||||||
|
s.homepage = "http://libevent.org/"
|
||||||
|
s.license = "BSD"
|
||||||
|
s.authors = { "liguangming" => "cute@liguangming.com" }
|
||||||
|
s.social_media_url = "http://twitter.com/liguangming"
|
||||||
|
s.ios.deployment_target = "6.0"
|
||||||
|
s.source = { :git => "https://github.com/cute/libevent.git", :tag => "1.0" }
|
||||||
|
s.header_dir = "event2"
|
||||||
|
s.source_files = "include/**/*.h"
|
||||||
|
s.ios.library = "event"
|
||||||
|
s.preserve_paths = "include", "lib"
|
||||||
|
s.requires_arc = false
|
||||||
|
s.xcconfig = {
|
||||||
|
"HEADER_SEARCH_PATHS" => "$(PODS_ROOT)/libevent/include",
|
||||||
|
"HEADER_SEARCH_PATHS" => "$(PODS_ROOT)/libevent/include/event2",
|
||||||
|
"LIBRARY_SEARCH_PATHS" => "$(PODS_ROOT)/libevent/lib",
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
53
iOS/third-party-podspecs/RSocket.podspec
Normal file
53
iOS/third-party-podspecs/RSocket.podspec
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
Pod::Spec.new do |spec|
|
||||||
|
spec.name = 'RSocket'
|
||||||
|
spec.version = '0.10.0'
|
||||||
|
spec.license = { :type => 'MIT' }
|
||||||
|
spec.homepage = 'https://github.com/rsocket/rsocket-cpp'
|
||||||
|
spec.summary = 'C++ implementation of RSocket'
|
||||||
|
spec.authors = 'Facebook'
|
||||||
|
spec.source = { :git => 'https://github.com/rsocket/rsocket-cpp.git', :branch => "master"}
|
||||||
|
spec.module_name = 'RSocket'
|
||||||
|
spec.source_files = 'rsocket/benchmarks/*',
|
||||||
|
'rsocket/framing/*',
|
||||||
|
'rsocket/internal/*',
|
||||||
|
'rsocket/statemachine/*',
|
||||||
|
'rsocket/transports/*',
|
||||||
|
'rsocket/transports/**/*',
|
||||||
|
'yarpl/observable/*',
|
||||||
|
'yarpl/flowable/*',
|
||||||
|
'rsocket/*'
|
||||||
|
|
||||||
|
spec.libraries = "stdc++"
|
||||||
|
spec.compiler_flags = '-std=c++1y'
|
||||||
|
spec.dependency 'Folly'
|
||||||
|
spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0 -frtti
|
||||||
|
-fexceptions
|
||||||
|
-std=c++14
|
||||||
|
-Wno-error
|
||||||
|
-Wno-unused-local-typedefs
|
||||||
|
-Wno-unused-variable
|
||||||
|
-Wno-sign-compare
|
||||||
|
-Wno-comment
|
||||||
|
-Wno-return-type
|
||||||
|
-Wno-global-constructors'
|
||||||
|
spec.preserve_paths = 'rsocket/benchmarks/*.h',
|
||||||
|
'rsocket/framing/*.h',
|
||||||
|
'rsocket/internal/*.h',
|
||||||
|
'rsocket/statemachine/*.h',
|
||||||
|
'rsocket/transports/*.h',
|
||||||
|
'rsocket/*.h',
|
||||||
|
'yarpl/flowable/*.h',
|
||||||
|
'yarpl/observable/*.h',
|
||||||
|
'yarpl/perf/*.h',
|
||||||
|
'yarpl/single/*.h',
|
||||||
|
'yarpl/utils/*.h',
|
||||||
|
'yarpl/*.h',
|
||||||
|
'**/*.h'
|
||||||
|
spec.header_mappings_dir = './*'
|
||||||
|
spec.header_dir = './*'
|
||||||
|
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||||
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
||||||
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"/** \"/usr/local/include\" \"/usr/local/Cellar/openssl/1.0.2o_1/include\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/DoubleConversion\"/**" }
|
||||||
|
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
|
||||||
|
|
||||||
|
end
|
||||||
@@ -7,27 +7,18 @@ Pod::Spec.new do |spec|
|
|||||||
spec.authors = 'Facebook'
|
spec.authors = 'Facebook'
|
||||||
# spec.prepare_command = 'mv src double-conversion'
|
# spec.prepare_command = 'mv src double-conversion'
|
||||||
spec.source = { :git => 'https://github.com/facebook/Sonar.git',
|
spec.source = { :git => 'https://github.com/facebook/Sonar.git',
|
||||||
:branch => 'master' }
|
:branch => 'iOS-RSocket' }
|
||||||
spec.module_name = 'Sonar'
|
spec.module_name = 'Sonar'
|
||||||
spec.public_header_files = 'xplat/Sonar/*.h'
|
spec.public_header_files = 'xplat/Sonar/*.h'
|
||||||
spec.source_files = 'xplat/Sonar/*.{h,cpp,m,mm}'
|
spec.source_files = 'xplat/Sonar/*.{h,cpp,m,mm}'
|
||||||
spec.libraries = "stdc++"
|
spec.libraries = "stdc++"
|
||||||
spec.dependency 'Folly'
|
spec.dependency 'Folly'
|
||||||
spec.dependency 'EasyWSClient'
|
spec.dependency 'RSocket'
|
||||||
# spec.dependency 'boost-for-react-native'
|
|
||||||
#
|
|
||||||
# spec.dependency 'DoubleConversion'
|
|
||||||
# spec.dependency 'Folly'
|
|
||||||
# spec.dependency 'glog'
|
|
||||||
spec.compiler_flags = '-DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0 -Wall
|
spec.compiler_flags = '-DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0 -Wall
|
||||||
-std=c++14
|
-std=c++14
|
||||||
-Wno-global-constructors'
|
-Wno-global-constructors'
|
||||||
# spec.header_mappings_dir = 'folly'
|
|
||||||
# spec.header_dir = 'folly'
|
|
||||||
# spec.preserve_paths = 'xplat/**/*'
|
|
||||||
# Pinning to the same version as React.podspec.
|
|
||||||
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
|
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
|
||||||
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
||||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/EasyWSClient\" \"$(PODS_ROOT)/DoubleConversion\"" }
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"/usr/local/include\" \"/usr/local/Cellar/openssl/1.0.2o_1/include\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RSocket\" \"$(PODS_ROOT)/DoubleConversion\"" }
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user