iOS- Not working sonar script 'run-sonar-swift' - ios
I am trying to implement sonar qube swift. I have installed all prerequisites setup that you can find in the link.
https://medium.com/#pranay.urkude/sonarqube-integration-with-ios-b76df8405014
But when i run the ./run-sonar-swift.sh -v command then getting the error. which is mention in below logs please
>Apples-MacBook-Air:Wanna Aman$ ./run-sonar-swift.sh -v
Running run-sonar-swift.sh...
Project count is [1]
Xcode project file is: Wanna.xcodeproj
Xcode workspace file is: Wanna.xcworkspace
Xcode application scheme is: Wanna
Number version from plist is: 1.0
Destination simulator is: platform=iOS Simulator,name=iPhone 7,OS=12.2
Excluded paths from coverage are:
Creating directory sonar-reports/
Extracting Xcode project information
+ xcodebuild clean build -workspace Wanna.xcworkspace -scheme Wanna -destination 'platform=iOS Simulator,name=iPhone 7,OS=12.2' -destination-timeout 360 COMPILER_INDEX_STORE_ENABLE=NO
+ returnValue=0
+ set +x
▸ Clean Succeeded
▸ Copying Pods-Wanna-umbrella.h
▸ Processing Pods-Wanna-Info.plist
▸ Compiling Pods-Wanna-dummy.m
▸ Compiling Pods_Wanna_vers.c
▸ Touching Pods_Wanna.framework (in target: Pods-Wanna)
▸ Running script '[CP] Check Pods Manifest.lock'
▸ Compiling ViewController.swift
▸ Compiling AppDelegate.swift
▸ Linking Wanna
▸ Compiling LaunchScreen.storyboard
▸ Compiling Main.storyboard
▸ Processing Info.plist
▸ Touching Wanna.app (in target: Wanna)
▸ Build Succeeded
actual = 9549, min = 3
Running surefire
+ xcodebuild clean build test -workspace Wanna.xcworkspace -scheme Wanna -configuration Debug -enableCodeCoverage YES -destination 'platform=iOS Simulator,name=iPhone 7,OS=12.2' -destination-timeout 60
2019-07-01 17:00:18.123 xcodebuild[34637:171741] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/Aman/Library/Developer/Xcode/DerivedData/Wanna-flozsuddkzcjfadhlxefzthqazgq/Logs/Test/Run-Wanna-2019.07.01_17-00-12-+0530.xcresult/3_Test/Diagnostics/WannaTests-DACAF56A-03C3-43EA-AEF4-BF18730C5266/WannaTests-13AB698C-A67D-4AB5-92FF-A0F03008C70D/Session-WannaTests-2019-07-01_170018-25708T.log
2019-07-01 17:00:18.124 xcodebuild[34637:171579] [MT] IDETestOperationsObserverDebug: (86CE27D3-0AD7-4F62-B501-A3EB8862A636) Beginning test session WannaTests-86CE27D3-0AD7-4F62-B501-A3EB8862A636 at 2019-07-01 17:00:18.124 with Xcode 10E1001 on target <DVTiPhoneSimulator: 0x7fdd68da7af0> {
SimDevice: iPhone 7 (763FCF55-E246-4DC4-9240-91D57CED4F0A, iOS 12.2, Shutdown)
} (12.2 (16E226))
2019-07-01 17:00:28.099 xcodebuild[34637:171579] [MT] IDETestOperationsObserverDebug: (86CE27D3-0AD7-4F62-B501-A3EB8862A636) Finished requesting crash reports. Continuing with testing.
2019-07-01 17:00:40.206 xcodebuild[34637:171675] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/Aman/Library/Developer/Xcode/DerivedData/Wanna-flozsuddkzcjfadhlxefzthqazgq/Logs/Test/Run-Wanna-2019.07.01_17-00-12-+0530.xcresult/3_Test/Diagnostics/WannaUITests-9971F8D3-0217-4F89-B28E-AF6745AC64E6/WannaUITests-2DC182C8-A11E-4D24-897F-C2F8F6D2D86F/Session-WannaUITests-2019-07-01_170040-45gLHX.log
2019-07-01 17:00:40.206 xcodebuild[34637:171579] [MT] IDETestOperationsObserverDebug: (273A8001-66F3-469C-9A45-E7B689DF080A) Beginning test session WannaUITests-273A8001-66F3-469C-9A45-E7B689DF080A at 2019-07-01 17:00:40.206 with Xcode 10E1001 on target <DVTiPhoneSimulator: 0x7fdd68da7af0> {
SimDevice: iPhone 7 (763FCF55-E246-4DC4-9240-91D57CED4F0A, iOS 12.2, Booted)
} (12.2 (16E226))
2019-07-01 17:00:40.461 xcodebuild[34637:171579] [MT] IDETestOperationsObserverDebug: (273A8001-66F3-469C-9A45-E7B689DF080A) Finished requesting crash reports. Continuing with testing.
2019-07-01 17:00:58.421 xcodebuild[34637:171579] [MT] IDETestOperationsObserverDebug: 40.317 elapsed -- Testing started completed.
2019-07-01 17:00:58.421 xcodebuild[34637:171579] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2019-07-01 17:00:58.421 xcodebuild[34637:171579] [MT] IDETestOperationsObserverDebug: 40.317 sec, +40.317 sec -- end
+ returnValue=0
+ set +x
.T. Executed 2 tests, with 0 failures (0 unexpected) in 0.542 (0.545) seconds
Executed 1 test, with 0 failures (0 unexpected) in 9.052 (9.056) seconds
\nComputing coverage report\n
>Command line exclusion flags for slather is:
slather coverage --binary-basename Wanna --input-format profdata --cobertura-xml --output-directory sonar-reports --workspace Wanna.xcworkspace --scheme Wanna Wanna.xcodeproj
+ slather coverage --binary-basename Wanna --input-format profdata --cobertura-xml --output-directory sonar-reports --workspace Wanna.xcworkspace --scheme Wanna Wanna.xcodeproj
Slathering...
Slathered
+ returnValue=0
+ set +x
Running SwiftLint...dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /usr/local/bin/swiftlint
Reason: image not found
./run-sonar-swift.sh: line 384: 34914 Abort trap: 6 $SWIFTLINT_CMD lint --path "$word" > sonar-reports/"$appScheme"-swiftlint.txt
Running Tailor...Running OCLint...
Path included in oclint analysis is: --include .*/Wanna/Wanna/*
+ oclint-json-compilation-database -v --include ../Wanna/Wanna/AppDelegate.swift ../Wanna/Wanna/Assets.xcassets ../Wanna/Wanna/Base.lproj ../Wanna/Wanna/Info.plist ../Wanna/Wanna/ViewController.swift -- -rc LONG_LINE=250 -max-priority-1 10000 -max-priority-2 10000 -max-priority-3 10000 -report-type pmd -o sonar-reports/Wanna-oclint.xml
------------------------------ OCLint ------------------------------
/usr/local/bin/oclint -p /Users/Aman/Desktop/Wanna ../Wanna/Wanna/Assets.xcassets ../Wanna/Wanna/Base.lproj ../Wanna/Wanna/Info.plist ../Wanna/Wanna/ViewController.swift -rc LONG_LINE=250 -max-priority-1 10000 -max-priority-2 10000 -max-priority-3 10000 -report-type pmd -o sonar-reports/Wanna-oclint.xml
--------------------------------------------------------------------
>Skipping /Users/Aman/Desktop/Wanna/../Wanna/Wanna/Assets.xcassets. Compile command not found.
Skipping /Users/Aman/Desktop/Wanna/../Wanna/Wanna/Base.lproj. Compile command not found.
Skipping /Users/Aman/Desktop/Wanna/../Wanna/Wanna/Info.plist. Compile command not found.
Skipping /Users/Aman/Desktop/Wanna/../Wanna/Wanna/ViewController.swift. Compile command not found.
+ returnValue=0
+ set +x
Running FauxPas...Determining build settings for 3 targets and 2 build configurations
The Xcode project format is "Xcode 9.3". Faux Pas supports Xcode projects that are Xcode 8.0 or 6.3 or 3.2 or 3.1 -compatible. Some features may not work correctly.
Checking project: Wanna
target: Wanna
configuration: Release
ruleset: 86 Rules tagged [Recommended]: UndetachedDelegate, InvalidStringsFile, StringsFileEncoding, UIKitKVO, UnnecessaryNullCheck, RetinaImagesResolution, AssertionSideEffects, SuspiciousResources, NullCoalescingOp, LoadMethodWithoutAutoreleasePool, UnknownResourceCodeReference, StringsdictWithoutStrings, InitializeSuperInvocation, UnsupportedWeakReference, CompilerWarnings, HardcodedUIString, HardcodedSelfClass, MacroBasedIncludeGuard, RestrictedDirectMethodCall, RecommendedVCSIgnores, RetainingImmutableProperty, MissingAPIUsageDescription, CompleteNotificationCenterDetachment, XIBRuntimeAttributeMismatch, ThreadUnsafeInstanceCaching, MissingTranslation, RestrictedMethodOverride, MissingDeviceTypeResource, OldVerboseObjCSyntax, ViewLayoutInXIB, IsEqualAndHash, FileRefOutsideVCS, LiteralStringKeyPath, BasicProjectSettings, DuplicateTranslation, StrongDelegate, ConstructorReturnType, SetterInvocationInInitOrDealloc, ArgumentModification, FastEnumElementOutside, UnusedErrorValue, CopyingMutableProperty, ImplicitBundleId, UnnecessaryNibMethod, AssociatedObjectOnValueType, OrderedPointerToZeroComparison, PrefixHeaderIncludeSuggestion, ReleaseBuildCompilerArgs, XcconfigOverwrites, BuildSettingSelfReference, BuildSettingPlacement, FixedFormatDateFormatter, TerminatingApp, AbsPathInBuildSetting, PrivateCategory, FileRefWithAbsPath, MissingImageResolutionVariant, TranslationPunctuation, WeakReferenceToTopLevelXIBObject, UnprefixedClass, InitializeMethodCategoryOverride, SuspiciousDateTimeFormat, ReleaseBuildConfig, AssigningDelegate, UnknownResourceXIBReference, GlobalAndLocalizedResource, UnknownResourceModifier, Swizzling, ZeroAssignmentToPointer, DiscardedOpaqueNotificationObserver, DylibInstallName, TranslationFormatMismatch, SuspiciousMissingResources, ErrorConditionCheck, RedundantInclude, ReservedPrefix, NSLogUsed, UnprefixedCategoryMethod, UnidiomaticAccessorNaming, UncommentedLocalizedString, DuplicateResource, ViewControllerInitWithNibName, CategoryMethodConflict, BlockAPIRetainCycle, FileRefIgnoredInVCS, MissingNotificationCenterDetachment
Trial Version: Delaying operation for 15 more seconds…
Trial Version: Delaying operation for 14 more seconds…
Trial Version: Delaying operation for 13 more seconds…
Trial Version: Delaying operation for 12 more seconds…
Trial Version: Delaying operation for 11 more seconds…
Trial Version: Delaying operation for 10 more seconds…
Trial Version: Delaying operation for 9 more seconds…
Trial Version: Delaying operation for 8 more seconds…
Trial Version: Delaying operation for 7 more seconds…
Trial Version: Delaying operation for 6 more seconds…
Trial Version: Delaying operation for 5 more seconds…
Trial Version: Delaying operation for 4 more seconds…
Trial Version: Delaying operation for 3 more seconds…
Trial Version: Delaying operation for 2 more seconds…
Trial Version: Delaying operation for 1 more seconds…
Initialization: Determining VCS state...
Initialization: Resolving build settings...
Rule InvalidStringsFile will not be applied: “Applies to localized projects.”
Rule StringsFileEncoding will not be applied: “Applies to projects under Git version control.”
Rule LoadMethodWithoutAutoreleasePool will not be applied: “Applies to projects targeting an OS prior to iOS 6 or Mac OS 10.8.”
Rule StringsdictWithoutStrings will not be applied: “Applies to localized projects.”
Rule UnsupportedWeakReference will not be applied: “Applies to OS X targets.”
Rule HardcodedUIString will not be applied: “Applies to localized projects.”
Rule RecommendedVCSIgnores will not be applied: “Applies to projects under Git version control.”
Rule MissingTranslation will not be applied: “Applies to localized projects.”
Rule FileRefOutsideVCS will not be applied: “Applies to projects using one of these version control systems: Git, Mercurial, Bazaar, Subversion, Fossil.”
Rule DuplicateTranslation will not be applied: “Applies to localized projects.”
Rule PrefixHeaderIncludeSuggestion will not be applied: “Applies to projects that use a prefix header, and have at least 10 source code files.”
Rule TranslationPunctuation will not be applied: “Applies to localized projects.”
Rule DylibInstallName will not be applied: “Applies to OS X targets.”
Rule TranslationFormatMismatch will not be applied: “Applies to localized projects.”
Rule RedundantInclude will not be applied: “Applies to projects using a prefix header.”
Rule UncommentedLocalizedString will not be applied: “Applies to localized projects.”
Rule FileRefIgnoredInVCS will not be applied: “Applies to projects under Git version control.”
Rule MissingNotificationCenterDetachment will not be applied: “Applies to projects targeting an OS prior to iOS 9 or Mac OS 10.11.”
Initialization: Performing full build: required because project contains Swift code
Initialization: Building the project
Initialization: Processing build steps
ERROR: Initialization: Could not determine build steps for specified target 'Wanna'
Preparation failed → clearing build log caches
Checked total 0 code statements in 00:00:24.871 (the preparation took 00:00:09.792 (39.4%)).
Total 0 diagnostics.
(Evaluation trial limitation: only 5 random diagnostics will be returned when using machine-readable output.)
Some errors were encountered. If these are a problem, please consider the following remedies:
• Just try again — the project caches have now been cleared
• If source files are generated during builds, or if interpreting this project's source code otherwise depends on full builds to occur, enable the 'Build project before checking' option.
• In general, ensure that the xcodebuild arguments Faux Pas uses are correct: enable the 'verbose' option and try performing the checks to see what arguments are being used, and then determine if they need to be adjusted
Running Lizard...Running SonarQube using SonarQube Runner
+ sonar-scanner --define sonar.projectVersion=1.0
./run-sonar-swift.sh: line 101: sonar-scanner: command not found
+ returnValue=127
+ set +x
ERROR - Command 'sonar-scanner --define sonar.projectVersion=1.0' failed with error code: 127
Thanks in advance
You need to install sonar scanner first
brew install sonar-scanner
Related
How do you debug a Bazel sandboxing failure?
Repo with full code example. When I try to run a test with Bazel involving the tree-sitter binary, I get an Operation not permitted error without any further information. ❯ bazel test --test_output=errors --verbose_failures --sandbox_debug //tree-sitter-nbts:check-generated INFO: Analyzed target //tree-sitter-nbts:check-generated (0 packages loaded, 0 targets configured). INFO: Found 1 test target... FAIL: //tree-sitter-nbts:check-generated (see /private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/execroot/__main__/bazel-out/darwin_arm64-fastbuild/testlogs/tree-sitter-nbts/check-generated/test.log) INFO: From Testing //tree-sitter-nbts:check-generated: ==================== Test output for //tree-sitter-nbts:check-generated: ++ dirname /private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/sandbox/darwin-sandbox/17/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/tree-sitter-nbts/check-generated.runfiles/__main__/tree-sitter-nbts/check-generated + cd /private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/sandbox/darwin-sandbox/17/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/tree-sitter-nbts/check-generated.runfiles/__main__/tree-sitter-nbts + git init -b main Initialized empty Git repository in /private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/sandbox/darwin-sandbox/17/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/tree-sitter-nbts/check-generated.runfiles/__main__/tree-sitter-nbts/.git/ + git add . + GIT_AUTHOR_EMAIL=_ + GIT_AUTHOR_NAME=_ + GIT_COMMITTER_EMAIL=_ + GIT_COMMITTER_NAME=_ + git commit -m 'Initial commit' [main (root-commit) 1f79ef2] Initial commit 11 files changed, 11 insertions(+) create mode 120000 Cargo.lock create mode 120000 Cargo.toml create mode 120000 bindings/rust/build.rs create mode 120000 bindings/rust/lib.rs create mode 120000 check-generated create mode 120000 check-generated.sh create mode 120000 grammar.js create mode 120000 src/grammar.json create mode 120000 src/node-types.json create mode 120000 src/parser.c create mode 120000 src/tree_sitter/parser.h + tree-sitter generate Operation not permitted (os error 1) ================================================================================ Target //tree-sitter-nbts:check-generated up-to-date: bazel-bin/tree-sitter-nbts/check-generated INFO: Elapsed time: 0.220s, Critical Path: 0.11s INFO: 2 processes: 2 darwin-sandbox. INFO: Build completed, 1 test FAILED, 2 total actions //tree-sitter-nbts:check-generated FAILED in 0.1s /private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/execroot/__main__/bazel-out/darwin_arm64-fastbuild/testlogs/tree-sitter-nbts/check-generated/test.log INFO: Build completed, 1 test FAILED, 2 total actions What is a good way of debugging this? So far, I know the following: Running tree-sitter generate directly in the source tree works fine. The bazel test command works fine with --spawn_strategy=standalone, which I think confirms that this is a sandboxing issue. The bazel test command works fine inside the Nix environment (see the linked repo). This one is a little weird, not sure what's going on here. Configuration information: macOS 12.4 on an M1 Mac Bazel v5.2.0 (both in Nix and outside) tree-sitter v0.20.6 (both in Nix and outside) (I tried using the Nix-installed binary with Bazel and that didn't seem to make any difference) OpenJDK v11.0.15 in the global environment vs OpenJDK v11.0.11 in Nix. GitHub issues which seem related: ln call fails with "operation not permitted" during bazel test - This comment mentions there is no command printed with --verbose_failures --sandbox_debug. Strange "Operation not permitted" problem for test program accessing files in the sand box on MacOS
UnityWebRequest.mm missing '#include <pthread/sched.h>' while building Unity project for iOS
I am building a Unity app for iOS. I am using iOS Project Builder, which allows building iOS apps on Windows. It uses Cocoapods to install Frameworks. I have this error: Building the dependency project UnityFramework... ============================================================================= WARNING: this project contains shell scripts, which CANNOT BE RUN on Windows without being translated first. WORKAROUND: for now, please remove your assets & plugins having shell scripts in their build phases, or translate them to batch scripts and call them in a pre-packaging script (or ignore this warning if the scripts are non-critical) In Xcode project: Unity-iPhone.xcodeproj ----------------------------------------------------------------------------- shell script found: diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null if [ $? != 0 ] ; then # print error to STDERR 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 ============================================================================= These scripts might be non critical - attempting to proceed anyway. + Preparing output directory... + XCFrameworks: 0 supplied + Libraries: 9 supplied, 0 built + Frameworks: 0 supplied, 0 built + Pruning compilation results... + Pre-parsing project files... + Building UnityFramework for iphoneos (configuration: Release) + [armv7] Compiling ./Classes/Unity/UnityWebRequest.mm... ./Classes/Unity/UnityWebRequest.mm(99,13): error: missing '#include <pthread/sched.h>'; 'sched_yield' must be declared before it is used sched_yield(); ^ C:\Users\IRAKLI\iOS Project Builder for Unity\SDK\usr\include\pthread\sched.h(40,12): note: declaration here is not visible extern int sched_yield(void); ^ 1 error generated. Full log: https://pastebin.com/Yb2RYzLp OS: Windows 10 64 bit Unity Version: 2020.3.12f1 iOS Builder: 3.35.4 iOS SDK: 14.5 Firebase: 9.0.0 Any help would be highly appreciated.
Xamarin on VS for Mac - iOS Build Fails resource-rules has been deprecated in Mac OS X >= 10.10! or invalid resource specification rule(s)
I'm trying to build my Xamarin iOS app on Mac and failing on an error related to a deprecated command line parameter. I tried targeting iphone 10, 11 and above but still failing on same error. I Updated NuGets to latest versions, also tried creating an empty ResourceRules.plist file. Xcode 12.1 (17222) Build 12A7403 === Xamarin.Mac === Version: 6.22.1.26 (Visual Studio Community) === Xamarin.iOS === Version: 14.4.1.3 (Visual Studio Community) === Operating System === Mac OS X 10.15.7 Build Command from log: Tool /Applications/Xcode.app/Contents/Developer/usr/bin/actool execution started with arguments: --errors --warnings --notices --output-format xml1 --output-partial-info-plist /Users/user182752/Downloads/App1/App1.iOS/obj/iPhone/Release/actool/partial-info.plist --app-icon AppIcon --compress-pngs --target-device iphone --target-device ipad --minimum-deployment-target 11.0 --platform iphoneos --compile /Users/user182752/Downloads/App1/App1.iOS/obj/iPhone/Release/actool/bundle /Users/user182752/Downloads/App1/App1.iOS/obj/iPhone/Release/actool/cloned-assets/Assets.xcassets ... ... Copied /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.Settings.aotdata.arm64 to /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app/Plugin.Settings.aotdata.arm64 /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app built successfully. Creating "bin/iPhone/Release/mtouch.stamp" because "AlwaysCreate" was specified. Target _CopyITunesArtwork: Copying file from "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/iTunesArtwork#2x" to "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/iTunesArtwork#2x". Target _CopyITunesArtwork: Copying file from "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/iTunesArtwork" to "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/iTunesArtwork". Target _CopyAppExtensionsToBundle: Skipping target "_CopyAppExtensionsToBundle" because it has no inputs. Target _GenerateAppExtensionDebugSymbols: Directory "bin/iPhone/Release/MyDemoApp.iOS.app/../.dSYM" doesn't exist. Skipping. Target _CollectFrameworks: No Frameworks directory found. Target _GenerateFrameworkDebugSymbols: Skipping target "_GenerateFrameworkDebugSymbols" because it has no inputs. Target _GenerateDebugSymbols: Directory "bin/iPhone/Release/MyDemoApp.iOS.app.dSYM" doesn't exist. Skipping. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -num-threads 4 -z -o bin/iPhone/Release/MyDemoApp.iOS.app.dSYM bin/iPhone/Release/MyDemoApp.iOS.app/MyDemoApp.iOS /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -i -s obj/iPhone/Release/mtouch-symbols.list bin/iPhone/Release/MyDemoApp.iOS.app/MyDemoApp.iOS /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: warning: removing global symbols from a final linked no longer supported. Use -exported_symbols_list at link time when building: /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app/MyDemoApp.iOS Touching "bin/iPhone/Release/MyDemoApp.iOS.app.dSYM/Contents/Info.plist". /usr/bin/mdimport bin/iPhone/Release/MyDemoApp.iOS.app/../ Target _CodesignAppBundle: Tool /usr/bin/codesign execution started with arguments: -v --force --timestamp=none --sign 5FC337A423A139F99B2D118EC7FA72D8D0D94ABE --resource-rules /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app/ResourceRules.plist --entitlements /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/obj/iPhone/Release/Entitlements.xcent /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app bin/iPhone/Release/MyDemoApp.iOS.app : error : Warning: --resource-rules has been deprecated in Mac OS X >= 10.10! bin/iPhone/Release/MyDemoApp.iOS.app : error : /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app: invalid resource specification rule(s) Done building target "_CodesignAppBundle" in project "MyDemoApp.iOS.csproj" -- FAILED. I saw some references to this error mainly in old posts referring to code signing but couldn't find a recent solution referring to Xamarin. Any help would be appreciated. Cheers, Yuval
Can not make script 'run-sonar-swift' works
I am trying to run sonar swift. I have already sonarQube with the plugin and I can access it locally using this url http://localhost:9000 . I have installed all prerequisites that you can find here : https://github.com/Backelite/sonar-swift But I can't figure out what is this error when i launch run-sonar-swift.sh. If anyone can bring me the light I would be very grateful. Here the logs when I run in terminal command ./run-sonar-swift.sh -v : MacBook-Air:streamus-phoenix-ios oboujaouane$ ./run-sonar-swift.sh -v Running run-sonar-swift.sh... Project count is [1] Xcode project file is: Streamus.xcodeproj Xcode workspace file is: Streamus.xcworkspace Xcode application scheme is: Streamus Alpha Destination simulator is: platform=iOS Simulator,name=iPhone 6,OS=11.3 Excluded paths from coverage are: .Tests. Creating directory sonar-reports/ Running tests + xcodebuild clean build test -workspace Streamus.xcworkspace -scheme 'Streamus Alpha' -configuration Debug -enableCodeCoverage YES -destination 'platform=iOS Simulator,name=iPhone 6,OS=11.3' -destination-timeout 60 2018-05-12 10:34:14.031 xcodebuild[32149:775290] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusUITests-87E838E0-4F8F-4C19-B2AC-C2C0A274E8EC/Session-StreamusUITests-2018-05-12_103414-jhm3wz.log 2018-05-12 10:34:14.032 xcodebuild[32149:769805] [MT] IDETestOperationsObserverDebug: (98FB295E-FE60-46AA-8589-015B0DD2E617) Beginning test session StreamusUITests-98FB295E-FE60-46AA-8589-015B0DD2E617 at 2018-05-12 10:34:14.031 with Xcode 9E145 on target { SimDevice: iPhone 6 (672DE879-E48B-45DA-BFD9-D0412F51A706, iOS 11.3, Booted) } (11.3 (15E217)) 2018-05-12 10:34:14.061 xcodebuild[32149:769805] [MT] IDETestOperationsObserverDebug: (458F86F6-1492-40F1-9F72-A88FC23BD985) Beginning test session StreamusTests-458F86F6-1492-40F1-9F72-A88FC23BD985 at 2018-05-12 10:34:14.061 with Xcode 9E145 on target { SimDevice: iPhone 6 (672DE879-E48B-45DA-BFD9-D0412F51A706, iOS 11.3, Booted) } (11.3 (15E217)) 2018-05-12 10:34:14.061 xcodebuild[32149:770075] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusTests-4F203461-1372-49B7-A806-F130F168079E/Session-StreamusTests-2018-05-12_103414-MfIreE.log 2018-05-12 10:34:30.016 xcodebuild[32149:769805] Error Domain=IDETestOperationsObserverErrorDomain Code=14 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusUITests-87E838E0-4F8F-4C19-B2AC-C2C0A274E8EC/Session-StreamusUITests-2018-05-12_103414-jhm3wz.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusUITests-87E838E0-4F8F-4C19-B2AC-C2C0A274E8EC/Session-StreamusUITests-2018-05-12_103414-jhm3wz.log} 2018-05-12 10:34:30.016 xcodebuild[32149:769805] Error Domain=IDETestOperationsObserverErrorDomain Code=14 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusTests-4F203461-1372-49B7-A806-F130F168079E/Session-StreamusTests-2018-05-12_103414-MfIreE.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusTests-4F203461-1372-49B7-A806-F130F168079E/Session-StreamusTests-2018-05-12_103414-MfIreE.log} Testing failed: Linker command failed with exit code 1 (use -v to see invocation) ** TEST FAILED ** The following build commands failed: Ld /Users/oboujaouane/Library/Developer/Xcode/DerivedData/Streamus-gwtdwpbaxrfgafdtejzjtpxyhhhq/Build/Intermediates.noindex/Streamus.build/Alpha-iphonesimulator/StreamusTests.build/Objects-normal/x86_64/StreamusTests normal x86_64 Ld /Users/oboujaouane/Library/Developer/Xcode/DerivedData/Streamus-gwtdwpbaxrfgafdtejzjtpxyhhhq/Build/Intermediates.noindex/Streamus.build/Alpha-iphonesimulator/StreamusTests.build/Objects-normal/i386/StreamusTests normal i386 (2 failures) returnValue=65 set +x ERROR - Command 'xcodebuild clean build test -workspace Streamus.xcworkspace -scheme Streamus Alpha -configuration Debug -enableCodeCoverage YES -destination platform=iOS Simulator,name=iPhone 6,OS=11.3 -destination-timeout 60' failed with error code: 65 In advance thank you,
It seems that error was due to provisioning profile. When I added my Provisioning Profile and try it again the problem was resolved. Then I had another problem with MessageKit:“Segmentation fault: 11” It was a CocoaPods Podfile config issue. So I had to switch compilation mode for Debug from "Single File" to "Whole Module” by click on Pods in Xcode project navigator then select MessageKit in targets of pods then Builds settings tab then in searcher tap ‘compilation mode’ and switch “Single File” to “Whole Module” and re-run script run-sonar-swift.sh  ⚠️ each time you make a pod install / update or something that can change pods you have to switch compilation mode for Debug from "Single File" to "Whole Module” for the pod which give you an error when you launch run-sonar.swift.sh with -v for verbose. After that it was not yet the end of my problems! In fact I had a last problem which was an error with SwipeCellKit pod: “No such module SwipeCellKit”. To resolve this problem follow instructions given here https://stackoverflow.com/a/37732248/6188918 Then I tried again and the rest of the script started (SwiftLint, Tailor & Lizard) and I thought this time it was finally good but an error occurred once again a new error message at the end of the script concerning Lizard which was: ERROR: Error during SonarQube Scanner execution ERROR: File MyprojectName/Domains/Repositories/Local/cacheManager.swift can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging. To resolve this inclusion/exclusion I followed the answer given here: https://stackoverflow.com/a/40150551/6188918 by adding these to line in sonar-project.properties file below sonar.swift.excludedPathsFromCoverage line: sonar.test.inclusions=**/*Test*/** sonar.exclusions=**/*Test*/** I tried again but with parameter -notailor(run script and skip Tailor): ./run-sonar-swift.sh -notailor -v just to save a little time because tailor take time And after launch the script... Boom a new error... But it was a known issue: Error: Caused by: org.sonar.api.measures.PersistenceMode And the issue is explained here https://github.com/Backelite/sonar-swift/issues/118 So I downloaded this .jar file “backelite-sonar-swift-plugin-0.4-sonar-7-quick-fix.jar” found here https://github.com/Hugal31/sonar-swift/releases/tag/0.4-sonar-7-quick-fix and replace it in plugins of my local SonarQube and try again. …and this time after an umpteenth launch I finally saw the light 🤪💡 Hope this answer will help and if you have a question don’t hesitate. Good luck & have fun :) PS: You’ll find here some options to run script with parameters: ./run-sonar-swift.sh -noswiftlint -v (run script with verbose option and skip SwiftLint) ./run-sonar-swift.sh -notailor -v (run script with verbose option and skip Tailor) ./run-sonar-swift.sh -nounittests -v (if your project does not have scheme configured to be tested launch with this parameter) If you want more info check in run-sonar-swift.sh script and check around lines 125 ## COMMAND LINE OPTIONS PS2: I have also opened an issue in sonar-swift GitHub if it can help: https://github.com/Backelite/sonar-swift/issues/138
I had an extra issue with oclint: oclint: Not enough positional command line arguments specified!. So I had to modify the run-sonar-swift.sh script a little bit in order to get it working: https://gist.github.com/Edudjr/79a2379842357c33709aecf040d9ae77#file-run-sonar-swift-sh And this is a model of my sonar-project.properties: https://gist.github.com/Edudjr/db51907068ea76b116d11d9a9b13f05f#file-sonar-project-properties
Getting Command /bin/sh failed with exit code 65 Error with Xcode 5.1 .
Sadly, I updated my iOS from 7.0.4 to 7.1 and hence was forced to upgrade Xcode from 5.0 to 5.1, after which I had to solve several issues. But I am not able to resolve the following error. It would be great if you can help resolving it. I am using iOSSdk6.1 as target SDK with Xcode 5.1 Here are the logs below: Command /bin/sh failed with exit code 65 ########### TESTS ############# Use the following variables when debugging this script; note that they may change on recursions BUILD_DIR = /Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Products BUILD_ROOT = /Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Products CONFIGURATION_BUILD_DIR = /Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Products/Debug-iphoneos BUILT_PRODUCTS_DIR = /Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Products/Debug-iphoneos CONFIGURATION_TEMP_DIR = /Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Intermediates/TheAmazingAudioEngine.build/Debug-iphoneos TARGET_BUILD_DIR = /Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Products/Debug-iphoneos XCode has selected SDK: iphoneos with version: 6.1 (although back-targetting: 4.3) ...therefore, OTHER_SDK_TO_BUILD = iphonesimulator6.1 xcodebuild -project "/Users/rahulg/Desktop/TheAmazingAudioEngine-master/TheAmazingAudioEngine.xcodeproj" -configuration "Debug" -target "TheAmazingAudioEngine" -sdk "iphonesimulator6.1" build RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="/Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Products" BUILD_ROOT="/Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Products" CALLED_FROM_MASTER=1 Build settings from command line: BUILD_DIR = /Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Products BUILD_ROOT = /Users/rahulg/Library/Developer/Xcode/DerivedData/TheEngineSample-abaidaurzaogqcbzpmqjesdtvulv/Build/Products CALLED_FROM_MASTER = 1 RUN_CLANG_STATIC_ANALYZER = NO SDKROOT = iphonesimulator6.1 === BUILD TARGET TheAmazingAudioEngine OF PROJECT TheAmazingAudioEngine WITH CONFIGURATION Debug === Check dependencies No architectures to compile for (ARCHS=i386 x86_64, VALID_ARCHS=armv7). ** BUILD FAILED ** The following build commands failed: Check dependencies (1 failure) Command /bin/sh failed with exit code 65
I had the same issue and I resolved it by editing the scheme of my target into release mode. (Build configuration = release) I hope that helps you to resolve your problem.