ProGuard can't find classes flyway - flyway

I use Flyway in the android app.
Now with ProGuard, version 5.3.3 it can't find some referenced classes.
My app build.gradle is
android {
compileSdkVersion 26
buildToolsVersion '26.0.3'
...
implementation 'org.flywaydb:flyway-core:5.0.7'
implementation 'org.sqldroid:sqldroid:1.0.3'
}
and Proguard output is
Warning:
core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner$1:
can't find superclass or interface
org.jboss.vfs.VirtualFileFilter Warning:
org.flywaydb.core.api.migration.spring.SpringJdbcMigration: can't find
referenced class org.springframework.jdbc.core.JdbcTemplate Warning:
org.flywaydb.core.internal.database.postgresql.PostgreSQLCopyStatement:
can't find referenced class org.postgresql.copy.CopyManager Warning:
org.flywaydb.core.internal.database.postgresql.PostgreSQLCopyStatement:
can't find referenced class org.postgresql.core.BaseConnection
Warning:
org.flywaydb.core.internal.database.postgresql.PostgreSQLCopyStatement:
can't find referenced class org.postgresql.copy.CopyManager Warning:
org.flywaydb.core.internal.database.postgresql.PostgreSQLCopyStatement:
can't find referenced class org.postgresql.copy.CopyManager Warning:
org.flywaydb.core.internal.database.postgresql.PostgreSQLCopyStatement:
can't find referenced class org.postgresql.copy.CopyManager Warning:
org.flywaydb.core.internal.resolver.spring.SpringJdbcMigrationExecutor:
can't find referenced class org.springframework.jdbc.core.JdbcTemplate
Warning:
org.flywaydb.core.internal.resolver.spring.SpringJdbcMigrationExecutor:
can't find referenced class
org.springframework.jdbc.datasource.SingleConnectionDataSource
Warning:
org.flywaydb.core.internal.resolver.spring.SpringJdbcMigrationExecutor:
can't find referenced class
org.springframework.jdbc.datasource.SingleConnectionDataSource
Warning:
org.flywaydb.core.internal.resolver.spring.SpringJdbcMigrationExecutor:
can't find referenced class org.springframework.jdbc.core.JdbcTemplate
Warning: org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog: can't
find referenced class org.slf4j.Logger Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog: can't find
referenced class org.slf4j.Logger Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog: can't find
referenced class org.slf4j.Logger Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog: can't find
referenced class org.slf4j.Logger Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog: can't find
referenced class org.slf4j.Logger Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog: can't find
referenced class org.slf4j.Logger Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog: can't find
referenced class org.slf4j.Logger Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog: can't find
referenced class org.slf4j.Logger Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog: can't find
referenced class org.slf4j.Logger Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLogCreator: can't
find referenced class org.slf4j.LoggerFactory Warning:
org.flywaydb.core.internal.util.logging.slf4j.Slf4jLogCreator: can't
find referenced class org.slf4j.LoggerFactory Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.FrameworkUtil Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.FrameworkUtil Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.Bundle Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.Bundle Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.Bundle Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.BundleContext Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.BundleContext Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.Bundle Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.Bundle Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.Bundle Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.Bundle Warning:
org.flywaydb.core.internal.util.scanner.classpath.OsgiClassPathLocationScanner:
can't find referenced class org.osgi.framework.Bundle Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner:
can't find referenced class org.jboss.vfs.VFS Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner:
can't find referenced class org.jboss.vfs.VFS Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner:
can't find referenced class org.jboss.vfs.VirtualFile Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner:
can't find referenced class org.jboss.vfs.VirtualFile Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner:
can't find referenced class org.jboss.vfs.VirtualFile Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner:
can't find referenced class org.jboss.vfs.VirtualFile Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner:
can't find referenced class org.jboss.vfs.VirtualFile Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner$1:
can't find referenced class org.jboss.vfs.VirtualFileFilter Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner$1:
can't find referenced class org.jboss.vfs.VirtualFile Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner$1:
can't find referenced class org.jboss.vfs.VirtualFile Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner$1:
can't find referenced class org.jboss.vfs.VirtualFile Warning:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv3ClassPathLocationScanner$1:
can't find referenced class org.jboss.vfs.VirtualFile
Note: org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv2UrlResolver:
can't find dynamically referenced class org.jboss.virtual.VFS Note:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv2UrlResolver:
can't find dynamically referenced class org.jboss.virtual.VFSUtils
Note:
org.flywaydb.core.internal.util.scanner.classpath.jboss.JBossVFSv2UrlResolver:
can't find dynamically referenced class org.jboss.virtual.VirtualFile
Any help will be highly appreciated.

