Skip to main content

Posts

Apple push certificate is not trusted

  Fix: - Go to the Apple link to download the trusted certificate:  https://www.apple.com/certificateauthority/ - Download WDR-G4 certificate( Worldwide Developer Relations - G4 ) - Double-click to install This will fix this issue. Enjoy happy coding :)
Recent posts

AppCenter SDK integration error while running on device

While running the application on device and added AppCenter SDK. Analytics call showing below error. "An SSL error has occurred and a secure connection to the server cannot be made." Solution:  Add the below code in the info.plist file:      <key> NSAppTransportSecurity </key> <dict> <key> NSExceptionDomains </key> <dict> <key> *.appcenter.com </key> <dict> <key> NSExceptionMinimumTLSVersion </key> <string> TLSv1.2 </string> </dict> </dict> </dict> Your Plist file looks this after adding the above code: <?xml version= "1.0" encoding= "UTF-8" ?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" " http://www.apple.com/DTDs/PropertyList-1.0.dtd " > <plist version = "1.0" > <dict> <key> NSAppTransportSecurity </key> <dict> <key> NSExceptionDom

XCConfig files are not properly deintegrated

After looking into the different block and searched over the internet, still not able to find a valid reason for this error. I also tried "pod deintegrate" but that will also not worked for me. After installing pods, I got a warning message(pasted below). It seems, this is the reason for XCConfig error. This may be because my team member using older version of CocoaPods.. [!] The version of CocoaPods used to generate the lockfile (1.6.1) is higher than the version of the current executable (1.5.2). Incompatibility issues may arise. To fix this issue I follow the below steps, maybe this will work for you. 1. Right click on xxx.xcodeproj file and click on "Show Package Contents" 2. Open "project.pbxproj" file in edit mode 3. Search " Pods; " in opened file 4. Change : path = Pods; to name = Pods; NOTE:  "path" for the newer version and "name" for the older version. Please let me know if it works for you or

Fixed : URL(string :"url string with white space") will return nil

Space contained in any URL will give you nil value if you try to user URL(string: "") When you try to convert below string into URL it will throw you nil value because URL(string: " ") will not able to handle white spaces and this is why it return you nil value  let  imageURL =  "https://s3.amazonaws.com/images.goodtime.city/Profile/4e1d7331-78df-11e7-ba2f-9e34d39fd224-10/5/2018 12:19:09 PM.png" let  url =  URL (string: escapedURL!) to fix this issue you need to use : let   escapedURL = imageURL . addingPercentEncoding ( withAllowedCharacters:   CharacterSet . urlQueryAllowed ) To fix this issue you need to use below code : let imageURL = "https://s3.amazonaws.com/images.goodtime.city/Profile/4e1d7331-78df-11e7-ba2f-9e34d39fd224-10/5/2018 12:19:09 PM.png" let escapedURL = imageURL. addingPercentEncoding (             withAllowedCharacters: CharacterSet . urlQueryAllowed ) let url = URL (stri

Create hyperlink button with underline text

Created a custom bar button with underlined text You can also add different attributes to make your text customised let font = UIFont . systemFont (ofSize: CGFloat ( 15.0 )) let attributesForTitleText = [             NSAttributedString . Key . foregroundColor : UIColor . orange ,             NSAttributedString . Key . font : font,             NSAttributedString . Key . underlineStyle : NSUnderlineStyle . single . rawValue             ] as [ NSAttributedString . Key : Any ] let pageTitleButton = UIBarButtonItem (title: pageTitleText, style: UIBarButtonItem . Style . plain , target: self , action: nil )         pageTitleButton. setTitleTextAttributes (attributesForTitleText, for: UIControl . State . normal )         pageTitleButton. setTitleTextAttributes (attributesForTitleText, for: UIControl . State . highlighted )         leftBarButtonArray. append (pageTitleButton) navigationItem . leftBarButtonItems = leftBarButtonArray