« first day (2107 days earlier)      last day (1876 days later) » 

04:52
morning
Good Morning
How are you?
Good Morning all
@Shubhank good morning bro
@RobinHood good morning bro
05:30
good
you tell Robin
Hello
I want to set my bedge count zero but do not want to clear notifications is that possible in ios
have you checked if setting badge number 0 clears the notifications
@Shubhank I'm also good
wassup these days
bro how to validate mobile numbers @Shubhank
search, lots of solution on it for ios already on stackoverflow
bro i check but its not working
can i share code if u want
06:05
sure
var isPhoneNumber: Bool {

do { let detector = try NSDataDetector(types: NSTextCheckingResult.CheckingType.phoneNumber.rawValue)
let matches = detector.matches(in: self, options: [], range: NSMakeRange(0, self.count))
if let res = matches.first { return res.resultType == .phoneNumber && res.range.location == 0 && res.range.length == self.count }
else
{
return false
}
}
catch { return false }
}
this is code which i m using for mobile number validation
if(txtMobileFirst.text?.isPhoneNumber)!{
let alert = UIAlertController(title: "Error", message: "Please enter a valid Mobile number", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
self.present(alert, animated: true, completion: nil)
txtEmailFirst.resignFirstResponder()
return false
}
this is how i m using it
have you checked which line it is returning false
your custom validator
how
if i m entering correct number in textfield still it is giving alert number is not valid
use breakpoints
i checked
do { let detector = try NSDataDetector(types: NSTextCheckingResult.CheckingType.phoneNumber.rawValue)
let matches = detector.matches(in: self, options: [], range: NSMakeRange(0, self.count))
if let res = matches.first { return res.resultType == .phoneNumber && res.range.location == 0 && res.range.length == self.count }
this line only works in above by breakpoints
06:13
return true in this case
do { let detector = try NSDataDetector(types: NSTextCheckingResult.CheckingType.phoneNumber.rawValue)
let matches = detector.matches(in: self, options: [], range: NSMakeRange(0, self.count))
if let res = matches.first { return res.resultType == .phoneNumber && res.range.location == 0 && res.range.length == self.count }
else
{
return false
}
return true;
}
catch { return false }
}
ok let me check
    return true;
warning here
will never be executed
oh okay you have a return there
print(self)
06:22
at the top
where at the top
before do
ok
var isPhoneNumber: Bool {

print(self)
do { let detector = try NSDataDetector(types: NSTextCheckingResult.CheckingType.phoneNumber.rawValue)
let matches = detector.matches(in: self, options: [], range: NSMakeRange(0, self.count))
if let res = matches.first { return res.resultType == .phoneNumber && res.range.location == 0 && res.range.length == self.count }
else
{
return false
}
}
catch { return false }
}
this will be code right
ok wait let me run and check
99889998asda
this is printing
06:26
this is not valid
its not giving any alert means it is valid
so that means code is not working
so what to do
check what is it returning true or false
ok
else
{
return false
}
this calls
i checked with breakpoints
06:29
yup, now break the line
if let res = matches.first { return res.resultType == .phoneNumber && res.range.location == 0 && res.range.length == self.count }
and see which fails
 
2 hours later…
08:23
Is it worth using webP images in iOS ? Does it effect performance while encode/decode ?
08:44
should be worth it
if the backend serves webp
09:05
@Shubhank thanks Shubhank. Going to use for the first time. ;-)
 
2 hours later…
10:53
Hi All
Good Evening
5 hours ago, by Shubhank
wassup these days
11:40
Nothing new, currently working on white labeling.
stereotype work. fed up!
12:30
yupp
i have been given a portal management app
boring!
 
1 hour later…
13:54
Hi, I am facing strange issue while installing apk in devices.
First I was using testing device to develop application.
Next I created a signed apk and downloaded into the same testing device and uninstalled the previous debug apk and installed this signed apk.
This is working fine.
Next time if I uninstall the signed apk and tried to install once again the same signed apk it is throwing an error saying, "App Not Installed".

This is happening in all the devices.

Is there any thing extra I need to do while generating signed apk???

« first day (2107 days earlier)      last day (1876 days later) »