quran / quran-ios

QuranEngine is the engine powering the Quran.com iOS app.
Apache License 2.0
462 stars 160 forks source link

I have a problem #223

Closed alisalsalem88 closed 6 years ago

alisalsalem88 commented 6 years ago
public init<InteractorType: Interactor>(_ interactor: InteractorType)
    where InteractorType.Input ==Void, InteractorType.Output == Output {
        executeClosure = interactor.execute
} 

Text clarification :: Cannot assign value of type '(Void) -> Promise' to type '() -> Promise'

What is the solution and all thanks to you

mohamede1945 commented 6 years ago

Which version of Xcode are you using?

alisalsalem88 commented 6 years ago

Xcode 9

mohamede1945 commented 6 years ago

Try using Xcode 9.2

alisalsalem88 commented 6 years ago

updated Xcode 9.3 The same problem Attachment Picture https://i.imgur.com/A6nHWfY.png

mohamede1945 commented 6 years ago

That's extremely weird. I'm using Xcode 9.2 and I'm able to successfully build the project. I'm redownloading the project and try to see if I will be able to build it again.

mohamede1945 commented 6 years ago

I just redownloaded the repo and tried to build it and built with no errors. So, try to revert any changes you have made (or re-download it) and see if it works for you.

nayabraheel commented 6 years ago

i am getting the same error in PromiseKit, my Xcode version is 9.3

mohamede1945 commented 6 years ago

So you're compiling PromiseKit alone or within the app?

nayabraheel commented 6 years ago

Within the app, screenshot is attached.

screenshot 2018-04-05 10 14 56

mohamede1945 commented 6 years ago

I see. But unfortunately, I don't know how I can solve these issues if I'm not able to face them (which is weird because I downloaded the code and compiled it). If you can fix the issue, PRs are welcome.

pathegs commented 6 years ago

I have the same problem using Xcode version is 9.3 I have an online Mac if you can check on this @mohamede1945 If you can, I will the send you the login info

mohamede1945 commented 6 years ago

Thanks @pathegs for the suggestion. But I'm right now focusing on implementing those features.

It seems to be a simple compilation issue. Pull requests are very welcome.

alisalsalem88 commented 6 years ago

I also have the same problem and what is the solution

alisalsalem88 commented 6 years ago
screen shot 2018-04-04 at 12 52 16 am
pathegs commented 6 years ago

Please how to fix that compilation issue @mohamede1945 ?

nayabraheel commented 6 years ago

I tested it on Xcode 9.2 with swift 4.0 and its running now.

mohamede1945 commented 6 years ago

Great to see you @nayabraheel have it running 👍

mohamede1945 commented 6 years ago

@pathegs I don't know how to fix it, sorry. Just google it and I think you will find many solutions.

pathegs commented 6 years ago

It works fine with Xcode 9.2 with swift 4.0

mumer92 commented 6 years ago

Salaam, @mohamede1945

I am reporting that this issue exists with the Xcode 9.3 and Swift 4.1. My Xcode updated to 9.3 in background. When I tried to build this issue arises. I have cloned project locally and in progress to update. So far, I have successfully updated PromiseKit and PromiseKit is now on release build 6. Now the issue is with frameworkQuranFoundation.framework as it was build with Swift 4.0.3 as reported by Xcode. I am available to update project, however you like.

mohamede1945 commented 6 years ago

Thanks, @mumer92 for taking the time to do that. I will try to download Xcode 9.3 and build this framework and provide it as soon as possible.

mohamede1945 commented 6 years ago

https://github.com/quran/quran-ios/pull/236 should resolve this issue

mohamede1945 commented 6 years ago

Sorry for taking too long to resolve this, since I was very busy at work and implementing the playback functionality and I got sick last week the whole week.

mumer92 commented 6 years ago

@mohamede1945 May Allah bless you with good health.

As I wrote before, PromiseKit is now at version 6, PromieKit migration, I have updated it locally but it has code breaking api changes, what do you suggest, update pods in next version or should I open a PR? I have updated locally.

mohamede1945 commented 6 years ago

@mumer92 Jazak Allah Khyran :)

If you have the changes for updating the PromiseKit pod. Feel free to open a PR.

mumer92 commented 6 years ago

Seems like DispatchQueue.default has been removed. It has been referenced many time in project. Sometime it looks like in global queue or sometimes it looks like main queue. I think we should not update pod of PromiseKit. We can look it sometime after with thorough review.

mohamede1945 commented 6 years ago

Yeah sure, no problem