jdiehl / async-network

Cocoa and iOS Socket Networking Evolved
http://jdiehl.github.com/async-network
MIT License
91 stars 31 forks source link

AsyncNetwork Framework for iOS architecture x86_64 #3

Closed willSapgreen closed 9 years ago

willSapgreen commented 9 years ago

Hello Jonathan, Have you tried to build AsyncNetwork framework iOS x86_64 in Xcode 6+? I modified your setting to generate AsyncNetwork framework for iOS but got

ld warning: /MyProjectName/AsyncNetwork.framework/AsyncNetwork, missing required architecture x86_64 in file /MyProjectName/AsyncNetwork.framework/AsyncNetwork (2 slices) Undefined symbols for architecture x86_64: "_OBJCCLASS$_AsyncClient", referenced from: objc-class-ref in ViewController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thank you for precious time on my problem. I will also give you an update if any progress on my side.

jdiehl commented 9 years ago

I'll take a look at it.

jdiehl commented 9 years ago

I updated the build process and the examples to work on 10.10 and iOS 8.2. Can you verify that it works now?

willSapgreen commented 9 years ago

Hello Jonathan,

Thank you for the quick response. After "Download Zip" your new commit, here is the problem I have for compiling AsyncNetworkIOS target:

. GCDAsyncSocket.h, GCDAsyncSocket.m, GCDAsyncUdpSocket.h, GCDAsyncUdpSocket.m are missing in AsyncSocket folder . After adding these missing files which downloading from https://github.com/robbiehanson/CocoaAsyncSocket, the error when building is

Undefined symbols for architecture armv7:

ld: symbol(s) not found for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Only change I did is add these four missing files.

Working environment:

Xcode 6.2. Yosemite 10.10.2.

Please let me know if any question.

Thank you so much for precious time on my question.

Will

On Mon, Mar 16, 2015 at 1:52 PM, Jonathan Diehl notifications@github.com wrote:

I updated the build process and the examples to work on 10.10 and iOS 8.2. Can you verify that it works now?

— Reply to this email directly or view it on GitHub https://github.com/jdiehl/async-network/issues/3#issuecomment-81930432.

willSapgreen commented 9 years ago

Hello Jonathan, Based on these two Stack Overflow threads, I can build the AsyncNetworkIOS.framework for iOS device.

http://stackoverflow.com/questions/10027627/undefined-symbols-for-architecture-armv7-when-adding-cocoaasyncsocket

http://stackoverflow.com/questions/11697207/issue-with-gcdasyncsocket-in-mountain-lion

So what you need to do is in AsyncNetworkIOS target setting:

  1. Add CFNetwork.framework and Security.framework to "Link Binary With Libraries"
  2. Add GCDAsyncSocket.m and GCDAsyncUdpSocket.m to "Compile Source"

Let me know if any problem.

jdiehl commented 9 years ago

Thanks for your feedback.

I have re-added the CFNetwork dependency (for some reason my Xcode allows compiling the framework without it).

The missing files are included as a submodule, which works fine when checking out the project instead of downloading it.

jdiehl commented 9 years ago

Re-added missing Security.framework dependency to iOS

SharadExt commented 8 years ago

I have following error . CoreDataController.m is added in compile resources But still it shows this error.

"OBJCCLASS$_CoreDataController", referenced from:"

jdiehl commented 8 years ago

I can't reproduce this error. Try cleaning the project before compiling or (if that doesn't help) checking out a fresh copy of the project and compiling that. Also try the make command, which should create a working library to be included. Make sure you have the latest Version of Mac OS and XCode installed.

SharadExt commented 8 years ago

I modified the code so I can not checking out a fresh copy of the project. Is there any other way ?

SharadExt commented 8 years ago

I am stuck with this error . Is this XCODE problem ?

jdiehl commented 8 years ago

Please try to reproduce the steps that lead to the error. Check out a clean copy of the framework and compile it. Then add your modifications in small steps and try compiling after each change

SharadExt commented 8 years ago

Thanks. I checking out a fresh copy of the project and it works .

On Mon, Jun 27, 2016 at 4:03 PM, Jonathan Diehl notifications@github.com wrote:

Please try to reproduce the steps that lead to the error. Check out a clean copy of the framework and compile it. Then add your modifications in small steps and try compiling after each change

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jdiehl/async-network/issues/3#issuecomment-228710306, or mute the thread https://github.com/notifications/unsubscribe/ASQfa1GzPvmjPr5hIZFdFJ0NhDS2XEWAks5qP6cOgaJpZM4Du3Hq .

Chan-Chun commented 7 years ago

Hello, i have solved the problem.

  1. enter the "build page". 2.and select the "build setting" 3.add the "GCDasyncsocket.m" into the compile sources.

and enjoy socket programming!