Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing issuse #6

Open
tqhuy1811 opened this issue Nov 15, 2017 · 19 comments
Open

Installing issuse #6

tqhuy1811 opened this issue Nov 15, 2017 · 19 comments

Comments

@tqhuy1811
Copy link

Hi Christopher,

I tried to install your framework and encountered this problem after launching my project.

Could not build Objective-C module 'Alamofire'

@chrisdhaan
Copy link
Owner

@tqhuy1811 there isn't enough information here for me to properly assist you. Can you fill out the information below:

CDYelpFusionKit Environment

CDYelpFusionKit version:
Xcode version:
Swift version:
Platform(s) running CDYelpFusionKit:
macOS version running Xcode:

and in the future follow the template when submitting an issue?

@tqhuy1811
Copy link
Author

tqhuy1811 commented Nov 15, 2017

I am sorry, I am kinda new to Github

CDYelpFusionKit version: 1.2.0
Xcode version: 9.0
Swift version: 4.0
Platform(s) running CDYelpFusionKit: Cocaopod
macOS version running Xcode: 10.13

I tried to creat a "bridging header file" for Alamofire framework but the result is still the same
I also tried to build Alamofire scheme first and clean my project but nothing changed

@chrisdhaan
Copy link
Owner

Does your project also support objective-c? I don't know why a bridging header file would be needed. I'm able to install the framework just fine via CocoaPods on my laptop. Do you have a link to your project you are comfortable sharing?

@tqhuy1811
Copy link
Author

My project is purely in swift. Sure, it's just a little school project
https://github.com/MonicaTran/hobby-quest/commits/master

@chrisdhaan
Copy link
Owner

Awesome! Thanks. The GitHub link will really help. I'll hopefully have a solution for you within the next 24 hours.

@umerk12345
Copy link

I tried running your IOS example but I too kept getting errors
screen shot 2017-11-16 at 9 44 29 am

@chrisdhaan
Copy link
Owner

chrisdhaan commented Nov 16, 2017

@umerk12345 can you fill out the following information:

CDYelpFusionKit Environment

CDYelpFusionKit version:
Xcode version:
Swift version:
Platform(s) running CDYelpFusionKit:
macOS version running Xcode:

Based on the image it looks like the macOS and watchOS targets were installed which haven't been released in an official version yet which has me thinking you're possibly on a pre-release version. What dependency manager did you use to install it?

@chrisdhaan
Copy link
Owner

@tqhuy1811 please add the following lines of code to the bottom of your Podfile:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'CDYelpFusionKit' || target.name == 'ObjectMapper' || target.name == 'Alamofire' || target.name == 'AlamofireObjectMapper'
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '3.0'
            end
        end
    end
end

I was able to use this to successfully buildi CDYelpFusionKit and use it in your project. @umerk12345 try this solution if you were using CocoaPods as your dependency manager.

I will be releasing a new version of CDYelpFusionKit 2.0.0 built with Swift 4 by the end of the week. At that point this code won't be needed anymore. I'll keep this issue open until then.

@umerk12345
Copy link

It works for me now! Thank you

@tqhuy1811
Copy link
Author

@chrisdhaan It works for me too ! Thank you!

@tqhuy1811
Copy link
Author

tqhuy1811 commented Nov 16, 2017

@chrisdhaan A new problem occured
, when I tried to "import CDYelpFusionKit", it keeps saying that "no such module exists" I tried to all of these solutions here https://stackoverflow.com/questions/29500227/getting-error-no-such-module-using-xcode-but-the-framework-is-there , none of them work for me

@chrisdhaan
Copy link
Owner

chrisdhaan commented Nov 16, 2017

@tqhuy1811 I would not attempt any of the solution in that StackOverflow as they aren't related to CocoaPods. Did you try cleaning before building? I installed the framework using the code above in your project and was able to use import CDYelpFusionKit just fine.

@tqhuy1811
Copy link
Author

Yes I cleaned everything but the problem still persist. I was able to get it to work by restarting my computer. Thank you anyway!

@chrisdhaan
Copy link
Owner

@tqhuy1811 and @umerk12345 I've released 1.4.0 which is built with Swift 4 in mind. You can trying installing that version without the code I posted previously for the Podfile.

@tqhuy1811
Copy link
Author

I just tried that and then this happened
screen shot 2017-11-21 at 02 10 30

@chrisdhaan
Copy link
Owner

@tqhuy1811 did you try cleaning and building? That is generally needed with dependency manager updates. Is your project still available on GitHub? I can always try pulling it to see what the problem is. Both I and have other users of CDYelpFusionKit have been able to install 1.4.0 and get it running.

@tqhuy1811
Copy link
Author

Yeah, I tried that but nothing change and my project is still available

@JB184351
Copy link

JB184351 commented Mar 25, 2019

Has there been an update on this? I am trying to use Yelp API for a simple application that will allow users to find Bowling Locations and mostly doing this to learn basic iOS development. I also have an issue when trying to import CDYelpFusionKit

@JB184351
Copy link

JB184351 commented Mar 27, 2019

Update: I was able to get it to work I think I didn't quite follow directions quite right or just looked at a different set of instructions when installing via CocoaPods and all that I did was this

pod 'CDYelpFusionKit', '1.5.1'
target 'PROJECT_NAME_GOES_HERE'

Before I only had pod 'YelpAPI' so if your having issues with the 'import CDYelpFusionKit' this may help you.

Just kidding I didn't have any errors because I opened my project in the .xcworksapce file instead of the .xcproj and now I unable to import CDYelpFusionKit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants