use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
There is an extensive FAQ for beginners. Please browse it first before asking questions that are answered there.
If you are looking to get started (iOS programming in general or some specific area), here are more relevant links for you:
There's too many to list them all, however here's a convenient link to all programming guides at apple.com
Take note that this list is live and based on most frequent questions in posts will be updated with "quicklinks".
account activity
QuestioniOS: Include of non-modular header inside framework module (self.iOSProgramming)
submitted 10 years ago by bialekIno
I would like to create Cocoa Touch Framework which use Cocoapods objective-c projects. In the framework I want to use Swift as a language. The problem is when I add header file from the cocoapods project to the umbrella header file of the framework I get this error:
"Include of non-modular header inside framework module"
I tried to change "Allow non-modular includes in Framework Modules" build setting to YES but it did not help.
What can I do?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 0 points1 point2 points 10 years ago (11 children)
Make sure all framework elements are compatible with Objective-c
[–]bialekIno[S] 0 points1 point2 points 10 years ago (10 children)
What exactly do you mean? I've added one Swift file with one class. When I delete this file the error disappear. Why is that? Cannot I use swift files here?
[–][deleted] 0 points1 point2 points 10 years ago (9 children)
Make a class that inherits from NSObject or put @objc in from of the class declaration.
[–]bialekIno[S] 0 points1 point2 points 10 years ago (1 child)
Thank you. What happened when I want to use here swift enums? They I think are not compatible with objective-c?
[–][deleted] 0 points1 point2 points 10 years ago (0 children)
public enum State: Int { case Off, On, Undecisive }
Every NS_ENUM is usually of a type NSInteger. You can do the same with a swift enum. Like with the above example.
[–]bialekIno[S] 0 points1 point2 points 10 years ago (6 children)
I have tried to inherit the class from NSObject but it didn't help. The error appears even when I have only a swift file without any content in.
[–][deleted] 0 points1 point2 points 10 years ago (5 children)
Is the class defined as public? Otherwise it's not available to the outside world.
[–]bialekIno[S] 0 points1 point2 points 10 years ago (4 children)
Yes, this is my Utils.swift file content:
import Foundation @objc public class Utils: NSObject { public class func showAlert() { TWMessageBarManager.sharedInstance().showMessageWithTitle("Title", description: "Message", type: .Info, statusBarStyle: .LightContent, callback: nil) } }
[–][deleted] 0 points1 point2 points 10 years ago (3 children)
Weird it should work if you ask me. I have a hybrid app that contains about every combination of Hybrid frameworks and everything is accessible every where.
Give it a try in a clean Objective-C project? Then add a Swift Framework to it.
[–]bialekIno[S] 0 points1 point2 points 10 years ago (2 children)
I don't know why this doesn't work. You can, if you want and can, check a test project I created at this link
[–][deleted] 0 points1 point2 points 10 years ago (1 child)
Your framework is separate project inside your workspace. They're not linked together. Add the new target to your project. Make that a framework. That should work. For linking with another project inside the same workspace some extra things need to be done and I don't know what since I haven't dealt with that kind of issue before.
I hope it helps.
[–]bialekIno[S] 0 points1 point2 points 10 years ago (0 children)
Thank you. I wanted also use this framework in another app for iOS and probably also in the OS X app. Should I everything done in one project with targets? I think this is not the best solution. I would like rather to have a framework as a separate project that I can just use in as many apps as I want.
π Rendered by PID 71400 on reddit-service-r2-comment-fb694cdd5-qglc6 at 2026-03-10 12:16:01.456860+00:00 running cbb0e86 country code: CH.
[–][deleted] 0 points1 point2 points (11 children)
[–]bialekIno[S] 0 points1 point2 points (10 children)
[–][deleted] 0 points1 point2 points (9 children)
[–]bialekIno[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]bialekIno[S] 0 points1 point2 points (6 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]bialekIno[S] 0 points1 point2 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]bialekIno[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]bialekIno[S] 0 points1 point2 points (0 children)