Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLProductHomeViewController in current version crashes in sandbox mode on collection view prefetch #314

Open
DevTchernov opened this issue May 29, 2019 · 0 comments

Comments

@DevTchernov
Copy link

DevTchernov commented May 29, 2019

2019-05-29 17:04:32.159591+0700 test-kitely[78901:2128104] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'bad url scheme ((null)), only http & https are supported'
*** First throw call stack:
(
	0   CoreFoundation                      0x0000000106a436fb __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x0000000105898ac5 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000106a43482 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x00000001052e6927 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
	4   KiteSDK                             0x000000010439cfa2 +[OLAsset assetWithURL:size:] + 626
	5   KiteSDK                             0x000000010446ce55 -[OLProduct coverPhotoAsset] + 597
	6   KiteSDK                             0x000000010446d0db -[OLProduct classImageAsset] + 587
	7   KiteSDK                             0x000000010447f1d4 -[OLProductHomeViewController collectionView:cellForItemAtIndexPath:] + 1684
	8   UIKitCore                           0x0000000111b37767 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] + 383
	9   UIKitCore                           0x0000000111b39316 -[UICollectionView _prefetchItemsForVelocity:maxItemsToPrefetch:invalidateCandidatesOnDirectionChanges:] + 354

There is all code for SDK usage:

import UIKit
import KiteSDK

class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {

  override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view.
  }

  override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    let picker = UIImagePickerController()
    picker.sourceType = .photoLibrary
    picker.delegate = self
    present(picker, animated: true, completion: nil)
  }
  
  func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
    guard let image = info[.originalImage] as? UIImage else {
      return
    }
    picker.dismiss(animated: true) {
      if let newVC = OLKiteViewController(assets: [OLAsset(imageAsPNG: image)]) {
        self.present(newVC, animated: true)
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant