Xcode 11 beta 4 error: Command CompileSwiftSources failed with a nonzero exit code - xcode

I've downloaded the latest Xcode beta 4. When I build I'm getting the same error with 3 of my pods:
Command CompileSwiftSources failed with a nonzero exit code
<unknown>:0: error: unknown argument: '-w'
<unknown>:0: error: unknown argument: '-Xanalyzer'
<unknown>:0: error: unknown argument: '-analyzer-disable-all-checks'
This is the MarqueeLabel pod logs:
I have tried:
Cleaning and deep cleaning (shift + alt + cmd + k)
Deleting the Derived Data folder
Restarting Xcode
I can't see the error listed in the release notes.
https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_4_release_notes
Does anyone know what the problem is or a workaround?

There is a known issue with Cocoapods and Xcode 11 Beta 4 where inhibit_all_warnings! causes arguments to be set for Swift which do not compile. Removing this inhibit resolves the issue, and Swift warnings can be inhibited with SWIFT_SUPPRESS_WARNINGS = YES on targets instead.

CocoaPods had a fix for this that got released as part of CocoaPods 1.7.5.
Below is the answer preceding the 1.7.5 release:
If you need to use Xcode 11 Beta 4 in the mean time, you could install a patched version of CocoaPods from that pull request:
1. Open Gemfile, replace gem 'cocoapods' with
gem 'cocoapods', :git => 'https://github.com/dnkoutso/CocoaPods.git', :branch => "swift_compiler_warnings"
2. Run bundle install and bundle exec pod install
Keep in mind, this is a temporary solution.

The latest version of CocoaPods (1.7.5) has this issue fixed!
In Terminal run
sudo gem update cocoapods
And then, on your project directory
pod install

Resolved for me!!!!
The issue is actually i created two files with same name. So after i renamed one of a file and error cleared.

Related

error installing ruby old version 2.0.0-p247

I am trying to run command
rbenv install 2.0.0-p247
I tried to follow several steps by googling the errors that I faced but I am still not able to resolve the error
I got this error
BUILD FAILED (macOS 11.4 using ruby-build 20210804)
Inspect or clean up the working tree at /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.F4rCnt
Results logged to /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.log
Last 10 log lines:
compiling ancdata.c
compiling raddrinfo.c
installing default socket libraries
compiling constants.c
1 warning generated.
linking shared-object ripper.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
linking shared-object socket.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
make: *** [build-ext] Error 2
The log file mentioned above has content:
https://easyupload.io/gygw5y
Ruby 2.0.0 is very much past its end of life, so I'm assuming you have a specific reason you need install it. Otherwise, you are much better off installing a modern, supported version such as 2.7.x or 3.0.x.
Older versions of ruby were built with openssl#1.0. After 1.0 went end of life, ruby-build had a breaking change to require openssl#1.1. This means that ruby versions < 2.4 can no longer be installed/built directly using ruby-build (i.e., rbenv). This GitHub issue has details.
Homebrew has removed its openssl#1.0 formula, but you can still install it via an rbenv tap. The following might work for you, though the comments in the issue report mixed results depending on the version of Command Line Tools being used.
brew install rbenv/tap/openssl#1.0
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.0)" 2.0.0-p247
Note: if you are running on an M1 (Apple Silicon) Mac, you might be out of luck. AFIK, there's no intention of getting openssl#1.0 to to work on Apple Silicon.

Mongodb Realm installation using Xcode 11.4 with Cocoapods causes error

