Code Monkey home page Code Monkey logo

Comments (21)

mattt avatar mattt commented on May 22, 2024 2

Thanks, @angelcasado.

from alamofire.

luketheobscure avatar luketheobscure commented on May 22, 2024 2

@Isuru-Nanayakkara I just spent an embarrassing amount of time trying to get things working as a framework...finally realized that I didn't add "import Alamofire" into my Swift classes.

from alamofire.

db0company avatar db0company commented on May 22, 2024 1

I don't get how you're supposed to use it as a framework?
I added several .framework dependencies in my project and it worked fine, but the README here calls for a .xcodeproj file. Dragging it didn't make it work. Any idea?
In the meantime I just added the source file and remove the Alamofire. in my sources.

from alamofire.

dltlr avatar dltlr commented on May 22, 2024

If you look at the code change the AlamoFire struct was removed, so if you were using AlamoFire.request just use "request".

from alamofire.

macu avatar macu commented on May 22, 2024

Looks like we're going to have to include Alamofire in our projects as a framework. I downloaded the ZIP and tried adding the Alamofire framework in "linked frameworks and libraries" and "target dependencies" but the linker is failing. Not sure if there's an official plan for Swift Cocoapods but I hope so. Instructions for including the framework would be helpful in the meantime.

from alamofire.

marcopompei avatar marcopompei commented on May 22, 2024

Frameworks are only available in iOS 8, right? So to use Alamofire like we used until now (Alamofire.request()) we'd need to require iOS 8.

from alamofire.

mattt avatar mattt commented on May 22, 2024

The example project is built with Alamofire as a framework. You can use that as a reference if you need more clarification on installation.

from alamofire.

angelcasado avatar angelcasado commented on May 22, 2024

In case anyone hasn't figured it out yet. Once you drag the Alamofire.xcodeproj into your project go to your project target >> "Build Phases" under "Target Dependencies" press + and add the framework.

screen shot 2014-08-27 at 4 05 54 pm

As for supporting iOS 7; I found it easy to change Alamofire's "Deployment Target" to iOS 7. I haven't really found a bug in doing this yet. This may be the cause of some errors if your project deploys with iOS 7.

screen shot 2014-08-27 at 4 05 59 pm

from alamofire.

Isuru-Nanayakkara avatar Isuru-Nanayakkara commented on May 22, 2024

@angelcasado I dragged and dropped the Alamofire.xcodeproj to my project, added the framework as a Target Dependency but still it doesn't work. And here's the kicker! When I build it, it fails without an error!

screen shot 2014-09-02 at 2 28 11 pm
I have no idea why Alamorefire.framework is showing in red either.

@mattt Is adding it as a framework the only option to add Alamofire to a project? Can't we just add the file like it used to be anymore?

from alamofire.

Isuru-Nanayakkara avatar Isuru-Nanayakkara commented on May 22, 2024

@luketheobscure Thanks, Luke. I finally managed to integrate it successfully.

from alamofire.

pketh avatar pketh commented on May 22, 2024

Thanks @angelcasado, @luketheobscure !

from alamofire.

mogocat avatar mogocat commented on May 22, 2024

@luketheobscure Thanks, you are a life saver!

from alamofire.

ackleymi avatar ackleymi commented on May 22, 2024

@luketheobscure @mattt forgot to import Alamofire into my class. face palm

from alamofire.

mattcantstop avatar mattcantstop commented on May 22, 2024

I am getting the same error. I followed all the steps but I was not sure about this step, I probably did something wrong because I don't see this "Targets" option in the side nav:

In Xcode, navigate to the target configuration window by clicking on the blue project icon, and selecting the application target under the "Targets" heading in the sidebar.

I do not see the "Targets" heading in the sidebar. Where is this?

The attached screenshot is what it currently looks like. You can see the framework is red, which to me implies that there was a build problem for the framework.

screen shot 2014-10-08 at 8 32 58 am

from alamofire.

Isuru-Nanayakkara avatar Isuru-Nanayakkara commented on May 22, 2024

@mattcantstop You need to add the Alamofire.framework to the Target Dependencies, not Link Binary with Libraries,.

from alamofire.

mattcantstop avatar mattcantstop commented on May 22, 2024

Ah, thanks. Overlooked that this go round.

from alamofire.

adooylabs avatar adooylabs commented on May 22, 2024

@Isuru-Nanayakkara - 👍 Adding to Target Dependencies fixed it, Thanks! And step 6 on the read me should be changed.

from alamofire.

mattcantstop avatar mattcantstop commented on May 22, 2024

I just assumed I misread it @adooylabs. I can submit a pull request to make that change if people want.

from alamofire.

adooylabs avatar adooylabs commented on May 22, 2024

@mattcantstop - Sounds like a good idea. 👍

from alamofire.

johngoren avatar johngoren commented on May 22, 2024

In my case, if this helps anyone, I found myself with Alamofire added in both places, Target Dependencies and Link Binaries With Libraries. And the error only went away once I removed it from Link Binary.

from alamofire.

truq avatar truq commented on May 22, 2024

Great angelcassado

from alamofire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.