Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
Fengshui-Seller-iOS
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Monika Agarwal
Fengshui-Seller-iOS
Commits
3c37240a
Commit
3c37240a
authored
Oct 15, 2018
by
SunARcTech2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
form changes
parent
e9be7a5f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
103 additions
and
23 deletions
+103
-23
.DS_Store
+0
-0
Bhagyashree.xcodeproj/project.pbxproj
+5
-2
Bhagyashree.xcworkspace/xcuserdata/sunarctech2.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Bhagyashree.xcworkspace/xcuserdata/sunarctech2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+16
-0
Bhagyashree/Info.plist
+9
-2
Bhagyashree/Sunarc/Controller/Appointment/Cells/PlayAudioCell.swift
+13
-4
Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift
+14
-3
Bhagyashree/Sunarc/Controller/Home/OnlineEnquiryViewController.swift
+26
-8
Bhagyashree/Sunarc/Other/Audio.swift
+20
-4
No files found.
.DS_Store
View file @
3c37240a
No preview for this file type
Bhagyashree.xcodeproj/project.pbxproj
View file @
3c37240a
...
@@ -2124,6 +2124,9 @@
...
@@ -2124,6 +2124,9 @@
LastSwiftMigration
=
0920
;
LastSwiftMigration
=
0920
;
ProvisioningStyle
=
Manual
;
ProvisioningStyle
=
Manual
;
SystemCapabilities
=
{
SystemCapabilities
=
{
com.apple.BackgroundModes
=
{
enabled
=
1
;
};
com.apple.Push
=
{
com.apple.Push
=
{
enabled
=
1
;
enabled
=
1
;
};
};
...
@@ -2919,7 +2922,7 @@
...
@@ -2919,7 +2922,7 @@
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_STYLE
=
Manual
;
DEVELOPMENT_TEAM
=
AY4776L6L2
;
DEVELOPMENT_TEAM
=
AY4776L6L2
;
INFOPLIST_FILE
=
Bhagyashree/Info.plist
;
INFOPLIST_FILE
=
Bhagyashree/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
1
0
.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
1
1
.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.gdi.yuanzhongsiuseller
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.gdi.yuanzhongsiuseller
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
...
@@ -2944,7 +2947,7 @@
...
@@ -2944,7 +2947,7 @@
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_STYLE
=
Manual
;
DEVELOPMENT_TEAM
=
AY4776L6L2
;
DEVELOPMENT_TEAM
=
AY4776L6L2
;
INFOPLIST_FILE
=
Bhagyashree/Info.plist
;
INFOPLIST_FILE
=
Bhagyashree/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
1
0
.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
1
1
.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.gdi.yuanzhongsiuseller
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.gdi.yuanzhongsiuseller
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
...
...
Bhagyashree.xcworkspace/xcuserdata/sunarctech2.xcuserdatad/UserInterfaceState.xcuserstate
View file @
3c37240a
No preview for this file type
Bhagyashree.xcworkspace/xcuserdata/sunarctech2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
3c37240a
...
@@ -147,5 +147,21 @@
...
@@ -147,5 +147,21 @@
landmarkType =
"7"
>
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointContent>
</BreakpointProxy>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Bhagyashree/Sunarc/Other/Audio.swift"
timestampString =
"561276157.105332"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"64"
endingLineNumber =
"64"
landmarkName =
"playAudio(audioPath:success:failure:progress:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Breakpoints>
</Bucket>
</Bucket>
Bhagyashree/Info.plist
View file @
3c37240a
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
k
e
y
>
CFBundleDisplayName
<
/k
e
y
>
<
string
>
iAstro
(
Master
)<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
...
@@ -17,7 +19,7 @@
...
@@ -17,7 +19,7 @@
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
<
/string
>
<
string
>
4
<
/string
>
<
k
e
y
>
Fabric
<
/k
e
y
>
<
k
e
y
>
Fabric
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
APIKey
<
/k
e
y
>
<
k
e
y
>
APIKey
<
/k
e
y
>
...
@@ -49,6 +51,11 @@
...
@@ -49,6 +51,11 @@
<
string
>
Fengushi
would
like
to
access
your
photos
for
sharing
<
/string
>
<
string
>
Fengushi
would
like
to
access
your
photos
for
sharing
<
/string
>
<
k
e
y
>
NSPhotoLibraryUsageDescription
<
/k
e
y
>
<
k
e
y
>
NSPhotoLibraryUsageDescription
<
/k
e
y
>
<
string
>
Fengushi
would
like
to
access
your
photos
for
sharing
<
/string
>
<
string
>
Fengushi
would
like
to
access
your
photos
for
sharing
<
/string
>
<
k
e
y
>
UIBackgroundModes
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
fetch
<
/string
>
<
string
>
remote-notification
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
string
>
LaunchScreen
<
/string
>
<
string
>
LaunchScreen
<
/string
>
<
k
e
y
>
UIMainStoryboardFile
<
/k
e
y
>
<
k
e
y
>
UIMainStoryboardFile
<
/k
e
y
>
...
@@ -60,7 +67,7 @@
...
@@ -60,7 +67,7 @@
<
string
>
armv7
<
/string
>
<
string
>
armv7
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
UIRequiresFullScreen
<
/k
e
y
>
<
k
e
y
>
UIRequiresFullScreen
<
/k
e
y
>
<
fa
ls
e
/
>
<
tru
e
/
>
<
k
e
y
>
UIStatusBarStyle
<
/k
e
y
>
<
k
e
y
>
UIStatusBarStyle
<
/k
e
y
>
<
string
>
UIStatusBarStyleLightContent
<
/string
>
<
string
>
UIStatusBarStyleLightContent
<
/string
>
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
...
...
Bhagyashree/Sunarc/Controller/Appointment/Cells/PlayAudioCell.swift
View file @
3c37240a
...
@@ -43,11 +43,20 @@ class PlayAudioCell: UITableViewCell {
...
@@ -43,11 +43,20 @@ class PlayAudioCell: UITableViewCell {
func
playAudioFile
()
{
func
playAudioFile
()
{
Audio
.
playAudio
(
audioPath
:
audioRecording
!.
audioPath
,
success
:
{
self
.
audioRecording
?
.
isPlaying
=
true
Audio
.
playAudio
(
audioPath
:
audioRecording
!.
audioPath
,
success
:
{
(
max
)
in
})
{
(
errorMesaage
)
in
print
(
max
)
// TO DO: show tost
},
failure
:
{
(
errorMessage
)
in
print
(
errorMessage
)
})
{
(
current
)
in
print
(
"current =
\(
current
)
"
)
}
}
// Audio.playAudio(audioPath: audioRecording!.audioPath, success: {
// self.audioRecording?.isPlaying = true
// }) { (errorMesaage) in
// // TO DO: show tost
// }
}
}
...
...
Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift
View file @
3c37240a
...
@@ -473,11 +473,22 @@ class ResultAudioCell: UITableViewCell {
...
@@ -473,11 +473,22 @@ class ResultAudioCell: UITableViewCell {
}
}
if
let
audioPath
=
audioPath
{
if
let
audioPath
=
audioPath
{
Audio
.
playAudio
(
audioPath
:
audioPath
,
success
:
{
Audio
.
playAudio
(
audioPath
:
audioPath
,
success
:
{
(
max
)
in
print
(
"max =
\(
max
)
"
)
self
.
delegate
?
.
playingAudioAtIndex
(
index
:
cellIndex
)
self
.
delegate
?
.
playingAudioAtIndex
(
index
:
cellIndex
)
})
{
(
errorMesssage
)
in
},
failure
:
{
(
errorMessage
)
in
self
.
viewController
()?
.
view
.
showToast
(
errorMesssage
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
print
(
errorMessage
)
})
{
(
current
)
in
print
(
"current =
\(
current
)
"
)
}
}
// Audio.playAudio(audioPath: audioPath, success: {
// self.delegate?.playingAudioAtIndex(index: cellIndex)
// }) { (errorMesssage) in
// self.viewController()?.view.showToast(errorMesssage, position: .bottom, popTime: 2.0, dismissOnTap: false)
// }
}
else
{
}
else
{
self
.
viewController
()?
.
view
.
showToast
(
"Audio missing"
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
self
.
viewController
()?
.
view
.
showToast
(
"Audio missing"
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
}
}
...
...
Bhagyashree/Sunarc/Controller/Home/OnlineEnquiryViewController.swift
View file @
3c37240a
...
@@ -351,11 +351,20 @@ class OnlineEnquiryMasterAudioCell: UITableViewCell {
...
@@ -351,11 +351,20 @@ class OnlineEnquiryMasterAudioCell: UITableViewCell {
@IBAction
func
play
()
{
@IBAction
func
play
()
{
if
let
audioPath
=
audioPath
{
if
let
audioPath
=
audioPath
{
Audio
.
playAudio
(
audioPath
:
audioPath
,
success
:
{
Audio
.
playAudio
(
audioPath
:
audioPath
,
success
:
{
(
max
)
in
})
{
(
errorMesssage
)
in
print
(
"max =
\(
max
)
"
)
self
.
viewController
()?
.
view
.
showToast
(
errorMesssage
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
},
failure
:
{
(
errorMessage
)
in
print
(
errorMessage
)
})
{
(
current
)
in
print
(
"current =
\(
current
)
"
)
}
}
// Audio.playAudio(audioPath: audioPath, success: {
//
// }) { (errorMesssage) in
// self.viewController()?.view.showToast(errorMesssage, position: .bottom, popTime: 2.0, dismissOnTap: false)
// }
}
else
{
}
else
{
self
.
viewController
()?
.
view
.
showToast
(
"Audio missing"
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
self
.
viewController
()?
.
view
.
showToast
(
"Audio missing"
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
}
}
...
@@ -385,11 +394,20 @@ class OnlineEnquiryCustomerAudioCell: UITableViewCell {
...
@@ -385,11 +394,20 @@ class OnlineEnquiryCustomerAudioCell: UITableViewCell {
@IBAction
func
play
()
{
@IBAction
func
play
()
{
if
let
audioPath
=
audioPath
{
if
let
audioPath
=
audioPath
{
Audio
.
playAudio
(
audioPath
:
audioPath
,
success
:
{
Audio
.
playAudio
(
audioPath
:
audioPath
,
success
:
{
(
max
)
in
})
{
(
errorMesssage
)
in
print
(
"Max =
\(
max
)
"
)
self
.
viewController
()?
.
view
.
showToast
(
errorMesssage
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
},
failure
:
{
(
errorMessage
)
in
print
(
errorMessage
)
})
{
(
current
)
in
print
(
"current =
\(
current
)
"
)
}
}
// Audio.playAudio(audioPath: audioPath, success: {
//
// }) { (errorMesssage) in
// self.viewController()?.view.showToast(errorMesssage, position: .bottom, popTime: 2.0, dismissOnTap: false)
// }
}
else
{
}
else
{
self
.
viewController
()?
.
view
.
showToast
(
"Audio missing"
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
self
.
viewController
()?
.
view
.
showToast
(
"Audio missing"
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
}
}
...
...
Bhagyashree/Sunarc/Other/Audio.swift
View file @
3c37240a
...
@@ -14,6 +14,7 @@ class Audio {
...
@@ -14,6 +14,7 @@ class Audio {
var
audioRecorder
:
AVAudioRecorder
!
var
audioRecorder
:
AVAudioRecorder
!
var
audioPlayer
:
AVPlayer
?
var
audioPlayer
:
AVPlayer
?
var
playerItem
:
AVPlayerItem
?
var
audioPlayerForLocalFile
:
AVAudioPlayer
?
var
audioPlayerForLocalFile
:
AVAudioPlayer
?
var
currentRecordingPath
:
String
?
var
currentRecordingPath
:
String
?
static
let
shared
=
Audio
()
static
let
shared
=
Audio
()
...
@@ -58,7 +59,7 @@ class Audio {
...
@@ -58,7 +59,7 @@ class Audio {
}
}
class
func
playAudio
(
audioPath
:
String
,
success
:(
)
->
Void
,
failure
:
(
_
message
:
String
)
->
Void
)
{
class
func
playAudio
(
audioPath
:
String
,
success
:(
_
max
:
Float64
)
->
Void
,
failure
:
(
_
message
:
String
)
->
Void
,
progress
:
@escaping
(
_
current
:
Float64
)
->
Void
)
{
if
audioPath
.
first
==
"/"
{
// local file path
if
audioPath
.
first
==
"/"
{
// local file path
let
audioURL
=
URL
(
fileURLWithPath
:
audioPath
)
let
audioURL
=
URL
(
fileURLWithPath
:
audioPath
)
...
@@ -69,16 +70,31 @@ class Audio {
...
@@ -69,16 +70,31 @@ class Audio {
try
Audio
.
shared
.
audioPlayerForLocalFile
=
AVAudioPlayer
(
contentsOf
:
audioURL
)
try
Audio
.
shared
.
audioPlayerForLocalFile
=
AVAudioPlayer
(
contentsOf
:
audioURL
)
Audio
.
shared
.
audioPlayerForLocalFile
!.
prepareToPlay
()
Audio
.
shared
.
audioPlayerForLocalFile
!.
prepareToPlay
()
Audio
.
shared
.
audioPlayerForLocalFile
!.
play
()
Audio
.
shared
.
audioPlayerForLocalFile
!.
play
()
success
()
success
(
Audio
.
shared
.
audioPlayerForLocalFile
!.
duration
)
Timer
.
scheduledTimer
(
withTimeInterval
:
1.0
,
repeats
:
true
)
{
(
timer
)
in
progress
(
Audio
.
shared
.
audioPlayerForLocalFile
!.
currentTime
)
}
}
catch
{
}
catch
{
failure
(
error
.
localizedDescription
)
failure
(
error
.
localizedDescription
)
}
}
}
else
{
// remote path
}
else
{
// remote path
let
url
=
URL
(
string
:
audioPath
)
let
url
=
URL
(
string
:
audioPath
)
Audio
.
shared
.
audioPlayer
=
AVPlayer
(
url
:
url
!
)
Audio
.
shared
.
playerItem
=
AVPlayerItem
(
url
:
url
!
)
Audio
.
shared
.
audioPlayer
=
AVPlayer
(
playerItem
:
Audio
.
shared
.
playerItem
)
Audio
.
shared
.
audioPlayer
?
.
play
()
Audio
.
shared
.
audioPlayer
?
.
play
()
success
()
Audio
.
shared
.
audioPlayer
!.
addPeriodicTimeObserver
(
forInterval
:
CMTimeMakeWithSeconds
(
1
,
1
),
queue
:
DispatchQueue
.
main
)
{
(
CMTime
)
->
Void
in
progress
(
CMTimeGetSeconds
(
Audio
.
shared
.
audioPlayer
!.
currentTime
()))
}
let
duration
:
CMTime
=
Audio
.
shared
.
playerItem
!.
asset
.
duration
let
maxSeconds
:
Float64
=
CMTimeGetSeconds
(
duration
)
success
(
maxSeconds
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment