Closed Blog404DE closed 4 years ago
Hi there. Sorry for the delay. What version of PMAlertController are you using?
Hi,
that’s no problem :-) I’ve tested the current version (via pod) and (today) the current master-branch.
During the testing, i’ve seen a second (small) problem in relation with ObjC Projects: Installing this library via pod (current version) for a objc-project, leads to the following error-message:
pod update
Update all pods
…
Pre-downloading: `PMAlertController` from `https://github.com/pmusolino/PMAlertController.git`, branch `master`
…
Installing PMAlertController 4.0.0
…
[!] Unable to determine Swift version for the following pods:
- `PMAlertController` does not specify a Swift version and none of the targets (`XYZ`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
A workaround for me was to let the Podfile set the swift-version „by hand“:
pre_install do |installer|
installer.analysis_result.specifications.each do |s|
if s.name == 'PMAlertController'
s.swift_version = '5.0'
end
end
end
I’ll check
Hi,
if nearly forgotten this issue - bit now I had some time to look into your swift-code.
The main problem with adding/accessing the textFields from objc code were triggered by two things:
[quittungDatenAlert addTextFieldWithTextField:nil :^(UITextField *textField) {
[textField setPlaceholder: @"Dummy-Placeholder"];
[textField setKeyboardType:UIKeyboardTypeDefault];
}];
With this patch, you should be able to use PMAlertController in objective-c projects as in older versions (without major changes in existing codes).
Hi,
i’m using PMAlertController (installed via pod) within a objc app. After some issues with with pods, i’ve removed my pods-folder and reinstalled every pod.
After re-installing i’ve got some build-errors in connection with textFields inside the alert controller.
My (relevant) code:
Instead of accessing the textfield, Xcode now created the following build error: No visible @interface for 'PMAlertController' declares the selector ‚textFields'
How else could you access the text fields or where is the error?