0

I'm a big noob when it comes to Swift and Xcode. I'm making an app and I want to utilize Chameleon Framework in it. The instructions in the Chameleon GitHub are sparse but they say that if I'm not using Carthage or CocoaPod (my case) I need to manually copy the Chameleon folder to my project. I proceed to do that successfully.

Then it says I must copy an extra file too, called "ChameleonShorthand.swift" and I proceed to copy it.

Then, to initialize the framework, I'm supposed to import them on each of my View Controllers.

I try doing that, but no matter which way I try to syntax it, errors occur. When I import, it says "there is no such module" or "expected expression"! Plus when I try building the program lots of errors appear in that extra file I had to put (read the tutorial I hyperlinked)!

Errors that appear

What exactly should I do? Do I have to create a Bridging Header? Can you explain to me like I'm 5 years old?

ps: unfortunately I can't add more images, I wanted to show thoroughly to you guys where I put the files and how I typed the imports.

Matt
  • 3,052
  • 1
  • 17
  • 30
Fraga500
  • 1
  • 1

1 Answers1

1

I would highly recommend installing CocoaPods. It will make your life so much easier moving forward.

How to install cocoa pods?

Anyways!

In swift, all you need to type is:

import Chameleon

which will import the whole folder. no quotes or # or .h That should get rid of some or all your errors.

Community
  • 1
  • 1
David Park
  • 325
  • 2
  • 11
  • Does CocoaPods add the needed frameworks to a project? Because I plan to use and test the app on other devices, and I don't want to tell those people that they need to install CocoaPods/Chameleon Framework lol – Fraga500 Sep 06 '16 at 13:16
  • If you are sending other people your code to run on their xcode then yes they do need to install the pods. All they need to do is type pod install in their terminal since the Podfile will already be saved with all the neccessary pods. If you don't want to use CocoaPods you can just drag and drop everything into your project like you are doing but make sure everything is in the same folder and that you are importing correctly – David Park Sep 06 '16 at 17:44