My project build successfully without classes listed in the question. I just add follow lines in to the proguard-rules.pro
-dontwarn org.flywaydb.core.internal.**
-dontwarn org.flywaydb.core.api.migration.spring.**

Related

Why does SLF4J with slf4j-nop output the StaticLoggerBinder warning when using a Groovy script with #Grab

I have a Groovy script which specifies dependencies using the Grape #Grab annotation. Included with that are a dependency on spring-web to use RestTemplate, and a dependency on slf4j-nop to avoid the Failed to load class "org.slf4j.impl.StaticLoggerBinder" warning.
#!/usr/bin/env groovy
#Grab('org.springframework:spring-web:5.3.18')
#Grab('org.slf4j:slf4j-nop:1.7.36')
import org.springframework.web.client.RestTemplate
new RestTemplate().getForObject('http://www.example.com', String)
However, despite this, I am still getting the SLF4J warning:
$ ./restTemplateLoggingTest.groovy
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Given that it's a script, it's important that the output not contain extraneous noise, as it may be used and manipulated programmatically.
What can I do to prevent this logging warning from being output when I run my script?
Experimentation has shown that attaching the dependencies to the system classloader using #GrabConfig(systemClassLoader=true) causes the logs to no longer be emitted:
#!/usr/bin/env groovy
#GrabConfig(systemClassLoader=true)
#Grab('org.springframework:spring-web:5.3.18')
#Grab('org.slf4j:slf4j-nop:1.7.36')
import org.springframework.web.client.RestTemplate
new RestTemplate().getForObject('http://www.example.com', String)
I don't know for sure why this is the cause, though I have some vague guesses.
Note that despite addressing the issue, this isn't a use that's described by the Javadocs for GrabConfig#systemClassLoader:
Set to true if you want to use the system classloader when loading the grape. This is normally only required when a core Java class needs to reference the grabbed classes, e.g. for a database driver accessed using DriverManager.

NoSuchMethodError when using Scala in R with rscala

I'm having trouble using rscala package in R to call precompiled Scala code.
I have an Scala project running on version 2.11.12. I build a fat jar with sbt-assembly and make it available to rscala through rscala::scala("path-to-jar.jar")
But whenever I try to run any function/method/whatever from the package, I get the following error:
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps;
at myPackage.myClass$.myMethod(myClass.scala:116)
at $line6.$read$$iw$$iw$$iw$$iw$.$anonfun$res0$1(<console>:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.ddahl.rscala.server.Server.$anonfun$invoke$3(Server.scala:305)
at org.ddahl.rscala.server.Server.wrap(Server.scala:47)
at org.ddahl.rscala.server.Server.invoke(Server.scala:305)
at org.ddahl.rscala.server.Server.run(Server.scala:400)
at org.ddahl.rscala.server.Main$.delayedEndpoint$org$ddahl$rscala$server$Main$1(Main.scala:105)
at org.ddahl.rscala.server.Main$delayedInit$body.apply(Main.scala:11)
at scala.Function0.apply$mcV$sp(Function0.scala:39)
at scala.Function0.apply$mcV$sp$(Function0.scala:39)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
at scala.App.$anonfun$main$1$adapted(App.scala:80)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.App.main(App.scala:80)
at scala.App.main$(App.scala:78)
at org.ddahl.rscala.server.Main$.main(Main.scala:11)
at org.ddahl.rscala.server.Main.main(Main.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at scala.reflect.internal.util.ScalaClassLoader.$anonfun$run$2(ScalaClassLoader.scala:106)
at scala.reflect.internal.util.ScalaClassLoader.asContext(ScalaClassLoader.scala:41)
at scala.reflect.internal.util.ScalaClassLoader.asContext$(ScalaClassLoader.scala:37)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:132)
at scala.reflect.internal.util.ScalaClassLoader.run(ScalaClassLoader.scala:106)
at scala.reflect.internal.util.ScalaClassLoader.run$(ScalaClassLoader.scala:98)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:132)
at scala.tools.nsc.CommonRunner.run(ObjectRunner.scala:28)
at scala.tools.nsc.CommonRunner.run$(ObjectRunner.scala:27)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:45)
at scala.tools.nsc.CommonRunner.runAndCatch(ObjectRunner.scala:35)
at scala.tools.nsc.CommonRunner.runAndCatch$(ObjectRunner.scala:34)
at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:45)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:73)
at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:92)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:103)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:108)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
Error in pop(details, transcompileInfo, envir) : Invocation error.
It does allow me to import its classes and objects, so it does seem to be in the classpath, but that's it.
My build.sbt includes crossScalaVersions := Seq("2.11.12", "2.12.7", "2.13.0-M5") as required in the package.
Any thoughts? It seems like a scala version error, since running rscala::scalaConfig() shows me it is using scalaFullVersion 2.12.8, but I can't seem to choose a scala installation, so I can't really expect this to be the problem.
EDIT:
After Jasper-M's suggestion, I set environment variable RSCALA_SCALA_MAJORVERSION=2.11 and reexecuted the config with rscala::scalaConfig(download='scala'). Now it returns scalaMajorVersion as 2.11.
Now, when I create an instance of the scala bridge with rscala::scala(), it returns a message (not an error) saying:
cat: /release: No such file or directory
If I run println() it compiles with no issues. However, if I instantiate the scala bridge with a precompiled fat JAR of my own and do ANYTHING (like println), it returns the following error:
error: error while loading package, class file '$HOME/.rscala/scala/lib/scala-library.jar(scala/reflect/package.class)' is broken
(class java.lang.RuntimeException/Scala class file does not contain Scala annotation)
error: error while loading package, class file '$HOME/.rscala/scala/lib/scala-library.jar(scala/package.class)' is broken
(class java.lang.RuntimeException/Scala class file does not contain Scala annotation)
error: error while loading package, class file '$HOME/.rscala/scala/lib/scala-library.jar(scala/reflect/package.class)' is broken
(class java.lang.RuntimeException/Scala class file does not contain Scala annotation)
error: error while loading package, class file '$HOME/.rscala/scala/lib/scala-library.jar(scala/package.class)' is broken
(class java.lang.RuntimeException/Scala class file does not contain Scala annotation)
error: error while loading Predef, class file '$HOME/.rscala/scala/lib/scala-library.jar(scala/Predef.class)' is broken
(class java.lang.RuntimeException/Scala class file does not contain Scala annotation)
I'm really clueless here. Any ideas?
It's most definitely a Scala version error.
My best guess is that you have to set the environment variable RSCALA_SCALA_MAJORVERSION=2.11 . E.g. by calling
Sys.setenv(RSCALA_SCALA_MAJORVERSION = "2.11")
and then run
rscala::scalaConfig(download = "scala")

