sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

Can't Compile- Segmentation Fault #27

Closed blazierkyle closed 7 years ago

blazierkyle commented 7 years ago

Hi, thanks for spending the time to create this! It looks great and I'm trying to use this in a project of mine.

Unfortunately, when manually integrating this into my project (Not using CocoaPods), I am getting an error while building the file: SPRequestPermission.swift . I'm also encountering the same error when trying to build your sample project. This is the error I get: "Command failed due to signal: Segmentation fault: 11"

As a reference I am using Xcode 8.2.

I'd greatly appreciate your help resolving this issue... Thanks!

ivanvorobei commented 7 years ago

Hi!

Please, compress and send me your empty (with SPRequestPermission) project. I am try run it, if I get success - you have trouble with xCode

blazierkyle commented 7 years ago

Thanks for the quick response! I am still having the issue with the project but it is possible it could be an issue with my Xcode version or my machine. However, I was able to use this library in my project by removing the SPRequestPermission.swift file and just using the following code snippet to initialize the popup (as was being done inside the SPRequestPermission class).

let presenter = SPRequestPermissionDialogInteractivePresenter.init(with: [.calendar, .notification, .locationWhenInUse, .contacts], dataSource: SPRequestPermissionDialogInteractiveDataSource())

presenter.eventsDelegate = self

let controller = SPRequestPermissionDialogInteractiveViewController.init(presenter: presenter)

Thanks again for your work on this library!