Giter Site home page Giter Site logo

Comments (31)

lamatat avatar lamatat commented on September 24, 2024

any news about this? @MoathOthman

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

from molh.

lamatat avatar lamatat commented on September 24, 2024

yes i did tried it .. i will try doing that and let you know ..

from molh.

lamatat avatar lamatat commented on September 24, 2024

i just tried but didn't know how to do it x_x
but i think this happened when i used MOLHLanguage.isArabic()

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

from molh.

lamatat avatar lamatat commented on September 24, 2024

got same error ...

trie to comment them all .. and worked without errors .. so the problem is really from MOLHLanguage.isArabic() and MOLHLanguage.isRTL()

but i need to know if its arabic or not so i need to use one of them :(

if you please can help me solve this

thanks in advance!

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

from molh.

lamatat avatar lamatat commented on September 24, 2024

just two .. english and arabic

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

can you replace the function with this
/// get current Apple language
public class func currentAppleLanguage() -> String {
let userdef = UserDefaults.standard
let langArray = userdef.object(forKey: APPLE_LANGUAGE_KEY) as! NSArray
let current = langArray.firstObject as! String
let currentWithoutLocale = current.substring(to: current.index(current.startIndex, offsetBy: 2))
return currentWithoutLocale
}

from molh.

lamatat avatar lamatat commented on September 24, 2024

screen shot 2018-05-30 at 3 25 48 pm

got the same error in next function ...

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

from molh.

lamatat avatar lamatat commented on September 24, 2024

you mean just to do pod update?
or do you have a version number to add in podfile?
sorry i didn't really get what do you mean x_x

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

@lamatat you can use pod 'MOLH',:git => 'https://github.com/MoathOthman/MOLH.git'

from molh.

lamatat avatar lamatat commented on September 24, 2024

i got this [!] Unable to find a specification for 'MOLH'.

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

@lamatat

i got this [!] Unable to find a specification for 'MOLH'.

its fixed now , thanx for pointing it out. please try again.

from molh.

lamatat avatar lamatat commented on September 24, 2024

am getting the same error even after updating the pod

screen shot 2018-05-31 at 11 32 19 am

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

@lamatat can you debug it , print the result of userdef.object(forkey: ....)

from molh.

lamatat avatar lamatat commented on September 24, 2024

got this:
Optional(<__NSSingleObjectArrayI 0x125d6bd70>(
ar
)
)
before crashing...

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

NSSingleObjectArray!, interesting , I think you have only one language for the device which is arabic, right? , if you go to settings app -> general -> languages , you should see one language, right?

from molh.

lamatat avatar lamatat commented on September 24, 2024

no there's 2 .. english and arabic

from molh.

lamatat avatar lamatat commented on September 24, 2024

sorry i was running the app with arabic language x_x
now changed it to system language and got this:
Optional(<__NSCFArray 0x13de224a0>(
ar,
en
)
)

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

@lamatat do you still get the crash then?

from molh.

lamatat avatar lamatat commented on September 24, 2024

yes i do
same crash as the screenshot above

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

mmmm, thats really weird. is there any environment factors you have, did you try it on device while not in debug mode?
I updated the code to swift 4 , can you pod install again and try?

from molh.

lamatat avatar lamatat commented on September 24, 2024

same :(
please help me solve this T_T

from molh.

lamatat avatar lamatat commented on September 24, 2024

found out something ...
this is only happens when used in: class TextField: UITextField for example...
any idea?

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

@lamatat since textfield functionality is not that perfect,
comment out the line where its swizzled ..
swizzle(class:UITextField.self, sel: #selector(UITextField.layoutSubviews), override: #selector(UITextField.cstmlayoutSubviews))

from molh.

lamatat avatar lamatat commented on September 24, 2024

just found something ...
this has nothing to do with your library ...
because i have tried:
let pre = Locale.preferredLanguages.first
if pre == "ar"{
......
}
and got the same error! which is really wired!

sorry for all the trouble but it has nothing to do with your awesome library :)
i have another question i will open new issue if you please can check it out .. thanks

from molh.

MoathOthman avatar MoathOthman commented on September 24, 2024

from molh.

lamatat avatar lamatat commented on September 24, 2024

sure.. thanks you :)!

from molh.

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.