Installing Root using Linux Subsystem on Windows: "error: no member named 'fgetws' in the global namespace"

I am trying to install ROOT (6.10.08) on a Linux Subsystem on Windows (Ubuntu 16.04). More details are described here. When I try to build root (cmake --build .), 69% through the build, I run into the following problem:
[ 69%] Generating G__ODBC.cxx, ../../lib/libRODBC_rdict.pcm, ../../lib/libRODBC.rootmap
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:40:
In file included from /usr/include/c++/5/bits/char_traits.h:40:
In file included from /usr/include/c++/5/bits/postypes.h:40:
/usr/include/c++/5/cwchar:143:11: error: no member named 'fgetws' in the global namespace
using ::fgetws;
~~^
/usr/include/c++/5/cwchar:145:11: error: no member named 'fputws' in the global namespace
using ::fputws;
~~^
/usr/include/c++/5/cwchar:149:11: error: no member named 'getwc' in the global namespace
using ::getwc;
~~^
/usr/include/c++/5/cwchar:150:11: error: no member named 'getwchar' in the global namespace
using ::getwchar;
~~^
/usr/include/c++/5/cwchar:155:11: error: no member named 'putwc' in the global namespace
using ::putwc;
~~^
/usr/include/c++/5/cwchar:156:11: error: no member named 'putwchar' in the global namespace
using ::putwchar;
~~^
/usr/include/c++/5/cwchar:158:11: error: no member named 'swprintf' in the global namespace
using ::swprintf;
~~^
/usr/include/c++/5/cwchar:167:11: error: no member named 'vswprintf' in the global namespace
using ::vswprintf;
~~^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:43:
In file included from /usr/include/c++/5/bits/localefwd.h:40:
/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h:52:23: error: use of undeclared identifier 'uselocale'
extern "C" __typeof(uselocale) __uselocale;
^
/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h:62:11: error: unknown type name '__locale_t'
typedef __locale_t __c_locale;
^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:43:
In file included from /usr/include/c++/5/bits/localefwd.h:42:
/usr/include/c++/5/cctype:87:11: error: no member named 'isblank' in the global namespace
using ::isblank;
~~^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:52:
In file included from /usr/include/c++/5/bits/basic_string.h:39:
In file included from /usr/include/c++/5/ext/atomicity.h:35:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:148:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:35:
In file included from /mnt/c/MinGW/include/pthread.h:76:
/mnt/c/MinGW/include/_ptw32.h:55:4: error: "Please upgrade your GNU compiler to one that supports __declspec."
# error "Please upgrade your GNU compiler to one that supports __declspec."
^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:52:
In file included from /usr/include/c++/5/bits/basic_string.h:39:
In file included from /usr/include/c++/5/ext/atomicity.h:35:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:148:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:35:
In file included from /mnt/c/MinGW/include/pthread.h:179:
/mnt/c/MinGW/include/time.h:383:1: error: unknown type name '__MINGW_IMPORT'
__MINGW_IMPORT char *tzname[2];
^
/mnt/c/MinGW/include/time.h:383:16: error: expected unqualified-id
__MINGW_IMPORT char *tzname[2];
^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:52:
In file included from /usr/include/c++/5/bits/basic_string.h:5249:
In file included from /usr/include/c++/5/ext/string_conversions.h:41:
/usr/include/c++/5/cstdlib:126:11: error: no member named 'at_quick_exit' in the global namespace
using ::at_quick_exit;
~~^
/usr/include/c++/5/cstdlib:149:11: error: no member named 'quick_exit' in the global namespace
using ::quick_exit;
~~^
/usr/include/c++/5/cstdlib:241:11: error: no member named 'atoll' in the global namespace
using ::atoll;
~~^
/usr/include/c++/5/cstdlib:262:22: error: no member named 'atoll' in namespace '__gnu_cxx'
using ::__gnu_cxx::atoll;
~~~~~~~~~~~~~^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:52:
/usr/include/c++/5/bits/basic_string.h:5402:51: error: no member named 'vswprintf' in namespace 'std'
{ return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(int),
~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
*** Break *** segmentation violation
I'm a beginner and am following the steps as closely as I can. I was wondering if anyone could offer advice as to the errors I am running into, and potential fixes.
Thanks!

Different library conflict with same name file

I encounter a series of file conflict with my SBT build file.I'm pick two error of them which represent properties conflict and class conflict.
The error caused by sbt assembly command, as this:
error] (util/*:assembly) deduplicate: different file contents found in the following:
[error] /Users/lorancechen/.ivy2/cache/io.netty/netty-buffer/jars/netty-buffer-4.0.42.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/lorancechen/.ivy2/cache/io.netty/netty-common/jars/netty-common-4.0.42.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/lorancechen/.ivy2/cache/io.netty/netty-codec-http/jars/netty-codec-http-4.0.42.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/lorancechen/.ivy2/cache/io.netty/netty-codec/jars/netty-codec-4.0.42.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/lorancechen/.ivy2/cache/io.netty/netty-transport/jars/netty-transport-4.0.42.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/lorancechen/.ivy2/cache/io.netty/netty-handler/jars/netty-handler-4.0.42.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/lorancechen/.ivy2/cache/io.netty/netty-transport-native-epoll/jars/netty-transport-native-epoll-4.0.42.Final-linux-x86_64.jar:META-INF/io.netty.versions.properties
[error] deduplicate: different file contents found in the following:
[error] /Users/lorancechen/.ivy2/cache/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.7.21.jar:org/apache/commons/logging/Log.class
[error] /Users/lorancechen/.ivy2/cache/commons-logging/commons-logging/jars/commons-logging-1.2.jar:org/apache/commons/logging/Log.class
It not caused by library version dependency conflict but because of different library has same class or file named with same package path.
I have two questions:
Is it possible fetch correct file and how to do it in sbt build file?
Java project should be follow the package namespace definition. So, why the two organization of org.slf4j/jcl-over-slf4j and commons-logging/commons-logging has the same class path org/apache/commons/logging/Log.class, rather then define as org/slf4j/commons/logging/Log.class for org.slf4j org and org/apache/commons/logging/Log.class for commons-logging org?
Besides, the name of commons-logging as a groupId is very strange.
Thanks.

CocoaAsyncSocket Apple Mach-O Linker Error

I need to receive TCP packets using CocoaAsyncSocket. When I'm importing that library to Xcode and trying to run my application, it gives me Apple Mach-O Linker Errors:
Undefined symbols for architecture i386:
"_kCFStreamErrorDomainMach", referenced from:
-[AsyncSocket errorFromCFStreamError:] in AsyncSocket.o
"_kCFStreamErrorDomainNetDB", referenced from:
-[AsyncSocket errorFromCFStreamError:] in AsyncSocket.o
"_kCFStreamErrorDomainNetServices", referenced from:
-[AsyncSocket errorFromCFStreamError:] in AsyncSocket.o
"_kCFStreamErrorDomainSystemConfiguration", referenced from:
-[AsyncSocket errorFromCFStreamError:] in AsyncSocket.o
"_kCFStreamPropertySSLSettings", referenced from:
-[AsyncSocket maybeStartTLS] in AsyncSocket.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So, What Can I do???
You just need to add SecurityFramework in the Frameworks.
I also met this similar problem.

Resources