One of the project we are currently working on uses a static objective-c library created by an ex employee.
The problem we have is that the library was built for arm7 which has 32 bit architecture. Is there a way to recompile for new architecture. It seems like a long shot though.
___Edited I don't have the source code.
Do you have the source code and Xcode project? If so, the answer is yes. As mah says, you may have to refactor the project for the latest IDE.
If you don't have the source code then the answer is a resounding "NO!" Compiling means converting source code into machine code. No source code = nothing to compile. You might be able to analyze the machine code and reverse-engineer it, but that's a horrific amount of work.
Related
I think I just must be stupid.
I'm having a lot trouble understanding very basic things concerning frameworks in Xcode/iOs/Swift. While I've certainly gotten some things to work, I've gotten more and more confused about what I'm actually doing. And the documentation on the web just confuses me more.
When I see discussions about how to import particular frameworks (e.g. https://github.com/danielgindi/Charts is the library I'm playing with, but I've seen this pattern repeated in other libraries) they seem to always tell me include the Xcode project file as a child project of my project, in addition to linking things as an embedded binary. This confuses me. Is it not possible to link an already compiled framework to my project without including all the source code of the project?
That is, can't I just take a library.framework file, and add it to my embedded libraries list and be done with it?
In the frameworks I've played with (again https://github.com/danielgindi/Charts is my primary example, but this is true in many others I've played with) I can't seem to use the framework without Carthage or CocoaPods. For me at this stage, that is just confusing... I accept that they are useful tools to automate a difficult process, but I'd really like to understand what that process actually is before I let a tool automate it for me. As I search the web I just seem to always be led back to these tools as being the correct way to do things.
So here are my questions.
If I find a framework library on the web... do I need its source code or can I somehow just link to a compiled version of the framework?
In my reading, it seems that libraries made with Swift are somehow second-class citizens because Swift is a newer thing. Is that still the case? (The articles I read about this seems to date from 2014-2015).
Is there are good place to understand how Apple expects me to add a framework to a project, without using CocoaPods or Carthage?
No need to add source code. Just add the framework to Target ->
General -> Linked Framework and Libraries -> Tap on + and select
your framework.
In my opinion, many new libraries are being written is Swift. So you won't be left behind for using swift.
Apple has documentation about adding frameworks to XCode. But I would suggest to use Cocoapods , as its easy to manage libraries.
Cheers :)
This is a variant of the old "dyld: Library not loaded: #rpath/libswiftCore.dylib" problem. I'm pretty sure I know what the issue is, but I don't have any ideas on how to fix it.
I'll reference the project I'm working on, so I don't clutter the question with huge blocks of code.
The project generates a dylib that can be thrown into another project, and abstract a huge block of coding for developers (a communication layer of a client/server system).
I want the framework to be as simple as possible to to use; even if that means making it a big fat pig. I just want people to be able to toss it into their project (Swift or ObjC), and not have to worry about playing around with different variants for things like simulators and devices.
I use a variant of the old Wenderlich script to lipo the executables for x86 and ARM together.
Note the commented-out section. There be draggones.
Works great. In Swift.
Objective-C, not so great. That's because of the various Swift frameworks that need to be carried into the Objective-C program.
I switched on the embed frameworks setting, and the target dutifully gives me all my frameworks.
The problem is that each architecture has frameworks for ONLY that architecture. They aren't "fat" frameworks, so my hand-built "fat" framework really is kinda skinny, because it will only work on certain architectures.
My question is whether or not there's a way to ensure that the Swift frameworks I embed can be made "fat," or if I just have to give up, and package different variants of the framework for Objective-C programmers.
Any ideas?
I'm giving up on this sucker.
You cain't git thar f'm here.
This library will be Swift-only.
i have this problem for a while now. I have iPhone project which was built with non ARC. And now somehow i need to add another smaller project to it, but that project was built with ARC. I have tried to copy files one by one, but ass soon as i was done, i got lots of ARC errors and some with Security.framework... Can someone help me? Or give me some ideas how should i proceed?
I have tried this but it didnt solvet issius with ARC...
ARC is done at compile time. ARC-enabled source code files need to be compiled with ARC, non-ARC source files need to be compiled without. It is a s simple as that. ARC is nothing but syntactic sugar injected by the compiler.
I have had this problem with some third parties not entirely migrated to ARC. Just create a static library around these files.
You could also try to change the per-file compiler options (see this question: How to disable ARC for a single file in Xcode 5?), but I would recommend against it since it will just become a maintenance burden in the end.
And of course, if it is your source code and not some third party: Migrate it to ARC. It is worth it.
I am a game developer. I have developed a game using box2d which is in Final Phase. To structure the code when i attempt to make code refactoring i am receiving this error alert http://screencast.com/t/ir1nCvnx . But when i attempt to make code refactoring for another project which is not using .mm suffix means i can make it out. The thing i want to know is can we do code refactoring for the code using c++ concepts. If not what is other way to do code refactoring.
I thought because Xcode depended on the clang front end for all of its
code coverage features, that it would eventually be able to refactor
C++. As I understood it, it didn't refactor C++ in the past because
clang's C++ support was still insufficient.
But clang is a very good C++ compiler now. Yet Xcode still balks at
even renaming symbols (the only refactoring I've ever needed).
So, till now, you can not refactor your C++ code and hope you will get it with new release of clang / LLVM / XCode.
I am working on a project using Mono for Android. After reading a cross-platform document with Xamarin. I had my data layer in a separate project and was going to move it to my Mono for Android project and then link those files to my Mono Touch project, and one day perhaps a Windows Phone 8 project.
When I moved the code, I am now unable to compile because of the System.Xml.Linq reference. The reference shows in the Mono for Android project, but I am unable to use it. I thought aiming for Froyo may be the problem, but upgrading the project to Gingerbread or Ice Cream Sandwich didn't help.
Does anybody know what I am doing wrong? I am a seasoned .NET developer and am well aware of how references work in project, but this one has me stumped.
The project the original code was working on was targeting the Mono/.NET 4 framework
Is your reference to System.Xml.Linq pointing to the .Net version or the Mono version? The one for Mono will have Version 2.0.5.0.
Also, is the reference to System.Xml.Linq in a Android Class Library/Application or in a regular .Net Class library. If it is a .Net Class library, I would try referencing the library in your Android application as a compiled (dll) reference and not a project reference. It is not a perfect solution, but I have found that this works when I needed to reference libraries that I use across multiple solutions. The reference will generally work out fine, but if there is anything that is not supported in the Mono version, then it can cause issues.
Assuming you have your code in a class library, your best bet may be to create a Mono specific version of your library project. You can import and use the same class files, but just add some Conditional compilation symbols to have it compile properly for Mono. If you are not familiar with this, take a look at how Json.Net or ServiceStack manages code for multiple platforms.