Unable to connect iOS application in Swift to Objective C files using bridging header - swift

I am trying to connect Parse to my iOS application. I make a bridging header and #import <Parse/Parse.h> in the bridging header. When I try to call any Parse.function inside my AppDelegate.swift, glitchy Xcode8-Beta3 does not autofill or even know Parse is there, despite the bridging header file being right below it! It throws an Unidentified Parse error. I imported all the frameworks Parse instructed to important. Any ideas or should I just avoid Xcode8 completely and go back to coding Android like the rest of the world?

Clean, clean build folder, rebuild and you should be able to use your imported framework.

Related

How to retrieve bridging headers that has been lost

I was trying to put a facebook login in my app. I'm also checking some of the tutorials that'll help me to do this. Then i have created a header file that i also delete since that i wasn't able to accomplished the tutorial that i'm watching. Then all of a sudden, i'm having an error that stating...
Briding Header 'Users/mac/Desktop/App
Files/myApp/myApp-Bridging-Header.h' does not exist
I don't know why is that happening. I try to delete my .swift file and replace it with the same name then it still having an error. I even try to make a .swift file with a different name but still having an error as well.
In build settings.. in “Swift Compiler -Code Generation”—> Objective-C Bridging Header — “reset the Path of Bridging header file”
How to create a Swift Bridging Header Manually
Add a new file to Xcode (File > New > File), then select “Source” and
click “Header File“.
Name your file “YourProjectName-Bridging-Header.h”. Example: In my
app Station, the file is named “Station-Bridging-Header”.
Create the file.
Navigate to your project build settings and find the “Swift Compiler
– Code Generation” section. You may find it faster to type in “Swift
Compiler” into the search box to narrow down the results. Note: If
you don’t have a “Swift Compiler – Code Generation” section, this
means you probably don’t have any Swift classes added to your project
yet. Add a Swift file, then try again.
Next to “Objective-C Bridging Header” you will need to add the
name/path of your header file. If your file resides in your project’s
root folder simply put the name of the header file there. Examples:
“ProjectName/ProjectName-Bridging-Header.h” or simply
“ProjectName-Bridging-Header.h”.
Open up your newly created bridging header and import your
Objective-C classes using #import statements. Any class listed in
this file will be able to be accessed from your swift classes.

Zebra Printer SDK swift

I am currently trying to write an App, that connects to a Zebra printer using Swift. I followed these instructions to link the SDK to the project and this page for information on what to add to the bridging header.
This is where it fails. As soon as I add a single line to the bridging header, for example #import "SGD.h" it does not compile, with the error 'SGD.h' file not found
I know this question was already self answered by the writer, but... It doesn't answer the question of how to correctly add the Zebra sdk to a Swift project (which is nowhere to be found on Zebra's site or in the documentation).
Add the framework ".a" file (libZSDK_API.a) to your project.
Add the entire "include" folder provided by Zebra (make sure to add as group)
Add a bridging header
All of that was pretty standard, now here is the tricky part. Add the following imports to the bridging header in this exact same order:
#import "MFiBtPrinterConnection.h"
#import "ZebraPrinterConnection.h"
#import "ZebraPrinter.h"
#import "ZebraPrinterFactory.h"
#import "TcpPrinterConnection.h"
#import "SGD.h"
I figured it out: This was not very clear from the instructions, but I configured those settings in The Project settings, not the Target settings. I also had to disable Bitcode.

Sqlite for custom swift framework

I am creating a custom swift framework for managing all common data of my applications like data base or common classes.
I import the library "libsqlite3.0.tbd" in Linked Frameworks and Libraries, but when I try to put #import "sqlite3.h" in my Umbrella header file, I recite the next error:
Include of non-modular header inside framework module
Any idea?
Thank you very much
Step by Step what I did with my sqlite project for it to work, try this (keep the library added and the #import statement in the header):
First, remove the Header from Build Phases >> Headers.
Then go to Build Settings and add the path to the Header in the Objective-C Bridging Header. If you just created the Framework, didn't change the name of the .h file and your project is called Test, for example, the path will be Teste/Test.h (Xcode 7.1.1).
Hope it works.

Header file for included static library not found by swift bridging header during archive

I've run into a very vexing problem.
I've included a 3rd party static library (PDFKitten) into my project, which is a mixture of Swift and Objective-C code. I can build & test just fine in simulator and device.
However, when trying to do an Archive build ready to submit to the app store, the Swift compiler complains that the header PDFKitten/PDFKitten.h cannot be found.
Reproducing this is easy:
Create an empty Swift iOS project in Xcode.
Grab the PDF Kitten project and add it as a sub project.
Add the PDFKitten lib as a dependency
Create an objective-c source file to force the creation of the bridging header. Once the bridging header is created, you can delete the empty objective-c source file again (not the header!)
In the bridging header, add #import
An ordinary build will have no issues.
If you then try to do an archive build you'll get the error message.
Any ideas?
I had the same issue. I was able to get it to archive error-free once I added the path to the "Not Found" header file (in your case, PDFKitten.h) into the Header Search Paths portion of the app's Build Settings.

problem sending mail from backend file not found iphone

i'm trying to use the skpsmtpmessage to send emails from backend. In the README.txt it says:
To use this in your app include the following files in your project:
SKPSMTPMessage.*
NSStream+SKPSMTPExtensions.*
That should mean that i have to include the .h .m files in my project. Now, after i've done that i get an error NSData+Base64Additions.h not found, so i imported the missing classes for this 'skpsmtpmessage' project but i get tons of errors like:
Undefined symbols for architecture armv6:
"_kCFStreamSSLLevel", referenced from:
-[SKPSMTPMessage parseBuffer] in SKPSMTPMessage.o
i get the same errors if i even remove the import lines. I cleaned the project but it doesn't help at all.
Has anyone used this library before? Have you experienced this errors before? I need some guide.
Thanks in advance!
Have a look at the header files for the project you've downloaded. You'll see this:
#import <CFNetwork/CFNetwork.h>
This means that the class uses the CFNetwork framework. You will need to add it to your project in Xcode and make sure that your target links against the framework.