Skip to main content

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 )...

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: UICon...

Parse array of string Realm + ObjectMapper in Swift4

Parse array of String for Realm with ObjectMapper Response JSON: {     id: 210,     images: ["image1","image2","image3"] }  Swift Model file : public class Value: Object {     @objc public dynamic var image: String ? } class   : Object , Mappable {     @objc dynamic var id = 0          var images = List < Value >()     override static func primaryKey() -> String ? {         return "id"     }          //Impl. of Mappable protocol     required convenience init ?(map: Map ) {         self . init ()     }          func mapping(map: Map ) {                                           //Used scr...

You can create a new administrator account on Mac machine

Don't worry if you forgot your admin account or not created admin account and using Standard account only. You can follow below steps and create new admin account on MAC machine You can create a new administrator account by restarting the Setup Assistant: Boot into Single User Mode: Start/restart your Mac. As soon as you hear the startup tone, press and hold  ⌘  + S until you see a black screen with white lettering. (If you end up back on the login screen after a flash of the black screen with white lettering, enter your password and it will return to the black screen.) Check and repair the drive by typing /sbin/fsck -fy then  ↩ enter - as directed by the on-screen text. Mount the drive as read-write by typing /sbin/mount -uw / then  ↩ enter. Remove the Apple Setup Done file by typing rm /var/db/.AppleSetupDone then  ↩ enter. Reboot by typing reboot then  ↩ enter. Complet...

iOS9 iTune Upload Error : Invalid Bundle. iPad Multitasking support requires launch story board in bundle

1. Add the UIRequiresFullScreen key to your Xcode project’s Info.plist file and apply the Boolean value YES 2. This will fix one more issue that is coming at the time of iTune upload Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. If your application only using single orientation then use the above keyword in info.plist