Skip to content

Commit

Permalink
fix ios hasPermission issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nikk.li committed Oct 18, 2019
1 parent 0509f93 commit 17224f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## 0.4.3
* fix iOS has permission result issue;

## 0.4.2
* fix the android's audio file path, now you can get it from *current* method
* fix the Android's audio file path, now you can get it from *current* method

## 0.4.1

* Change Android Dependencies Version
* Change Android dependencies version

## 0.4.0

Expand Down Expand Up @@ -38,16 +41,16 @@

## 0.1.2

* Updated Package Description.
* Updated package description.

## 0.1.1

* Chinese Documentation added.
* Chinese documentation added.

## 0.1.0

* Documentation added.

## 0.0.1

* Initial Release.
* Initial release.
4 changes: 4 additions & 0 deletions ios/Classes/SwiftFlutterAudioRecorderPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public class SwiftFlutterAudioRecorderPlugin: NSObject, FlutterPlugin, AVAudioRe
case "resume":
print("resume")


if audioRecorder == nil {
result(nil)
}
Expand All @@ -160,12 +161,15 @@ public class SwiftFlutterAudioRecorderPlugin: NSObject, FlutterPlugin, AVAudioRe
break
case AVAudioSession.RecordPermission.undetermined:
print("undetermined")

AVAudioSession.sharedInstance().requestRecordPermission() { [unowned self] allowed in
DispatchQueue.main.async {
if allowed {
self.hasPermissions = true
result(self.hasPermissions)
} else {
self.hasPermissions = false
result(self.hasPermissions)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_audio_recorder
description: Flutter Audio Record Plugin that supports Record Pause Resume Stop and provide access to audio level metering properties average power peak power.
version: 0.4.2
version: 0.4.3
authors:
- wenyan <[email protected]>
- tao zhu <[email protected]>
Expand Down

0 comments on commit 17224f7

Please sign in to comment.