Failed to import bridging header FBSDKCoreKit/FBSDKCoreKit.h file not found - parse-platform

I am trying to add the Facebook login using Parse with swift and I have been following the iOS Developers guide. However it states swift compiler error: failed to import bridging header FBSDKCoreKit/FBSDKCoreKit.h file not found and the issue was found in the Test section on Xcode. Please can someone please help me to rectify this. Thank you very much.

I just solved this exact problem by actually copying the Facebook desired frameworks (in my case CoreKit, LoginKit and ShareKit) from the ~/Documents/FacebookSDK folder to the project folder.
To achieve that, I just dragged the frameworks into the project folder on XCode, but I CHECKED the option "Copy items if needed".
After that, everything worked in the first build.
I'm using Facebook SDK 4.7 and XCode 7.1.

I've had the same problem. I CHECKED the option "Copy items if needed" and build succeeded.
works for XCode 7.1 , Facebook SDK 4.7.1

Related

AudioKit 4.11.2 Playgrounds: "No such module AudioKitPlaygrounds"

It has been a year since updating so I downloaded AudioKit 4.11.2 yesterday. I built all of the frameworks, including the AudioKit and AudioKitUI xcframeworks.
Then I began playing with the Playgrounds. Right away Xcode tells me the build failed because it can't find the AudioKit frameworks. It appears that the Search Paths that are set in the original project file need tweaking so I set it to "$(inherited)../Frameworks".
Now it builds but still will not run, saying on the import AudioKitPlaygrounds statement that there is No such module AudioKitPlaygrounds.
Odd, because that is the target of the build and it exists in the Derived Data Products folder.
Searching through StackOverflow shows that AudioKit has had similar problems like this in the past but none of the proposed solutions seemed relevant to my situation.
What other tricks are necessary to get the Playgrounds running? Shouldn't it build and run straight out of the box without messing with the project search paths?
My environment is:
macOS 10.15.6
MacBookPro
Xcode 12.0.1
I ran through a similar problem with macOS 10.15.7, XCode 12.1 and AudioKit 4.11.2.
I got the same “No such module AudioKitPlaygrounds” message.
The "Build Active Scheme" option was unchecked in my File Inspector >> Playground Settings, so I checked it, rebuild the "Introduction and Hello World" .playground and it worked.
Edit (04/15/2021): David Thery gave a more complete answer in the following answers.
Also, make sure to:
run 'pod install' + automatically converting to swift5 in XCode
check "Build Active Scheme" as mentioned by Miguel FOR EACH single playgrounds you want to run.
run the playground with the play button in the editor, not the xcode main run button
If you want instead to use AudioKit in another XCode project, only two steps:
download AudioKit and AudioKitUI frameworks from here:
embed them in General > Frameworks, Libraries, and Embedded content, as shown on the screenshot below.
How did you build the frameworks? The assumption when it comes to the paths in other projects (including Playgrounds) is that they have been built via the build_frameworks.sh and build_xcframework.sh scripts in the Frameworks directory.
The end result should be a set of XCFrameworks in that same Frameworks directory, which is in turn referenced by examples and the playgrounds project.
To anyone still experiencing this issue, I just found a really simple solution. I was opening my playground files directly from 'Open Recent'. Problem is, Xcode doesn't automatically look at the parent directory and included files. Just close Xcode and open the AudioKitPlaygrounds.xcodeproj from finder. When you open your playground files from there they should work properly.

SpeechToTextV1 - Missing required modules SSCZLib, SSCommonCrypto

I am working on XCode 9.1 project that uses IBM Watson swift-sdk SpeechToTextV1 package. After upgrading swift-sdk to the version 0.19.0 and building XCode project the compiler error has occured: Missing required modules: 'SSCZLib', 'SSCommonCrypto' pointing to the import SpeechToTextV1 statement. swift-sdk updated via Carthage.
Cartfile content: github "watson-developer-cloud/swift-sdk".
command line update: carthage update --platform ios --no-use-binaries.
How can I include SSCZLib and SSCommonCrypto modules into XCode project?
Please help. Thanks a lot.
Use carthage update --platform iOS --no-use-binaries. It takes a while, but it works.
I'm afraid that I haven't been able to replicate the problem on my machine. I started with a new, empty Xcode project and was able to transcribe audio with the Speech to Text service.
I uploaded my app here. Can you try downloading it, adding your Speech to Text credentials, and running the app?
Please make sure that the newly compiled frameworks are the ones being used. Carthage does not place the frameworks in a custom location that is referenced in the project or workspace.
For me - in addition to building the library using --no-use-binaries flag - I also had to ensure that under my target's
Build Phases->Embed Frameworks
Build Phases->Link Binary with Libraries
SpeechToTextV1.framework is included
In addition - I found that these two files made all the difference inside the Carthage folder:
Carthage/Checkouts/ios-sdk/Source/SupportingFiles/Dependencies/Starscream/zlib/include.h
Carthage/Checkouts/ios-sdk/Source/SupportingFiles/Dependencies/Starscream/zlib/module.modulemap
I could only get this to work after my project was directly referencing the Carthage folder. Deleting either of these two files caused the error to return.
The v0.21.0 release of the Watson Swift SDK fixes this issue. You should no longer have to add a link to the zlib folder in your project settings. However, you will need to copy Starscream.framework into your application in the same way that other frameworks are copied.
The solution was to externalize the Starscream dependency. Adding Starscream as a recursive dependency for the Swift SDK allows it to build independently with its own environment. When the Starscream library is copied into your application, it should automatically include the SSCZLib and SSCommonCrypto dependencies.
We test each SDK before it's release, but this problem slipped past us. Our test machine happens to have other software that adds SSCZLib and SSCommonCrypto to the path, making it available to the Xcode build. It wasn't until we refreshed the machine with a new macOS install that we were able to replicate the problem. And with v0.21.0, that problem has been solved.
Sorry for your trouble and thank you for your patience while we tracked down the solution!

