diff --git a/CNAME b/CNAME deleted file mode 100644 index cd7f9e71a..000000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -fbsonar.com \ No newline at end of file diff --git a/android/sample/AndroidManifest.xml b/android/sample/AndroidManifest.xml index 5d52b59f9..afce9381e 100644 --- a/android/sample/AndroidManifest.xml +++ b/android/sample/AndroidManifest.xml @@ -16,7 +16,8 @@ android:label="@string/app_name" android:icon="@drawable/ic_launcher" android:allowBackup="false" - android:theme="@style/NoTitleBarWhiteBG"> + android:theme="@style/NoTitleBarWhiteBG" + android:debuggable="true"> diff --git a/build.gradle b/build.gradle index 6a444bec6..66b141600 100644 --- a/build.gradle +++ b/build.gradle @@ -25,8 +25,8 @@ buildscript { subprojects { repositories { - jcenter() google() + jcenter() } } diff --git a/docs/getting-started.md b/docs/getting-started.md index 6b4428817..452e25df1 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -23,11 +23,7 @@ Once you start Sonar and launch an emulator/simulator or connect a device, you w ### Setup your Android app -#### Including Sonar via jcenter - -**Sonar is still being deployed to jcenter so you may need to include the .aar manually.** - -Add dependencies to your `build.gradle` file. +Sonar is distributed via JCenter. Add dependencies to your `build.gradle` file. ``` repositories { @@ -39,23 +35,6 @@ dependencies { } ``` -#### Manually including sonar.aar - -Download the latest .aar from [GitHub releases](https://github.com/facebook/Sonar/releases) and put it in your app's libs/ folder. - -``` -repositories { - jcenter() - flatDir { - dirs 'libs' - } -} - -dependencies { - debugCompile(name:'sonar-0.0.1', ext:'aar') -} -``` - Now you can initialize Sonar in your Application's `onCreate`-method like this: ```java @@ -76,20 +55,42 @@ public class MyApplication extends Application { ### Setup your iOS app -To integrate with our iOS app, you can use [CocoaPods](https://cocoapods.org). Add the mobile Sonar SDK to your `Podfile`: +To integrate with an iOS app, you can use [CocoaPods](https://cocoapods.org). Add the mobile Sonar SDK and its dependencies to your `Podfile`: ```ruby platform :ios, '8.0' +swift_version = '4.1' target 'MyApp' do - pod 'Sonar', '~> 0.0.1' -en + + 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 + ``` and install the dependencies by running `pod install`. When you open the Xcode workspace file for your app, you now can import and initialize Sonar in your AppDelegate. ```objective-c -#import +#import @implementation AppDelegate @@ -104,6 +105,12 @@ and install the dependencies by running `pod install`. When you open the Xcode w } @end ``` +
+ +* We haven't released the dependency to CocoaPods, because we weren't able to successfully validate the podspec of SonarKit. You could help us out by fixing this [issue](https://github.com/facebook/Sonar/issues/11) by submitting a PR to the repo. +* If you do not use CocoaPods as a dependency management tool then currently there is no way to integrate SonarKit other than manually including all the dependencies and building it. +* Also Sonar doesn't work with swift projects as its written in C++ and had C++ dependencies. But we are working on supporting sonar for swift projects. You can find this issue [here](https://github.com/facebook/Sonar/issues/13) +
## Ready for takeoff diff --git a/flow-typed/electron-menu.js b/flow-typed/electron-menu.js index c18519784..46a34b912 100644 --- a/flow-typed/electron-menu.js +++ b/flow-typed/electron-menu.js @@ -31,7 +31,12 @@ type Electron$MenuRoles = | 'help' | 'services'; -type Electron$MenuType = 'normal' | 'separator' | 'submenu' | 'checkbox' | 'radio'; +type Electron$MenuType = + | 'normal' + | 'separator' + | 'submenu' + | 'checkbox' + | 'radio'; type Electron$MenuItemOptions = { click?: ( @@ -54,25 +59,27 @@ type Electron$MenuItemOptions = { }; declare class Electron$MenuItem { - constructor: (options: Electron$MenuItemOptions) => void, - enabled: boolean, - visible: boolean, - checked: boolean, + constructor: (options: Electron$MenuItemOptions) => void; + enabled: boolean; + visible: boolean; + checked: boolean; } declare class Electron$Menu { - static setApplicationMenu: (menu: Electron$Menu) => void, - static getApplicationMenu: () => ?Electron$Menu, - static sendActionToFirstResponder: (action: string) => void, - static buildFromTemplate: (templates: Array) => Electron$Menu, + static setApplicationMenu: (menu: Electron$Menu) => void; + static getApplicationMenu: () => ?Electron$Menu; + static sendActionToFirstResponder: (action: string) => void; + static buildFromTemplate: ( + templates: Array, + ) => Electron$Menu; popup: ( browserWindow: Object, x?: number, y?: number, positioningItem?: number, - ) => void, - popup: (x?: number, y?: number, positioningItem?: number) => void, - append: (menuItem: Electron$MenuItem) => void, - insert: (pos: number, menuItem: Electron$MenuItem) => void, - items: Array, + ) => void; + popup: (x?: number, y?: number, positioningItem?: number) => void; + append: (menuItem: Electron$MenuItem) => void; + insert: (pos: number, menuItem: Electron$MenuItem) => void; + items: Array; } diff --git a/iOS/Plugins/SonarKitLayoutPlugin/SonarKitLayoutComponentKitSupport/CKComponent+Sonar.mm b/iOS/Plugins/SonarKitLayoutPlugin/SonarKitLayoutComponentKitSupport/CKComponent+Sonar.mm index 22e34ab78..8cf04e1ee 100644 --- a/iOS/Plugins/SonarKitLayoutPlugin/SonarKitLayoutComponentKitSupport/CKComponent+Sonar.mm +++ b/iOS/Plugins/SonarKitLayoutPlugin/SonarKitLayoutComponentKitSupport/CKComponent+Sonar.mm @@ -115,14 +115,23 @@ FB_LINKABLE(CKComponent_Sonar) } for (auto responder : action.second) { - id initialTarget = _CKTypedComponentDebugInitialTarget(responder).get(self); - const CKActionInfo actionInfo = CKActionFind(responder.selector(), initialTarget); - [responders addObject: @{ - @"initialTarget": SKObject(NSStringFromClass([initialTarget class])), - @"identifier": SKObject(@(responder.identifier().c_str())), - @"handler": SKObject(NSStringFromClass([actionInfo.responder class])), - @"selector": SKObject(NSStringFromSelector(responder.selector())), - }]; + auto debugTarget = _CKTypedComponentDebugInitialTarget(responder); + if (debugTarget.isBlockBaseAction()) { + [responders addObject: @{ + @"identifier": SKObject(@(responder.identifier().c_str())), + @"selector": SKObject(NSStringFromSelector(responder.selector())), + }]; + + } else { + id initialTarget = debugTarget.get(self); + const CKActionInfo actionInfo = CKActionFind(responder.selector(), initialTarget); + [responders addObject: @{ + @"initialTarget": SKObject(NSStringFromClass([initialTarget class])), + @"identifier": SKObject(@(responder.identifier().c_str())), + @"handler": SKObject(NSStringFromClass([actionInfo.responder class])), + @"selector": SKObject(NSStringFromSelector(responder.selector())), + }]; + } } } diff --git a/iOS/Podfile b/iOS/Podfile index 63a63d759..056604147 100644 --- a/iOS/Podfile +++ b/iOS/Podfile @@ -9,11 +9,12 @@ target 'SonarKit' do # Pods for SonarKit - pod 'PeerTalk', :podspec => 'third-party-podspecs/PeerTalk.podspec' - pod 'RSocket', :podspec => 'third-party-podspecs/RSocket.podspec' + # Third party deps podspec link + pod 'EasyWSClient', :podspec => 'third-party-podspecs/EasyWSClient.podspec' pod 'DoubleConversion', :podspec => 'third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => 'third-party-podspecs/glog.podspec' pod 'Folly', :podspec => 'third-party-podspecs/Folly.podspec' - pod 'Sonar', :podspec => '../xplat/Sonar/Sonar.podspec' + pod 'Sonar', :podspec => '../xplat/Sonar/SonarKitCPP.podspec' pod 'CocoaAsyncSocket' + pod 'PeerTalk', :git => 'https://github.com/rsms/peertalk' end diff --git a/iOS/Podfile.lock b/iOS/Podfile.lock deleted file mode 100644 index 1cf648505..000000000 --- a/iOS/Podfile.lock +++ /dev/null @@ -1,76 +0,0 @@ -PODS: - - boost-for-react-native (1.63.0) - - CocoaAsyncSocket (7.6.3) - - CocoaLibEvent (1.0.0) - - DoubleConversion (3.0.0) - - Folly (2018.05.28.00): - - boost-for-react-native - - CocoaLibEvent (~> 1.0) - - DoubleConversion - - glog - - OpenSSL-Static (= 1.0.2.c1) - - glog (0.3.5) - - OpenSSL-Static (1.0.2.c1) - - PeerTalk (1.0.0) - - RSocket (0.10.0): - - Folly - - Sonar (0.0.1): - - Folly - - RSocket - -DEPENDENCIES: - - CocoaAsyncSocket - - DoubleConversion (from `third-party-podspecs/DoubleConversion.podspec`) - - Folly (from `third-party-podspecs/Folly.podspec`) - - glog (from `third-party-podspecs/glog.podspec`) - - PeerTalk (from `third-party-podspecs/PeerTalk.podspec`) - - RSocket (from `third-party-podspecs/RSocket.podspec`) - - Sonar (from `../xplat/Sonar/Sonar.podspec`) - -SPEC REPOS: - https://github.com/cocoapods/specs.git: - - boost-for-react-native - - CocoaAsyncSocket - - CocoaLibEvent - - OpenSSL-Static - -EXTERNAL SOURCES: - DoubleConversion: - :podspec: third-party-podspecs/DoubleConversion.podspec - Folly: - :podspec: third-party-podspecs/Folly.podspec - glog: - :podspec: third-party-podspecs/glog.podspec - PeerTalk: - :podspec: third-party-podspecs/PeerTalk.podspec - RSocket: - :podspec: third-party-podspecs/RSocket.podspec - Sonar: - :podspec: "../xplat/Sonar/Sonar.podspec" - -CHECKOUT OPTIONS: - PeerTalk: - :commit: 588303b43efa5082d654b6f75d1b84a6ba4b5b9e - :git: https://github.com/rsms/PeerTalk.git - RSocket: - :commit: 11491fb22aaaf29b2702a1723561db51b314dd0f - :git: https://github.com/rsocket/rsocket-cpp.git - Sonar: - :commit: e6f1e3f018cb4eb8d1d1bfd09851a780f08656fd - :git: https://github.com/facebook/Sonar.git - -SPEC CHECKSUMS: - boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c - CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987 - CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f - DoubleConversion: 9bd61b1134a393694e95e0950c5bf3f99534817f - Folly: 551752534f77d816ebf69195405d9d0fbd3efcc0 - glog: fdb5d40eb83acd6a4d5d61d95ecc583f5970a119 - OpenSSL-Static: bd17e34564a8591ad76b740318683a6caa19a13e - PeerTalk: aadc42bc7d7f19e89f817b59ef8196305a711504 - RSocket: e9ee232080f995ba8f403ccf4cb61238a5646cb6 - Sonar: 29d8fb9b010e56fa1358be996d68d4b436dd8c21 - -PODFILE CHECKSUM: c3be9232e8e3190250398e3f9b310c5585d7d26b - -COCOAPODS: 1.5.2 diff --git a/iOS/Sample/Podfile b/iOS/Sample/Podfile index 2e86e349a..70f73b4a3 100644 --- a/iOS/Sample/Podfile +++ b/iOS/Sample/Podfile @@ -6,17 +6,18 @@ swift_version = "4.1" target 'Sample' do - pod 'RSocket', :podspec => '../third-party-podspecs/RSocket.podspec' + pod 'EasyWSClient', :podspec => '../third-party-podspecs/EasyWSClient.podspec' pod 'DoubleConversion', :podspec => '../third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../third-party-podspecs/Folly.podspec' - pod 'PeerTalk', :podspec => '../third-party-podspecs/PeerTalk.podspec' + pod 'PeerTalk', :git => 'https://github.com/rsms/peertalk' pod 'ComponentKit', :podspec => '../third-party-podspecs/ComponentKit.podspec' pod 'Yoga','~>1.8.1', :modular_headers => true - pod 'Sonar', :podspec => '../../xplat/Sonar/Sonar.podspec' - pod 'SonarKit', :podspec => '../../SonarKit.podspec' - pod 'SonarKit/SonarKitLayoutComponentKitSupport', :podspec => '../../SonarKit.podspec' - pod 'SonarKit/SKIOSNetworkPlugin', :podspec => '../../SonarKit.podspec' + pod 'Sonar', :podspec => '../../xplat/Sonar/SonarKitCPP.podspec' + pod 'SonarKit', :podspec => '../SonarKit.podspec' + pod 'SonarKit/SonarKitLayoutComponentKitSupport', :podspec => '../SonarKit.podspec' + pod 'SonarKit/SKIOSNetworkPlugin', :podspec => '../SonarKit.podspec' + post_install do |installer| installer.pods_project.targets.each do |target| if ['YogaKit'].include? target.name diff --git a/iOS/Sample/Podfile.lock b/iOS/Sample/Podfile.lock index 9fce57f8c..399025b3e 100644 --- a/iOS/Sample/Podfile.lock +++ b/iOS/Sample/Podfile.lock @@ -1,62 +1,53 @@ PODS: - boost-for-react-native (1.63.0) - CocoaAsyncSocket (7.6.3) - - CocoaLibEvent (1.0.0) - ComponentKit (0.21): - Yoga - DoubleConversion (3.0.0) - - Folly (2018.05.28.00): + - EasyWSClient (1.0.0) + - Folly (2018.05.07.00): - boost-for-react-native - - CocoaLibEvent (~> 1.0) - DoubleConversion - glog - - OpenSSL-Static (= 1.0.2.c1) - glog (0.3.5) - - OpenSSL-Static (1.0.2.c1) - - PeerTalk (1.0.0) - - RSocket (0.10.0): + - PeerTalk (0.0.2) + - Sonar (1.0.0): + - EasyWSClient - Folly - - Sonar (0.0.1): - - Folly - - RSocket - - SonarKit (0.0.1): + - SonarKit (1.0.0): - CocoaAsyncSocket (~> 7.6) - Folly - - OpenSSL-Static (= 1.0.2.c1) - PeerTalk - Sonar - - SonarKit/SKIOSNetworkPlugin (= 0.0.1) - - SonarKit/SonarKitLayoutComponentKitSupport (= 0.0.1) - - SonarKit/SonarKitLayoutPlugin (= 0.0.1) - - SonarKit/SonarKitNetworkPlugin (= 0.0.1) - - SonarKit/SKIOSNetworkPlugin (0.0.1): + - SonarKit/SKIOSNetworkPlugin (= 1.0.0) + - SonarKit/SonarKitLayoutComponentKitSupport (= 1.0.0) + - SonarKit/SonarKitLayoutPlugin (= 1.0.0) + - SonarKit/SonarKitNetworkPlugin (= 1.0.0) + - SonarKit/SonarKitNetworkPlugin (= 1.0.0) + - SonarKit/SKIOSNetworkPlugin (1.0.0): - CocoaAsyncSocket (~> 7.6) - Folly - - OpenSSL-Static (= 1.0.2.c1) - PeerTalk - Sonar - SonarKit/SonarKitNetworkPlugin - - SonarKit/SonarKitLayoutComponentKitSupport (0.0.1): + - SonarKit/SonarKitLayoutComponentKitSupport (1.0.0): - CocoaAsyncSocket (~> 7.6) - ComponentKit - Folly - - OpenSSL-Static (= 1.0.2.c1) - PeerTalk - Sonar - SonarKit/SonarKitLayoutPlugin - - Yoga (~> 1.8) - - SonarKit/SonarKitLayoutPlugin (0.0.1): + - Yoga (= 1.8.1) + - SonarKit/SonarKitLayoutPlugin (1.0.0): - CocoaAsyncSocket (~> 7.6) - Folly - - OpenSSL-Static (= 1.0.2.c1) - PeerTalk - Sonar - - Yoga (~> 1.8) + - Yoga (= 1.8.1) - YogaKit (= 1.8.1) - - SonarKit/SonarKitNetworkPlugin (0.0.1): + - SonarKit/SonarKitNetworkPlugin (1.0.0): - CocoaAsyncSocket (~> 7.6) - Folly - - OpenSSL-Static (= 1.0.2.c1) - PeerTalk - Sonar - Yoga (1.8.1) @@ -66,22 +57,20 @@ PODS: DEPENDENCIES: - ComponentKit (from `../third-party-podspecs/ComponentKit.podspec`) - DoubleConversion (from `../third-party-podspecs/DoubleConversion.podspec`) + - EasyWSClient (from `../third-party-podspecs/EasyWSClient.podspec`) - Folly (from `../third-party-podspecs/Folly.podspec`) - glog (from `../third-party-podspecs/glog.podspec`) - - PeerTalk (from `../third-party-podspecs/PeerTalk.podspec`) - - RSocket (from `../third-party-podspecs/RSocket.podspec`) - - Sonar (from `../../xplat/Sonar/Sonar.podspec`) - - SonarKit (from `../../SonarKit.podspec`) - - SonarKit/SKIOSNetworkPlugin (from `../../SonarKit.podspec`) - - SonarKit/SonarKitLayoutComponentKitSupport (from `../../SonarKit.podspec`) + - PeerTalk (from `https://github.com/rsms/peertalk`) + - Sonar (from `../../xplat/Sonar/SonarKitCPP.podspec`) + - SonarKit (from `../SonarKit.podspec`) + - SonarKit/SKIOSNetworkPlugin (from `../SonarKit.podspec`) + - SonarKit/SonarKitLayoutComponentKitSupport (from `../SonarKit.podspec`) - Yoga (~> 1.8.1) SPEC REPOS: https://github.com/cocoapods/specs.git: - boost-for-react-native - CocoaAsyncSocket - - CocoaLibEvent - - OpenSSL-Static - Yoga - YogaKit @@ -90,52 +79,50 @@ EXTERNAL SOURCES: :podspec: "../third-party-podspecs/ComponentKit.podspec" DoubleConversion: :podspec: "../third-party-podspecs/DoubleConversion.podspec" + EasyWSClient: + :podspec: "../third-party-podspecs/EasyWSClient.podspec" Folly: :podspec: "../third-party-podspecs/Folly.podspec" glog: :podspec: "../third-party-podspecs/glog.podspec" PeerTalk: - :podspec: "../third-party-podspecs/PeerTalk.podspec" - RSocket: - :podspec: "../third-party-podspecs/RSocket.podspec" + :git: https://github.com/rsms/peertalk Sonar: - :podspec: "../../xplat/Sonar/Sonar.podspec" + :podspec: "../../xplat/Sonar/SonarKitCPP.podspec" SonarKit: - :podspec: "../../SonarKit.podspec" + :podspec: "../SonarKit.podspec" CHECKOUT OPTIONS: ComponentKit: - :commit: 73acd7995610ad6b009a9a74b8290a54dab7c716 + :commit: f801317e71f88fbb5a398cd726fc0375255f43ba :git: https://github.com/facebook/ComponentKit.git + EasyWSClient: + :commit: 9b87dc488048900a8cd684f51ddc98143682dbc3 + :git: https://github.com/dhbaird/easywsclient.git PeerTalk: :commit: 588303b43efa5082d654b6f75d1b84a6ba4b5b9e - :git: https://github.com/rsms/PeerTalk.git - RSocket: - :commit: 11491fb22aaaf29b2702a1723561db51b314dd0f - :git: https://github.com/rsocket/rsocket-cpp.git + :git: https://github.com/rsms/peertalk Sonar: - :commit: a0959cf41cb51e7571066877ee2b7090659913b8 + :commit: 26c298ad3401157ac2b7336218c1dde63260dc0c :git: https://github.com/facebook/Sonar.git SonarKit: - :commit: a0959cf41cb51e7571066877ee2b7090659913b8 + :commit: 26c298ad3401157ac2b7336218c1dde63260dc0c :git: https://github.com/facebook/Sonar.git SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987 - CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f ComponentKit: 7bd0ad508946aeb68dd52ed8739ced9846ff3671 - DoubleConversion: 9bd61b1134a393694e95e0950c5bf3f99534817f - Folly: 551752534f77d816ebf69195405d9d0fbd3efcc0 - glog: fdb5d40eb83acd6a4d5d61d95ecc583f5970a119 - OpenSSL-Static: bd17e34564a8591ad76b740318683a6caa19a13e - PeerTalk: aadc42bc7d7f19e89f817b59ef8196305a711504 - RSocket: e9ee232080f995ba8f403ccf4cb61238a5646cb6 - Sonar: 29d8fb9b010e56fa1358be996d68d4b436dd8c21 - SonarKit: ac1fff5cc54ddb394282e78542ae67a781dab4f5 + DoubleConversion: 310ccd7cdf00175c32883664f84fe026025604df + EasyWSClient: 7ec8effe7d86f6061a47d19a55355769c9edfd2f + Folly: 2d29ed217455246ae583ff1980f9ce882af31e80 + glog: f175af2df1f453be65bd355b287a07c842927a99 + PeerTalk: f5389c286e4d477e59b73dfbf25c5c70a2464761 + Sonar: 815b6c6357c78564d9132f6389605b285a06f052 + SonarKit: 29b45073b54d7f5db13e53b7afe6fb6f36c6bea7 Yoga: e6f1fed82138c17da5332e15e5770abf0e9cc386 YogaKit: bb90d11e297e06abef7e0cfb20e035a6bd00cdc4 -PODFILE CHECKSUM: 7c2600fc131a2b041c967e8d6ffc2bd1a0383733 +PODFILE CHECKSUM: cab936292346d86ef8900c8f67d3c707dc421709 -COCOAPODS: 1.5.2 +COCOAPODS: 1.5.2 \ No newline at end of file diff --git a/iOS/Sample/Sample.xcodeproj/project.pbxproj b/iOS/Sample/Sample.xcodeproj/project.pbxproj index d1b532e26..bbe9e8cf1 100644 --- a/iOS/Sample/Sample.xcodeproj/project.pbxproj +++ b/iOS/Sample/Sample.xcodeproj/project.pbxproj @@ -333,6 +333,7 @@ "\"${PODS_ROOT}/Headers/Public/CocoaAsyncSocket\"", "\"${PODS_ROOT}/Headers/Public/ComponentKit\"", "\"${PODS_ROOT}/Headers/Public/DoubleConversion\"", + "\"${PODS_ROOT}/Headers/Public/EasyWSClient\"", "\"${PODS_ROOT}/Headers/Public/Folly\"", "\"${PODS_ROOT}/Headers/Public/PeerTalk\"", "\"${PODS_ROOT}/Headers/Public/Sonar\"/**", @@ -360,6 +361,7 @@ "-l\"CocoaAsyncSocket\"", "-l\"ComponentKit\"", "-l\"DoubleConversion\"", + "-l\"EasyWSClient\"", "-l\"Folly\"", "-l\"PeerTalk\"", "-l\"Sonar\"", @@ -398,6 +400,7 @@ "\"${PODS_ROOT}/Headers/Public/CocoaAsyncSocket\"", "\"${PODS_ROOT}/Headers/Public/ComponentKit\"", "\"${PODS_ROOT}/Headers/Public/DoubleConversion\"", + "\"${PODS_ROOT}/Headers/Public/EasyWSClient\"", "\"${PODS_ROOT}/Headers/Public/Folly\"", "\"${PODS_ROOT}/Headers/Public/PeerTalk\"", "\"${PODS_ROOT}/Headers/Public/Sonar\"/**", @@ -425,6 +428,7 @@ "-l\"CocoaAsyncSocket\"", "-l\"ComponentKit\"", "-l\"DoubleConversion\"", + "-l\"EasyWSClient\"", "-l\"Folly\"", "-l\"PeerTalk\"", "-l\"Sonar\"", diff --git a/SonarKit.podspec b/iOS/SonarKit.podspec similarity index 79% rename from SonarKit.podspec rename to iOS/SonarKit.podspec index c5746c65f..80136339f 100644 --- a/SonarKit.podspec +++ b/iOS/SonarKit.podspec @@ -1,15 +1,15 @@ folly_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' -yoga_version = '~> 1.8' +yoga_version = '1.8.1' yogakit_version = '1.8.1' Pod::Spec.new do |spec| spec.name = 'SonarKit' - spec.version = '0.0.1' + spec.version = '1.0.0' spec.license = { :type => 'MIT' } spec.homepage = 'https://github.com/facebook/Sonar' spec.summary = 'Sonar iOS podspec' spec.authors = 'Facebook' - spec.static_framework = true + # spec.prepare_command = 'mv src double-conversion' spec.source = { :git => 'https://github.com/facebook/Sonar.git', :branch=> "master" } spec.module_name = 'SonarKit' @@ -17,10 +17,8 @@ Pod::Spec.new do |spec| spec.dependency 'Sonar' spec.dependency 'CocoaAsyncSocket', '~> 7.6' spec.dependency 'PeerTalk' - spec.dependency 'OpenSSL-Static', '1.0.2.c1' - spec.source_files = 'iOS/FBDefines/*.{h,cpp,m,mm}', 'iOS/SonarKit/**/*.{h,cpp,m,mm}', 'iOS/SonarKit/FBCxxUtils/*.{h, mm}', + spec.source_files = 'iOS/FBDefines/*.{h,cpp,m,mm}', 'iOS/SonarKit/**/*.{h,cpp,m,mm}' spec.public_header_files = 'iOS/SonarKit/CppBridge/*.{h}', - 'iOS/SonarKit/FBCxxUtils/*.{h}', 'iOS/SonarKit/SonarClient.h', 'iOS/SonarKit/SonarDeviceData.h', 'iOS/SonarKit/SonarPlugin.h', @@ -28,10 +26,12 @@ Pod::Spec.new do |spec| 'iOS/SonarKit/SonarConnection.h', 'iOS/SonarKit/SKMacros.h' + spec.private_header_files = 'iOS/Sample/' 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", - "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"/** \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/PeerTalkSonar\" \"$(PODS_ROOT)/ComponentKit\"/**" } - spec.platforms = { :ios => "8.0" } + "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", + "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"/** \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/ComponentKit\"/**" } + spec.platforms = { :ios => "8.0", :tvos => "9.2" } spec.subspec "SonarKitLayoutPlugin" do |ss| ss.dependency "Yoga", yoga_version @@ -62,6 +62,7 @@ Pod::Spec.new do |spec| ss.source_files = "iOS/Plugins/SonarKitLayoutPlugin/SonarKitLayoutComponentKitSupport/**/*.{h,cpp,m,mm}" ss.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", + "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"" } end @@ -72,6 +73,18 @@ Pod::Spec.new do |spec| 'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKNetworkReporter.h' ss.source_files = "iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/*.{h,cpp,m,mm}" ss.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", + "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", + "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"" } + end + + spec.subspec "SonarKitNetworkPlugin" do |ss| + ss.public_header_files = 'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin.h', + 'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKBufferingPlugin.h', + 'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKDispatchQueue.h', + 'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKNetworkReporter.h' + ss.source_files = "iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/*.{h,cpp,m,mm}" + ss.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", + "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"" } end @@ -80,6 +93,7 @@ Pod::Spec.new do |spec| ss.public_header_files = 'iOS/Plugins/SonarKitNetworkPlugin/SKIOSNetworkPlugin/SKIOSNetworkAdapter.h' ss.source_files = "iOS/Plugins/SonarKitNetworkPlugin/SKIOSNetworkPlugin/**/*.{h,cpp,m,mm}" ss.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", + "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"" } end end diff --git a/iOS/SonarKit.xcodeproj/project.pbxproj b/iOS/SonarKit.xcodeproj/project.pbxproj index cd0b7e5c7..bbcb046f2 100644 --- a/iOS/SonarKit.xcodeproj/project.pbxproj +++ b/iOS/SonarKit.xcodeproj/project.pbxproj @@ -1,577 +1,668 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 53D19A2620A4BABA00A371E3 /* SonarClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 53D19A1220A4BAB900A371E3 /* SonarClient.mm */; }; - 53D19A2820A4BABA00A371E3 /* SonarUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D19A1420A4BAB900A371E3 /* SonarUtil.m */; }; - 53D19A2F20A4BABA00A371E3 /* SKPortForwardingServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D19A1D20A4BABA00A371E3 /* SKPortForwardingServer.m */; }; - 53D19A3020A4BABA00A371E3 /* SonarCppBridgingConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 53D19A1F20A4BABA00A371E3 /* SonarCppBridgingConnection.mm */; }; - 53D19A3320A4BABA00A371E3 /* SonarCppBridgingResponder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 53D19A2220A4BABA00A371E3 /* SonarCppBridgingResponder.mm */; }; - 53D3BBD820C629230022EB45 /* FBCxxFollyDynamicConvert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 53D3BBD620C629230022EB45 /* FBCxxFollyDynamicConvert.mm */; }; - 53D3BBD920C629230022EB45 /* FBCxxFollyDynamicConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D3BBD720C629230022EB45 /* FBCxxFollyDynamicConvert.h */; }; - 53D4C50620A5B72800613A96 /* SonarCppWrapperPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A2020A4BABA00A371E3 /* SonarCppWrapperPlugin.h */; }; - 53D4C50720A5B72800613A96 /* SonarCppBridgingConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A2120A4BABA00A371E3 /* SonarCppBridgingConnection.h */; }; - 53D4C50820A5B72800613A96 /* SonarCppBridgingResponder.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A2320A4BABA00A371E3 /* SonarCppBridgingResponder.h */; }; - 53D4C50920A5B72800613A96 /* SKMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A1020A4BAB900A371E3 /* SKMacros.h */; }; - 53D4C50A20A5B72800613A96 /* SonarClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A1120A4BAB900A371E3 /* SonarClient.h */; }; - 53D4C50B20A5B72800613A96 /* SonarConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A1820A4BAB900A371E3 /* SonarConnection.h */; }; - 53D4C50C20A5B72800613A96 /* SonarPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A1620A4BAB900A371E3 /* SonarPlugin.h */; }; - 53D4C50D20A5B72800613A96 /* SonarResponder.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A1320A4BAB900A371E3 /* SonarResponder.h */; }; - 53D4C50E20A5B72800613A96 /* SKUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D4C4F920A5B20000613A96 /* SKUtils.h */; }; - 53D4C50F20A5B72800613A96 /* SKPortForwardingServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A1B20A4BABA00A371E3 /* SKPortForwardingServer.h */; }; - 53D4C51020A5B72800613A96 /* SKPortForwardingCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 53D19A1C20A4BABA00A371E3 /* SKPortForwardingCommon.h */; }; - 53D4C51220A5B89900613A96 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53D4C51120A5B89900613A96 /* Foundation.framework */; }; - 6AE55F0A77A5644AADF2CEA6 /* libPods-SonarKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 104CB87D17FDFDC934630C14 /* libPods-SonarKit.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 104CB87D17FDFDC934630C14 /* libPods-SonarKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SonarKit.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 53D19A0520A4BA3600A371E3 /* SonarKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SonarKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 53D19A0920A4BA3600A371E3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 53D19A1020A4BAB900A371E3 /* SKMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKMacros.h; sourceTree = ""; }; - 53D19A1120A4BAB900A371E3 /* SonarClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SonarClient.h; sourceTree = ""; }; - 53D19A1220A4BAB900A371E3 /* SonarClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SonarClient.mm; sourceTree = ""; }; - 53D19A1320A4BAB900A371E3 /* SonarResponder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SonarResponder.h; sourceTree = ""; }; - 53D19A1420A4BAB900A371E3 /* SonarUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SonarUtil.m; sourceTree = ""; }; - 53D19A1620A4BAB900A371E3 /* SonarPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SonarPlugin.h; sourceTree = ""; }; - 53D19A1820A4BAB900A371E3 /* SonarConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SonarConnection.h; sourceTree = ""; }; - 53D19A1B20A4BABA00A371E3 /* SKPortForwardingServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKPortForwardingServer.h; sourceTree = ""; }; - 53D19A1C20A4BABA00A371E3 /* SKPortForwardingCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKPortForwardingCommon.h; sourceTree = ""; }; - 53D19A1D20A4BABA00A371E3 /* SKPortForwardingServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKPortForwardingServer.m; sourceTree = ""; }; - 53D19A1F20A4BABA00A371E3 /* SonarCppBridgingConnection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SonarCppBridgingConnection.mm; sourceTree = ""; }; - 53D19A2020A4BABA00A371E3 /* SonarCppWrapperPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SonarCppWrapperPlugin.h; sourceTree = ""; }; - 53D19A2120A4BABA00A371E3 /* SonarCppBridgingConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SonarCppBridgingConnection.h; sourceTree = ""; }; - 53D19A2220A4BABA00A371E3 /* SonarCppBridgingResponder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SonarCppBridgingResponder.mm; sourceTree = ""; }; - 53D19A2320A4BABA00A371E3 /* SonarCppBridgingResponder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SonarCppBridgingResponder.h; sourceTree = ""; }; - 53D3BBD620C629230022EB45 /* FBCxxFollyDynamicConvert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FBCxxFollyDynamicConvert.mm; sourceTree = ""; }; - 53D3BBD720C629230022EB45 /* FBCxxFollyDynamicConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBCxxFollyDynamicConvert.h; sourceTree = ""; }; - 53D4C4F920A5B20000613A96 /* SKUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SKUtils.h; path = SonarKit/SKUtils.h; sourceTree = SOURCE_ROOT; }; - 53D4C4FA20A5B20000613A96 /* SKUtils.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SKUtils.mm; path = SonarKit/SKUtils.mm; sourceTree = SOURCE_ROOT; }; - 53D4C51120A5B89900613A96 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 5B3C0104984F1A2F624E5394 /* Pods-SonarKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SonarKit.release.xcconfig"; path = "Pods/Target Support Files/Pods-SonarKit/Pods-SonarKit.release.xcconfig"; sourceTree = ""; }; - C6253FA5661121EDD200B8A9 /* Pods-SonarKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SonarKit.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SonarKit/Pods-SonarKit.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 53D19A0120A4BA3600A371E3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 53D4C51220A5B89900613A96 /* Foundation.framework in Frameworks */, - 6AE55F0A77A5644AADF2CEA6 /* libPods-SonarKit.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 256B672257477FB71D3FAD20 /* Pods */ = { - isa = PBXGroup; - children = ( - C6253FA5661121EDD200B8A9 /* Pods-SonarKit.debug.xcconfig */, - 5B3C0104984F1A2F624E5394 /* Pods-SonarKit.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 53D199FB20A4BA3600A371E3 = { - isa = PBXGroup; - children = ( - 53D19A0720A4BA3600A371E3 /* SonarKit */, - 53D19A0620A4BA3600A371E3 /* Products */, - 256B672257477FB71D3FAD20 /* Pods */, - 716CE00064F59AEDC5DB6AA8 /* Frameworks */, - ); - sourceTree = ""; - }; - 53D19A0620A4BA3600A371E3 /* Products */ = { - isa = PBXGroup; - children = ( - 53D19A0520A4BA3600A371E3 /* SonarKit.framework */, - ); - name = Products; - sourceTree = ""; - }; - 53D19A0720A4BA3600A371E3 /* SonarKit */ = { - isa = PBXGroup; - children = ( - 53D3BBD520C629230022EB45 /* FBCxxUtils */, - 53D19A1E20A4BABA00A371E3 /* CppBridge */, - 53D19A1020A4BAB900A371E3 /* SKMacros.h */, - 53D19A1120A4BAB900A371E3 /* SonarClient.h */, - 53D19A1220A4BAB900A371E3 /* SonarClient.mm */, - 53D19A1820A4BAB900A371E3 /* SonarConnection.h */, - 53D19A1620A4BAB900A371E3 /* SonarPlugin.h */, - 53D19A1320A4BAB900A371E3 /* SonarResponder.h */, - 53D19A1420A4BAB900A371E3 /* SonarUtil.m */, - 53D4C4F920A5B20000613A96 /* SKUtils.h */, - 53D4C4FA20A5B20000613A96 /* SKUtils.mm */, - 53D19A1920A4BABA00A371E3 /* Utilities */, - 53D19A0920A4BA3600A371E3 /* Info.plist */, - ); - path = SonarKit; - sourceTree = ""; - }; - 53D19A1920A4BABA00A371E3 /* Utilities */ = { - isa = PBXGroup; - children = ( - 53D19A1A20A4BABA00A371E3 /* PortForwarding */, - ); - path = Utilities; - sourceTree = ""; - }; - 53D19A1A20A4BABA00A371E3 /* PortForwarding */ = { - isa = PBXGroup; - children = ( - 53D19A1B20A4BABA00A371E3 /* SKPortForwardingServer.h */, - 53D19A1C20A4BABA00A371E3 /* SKPortForwardingCommon.h */, - 53D19A1D20A4BABA00A371E3 /* SKPortForwardingServer.m */, - ); - path = PortForwarding; - sourceTree = ""; - }; - 53D19A1E20A4BABA00A371E3 /* CppBridge */ = { - isa = PBXGroup; - children = ( - 53D19A1F20A4BABA00A371E3 /* SonarCppBridgingConnection.mm */, - 53D19A2020A4BABA00A371E3 /* SonarCppWrapperPlugin.h */, - 53D19A2120A4BABA00A371E3 /* SonarCppBridgingConnection.h */, - 53D19A2220A4BABA00A371E3 /* SonarCppBridgingResponder.mm */, - 53D19A2320A4BABA00A371E3 /* SonarCppBridgingResponder.h */, - ); - path = CppBridge; - sourceTree = ""; - }; - 53D3BBD520C629230022EB45 /* FBCxxUtils */ = { - isa = PBXGroup; - children = ( - 53D3BBD620C629230022EB45 /* FBCxxFollyDynamicConvert.mm */, - 53D3BBD720C629230022EB45 /* FBCxxFollyDynamicConvert.h */, - ); - path = FBCxxUtils; - sourceTree = ""; - }; - 716CE00064F59AEDC5DB6AA8 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 53D4C51120A5B89900613A96 /* Foundation.framework */, - 104CB87D17FDFDC934630C14 /* libPods-SonarKit.a */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 53D19A0220A4BA3600A371E3 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 53D4C50B20A5B72800613A96 /* SonarConnection.h in Headers */, - 53D4C50D20A5B72800613A96 /* SonarResponder.h in Headers */, - 53D4C50620A5B72800613A96 /* SonarCppWrapperPlugin.h in Headers */, - 53D4C50720A5B72800613A96 /* SonarCppBridgingConnection.h in Headers */, - 53D4C50820A5B72800613A96 /* SonarCppBridgingResponder.h in Headers */, - 53D4C50920A5B72800613A96 /* SKMacros.h in Headers */, - 53D4C50A20A5B72800613A96 /* SonarClient.h in Headers */, - 53D3BBD920C629230022EB45 /* FBCxxFollyDynamicConvert.h in Headers */, - 53D4C50C20A5B72800613A96 /* SonarPlugin.h in Headers */, - 53D4C50E20A5B72800613A96 /* SKUtils.h in Headers */, - 53D4C50F20A5B72800613A96 /* SKPortForwardingServer.h in Headers */, - 53D4C51020A5B72800613A96 /* SKPortForwardingCommon.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 53D19A0420A4BA3600A371E3 /* SonarKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 53D19A0D20A4BA3600A371E3 /* Build configuration list for PBXNativeTarget "SonarKit" */; - buildPhases = ( - CC935574E023944658E3DB85 /* [CP] Check Pods Manifest.lock */, - 53D19A0020A4BA3600A371E3 /* Sources */, - 53D19A0120A4BA3600A371E3 /* Frameworks */, - 53D19A0220A4BA3600A371E3 /* Headers */, - 53D19A0320A4BA3600A371E3 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SonarKit; - productName = SonarKit; - productReference = 53D19A0520A4BA3600A371E3 /* SonarKit.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 53D199FC20A4BA3600A371E3 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0940; - ORGANIZATIONNAME = Facebook; - TargetAttributes = { - 53D19A0420A4BA3600A371E3 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 53D199FF20A4BA3600A371E3 /* Build configuration list for PBXProject "SonarKit" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 53D199FB20A4BA3600A371E3; - productRefGroup = 53D19A0620A4BA3600A371E3 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 53D19A0420A4BA3600A371E3 /* SonarKit */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 53D19A0320A4BA3600A371E3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - CC935574E023944658E3DB85 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SonarKit-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 53D19A0020A4BA3600A371E3 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 53D3BBD820C629230022EB45 /* FBCxxFollyDynamicConvert.mm in Sources */, - 53D19A3320A4BABA00A371E3 /* SonarCppBridgingResponder.mm in Sources */, - 53D19A2F20A4BABA00A371E3 /* SKPortForwardingServer.m in Sources */, - 53D19A3020A4BABA00A371E3 /* SonarCppBridgingConnection.mm in Sources */, - 53D19A2620A4BABA00A371E3 /* SonarClient.mm in Sources */, - 53D19A2820A4BABA00A371E3 /* SonarUtil.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 53D19A0B20A4BA3600A371E3 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_CXX_LIBRARY = "compiler-default"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_CXX0X_EXTENSIONS = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 53D19A0C20A4BA3600A371E3 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_CXX_LIBRARY = "compiler-default"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_CXX0X_EXTENSIONS = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 53D19A0E20A4BA3600A371E3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C6253FA5661121EDD200B8A9 /* Pods-SonarKit.debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - ); - GCC_USE_STANDARD_INCLUDE_SEARCHING = YES; - HEADER_SEARCH_PATHS = ( - "${SRCROOT}/SonarKit/**", - "${SRCROOT}/../xplat/**", - "$(inherited)", - "${PODS_ROOT}/Headers/Public/DoubleConversion/**", - "${PODS_ROOT}/boost-for-react-native", - "${PODS_ROOT}/Headers/Public/Folly", - "${PODS_ROOT}/DoubleConversion", - "${PODS_ROOT}/Headers/Public/glog", - "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket", - /usr/local/Cellar/openssl/1.0.2o_1/include, - ); - INFOPLIST_FILE = SonarKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_MOBILE=1", - "-DFOLLY_HAVE_LIBGFLAGS=0", - "-DFOLLY_FORCE_EXCEPTION_COUNT_USE_STD=1", - "-DFOLLY_USE_SYMBOLIZER=0", - "-DFOLLY_HAVE_TFO=0", - "-DFOLLY_HAVE_PWRITEV=0", - "-DFOLLY_HAVE_PREADV=0", - "-DFOLLY_HAVE_LIBJEMALLOC=0", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-l\"DoubleConversion\"", - "-l\"Folly\"", - "-l\"glog\"", - "-l\"stdc++\"", - "-DFOLLY_NO_CONFIG=1", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_HAVE_LIBGFLAGS=0", - "-DFOLLY_HAVE_LIBJEMALLOC=0", - "-DFOLLY_HAVE_PREADV=0", - "-DFOLLY_HAVE_TFO=0", - "-DFOLLY_FORCE_EXCEPTION_COUNT_USE_STD=1", - "-DFOLLY_USE_SYMBOLIZER=0", - "-DFOLLY_HAVE_PWRITEV=0", - ); - OTHER_LIBTOOLFLAGS = ""; - PRODUCT_BUNDLE_IDENTIFIER = FB.SonarKit; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - "USER_HEADER_SEARCH_PATHS[arch=*]" = "${SRCROOT}/SonarKit/** ${SRCROOT}/../xplat/**"; - USE_HEADERMAP = YES; - }; - name = Debug; - }; - 53D19A0F20A4BA3600A371E3 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5B3C0104984F1A2F624E5394 /* Pods-SonarKit.release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_USE_STANDARD_INCLUDE_SEARCHING = YES; - HEADER_SEARCH_PATHS = ( - "${SRCROOT}/SonarKit/**", - "${SRCROOT}/../xplat/**", - "$(inherited)", - "${PODS_ROOT}/Headers/Public/DoubleConversion/**", - "${PODS_ROOT}/boost-for-react-native", - "${PODS_ROOT}/Headers/Public/Folly", - "${PODS_ROOT}/DoubleConversion", - "${PODS_ROOT}/Headers/Public/glog", - "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket", - /usr/local/Cellar/openssl/1.0.2o_1/include, - ); - INFOPLIST_FILE = SonarKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_MOBILE=1", - "-DFOLLY_HAVE_LIBGFLAGS=0", - "-DFOLLY_FORCE_EXCEPTION_COUNT_USE_STD=1", - "-DFOLLY_USE_SYMBOLIZER=0", - "-DFOLLY_HAVE_TFO=0", - "-DFOLLY_HAVE_PWRITEV=0", - "-DFOLLY_HAVE_PREADV=0", - "-DFOLLY_HAVE_LIBJEMALLOC=0", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-l\"DoubleConversion\"", - "-l\"Folly\"", - "-l\"glog\"", - "-l\"stdc++\"", - "-DFOLLY_NO_CONFIG=1", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_HAVE_LIBGFLAGS=0", - "-DFOLLY_HAVE_LIBJEMALLOC=0", - "-DFOLLY_HAVE_PREADV=0", - "-DFOLLY_HAVE_TFO=0", - "-DFOLLY_FORCE_EXCEPTION_COUNT_USE_STD=1", - "-DFOLLY_USE_SYMBOLIZER=0", - "-DFOLLY_HAVE_PWRITEV=0", - ); - OTHER_LIBTOOLFLAGS = ""; - PRODUCT_BUNDLE_IDENTIFIER = FB.SonarKit; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - USE_HEADERMAP = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 53D199FF20A4BA3600A371E3 /* Build configuration list for PBXProject "SonarKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 53D19A0B20A4BA3600A371E3 /* Debug */, - 53D19A0C20A4BA3600A371E3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 53D19A0D20A4BA3600A371E3 /* Build configuration list for PBXNativeTarget "SonarKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 53D19A0E20A4BA3600A371E3 /* Debug */, - 53D19A0F20A4BA3600A371E3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 53D199FC20A4BA3600A371E3 /* Project object */; -} + + + + + archiveVersion + 1 + classes + + + objectVersion + 46 + objects + + 1DD70E29AEDF69A200000000 + + isa + PBXFileReference + name + SonarKit-Debug.xcconfig + path + ../../buck-out/gen/Libraries/SonarKit/SonarKit-Debug.xcconfig + sourceTree + SOURCE_ROOT + explicitFileType + text.xcconfig + + 1DD70E2959CE208C00000000 + + isa + PBXFileReference + name + SonarKit-Profile.xcconfig + path + ../../buck-out/gen/Libraries/SonarKit/SonarKit-Profile.xcconfig + sourceTree + SOURCE_ROOT + explicitFileType + text.xcconfig + + 1DD70E29CD64CBEE00000000 + + isa + PBXFileReference + name + SonarKit-Release.xcconfig + path + ../../buck-out/gen/Libraries/SonarKit/SonarKit-Release.xcconfig + sourceTree + SOURCE_ROOT + explicitFileType + text.xcconfig + + B401C9792F7F325000000000 + + isa + PBXGroup + name + Buck (Do Not Modify) + sourceTree + ]]> + children + + 1DD70E29AEDF69A200000000 + 1DD70E2959CE208C00000000 + 1DD70E29CD64CBEE00000000 + + + B401C979B781F65D00000000 + + isa + PBXGroup + name + Configurations + sourceTree + ]]> + children + + B401C9792F7F325000000000 + + + 1DD70E291F97291900000000 + + isa + PBXFileReference + name + libSonarKit--916269148.a + path + libSonarKit--916269148.a + sourceTree + BUILT_PRODUCTS_DIR + explicitFileType + archive.ar + + B401C979C806358400000000 + + isa + PBXGroup + name + Products + sourceTree + ]]> + children + + 1DD70E291F97291900000000 + + + 1DD70E29001F47FB00000000 + + isa + PBXFileReference + name + BUCK + path + BUCK + sourceTree + SOURCE_ROOT + explicitFileType + text.script.python + + 1DD70E295D9C4C1E00000000 + + isa + PBXFileReference + name + SonarCppBridgingConnection.h + path + SonarKit/CppBridge/SonarCppBridgingConnection.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E2955ED38AA00000000 + + isa + PBXFileReference + name + SonarCppBridgingConnection.mm + path + SonarKit/CppBridge/SonarCppBridgingConnection.mm + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.cpp.objcpp + + 1DD70E29B6F151F600000000 + + isa + PBXFileReference + name + SonarCppBridgingResponder.h + path + SonarKit/CppBridge/SonarCppBridgingResponder.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E292738EDD200000000 + + isa + PBXFileReference + name + SonarCppBridgingResponder.mm + path + SonarKit/CppBridge/SonarCppBridgingResponder.mm + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.cpp.objcpp + + 1DD70E298E830C8000000000 + + isa + PBXFileReference + name + SonarCppWrapperPlugin.h + path + SonarKit/CppBridge/SonarCppWrapperPlugin.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + B401C979DC3E2AEC00000000 + + isa + PBXGroup + name + CppBridge + path + SonarKit/CppBridge + sourceTree + SOURCE_ROOT + children + + 1DD70E295D9C4C1E00000000 + 1DD70E2955ED38AA00000000 + 1DD70E29B6F151F600000000 + 1DD70E292738EDD200000000 + 1DD70E298E830C8000000000 + + + 1DD70E29978C461B00000000 + + isa + PBXFileReference + name + SKPortForwardingCommon.h + path + SonarKit/Utilities/PortForwarding/SKPortForwardingCommon.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E290DA3557300000000 + + isa + PBXFileReference + name + SKPortForwardingServer.h + path + SonarKit/Utilities/PortForwarding/SKPortForwardingServer.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E290DA3557800000000 + + isa + PBXFileReference + name + SKPortForwardingServer.m + path + SonarKit/Utilities/PortForwarding/SKPortForwardingServer.m + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.objc + + B401C9797FE3A67E00000000 + + isa + PBXGroup + name + PortForwarding + path + SonarKit/Utilities/PortForwarding + sourceTree + SOURCE_ROOT + children + + 1DD70E29978C461B00000000 + 1DD70E290DA3557300000000 + 1DD70E290DA3557800000000 + + + B401C979BD78D6EA00000000 + + isa + PBXGroup + name + Utilities + path + SonarKit/Utilities + sourceTree + SOURCE_ROOT + children + + B401C9797FE3A67E00000000 + + + 1DD70E299D3D8CD900000000 + + isa + PBXFileReference + name + SKMacros.h + path + SonarKit/SKMacros.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E29DD8668F300000000 + + isa + PBXFileReference + name + SKUtils.h + path + SonarKit/SKUtils.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E29D346B67500000000 + + isa + PBXFileReference + name + SKUtils.mm + path + SonarKit/SKUtils.mm + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.cpp.objcpp + + 1DD70E297513814800000000 + + isa + PBXFileReference + name + SonarClient.h + path + SonarKit/SonarClient.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E292D5CA8C000000000 + + isa + PBXFileReference + name + SonarClient.mm + path + SonarKit/SonarClient.mm + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.cpp.objcpp + + 1DD70E29D967BA1B00000000 + + isa + PBXFileReference + name + SonarConnection.h + path + SonarKit/SonarConnection.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E29D016C2B000000000 + + isa + PBXFileReference + name + SonarPlugin.h + path + SonarKit/SonarPlugin.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E29C331B05900000000 + + isa + PBXFileReference + name + SonarResponder.h + path + SonarKit/SonarResponder.h + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.h + + 1DD70E2969DE008400000000 + + isa + PBXFileReference + name + SonarUtil.m + path + SonarKit/SonarUtil.m + sourceTree + SOURCE_ROOT + lastKnownFileType + sourcecode.c.objc + + B401C979EAB5339800000000 + + isa + PBXGroup + name + Sources + sourceTree + ]]> + children + + B401C979DC3E2AEC00000000 + B401C979BD78D6EA00000000 + 1DD70E299D3D8CD900000000 + 1DD70E29DD8668F300000000 + 1DD70E29D346B67500000000 + 1DD70E297513814800000000 + 1DD70E292D5CA8C000000000 + 1DD70E29D967BA1B00000000 + 1DD70E29D016C2B000000000 + 1DD70E29C331B05900000000 + 1DD70E2969DE008400000000 + + + B401C9795F1632B300000000 + + isa + PBXGroup + name + SonarKit + sourceTree + ]]> + children + + 1DD70E29001F47FB00000000 + B401C979EAB5339800000000 + + + B401C979EFB6AC4600000000 + + isa + PBXGroup + name + mainGroup + sourceTree + ]]> + children + + B401C979B781F65D00000000 + B401C979C806358400000000 + B401C9795F1632B300000000 + + + E7A30F0455ED38AA00000000 + + isa + PBXBuildFile + fileRef + 1DD70E2955ED38AA00000000 + settings + + COMPILER_FLAGS + -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 + + + E7A30F042738EDD200000000 + + isa + PBXBuildFile + fileRef + 1DD70E292738EDD200000000 + settings + + COMPILER_FLAGS + -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 + + + E7A30F040DA3557800000000 + + isa + PBXBuildFile + fileRef + 1DD70E290DA3557800000000 + settings + + COMPILER_FLAGS + -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 + + + E7A30F04D346B67500000000 + + isa + PBXBuildFile + fileRef + 1DD70E29D346B67500000000 + settings + + COMPILER_FLAGS + -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 + + + E7A30F042D5CA8C000000000 + + isa + PBXBuildFile + fileRef + 1DD70E292D5CA8C000000000 + settings + + COMPILER_FLAGS + -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 + + + E7A30F0469DE008400000000 + + isa + PBXBuildFile + fileRef + 1DD70E2969DE008400000000 + settings + + COMPILER_FLAGS + -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 + + + 1870857F0000000000000000 + + isa + PBXSourcesBuildPhase + files + + E7A30F0455ED38AA00000000 + E7A30F042738EDD200000000 + E7A30F040DA3557800000000 + E7A30F04D346B67500000000 + E7A30F042D5CA8C000000000 + E7A30F0469DE008400000000 + + + 4952437303EDA63300000000 + + isa + XCBuildConfiguration + name + Debug + buildSettings + + + baseConfigurationReference + 1DD70E29AEDF69A200000000 + + 4952437350C7218900000000 + + isa + XCBuildConfiguration + name + Profile + buildSettings + + + baseConfigurationReference + 1DD70E2959CE208C00000000 + + 49524373A439BFE700000000 + + isa + XCBuildConfiguration + name + Release + buildSettings + + + baseConfigurationReference + 1DD70E29CD64CBEE00000000 + + 218C37090000000000000000 + + isa + XCConfigurationList + buildConfigurations + + 4952437303EDA63300000000 + 4952437350C7218900000000 + 49524373A439BFE700000000 + + defaultConfigurationIsVisible + + + E66DC04E5F1632B300000000 + + isa + PBXNativeTarget + name + SonarKit + productName + SonarKit--916269148 + productReference + 1DD70E291F97291900000000 + productType + com.apple.product-type.library.static + dependencies + + + buildPhases + + 1870857F0000000000000000 + + buildConfigurationList + 218C37090000000000000000 + + 4952437303EDA63300000001 + + isa + XCBuildConfiguration + name + Debug + buildSettings + + + + 4952437350C7218900000001 + + isa + XCBuildConfiguration + name + Profile + buildSettings + + + + 49524373A439BFE700000001 + + isa + XCBuildConfiguration + name + Release + buildSettings + + + + 218C37090000000000000001 + + isa + XCConfigurationList + buildConfigurations + + 4952437303EDA63300000001 + 4952437350C7218900000001 + 49524373A439BFE700000001 + + defaultConfigurationIsVisible + + + 96C847935F1632B300000000 + + isa + PBXProject + mainGroup + B401C979EFB6AC4600000000 + targets + + E66DC04E5F1632B300000000 + + buildConfigurationList + 218C37090000000000000001 + compatibilityVersion + Xcode 3.2 + attributes + + LastUpgradeCheck + 9999 + + + + rootObject + 96C847935F1632B300000000 + + \ No newline at end of file diff --git a/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.mm b/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.mm index 031cdbca7..c2518f328 100644 --- a/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.mm +++ b/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.mm @@ -7,8 +7,7 @@ */ #import "SonarCppBridgingConnection.h" -#import - +#import "SKUtils.h" #import "SonarCppBridgingResponder.h" @implementation SonarCppBridgingConnection @@ -28,7 +27,7 @@ - (void)send:(NSString *)method withParams:(NSDictionary *)params { - conn_->send([method UTF8String], facebook::cxxutils::convertIdToFollyDynamic(params)); + conn_->send([method UTF8String], [SKUtils convertIdToFollyDynamic:params]); } - (void)receive:(NSString *)method withBlock:(SonarReceiver)receiver @@ -37,7 +36,7 @@ std::unique_ptr responder) { SonarCppBridgingResponder *const objCResponder = [[SonarCppBridgingResponder alloc] initWithCppResponder:std::move(responder)]; - receiver(facebook::cxxutils::convertFollyDynamicToId(message), objCResponder); + receiver([SKUtils convertFollyDynamicToId: message], objCResponder); }; conn_->receive([method UTF8String], lambda); } diff --git a/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.mm b/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.mm index 0b3714fb4..b43701980 100644 --- a/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.mm +++ b/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.mm @@ -7,7 +7,7 @@ */ #import "SonarCppBridgingResponder.h" -#import +#import "SKUtils.h" @implementation SonarCppBridgingResponder { std::unique_ptr responder_; @@ -28,8 +28,8 @@ #pragma mark - SonarResponder -- (void)success:(NSDictionary *)response { responder_->success(facebook::cxxutils::convertIdToFollyDynamic(response)); } +- (void)success:(NSDictionary *)response { responder_->success([SKUtils convertIdToFollyDynamic:response]); } -- (void)error:(NSDictionary *)response { responder_->error(facebook::cxxutils::convertIdToFollyDynamic(response)); } +- (void)error:(NSDictionary *)response { responder_->error([SKUtils convertIdToFollyDynamic:response]); } @end diff --git a/iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.h b/iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.h deleted file mode 100644 index dd83b9df3..000000000 --- a/iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. -#pragma once - -#import - -#include - -namespace facebook { -namespace cxxutils { - -folly::dynamic convertIdToFollyDynamic(id json); -id convertFollyDynamicToId(const folly::dynamic &dyn); - -} } diff --git a/iOS/SonarKit/Info.plist b/iOS/SonarKit/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/iOS/SonarKit/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/iOS/SonarKit/SKUtils.h b/iOS/SonarKit/SKUtils.h new file mode 100644 index 000000000..7cd13eb41 --- /dev/null +++ b/iOS/SonarKit/SKUtils.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2018-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. + * + */ +#pragma once + +#import + +#import + +namespace facebook { namespace sonar { +#define _C_ID '@' +#define _C_CLASS '#' +#define _C_SEL ':' +#define _C_CHR 'c' +#define _C_UCHR 'C' +#define _C_SHT 's' +#define _C_USHT 'S' +#define _C_INT 'i' +#define _C_UINT 'I' +#define _C_LNG 'l' +#define _C_ULNG 'L' +#define _C_LNG_LNG 'q' +#define _C_ULNG_LNG 'Q' +#define _C_FLT 'f' +#define _C_DBL 'd' +#define _C_BFLD 'b' +#define _C_BOOL 'B' +#define _C_VOID 'v' +#define _C_UNDEF '?' +#define _C_PTR '^' +#define _C_CHARPTR '*' +#define _C_ATOM '%' +#define _C_ARY_B '[' +#define _C_ARY_E ']' +#define _C_UNION_B '(' +#define _C_UNION_E ')' +#define _C_STRUCT_B '{' +#define _C_STRUCT_E '}' +#define _C_VECTOR '!' +#define _C_CONST 'r' +} +} + +@interface SKUtils: NSObject ++ (folly::dynamic)convertIdToFollyDynamic:(id)json; ++ (id)convertFollyDynamicToId:(const folly::dynamic &)dyn; + +@end diff --git a/iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.mm b/iOS/SonarKit/SKUtils.mm similarity index 63% rename from iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.mm rename to iOS/SonarKit/SKUtils.mm index b19405511..82c8b9699 100644 --- a/iOS/SonarKit/FBCxxUtils/FBCxxFollyDynamicConvert.mm +++ b/iOS/SonarKit/SKUtils.mm @@ -1,17 +1,97 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#import "FBCxxFollyDynamicConvert.h" - -#import - -namespace facebook { -namespace cxxutils { - /* - * The implementation is taken from RCTFollyConvert(https://fburl.com/vzw8ql2q) + * Copyright (c) 2018-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. + * */ +#include "SKUtils.h" -id convertFollyDynamicToId(const folly::dynamic &dyn) { +#include + +#import + +using namespace facebook::sonar; + +@implementation SKUtils + ++ (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 { + const auto value = [json longLongValue]; + if (isnan(value) || isinf(value)) { + return nullptr; + } + return value; + } + 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: { + const auto value = [json longLongValue]; + if (isnan(value) || isinf(value)) { + return nullptr; + } + return value; + } + + case _C_FLT: + case _C_DBL: { + const auto value = [json doubleValue]; + if (isnan(value) || isinf(value)) { + return nullptr; + } + return value; + } + + // default: + // fall through + } + } else if ([json isKindOfClass:[NSString class]]) { + NSData *data = [json dataUsingEncoding:NSUTF8StringEncoding]; + return std::string(reinterpret_cast(data.bytes), + data.length); + } else if ([json isKindOfClass:[NSArray class]]) { + folly::dynamic array = folly::dynamic::array; + for (id element in json) { + array.push_back([self 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([self convertIdToFollyDynamic:key], + [self convertIdToFollyDynamic:value]); + }]; + + return object; + } + + return nil; +} + ++ (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. @@ -27,84 +107,22 @@ id convertFollyDynamicToId(const folly::dynamic &dyn) { return @(dyn.getDouble()); case folly::dynamic::STRING: return [[NSString alloc] initWithBytes:dyn.c_str() length:dyn.size() - encoding:NSUTF8StringEncoding]; + encoding:NSUTF8StringEncoding]; case folly::dynamic::ARRAY: { NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:dyn.size()]; for (auto &elem : dyn) { - [array addObject:convertFollyDynamicToId(elem)]; + [array addObject:[self 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); + dict[[self convertFollyDynamicToId:elem.first]] = [self 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(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; -} - -} } +@end diff --git a/iOS/SonarKit/SonarClient.mm b/iOS/SonarKit/SonarClient.mm index 46766bcb2..14a62745d 100644 --- a/iOS/SonarKit/SonarClient.mm +++ b/iOS/SonarKit/SonarClient.mm @@ -15,7 +15,7 @@ #import #if !TARGET_OS_SIMULATOR -// #import "SKPortForwardingServer.h" +#import "SKPortForwardingServer.h" #endif using WrapperPlugin = facebook::sonar::SonarCppWrapperPlugin; @@ -24,7 +24,7 @@ using WrapperPlugin = facebook::sonar::SonarCppWrapperPlugin; facebook::sonar::SonarClient *_cppClient; folly::ScopedEventBaseThread eventBaseThread; #if !TARGET_OS_SIMULATOR - // SKPortForwardingServer *_server; + SKPortForwardingServer *_server; #endif } @@ -103,9 +103,9 @@ using WrapperPlugin = facebook::sonar::SonarCppWrapperPlugin; - (void)start; { #if !TARGET_OS_SIMULATOR - // _server = [SKPortForwardingServer new]; - // [_server forwardConnectionsFromPort:8088]; - // [_server listenForMultiplexingChannelOnPort:8078]; + _server = [SKPortForwardingServer new]; + [_server forwardConnectionsFromPort:8088]; + [_server listenForMultiplexingChannelOnPort:8078]; #endif _cppClient->start(); } @@ -114,8 +114,8 @@ using WrapperPlugin = facebook::sonar::SonarCppWrapperPlugin; { _cppClient->stop(); #if !TARGET_OS_SIMULATOR - // [_server close]; - // _server = nil; + [_server close]; + _server = nil; #endif } diff --git a/iOS/scripts/ios-configure-glog.sh b/iOS/scripts/ios-configure-glog.sh new file mode 100644 index 000000000..e6a15febb --- /dev/null +++ b/iOS/scripts/ios-configure-glog.sh @@ -0,0 +1,41 @@ +#!/bin/bash +set -e + +PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}" +CURRENT_ARCH="${CURRENT_ARCH:-armv7}" + +export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)" +export CXX="$CC" + +# Remove automake symlink if it exists +if [ -h "test-driver" ]; then + rm test-driver +fi + +./configure --host arm-apple-darwin + +# Fix build for tvOS +cat << EOF >> src/config.h + +/* Add in so we have Apple Target Conditionals */ +#ifdef __APPLE__ +#include +#include +#endif + +/* Special configuration for AppleTVOS */ +#if TARGET_OS_TV +#undef HAVE_SYSCALL_H +#undef HAVE_SYS_SYSCALL_H +#undef OS_MACOSX +#endif + +/* Special configuration for ucontext */ +#undef HAVE_UCONTEXT_H +#undef PC_FROM_UCONTEXT +#if defined(__x86_64__) +#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip +#elif defined(__i386__) +#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip +#endif +EOF diff --git a/iOS/third-party-podspecs/DoubleConversion.podspec b/iOS/third-party-podspecs/DoubleConversion.podspec index 95ba81257..91f4f819b 100755 --- a/iOS/third-party-podspecs/DoubleConversion.podspec +++ b/iOS/third-party-podspecs/DoubleConversion.podspec @@ -13,6 +13,6 @@ Pod::Spec.new do |spec| spec.libraries = "stdc++" spec.compiler_flags = '-std=c++1y' # Pinning to the same version as React.podspec. - spec.platforms = { :ios => "8.0" } + spec.platforms = { :ios => "8.0", :tvos => "9.2" } end diff --git a/iOS/third-party-podspecs/EasyWSClient.podspec b/iOS/third-party-podspecs/EasyWSClient.podspec new file mode 100644 index 000000000..0b3edeba9 --- /dev/null +++ b/iOS/third-party-podspecs/EasyWSClient.podspec @@ -0,0 +1,17 @@ +Pod::Spec.new do |spec| + spec.name = 'EasyWSClient' + spec.version = '1.0.0' + spec.license = { :type => 'MIT' } + spec.homepage = 'https://github.com/google/double-conversion' + spec.summary = 'Easywsclient is an easy and powerful WebSocket client to get your C++ code connected to a web stack right away.' + spec.authors = 'David Baird' + # spec.prepare_command = 'mv src double-conversion' + spec.source = { :git => 'https://github.com/dhbaird/easywsclient.git', :branch => 'master'} + spec.module_name = 'EasyWSClient' + spec.source_files = '*.{hpp,cpp}' + spec.libraries = "stdc++" + spec.compiler_flags = '-std=c++1y' + # Pinning to the same version as React.podspec. + spec.platforms = { :ios => "8.0", :tvos => "9.2" } + +end diff --git a/iOS/third-party-podspecs/Folly.podspec b/iOS/third-party-podspecs/Folly.podspec index 1623e2bfd..4732038d7 100755 --- a/iOS/third-party-podspecs/Folly.podspec +++ b/iOS/third-party-podspecs/Folly.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Folly' - spec.version = '2018.05.28.00' + spec.version = '2018.05.07.00' spec.license = { :type => 'Apache License, Version 2.0' } spec.homepage = 'https://github.com/facebook/folly' spec.summary = 'An open-source C++ library developed and used at Facebook.' @@ -11,9 +11,7 @@ Pod::Spec.new do |spec| spec.dependency 'boost-for-react-native' spec.dependency 'DoubleConversion' spec.dependency 'glog' - spec.dependency 'OpenSSL-Static', '1.0.2.c1' - spec.dependency 'CocoaLibEvent', '~> 1.0' - 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 + 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 @@ -27,27 +25,10 @@ Pod::Spec.new do |spec| 'folly/memory/detail/MallocImpl.cpp', 'folly/String.cpp', 'folly/*.cpp', - 'folly/detail/*.cpp', - 'folly/hash/*.cpp', - 'folly/portability/*.cpp', 'folly/ScopeGuard.h', 'folly/lang/ColdClass.cpp', 'folly/lang/Assume.h', - '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' + 'folly/lang/Assume.cpp' # workaround for https://github.com/facebook/react-native/issues/14326 spec.preserve_paths = 'folly/*.h', @@ -57,16 +38,16 @@ Pod::Spec.new do |spec| 'folly/detail/*.h', 'folly/hash/*.h', 'folly/memory/*.h', - 'folly/**/*.h', - 'folly/futures/detail/*.h', - 'folly/futures/*.h' + 'folly/**/*.h' spec.header_mappings_dir = 'folly' spec.header_dir = 'folly' spec.libraries = "stdc++" spec.private_header_files = 'folly/portability/Stdlib.h', - 'folly/portability/Stdio.h' - + 'folly/portability/Malloc.h', + 'folly/portability/Stdlib.h', + 'folly/portability/Stdio.h', + 'folly/portability/PThread.h' spec.public_header_files = 'folly/portability/Config.h', 'folly/Executor.h', 'folly/Function.h', @@ -100,19 +81,15 @@ Pod::Spec.new do |spec| 'folly/FBString.h', 'folly/hash/Hash.h', 'folly/memory/Malloc.h', - 'folly/io/async/AsyncTimeout.h', 'folly/**/*.h', 'folly/memory/detail/MallocImpl.h', 'folly/String.h', - 'folly/*.h', - 'folly/portability/PThread.h', - 'folly/futures/*.h', - 'folly/futures/detail/*.h' + 'folly/*.h' spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "CLANG_CXX_LANGUAGE_STANDARD" => "c++11", "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\"" } # Pinning to the same version as React.podspec. - spec.platforms = { :ios => "8.0"} + spec.platforms = { :ios => "8.0", :tvos => "10.0" } end diff --git a/iOS/third-party-podspecs/LibEvent.podspec b/iOS/third-party-podspecs/LibEvent.podspec deleted file mode 100644 index 3dc29d42b..000000000 --- a/iOS/third-party-podspecs/LibEvent.podspec +++ /dev/null @@ -1,29 +0,0 @@ -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 diff --git a/iOS/third-party-podspecs/PeerTalk.podspec b/iOS/third-party-podspecs/PeerTalk.podspec deleted file mode 100644 index eeac92540..000000000 --- a/iOS/third-party-podspecs/PeerTalk.podspec +++ /dev/null @@ -1,19 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'PeerTalk' - spec.version = '1.0.0' - spec.license = { :type => 'MIT' } - spec.homepage = 'http://rsms.me/peertalk/' - spec.authors = { 'Rasmus Andersson' => 'rasmus@notion.se' } - spec.summary = 'iOS and OS X Cocoa library for communicating over USB and TCP.' - - spec.source = { :git => "https://github.com/rsms/PeerTalk.git", :branch => 'master' } - spec.source_files = 'peertalk/*.{h,m}' - spec.requires_arc = true - spec.ios.deployment_target = '8.4' - spec.osx.deployment_target = '10.10' - - spec.description = " PeerTalk is a iOS and OS X Cocoa library for communicating over USB and TCP.\n\n Highlights:\n\n * Provides you with USB device attach/detach events and attached device's info\n * Can connect to TCP services on supported attached devices (e.g. an iPhone), bridging the communication over USB transport\n * Offers a higher-level API (PTChannel and PTProtocol) for convenient implementations.\n * Tested and designed for libdispatch (aka Grand Central Dispatch).\n" - spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", - "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"/**" } - -end diff --git a/iOS/third-party-podspecs/RSocket.podspec b/iOS/third-party-podspecs/RSocket.podspec deleted file mode 100644 index ac127e1aa..000000000 --- a/iOS/third-party-podspecs/RSocket.podspec +++ /dev/null @@ -1,53 +0,0 @@ -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 = 'rsocket' - spec.header_dir = 'rsocket' - spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", - "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"/** \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/DoubleConversion\"/**" } - spec.platforms = { :ios => "8.0" } - -end diff --git a/iOS/third-party-podspecs/glog.podspec b/iOS/third-party-podspecs/glog.podspec index 3524ba47e..a68659fa0 100755 --- a/iOS/third-party-podspecs/glog.podspec +++ b/iOS/third-party-podspecs/glog.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |spec| spec.homepage = 'https://github.com/google/glog' spec.summary = 'Google logging module' spec.authors = 'Google' - spec.prepare_command = "#!/bin/bash\nset -e\n\nPLATFORM_NAME=\"${PLATFORM_NAME:-iphoneos}\"\nCURRENT_ARCH=\"${CURRENT_ARCH:-armv7}\"\n\nexport CC=\"$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)\"\nexport CXX=\"$CC\"\n\n# Remove automake symlink if it exists\nif [ -h \"test-driver\" ]; then\n rm test-driver\nfi\n\n./configure --host arm-apple-darwin\n\n# Fix build for tvOS\ncat << EOF >> src/config.h\n\n/* Add in so we have Apple Target Conditionals */\n#ifdef __APPLE__\n#include \n#include \n#endif\n\n/* Special configuration for AppleTVOS */\n#if TARGET_OS_TV\n#undef HAVE_SYSCALL_H\n#undef HAVE_SYS_SYSCALL_H\n#undef OS_MACOSX\n#endif\n\n/* Special configuration for ucontext */\n#undef HAVE_UCONTEXT_H\n#undef PC_FROM_UCONTEXT\n#if defined(__x86_64__)\n#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip\n#elif defined(__i386__)\n#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip\n#endif\nEOF" + spec.prepare_command = File.read("../scripts/ios-configure-glog.sh") spec.source = { :git => 'https://github.com/google/glog.git', :tag => "v#{spec.version}" } spec.module_name = 'glog' @@ -36,6 +36,6 @@ Pod::Spec.new do |spec| } spec.compiler_flags = '-std=c++1y' spec.libraries = "stdc++" - spec.platforms = { :ios => "8.0"} + spec.platforms = { :ios => "8.0", :tvos => "9.2" } end diff --git a/package.json b/package.json index e4c78c4d7..33df6b4b7 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "eslint-plugin-relay": "^0.0.20", "flow-bin": "^0.69.0", "glob": "^7.1.2", - "prettier": "1.12.1" + "prettier": "1.13.4" }, "dependencies": { "JSONStream": "^1.3.1", diff --git a/scripts/public-build.sh b/scripts/public-build.sh index 59b3d6843..aae5f60e9 100755 --- a/scripts/public-build.sh +++ b/scripts/public-build.sh @@ -11,11 +11,13 @@ function jsonValue() { git -c http.proxy=fwdproxy:8080 -c https.proxy=fwdproxy:8080 clone https://github.com/facebook/Sonar.git sonar-public cp sonar/scripts/sandcastle-build.sh sonar-public/scripts/sandcastle-build.sh +# third-party dependencies are not on github, so we need to copy them in place +cp -r sonar/third-party sonar-public/third-party cd sonar-public/scripts && ./sandcastle-build.sh "$(git rev-list HEAD --count || echo 0)" VERSION=$(plutil -p ./sonar-public/dist/mac/Sonar.app/Contents/Info.plist | awk '/CFBundleShortVersionString/ {print substr($3, 2, length($3)-2)}') -RELEASE_JSON=$(curl $(fwdproxy-config curl) --silent --data '{ +RELEASE_JSON=$(curl -x fwdproxy:8080 --silent --data '{ "tag_name": "v'$VERSION'", "target_commitish": "master", "name": "v'$VERSION'", @@ -33,7 +35,7 @@ fi echo "Created GitHub release ID: $RELEASE_ID" UPLOAD_URL=$(echo $RELEASE_JSON | jsonValue upload_url| sed -e 's#{?name,label}##') -ASSET_JSON=$(curl $(fwdproxy-config curl) --silent $UPLOAD_URL'?access_token='$TOKEN'&name=Sonar.zip' --header 'Content-Type: application/zip' --upload-file ./sonar-public/dist/Sonar.zip -X POST) +ASSET_JSON=$(curl -x fwdproxy:8080 --silent $UPLOAD_URL'?access_token='$TOKEN'&name=Sonar.zip' --header 'Content-Type: application/zip' --upload-file ./sonar-public/dist/Sonar.zip -X POST) DOWNLOAD_URL=$(echo $ASSET_JSON | jsonValue browser_download_url) diff --git a/src/device-plugins/screen/index.js b/src/device-plugins/screen/index.js index 086f566da..59d12e67f 100644 --- a/src/device-plugins/screen/index.js +++ b/src/device-plugins/screen/index.js @@ -202,9 +202,11 @@ export default class ScreenPlugin extends SonarDevicePlugin { pullingData: true, }); }) - .then((): Promise => { - return self.pullFromDevice(`/sdcard/${VIDEO_FILE_NAME}`, VIDEO_PATH); - }) + .then( + (): Promise => { + return self.pullFromDevice(`/sdcard/${VIDEO_FILE_NAME}`, VIDEO_PATH); + }, + ) .then(openFile) .then(() => { self.executeShell(`rm /sdcard/${VIDEO_FILE_NAME}`); diff --git a/src/server.js b/src/server.js index 664905b23..e98da0e5f 100644 --- a/src/server.js +++ b/src/server.js @@ -443,7 +443,7 @@ export class Server extends EventEmitter { this.certificateProvider.processCertificateSigningRequest( csr, connectionParameters.os, - destination + destination, ); } }, diff --git a/src/ui/components/VirtualList.js b/src/ui/components/VirtualList.js index 1c5d8dc63..fe4c67d58 100644 --- a/src/ui/components/VirtualList.js +++ b/src/ui/components/VirtualList.js @@ -113,7 +113,7 @@ export default class VirtualList extends Component< // Overscan: render blocks of rows modulo an overscan row count // This dramatically reduces DOM writes during scrolling if (overscanCount) { - start = Math.max(0, start - start % overscanCount); + start = Math.max(0, start - (start % overscanCount)); visibleRowCount += overscanCount; } diff --git a/src/ui/components/desktop-toolbar.js b/src/ui/components/desktop-toolbar.js index abc7df2c8..c634fc526 100644 --- a/src/ui/components/desktop-toolbar.js +++ b/src/ui/components/desktop-toolbar.js @@ -65,8 +65,8 @@ const DesktopDropdownItemContainer = styled.view( type DesktopDropdownItemState = {|hovered: boolean|}; type DesktopDropdownItemProps = { - onClick?: false | ?(event: SyntheticMouseEvent<>) => void, - onHover?: false | ?() => React$Node, + onClick?: false | ?((event: SyntheticMouseEvent<>) => void), + onHover?: false | ?(() => React$Node), children?: React$Node, deactivate?: () => void, }; diff --git a/src/ui/components/table/TableHead.js b/src/ui/components/table/TableHead.js index f44a1e0ed..c62df84a9 100644 --- a/src/ui/components/table/TableHead.js +++ b/src/ui/components/table/TableHead.js @@ -86,7 +86,7 @@ const TableHeadColumnContainer = styled.view( const RIGHT_RESIZABLE = {right: true}; function calculatePercentage(parentWidth: number, selfWidth: number): string { - return `${100 / parentWidth * selfWidth}%`; + return `${(100 / parentWidth) * selfWidth}%`; } class TableHeadColumn extends PureComponent<{ diff --git a/src/utils/openssl-wrapper-with-promises.js b/src/utils/openssl-wrapper-with-promises.js index 52ff58cd2..763bfd67d 100644 --- a/src/utils/openssl-wrapper-with-promises.js +++ b/src/utils/openssl-wrapper-with-promises.js @@ -1,9 +1,10 @@ /** - * Copyright 2004-present Facebook. + * Copyright 2018-present Facebook. * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * @format */ + import {exec as opensslWithCallback} from 'openssl-wrapper'; export function openssl(action: string, options: {}): Promise { diff --git a/src/utils/snap.js b/src/utils/snap.js index 1b8e74577..723caabb1 100644 --- a/src/utils/snap.js +++ b/src/utils/snap.js @@ -10,7 +10,7 @@ import type {Rect} from './geometry.js'; export const SNAP_SIZE = 16; export function snapGrid(val: number): number { - return val - val % SNAP_SIZE; + return val - (val % SNAP_SIZE); } export function getPossibleSnappedPosition( diff --git a/website/core/Footer.js b/website/core/Footer.js index 1b187d243..0ab50ec55 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -47,7 +47,7 @@ class Footer extends React.Component {
More
- Twitter + Twitter GitHub 'MIT' } spec.homepage = 'https://github.com/facebook/sonar' spec.summary = 'SonarKit core cpp code with network implementation' spec.authors = 'Facebook' + # spec.prepare_command = 'mv src double-conversion' spec.source = { :git => 'https://github.com/facebook/Sonar.git', :branch => 'master' } spec.module_name = 'Sonar' @@ -12,12 +13,21 @@ Pod::Spec.new do |spec| spec.source_files = 'xplat/Sonar/*.{h,cpp,m,mm}' spec.libraries = "stdc++" spec.dependency 'Folly' - spec.dependency 'RSocket' + spec.dependency 'EasyWSClient' + # 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 -std=c++14 -Wno-global-constructors' - spec.platforms = { :ios => "8.0" } + # 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.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RSocket\" \"$(PODS_ROOT)/DoubleConversion\"" } + "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/EasyWSClient\" \"$(PODS_ROOT)/DoubleConversion\"" } end diff --git a/xplat/Sonar/SonarWebSocketImpl.cpp b/xplat/Sonar/SonarWebSocketImpl.cpp index 30d64339e..78b3d1338 100644 --- a/xplat/Sonar/SonarWebSocketImpl.cpp +++ b/xplat/Sonar/SonarWebSocketImpl.cpp @@ -35,7 +35,7 @@ #define PRIVATE_KEY_FILE "privateKey.pem" static constexpr int reconnectIntervalSeconds = 2; -static constexpr int connectionKeepaliveSeconds = 2; +static constexpr int connectionKeepaliveSeconds = 10; static constexpr int securePort = 8088; static constexpr int insecurePort = 8089; @@ -97,7 +97,7 @@ SonarWebSocketImpl::~SonarWebSocketImpl() { void SonarWebSocketImpl::start() { folly::makeFuture() .via(worker_->getEventBase()) - .delayed(std::chrono::milliseconds(0)) + .delayedUnsafe(std::chrono::milliseconds(0)) .then([this]() { startSync(); }); } @@ -113,18 +113,13 @@ void SonarWebSocketImpl::startSync() { } connectSecurely(); - } catch (const std::exception& e) { - std::string errors = folly::SSLContext::getErrors(); - SONAR_LOG("Error connecting to sonar"); - SONAR_LOG(e.what()); - SONAR_LOG(errors.c_str()); + } catch (const std::exception&) { failedConnectionAttempts_++; reconnect(); } } void SonarWebSocketImpl::doCertificateExchange() { - SONAR_LOG("Starting certificate exchange"); rsocket::SetupParameters parameters; folly::SocketAddress address; @@ -187,7 +182,7 @@ void SonarWebSocketImpl::connectSecurely() { void SonarWebSocketImpl::reconnect() { folly::makeFuture() .via(worker_->getEventBase()) - .delayed(std::chrono::seconds(reconnectIntervalSeconds)) + .delayedUnsafe(std::chrono::seconds(reconnectIntervalSeconds)) .then([this]() { startSync(); }); } @@ -216,11 +211,6 @@ void SonarWebSocketImpl::sendMessage(const folly::dynamic& message) { bool SonarWebSocketImpl::isCertificateExchangeNeeded() { if (failedConnectionAttempts_ >= 2) { - auto format = - "Requesting fresh certificate exchange after %d failed connection attempts"; - char buff[strlen(format) + 1]; - sprintf(buff, format, failedConnectionAttempts_); - SONAR_LOG(buff); return true; } @@ -238,7 +228,6 @@ bool SonarWebSocketImpl::isCertificateExchangeNeeded() { } void SonarWebSocketImpl::requestSignedCertFromSonar() { - SONAR_LOG("Requesting new client certificate from Sonar"); std::string csr = loadStringFromFile(absoluteFilePath(CSR_FILE_NAME)); if (csr == "") { generateCertSigningRequest( diff --git a/yarn.lock b/yarn.lock index c2d4bdabd..31b4e7147 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3874,9 +3874,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" +prettier@1.13.4: + version "1.13.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6" pretty-bytes@^1.0.2: version "1.0.4"