I created a new Swift app with xcode 11.4 and I am trying to install the pod for Mongodb Realm as per the instructions in the documentation (https://docs.mongodb.com/realm/ios/install/#ios-install). But when I do "pod install" I am getting this error:
*Installing Realm (10.0.0-beta.6)
[!] /bin/bash -c
set -e
sh build.sh cocoapods-setup
Downloading dependency: sync 10.0.0-beta.14 from https://static.realm.io/downloads/sync/realm-sync-cocoa-10.0.0-beta.14.tar.xz
Undefined symbols for architecture x86_64:
"___isPlatformVersionAtLeast", referenced from:
realm::util::(anonymous namespace)::ensure_reclaimer_thread_runs() in librealm-sync-ios-dbg.a(file_mapper.o)
realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in librealm-sync-ios-dbg.a(terminate.o)
realm::util::network::SecureTransportErrorCategory::message(int) const in librealm-sync-ios-dbg.a(network_ssl.o)
realm::util::network::ssl::Stream::verify_peer() in librealm-sync-ios-dbg.a(network_ssl.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)*
My podfile is as per instructions:
*platform :ios, '12.0'
target 'TEST' do
use_frameworks!
pod 'RealmSwift', '=10.0.0-beta.6'
end*
I am following the exact instructions and so why is this happening?
I would say the issue could be the podfile or that XCode was initially launched from another location (like a disk image or the downloads folder) and/or there are multiple XCode versions installed.
Podfile:
Looks like it's missing some components or may be malformed (which is why I asked if it was the exact podfile in my comments)
Here's what it should look like
project 'Test.xcodeproj'
target 'Test' do
use_frameworks!
pod 'RealmSwift', '=10.0.0-beta.6'
# ^^^ or whatever the current vers is
end
I just built a brand new MongoDB Realm project with this podfile and it worked correctly.
Also ensure your cocoapods is up-to-date as well. Either
sudo gem install cocoapods
or for us dealing with an error for that
sudo gem install -n /usr/local/bin cocoapods
Be sure you can access the latest Realm versions by ensuring your pods are up-to-date
pod repo update
XCode:
If it was initially launched from another location is won't know where it's files are. The fix is a delete and reinstall from the AppStore and/or realigning it's files with this in terminal:
xcode-select --switch /Applications/Xcode.app

Flutter ios Build not working on MacOS Big Sur 11.0 Beta

On MacOS BigSur Beta, I am trying to generate the build of iOS, but that is always giving me the following error.
I tried re-installing flutter, sitching to beta, dev or master and use of Xcode beta as well but nothing worked.
help me if anyone faced same issue and resolve that.
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/json-2.3.1/ext/json/ext/generator
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200926-66152-11vu3z5.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.6.0/gems/json-2.3.1/ext/json/ext/generator
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.6.0/gems/json-2.3.1/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in framework 'ruby' (loaded from '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/json-2.3.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/json-2.3.1/gem_make.out
Let's try installing old version cocoapods.
Uninstall cocoapods
install old version cocoapods (e.g. 1.8.0)sudo gem install cocoapods --version '=1.8.0' -n /usr/local/bin
flutter clean
pub get
run your project (iOS simulator)
I resolved the error using this procedure.

Lint Error for pod library Swift 4 Xcode 9

I'm creating a pod for my swift 4 for library.
I run pod lib create IntentedLibraryName which generates the workspace. Then I did the necessary modifications to the files IntentedLibraryName.podspec, and moving my library swift files to the path IntentedLibraryName/Classes/.
To test out if the pod works, I've Build and pod install from the Example project and everything works as intended.
Now, I run pod lib lint IntentedLibraryName.podspec --verbose then I got
(1 failure) === BUILD TARGET IntentedLibraryName OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor. The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor
I did the following hoping it would fix it:
In the Pod project, From Build Settings > Swift Compiler- Language > Swift Language Version from Swift unspecified to Swift 4.0.
I added and committed all changes along the tag (i.e git tag 0.0.1) and push all it with --tags. (i.e git push -u origin dev --tags)
I run the linting command again, and still the same issue.
I even try toecho 4.0 > .swift-version save all commit and push it again. NADA
Also tried s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' } NADA
## CocoaPods Environment
ℹ Please replace this with the output of `pod env`.
e.g. via `pod env | pbcopy`
### Stack
```
CocoaPods : 1.4.0.beta.1
Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin16]
RubyGems : 2.5.1
Host : Mac OS X 10.12.6 (16G1023)
Xcode : 9.0 (9A235)
Git : git version 2.8.1
Ruby lib dir : /Users/lamour/.rvm/rubies/ruby-2.3.0/lib
Repositories : bahlo - https://github.com/bahlo/SwiftGif # d26325392aefe7822dea79a757d4e300c694d010
master - https://github.com/CocoaPods/Specs.git # f2169476eead8b1a9d898ff73c5eba516504ed78
```
### Installation Source
```
Executable Path: /Users/lamour/.rvm/gems/ruby-2.3.0/bin/pod
```
### Plugins
```
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0
```
Project that demonstrates the issue
Please link to a project we can download that reproduces the issue.
You can delete this section if your issue is unrelated to build problems,
i.e. it's only an issue with CocoaPods the tool.
I do think its an issue with Xcode 9.0 because I've created empty project, still same thing happened.
Thanks for the help :)
Issue Fixed
The issue had nothing to do with Xcode 9 but it was with cocoapods. I did uninstall cocoapods from my machine and install it again. Once you done make sure you had the echo 4.0 > .swift-version. Voila :)
echo 4.0 > swift-version
should be
echo 4.0 > .swift-version
right (NB the leading dot)?
I had the same problem and for whichever reason, in my .swift-version file there was a strange
2.4 =>
in it (sic).
After I changed it to
4.0
, everything worked.
Example project here:
https://github.com/karstengresch/CleanroomLogger (actually a dumb fork of CleanRoomLogger which I want to use with Cocoapods).

Xamarin iOS Framework Binding

I am trying to create a binding for the WePay Framework:
https://github.com/wepay/wepay-ios
Following are the steps that I followed.
I installed CocoaPods.
I installed ObjectiveSharpie
I run this command in terminal : $ sharpie pod init ios WePay
And I get this error: Could not install CocoaPod
here is the full error message:
** Setting up CocoaPods master repo ...
(this may take a while the first time)
Setting up CocoaPods master repo
$ /usr/bin/git pull --ff-only
From https://github.com/CocoaPods/Specs
ee36ba4..8c6767d master -> origin/master
Updating ee36ba4..8c6767d
Fast-forward
Specs/BluetoothKit/0.3.0/BluetoothKit.podspec.json | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Specs/BluetoothKit/0.3.0/BluetoothKit.podspec.json
Setup completed
** Searching for requested CocoaPods ...
** Working directory:
** - Writing Podfile ...
** - Installing CocoaPods ...
** (running pod install --no-integrate --no-repo-update)
[!] Unknown option: --no-integrate
Did you mean: --no-ansi?
Usage:
$ pod install
Downloads all dependencies defined in `Podfile` and creates an Xcode Pods
library project in `./Pods`.
The Xcode project file should be specified in your `Podfile` like this:
project 'path/to/XcodeProject.xcodeproj'
If no project is specified, then a search for an Xcode project will be
made. If more than one Xcode project is found, the command will raise an
error.
This will configure the project to reference the Pods static library, add
a build configuration file, and add a post build script to copy Pod
resources.
Options:
--repo-update Force running `pod repo update` before
install
--project-directory=/project/dir/ The path to the root of the project
directory
--silent Show nothing
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command
error: could not install CocoaPod
Well apparently the most recent CocoaPods removed the --no-integrate option that objective sharpie uses. Downgrading cocoapods to 0.39.0 should fix your issue. It worked for us.

Resources