Error importing framework in Playground

I’m following the instructions for Importing Custom Frameworks into Playground, but I still keep getting "No such module” error.
I have tried adding everything in the workspace; a project with just Framework target, project of Cocoa Application with the framework, and just the Framework. I also tried creating a playground in the Application where I imported the framework, I can even import it in other swift file without any problem; but I can’t seem to be able to import it in playground.
Can someone please tell me what I might be doing wrong?
Try building your framework target using a simulator! I had only built mine using the generic device which doesn't work for playgrounds!
Did you ever get it to work? I figured out my issue. The code I was trying to import wasn't in a Framework Target. I had to add a new target to my project of type Cocoa Framework. Then include my source files in that framework, and then finally build that target. Then it worked.
I would like to echo what Reid said:
Try building your framework target using a simulator! I had only built mine using the generic device which doesn't work for playgrounds!
If you've updated to Xcode 12, you also need to make the "Build Active Scheme" box is checked. Select your playground and go to the inspector. The checkbox will be under "Playground Settings"
I've spent for this more than 4 hours. But i've solved it for XCode 10.
You're unable to add any framework into the Playground if there's no target for it the Workspace where the Playground is. So as you using downloaded framework (so am i) — you're doomed to fail with it.
The workable manual could be found here (God bless this guy): https://www.pardel.dev/blog/3rd-party-frameworks-in-xcode-playgrounds
tldr: the easiest way is to:
Download 3rd party framework sources.
Open *.xcodeproj
Add Playground to the Project.
Build project for any iOS simulator by cmd+b (have no idea how to use any macOS frameworks yet).
And it should work (at least it does for me).
I solved my problem with a different solution than Michael Welch's. I had my Xcode derived data setting different than original. Go to Preferences > Locations > Derived Data > Advanced and select Unique. This solved the framework not appearing in playground problem for me.

Problems with Moarfonts after updating to XCode 6

I encountered a problem with Moarfonts (site) after upgrading from XCode 5.1 to XCode 6.
The build phase of a project fails showing the following error:
moarfonts[4477:507] *** Assertion failure in -[FontCache initWithSDKRootURL:], /Users/0xced/Projects/MoarFonts/moarfonts/FontCache.m:33
error: Font cache directory not found
I tried the troubleshooting from the author of that plugin (from the site of the plugin), but no luck!
Has anyone found and solved this problem? Thank you in advance.
After digging up a little bit (nothing to do, unluckly), I've found this link while looking for the hashtag #moarfonts on Twitter.
That link shows the content of a bash script, and inside that there is the following directory path:
$SDKROOT/System/Library/.lilid/.lilic
With this link, I've looked for the value of SDKROOT (following example from troubleshooting guide from plugin's site), and it appears that it has to be equals to the location of iOS8 SDK.
Looking for that directory path ($SDKROOT/System/Library/.lilid/.lilic) gave no result. So I looked for it inside the previously used SDK directory (iOS 7.1 for me, from folder /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk), and there I found the directory System/Library/.lilid/.lilic).
At that point, the solution was to copy the folder .lilid from the iOS 7.1 SDK folder to iOS 8 SDK folder (inside System/Library, i.e.: maintaining folder structure).
After that, I could build my project with no other problems.
Hope this helps.

libxml/xmlwriter.h not found in XCode4.6.1

I have integrated LinkedIn library for an iOS app [https://github.com/ResultsDirect/LinkedIn-iPhone/]which builds fine in Xcode 4.5.1 for iOS 6.0,..but when I use Xcode 4.6.1 build fails saying libxml/xmlwriter.h not found
I've added libxml2.dylib as library and /usr/include/libxml2 to the header paths.Still
the error persists.
Can anyone please help me in this. Thanks in Advance.
Did you add ${SDKROOT}/usr/include/libxml2 to your Header search path in Build Settings?

Resources