Your Base64 string is not valid. It must be padded with =
characters to have
a length that is a multiple of 4. In your case: "eyJlbWFp....MTM3fQ=="
.
With this padding, initWithBase64EncodedString
decodes the Base64 string correctly.
Related Contents:
- Convert between UIImage and Base64 string
- How do I parse this nested JSON using Codable with Swift?
- How do I do base64 encoding on iOS?
- Convert UTF-8 encoded NSData to NSString
- How to use NSJSONSerialization
- Swift 3 URLSession.shared() Ambiguous reference to member ‘dataTask(with:completionHandler:) error (bug)
- Generate JSON string from NSDictionary in iOS
- How to parse JSON response from Alamofire API in Swift?
- How do I convert an NSString value to NSData?
- How to compress/resize image on iOS before uploading to a server?
- Type ‘Any’ Has no Subscript Members in xcode 8 Swift 3 [duplicate]
- Convert array to JSON string in swift
- How do I deserialize a JSON string into an NSDictionary? (For iOS 5+)
- Foreign key relationship mapping with RestKit
- iOS: Serialize/Deserialize complex JSON generically from NSObject class
- Parsing nested Array of Dictionaries using Object Mapper
- Simple and clean way to convert JSON string to Object in Swift
- How can I convert my device token (NSData) into an NSString?
- JSON parsing swift, array has no value outside NSURLSession
- Posting JSON data using AFNetworking 2.0
- Converting between NSData and base64 strings
- iOS 5 JSON Parsing Results in Cocoa Error 3840
- -[NSNull length]: unrecognized selector sent to JSON objects
- Checking a null value in Objective-C that has been returned from a JSON string
- iOS UIImagePickerController result image orientation after upload
- Can you animate a height change on a UITableViewCell when selected?
- How can I add NSAppTransportSecurity to my info.plist file?
- Number of days between two NSDates [duplicate]
- How to segue programmatically in iOS using Swift
- UIScrollView not scrolling
- How to get Wifi SSID in iOS9 after CaptiveNetwork is deprecated and calls for Wifi name are already blocked
- Reading and writing images to an SQLite DB for iPhone use
- property not working with getter AND setter
- How can you rotate text for UIButton and UILabel in Objective-C?
- How to change inside background color of UISearchBar component on iOS
- Xcode is looking for core data entity names with dot; not compiling
- iOS Multiple Columns in UITableView
- How to make a UILabel clickable?
- How do you make an UIPickerView component wrap around?
- iOS 5 Twitter Framework: Tweeting without user input and confirmation (modal view controller)
- Identify new iPhone model on xcode (5, 5c, 5s) [duplicate]
- @Binding and ForEach in SwiftUI
- How can I get a view’s current width and height when using autolayout constraints?
- Does dispatch_async(dispatch_get_main_queue(), ^{…}); wait until done?
- Detect volume button press
- Xcode keeps building storyboard after each keystroke
- Max length UITextField
- Cocoapods: Failed to connect to GitHub to update the CocoaPods/Specs specs repo
- Showing pushviewcontroller animation look like presentModalViewController
- Keyboard and cursor show, but I can’t type inside UITextFields and UITextViews