SocketIO manual installation for iOS app swift 4 xcode 9 - ios

I am having difficulty installing SocketIO for my Swift 4/Xcode 9 app. I have tried Swift Package Manager and Carthage and both did not work. Separate threads for those issues. I do not want to use Cocoapods.
Is there a way to manually install the libraries? I can drag and drop the Source files successfully however I don't know how to add the SocketIO and Starscream frameworks from the Git downloaded files. I can figure out how to link the binaries and that stuff myself, just want to know where I can physically extract the two frameworks from in the downloaded file.

Did you check in your project folder, the Carthage folder then Build folder then iOS folder and same with the Checkout folder?

Related

How to import external iOS framework in flutter plugin?

I'm doing a flutter plugin for stream video by using RTSP protocol. I had no problem develop it for Android, but in iOS things are more complex. I have to use an external library (SGPlayer) for getting the player work. I also downloaded the demo that uses this library and seems to work. This library is NOT on Cocoapods and I need to import it directly into the plugin project from my file system. the downloaded and compiled file structure of the plugin that I would like to use looks like this:
My problem is adding the ".framework" extension file correctly to the iOS project in a way that I can use it to develop the flutter plugin (iOS part).
UPDATE:
I built the project with the framework by using instructions at this link: https://github.com/flutter/flutter/issues/17978
The problem now is that while compiling the framework it change the umbrella header because, I think, it's not using the framework module.modulemap but another one. The result is that is importing just some header and implementations, and not all.
1.Place myFramework.framework to iOS plugin folder /ios ex: myPlugin/ios
2.Update iOS plugin file: myPlugin/ios/myPlugin.podspec
Adding the below line at the bottom of the file, above 'end'
s.vendored_frameworks = 'myFramework.framework'
In Terminal : cd to myPlugin/example/ios
run command
pod install
or
pod update
Now we can find the iOS plugin code by open iOS project (example/ios/Runner.xcworkspace) in XCode and go to
#Lorenzo you can pack your plugin and make private CocoaPod or Carthage repo.
Here is a good article howtos

Is it possible to distribute binary ios framework using carthage

Please bear with me because I spent considerable amount of time on this. I am also relatively a beginner with swift and iOS.
What I did
- built a framework using cocoa touch
- clean, build and it succeeds without a problem.
- made the scheme shared
- did carthage build --no-skip-current
- did carthage archive
- copied only the zip file to a fresh new directory and uploaded with release in git.
- In a different project tried to pull the framework using carthage
and I get the error Dependency "xxx-ios" has no shared framework schemes then I copied the scheme directly and pushed it in the git along the zip. nothing. Tried without the zip together with the scheme. nothing.
Then I created a fresh framework and I did carthage build --no-skip-current and I uploaded the whole thing in the project folder to git. That pulls properly with carthage. Then I removed some part of that folder so that the scheme inside .xcodeproj and the carthage build folder remain, then I get a different error. At this point it got me thinking if carthage does support binary framework distribution.
In my company, they want it so that I don't expose the code - so I am trying to distribute built binary of the framework.
I would really appreciate any help or guides of what different things I could try to single out the problem. Thanks.
Edit
someone had almost exactly the same issue as mine in their issues here but a couple of conversations later it is closed without a solution.
It sounds like you're using a github dependency in your Cartfile and attaching a binary of your framework to the GitHub Release. But you don't have any code in the repository, so Carthage is complaining because it can't actually build it.
That's as designed—Carthage doesn't support distributing binary-only frameworks that way. Binaries attached to GitHub Releases are only meant as a way to speed up builds.
However, Carthage does have a mechanism for binary-only dependencies: binary dependencies.

Xcode showing error 'No such module' even though I've installed Cocoapods and installed pod file of Dialogflow

I've been making a chatbot using Dialogflow formerly Api.AI but now encountering error while integrating the project to my app written in Swift in Xcode. I'd installed cocoapods using terminal "sudo gem install cocoapods" and using this version of Dialogflow to create the podfile.
All gone well but now when I'm importing inside Xcode in my app's AppDelegate.swift file using import ApiAI or import AI Xcode is showing me error that No such module. Please refer to image.
And on GitHub this library which is written in Swift, showing that it has depreciated and asking me to refer to API.AI's Apple Client library which is in Obj-C and unfortunately I've no expertise in Obj-C.
After installing a pod using Cocoa Pods, you must from that point forward open the workspace rather that the project file. The icons will appear differently in your project like so:
In the image you provided is clearly showing that you have opened the project file not the workspace one.
Go to Pods Build settings and set Build Active Architecture Only to NO. This always helps while using pods. After that clean the project once and then build.
After installing pod you should clean project (shift + command + k) and then builds (command + b) in it a few times. Repeat it a few times if it is not still working.
Hope this help!

iOS : How to generate a .framework file from a GitHub project

There is a Swift project on GitHub that I want to include in my iOS app.
In my iOS app, I use Carthage. But the GitHub project is not compatible with Carthage (only with Cocoapods), so I need to include the .framework file in my project manually.
How can I generate the .framework file without Carthage?
Building the framework is not always the same across projects. That being said, there should be a target available when you open the project to make the framework build. It should look something like this.
After clicking run the framework is usually output to the products directory.
If this doesn't work for you with this project then maybe you could share a link to the github page for the project and I could provide more instruction.
Fork Project
Change scheme to shared in scheme management (more information on Carthage docs)
Add your fork to your Cartfile
You can stop here but I highly recommend do this after:
Update README with information about Carthage support
Make a pull request

Echoprint iOS Missing Framework

Has anyone downloaded the demo iOS version of EchoPrint? It's an audio fingerprinting open source software.
I just downloaded it but it appears to missing framework... any place to get a functioning version?
Follow the steps to get it the framework running
Download latest version of boost . The download link for latest 1.51.0 for boost library
Extract the boost_1_51_0.tar.gz file.
Download the project for generation of libechoprint-codegen-ios.a famework from here
Open the project and set the Header Search Path as the path of the extracted boost folder. e.g. in my case the below is the path
/Users/$(USER)/Downloads/boost_1_51_0/boost_1_51_0
Open the echoprint-codegen-ios.xcconfig file and add the same path in the HEADER_SEARCH_PATHS
Now clean and build the project would give you libechoprint-codegen-ios.a under Products folder
Now download the Echoprint iOS Sample
Building this project would give you Errors as the files of ASIHTTP folder and the libechoprint-codegen-ios.a framework is missing are not added to the xcode project but are physically present in the project Folder.
Delete this folder from the project and drag-drop the physical folder to the xcode project. Also delete and add only the libechoprint-codegen-ios.a framework to this project from the previously compiled project.
Now you are ready with an error-free code.
Update for people who are still interested in this and are using XCode 5 + iOS 7 + LLVM 5.0.
I have forked the sample repo, upgraded it to XCode 5+ iOS 7 and modified it to automatically build in the echoprint-codegen dependency as a sub-project: https://github.com/rexstjohn/echoprint-ios-sample.
The above instructions will no longer work for the latest XCode + iOS.

Resources