Unable to import module SWXMLHash - ios

Running Xcode 9.3
I cloned the repo, opened the workspace and let the playground run.
I got an error:
No such module 'SWXMLHash'
So I closed down everything and ran again on the simulator. Received the same error.
I then tried bringing the framework into an existing project as a cocoapod. Again I was met with
No such module 'SWXMLHash'

Related

Xcode Swift Parse Framework Installation Issue (Command PhaseScriptExecution failed)

I'm having lots of trouble installing the 'Parse' Cocoapod library/framework on Xcode. (version 10.3)
What I did:
After initializing a podfile with "pod init", and adding "pod 'Parse'" into the file, I ran "pod install" from terminal and integrated the pod into Xcode. There are no compiler errors and the pod library is showing up and looking fine with autocomplete working on it as well
The issue:
Upon trying to run the app, it gives me an error:
Command PhaseScriptExecution failed with a nonzero exit code
More specifically, it gives me:
[filepath].../Pods-Real Estate App-frameworks.sh: eval: line 131: unexpected EOF while looking for matching `''
Things I've tried already:
Completely reinstalling and reintegrating pods
Restarting Xcode
Restarting my computer
Unlocking and relocking the login keychain
I tried installing pods and bolts just by downloading the framework files but they generated different errors (I think because the two frameworks weren't linked together properly doing it that way? I couldn't figure out how to fix that either)
Weird solution that I don't even know how I came across:
The issue was that a directory that contained my project had an apostrophe in it. I fixed it by renaming the directory, and then deleting the derived data folder in my project, cleaning the project and then running it.

Error encountered while reading from module 'RealmSwift'

Summary: Swift allows me to import RealmSwift, but it doesn't allow me to create a new instance of the Realm class (or type any code using Realm keywords). I don't have any other code because this is a brand new project.
Steps to Reproduce:
1. Make a new Xcode project
2. In Terminal, cd to the project and type 'pod init'
3. Open the Podfile and add the pod 'RealmSwift'
4. Open the Xcode project's workspace and go to the AppDelegate file
5. Import 'RealmSwift'
6. Make a new variable and make it an instance of the Realm class
Expected Results: The program runs and lets me make a new instance of the Realm class.
Actual Results: The program crashes with the following errors:
Command failed due to signal: Abort trap: 6" & "error: fatal error
encountered while reading from module 'RealmSwift'.
Also, at the top of the file where I wrote the code using Realm keywords, it says:
An Internal error occurred. Source editor functionality is limited. Attempting to restore...
This is a Swift Compiler Error btw
Version/Build:
Realm version: 3.7.4
Xcode version: 4.1
Swift version: 4.1
configuration: MacBook Pro running macOS High Sierra
Have you considered using a Dynamic Framework instead? I did use CocoaPods in the past but using a dynamic framework simplifies the process. Download the frameworks from here:
https://realm.io/docs/swift/latest#installation
And follow the instructions:
After you've dragged the framework into your project, it looks like so:
Now, the hurdle is that since this is not done through pod files, you cannot automatically update the Realm version. This you will have to do manually by downloading the newest version of the framework from time to time.
If you use Xcode packages, you can replace "Up to next major" by the exact version of the package (10.19.0 in my case)

Import Alamofire using manual installation is not working in iOS swift 3.0 project

I have followed whole procedure to import Alamofire using this link
which includes command line as
$ git init
$ git submodule add https://github.com/Alamofire/AlamofireImage.git
Then I:
dragged - drag the AlamofireImage.xcodeproj in project navigator
checked deployment target of alamofire project and my application project
added AlamofireImage.xcodeproj for iOS in General tab under embedded binaries.
All seems to be working fine and Alamofire framework got added successfully in target dependency, linked framework and embedded framework in a copy files build phase.
But when I tried to import with import AlamofireImage it gives error: "No such module AlamofireImage"
Please suggest me what I have missed in installation

Using Swift3 Package Manager with Xcode 8 with no luck

I'm trying to integrate swift package manager in my project, but with no luck. The iOS simulator crashes at startup.
Here are the steps that I followed in order to integrate the package manager:
open xcode and create a new xcodeproject: testcpackage
from the terminal I've run the command:
swift package init to create the Package.swift file
swift package generate-xcodeproj
swift build
swift test - everything seems to be ok
open the new generated file testpackage.xcodeproj in xcode
run the application (cmd+R): build succeeded
first error given by the iOS simulator: Could not attach to pid : “9207”
I close the iOS simulator and I run the project again when I get the 2nd error:
No installable items found at /Users/xxxxxx/Library/Developer/CoreSimulator/Devices/555xxx14-xxx-xx-8E6E-C13D5AB463A0/data/Library/Caches/com.apple.mobile.installd.staging/temp.rA1vGO/extracted/Payload
Could you please help me to solve this issue?
I use the following method to get packages to work in iOS. That being said, I'm not sure if this is the "best" way to do this:
Make starting Package.swift file
swift package generate-xcodeproj
Open project in Xcode
Project : Build Settings : Base SDK ==> change to IOS
Editor : Add Target : (iOS ... Single View App)
Select your project, look at target list, find your newly added target : General : Deployment Info
On toolbar, change "active scheme" to the new target
Run
It has worked for me in the past. However, I have had to fix search paths. I'm currently suffering from that problem here: Xcode: missing required module error
Good luck

XCode 8 , Swift 2.3 returns error Could not build module

After I updated to XCode 8 and we are trying to move to Swift 2.3 and I try to compile and build my project but there are few errors. I managed to get every other library working, only PubNub is unable to compile.
I Googled and try different solutions, nothing is working. I can build project from GitHub's test project
https://github.com/pubnub/SwiftExample
Errors are:
pleasurreApp/AppDelegate/AppDelegate.swift:14:8: Could not build Objective-C module 'PubNub'
Pods/PubNub/PubNub/Core/PubNub+CorePrivate.h:1:9: 'PubNub+Core.h' file not found
Please run pod update from your project's root directory (or where Podfile is stored). Current PubNub SDK version is 4.5.3.
Quit Xcode and delete DerivedData folder. After relaunch build should complete well.
Best regards,
Sergey

Resources