I can get the ShareKit demo from github to compile using the iOS 4.1 SDK, but when I import it into my project exactly how it's described on the ShareKit site, after compiling I'm getting 4,448 errors. It looks like I'm missing a framework, but I have the required frameworks listed. Maybe there's some kind of framework conflict. Here are some screenshots:
The frameworks:
Has anyone else seen this before? Thanks!
Looks like you're trying to compile a pure-C file with some Objective-C mixed in. I'd make sure that all the files have a source type of "sourcecode.c.objc" (which you can do by selecting the file and typing cmd-i)
Related
I'm trying to import an SPM package in Xcode11. I can fetch the library and see it in the project as Swift Package Dependencies but when trying to import, Xcode doesn't find it.
I read that the problem could be custom configurations and not the standard e.g. Debug.
Does anyone know how to solve this without renaming the configuration names?
The best advice at the moment is this post on the Swift forums where Ankit says:
This is a known issue that Apple folks are tracking internally. Currently, Swift packages default to the "Release" configuration when anything other than Debug and Release is used. In theory, adding $(BUILD_DIR)/Release to SWIFT_INCLUDE_PATHS build setting for the custom configurations should work around this issue but it can lead to some weird errors in case something unexpected gets picked from that directory.
I'm exploring Swift with Xcode-6 and so far so good although I think the new collections need a little bit of work as I've managed to break the compiler a few times.
Problem is I'm now stuck trying to create the framework package to then use in another project. The project builds without issue and all tests pass successfully. When I go to create Archive (which I assume is what is required) I receive the error:
:0: error: underlying Objective-C module 'Sample' not found
Now I assume this has something to do with the contents of my Sample.h which tells me
// In this header, you should import all the public headers of your framework using statements like #import <Sample/PublicHeader.h>
which is fine except I have only used swift enums, structs and classes for this framework so therefore no .h files exist.
Can anyone shed some light on this one as I can't find any documentation available yet?
EDIT (7/27/2018)
The information in the answer below may no longer be accurate. Your mileage may vary.
I sat down with an engineer and asked this exact question. This was their response:
Xcode 6 does not support building distributable Swift frameworks at this time and that Apple likely won't build this functionality into Xcode until its advantageous for them to do so. Right now, Frameworks are meant to be embedded in your app's project, rather than distributed. If you watch any of the session videos or see the sample projects, this is always the arrangement. Another reason is that Swift is very new and likely to change. Thus your Swift-based framework is not guaranteed to work on the platform you originally built it on.
Slight Update
The engineer mentioned that it's not impossible to make a framework for distribution, just that it's not supported.
I was able to get past the error by going to the target for the framework and on the Build Phases tab under Headers, remove the MyFramework.h file
However I was getting the "Underlying Objective-C module not found" error when I was using a framework to share code between a containing app and an app extension, both of which were pure Swift.
Assuming you are creating a truly pure Swift module, you must disable the Objective-C Compatibility Header and any generated interface headers so the compiler doesn't go off assuming it can find an Objective-C module for the framework.
Do Not remove your public framework header. You'll get a module-map warning at link time if you do.
You might find this useful: Creation of pure swift module
In short: it's possible to make static framework, but there is one issue: it doesn't work in end user' project if "ProjectName-Swift.h" header included.
But, it works fine if you use only swift.
I think it's a bug in XCode 6, or that Apple does not allow archiving the Framework from XCode while in beta.
If you compile to profile XCode generates the framework correctly. (See the Release folder created in DerivedData)
I try to add DDMathParser library to my project, but i get two linking errors. I'm a newbie in Objective-C programming, and it's still tricky for me.
Below there is a snapshot of the errors i get:
What should i do?
I also tried CGMathParser but i didn't manage to solve some errors i get.
I asked here, but i didn't get any feedback
Any advice?
Thanks
It looks like you've copied in the headers, but not actually linked the source files in. In other words, Xcode isn't compiling DDMathParser into your project.
This page on the DDMathParser wiki has information on what you're supposed to do: https://github.com/davedelong/DDMathParser/wiki/Adding-DDMathParser-to-your-project
I actually work on iphone project, and i want to use OAuthConsumer for the authentification.
The developer guide say
"In order to use the framework, you must first get a copy from the svn repository and compile it. Compiling the framework will automatically run all of the unit tests."
I get the svn repository but i don't understand how to compile this...
can you help me please ?
(sorry for my english...)
Thanks
ps: link to the installation guide http://code.google.com/p/oauthconsumer/wiki/UsingOAuthConsumer
you might have probably sorted this out already but in case it helps someone else...
http://code.google.com/p/oauthconsumer-iphone/
This project contains a makefile which will extract the Objective-C component of OAuthConsumer so that it is amenable for iPhone app development.
:)
I'm getting the following error when I attempt to compile my XCode project to debug on my device.
No architectures to compile for (ARCHS=x86_64, VALID_ARCHS=armv6 armv7).
I've included ObjectiveFlickr in my project just as the readme describes. I've gone through the process several times and redownloaded objectiveFlickr a few times to start over.
I've gotten objectiveFlickr to work on devices in the past. I don't know why I am suddenly having trouble. Can anybody point me to something that might hold the clue I need? Any other info I need to provide? I made only changes to my project that are specified by the OF documentation.
I also get this error when compiling the included snap-n-run example project provided with OF. So I must be missing something beneath my project.
Thanks,
Charlie
Check out this post for another solution. I have not tested it for release/dist but it works for debug so far.
http://groups.google.com/group/objectiveflickr/browse_thread/thread/ad8e5ec6ba976672
Well, I wasn't able to truly solve this problem. However, after corresponding with Lukhanos, the creator of objflickr, I tried including the objflickr source code directly in my project. After a bit of trial and error to sort out which source files were needed (the "source" directory and the "LFWebAPIKit" directory) and adding the "SystemConfiguration" framework to my project, things are building OK.
Still no clue as to why I was experiencing this issue, but at least I can get my project built now!
Thanks
- Charlie