Skip to content

Commit d78328e

Browse files
committed
Merge branch 'develop'
2 parents 70fe319 + 193ffbe commit d78328e

File tree

12 files changed

+151
-139
lines changed

12 files changed

+151
-139
lines changed

.gitignore

+82-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,83 @@
1-
# all hidden files
2-
.*
1+
########### Xcode ###########
2+
# Xcode temporary files that should never be committed
33

4-
#exclude
5-
!.gitignore
4+
## Build generated
5+
build/
6+
DerivedData
7+
8+
# NB: NIB/XIB files still exist even on Storyboard projects, so we want this
9+
*~.nib
10+
*.swp
11+
12+
## Various settings
13+
*.pbxuser
14+
!default.pbxuser
15+
*.mode1v3
16+
!default.mode1v3
17+
*.mode2v3
18+
!default.mode2v3
19+
*.perspectivev3
20+
!default.perspectivev3
21+
xcuserdata
22+
23+
## Other
24+
*.xccheckout
25+
*.moved-aside
26+
*.xcuserstate
27+
*.xcscmblueprint
28+
*.xcscheme
29+
30+
########### Mac OS X ###########
31+
# Mac OS X temporary files that should never be committed
32+
33+
.DS_Store
34+
.AppleDouble
35+
.LSOverride
36+
37+
# Icon must end with two \r
38+
Icon
39+
40+
41+
# Thumbnails
42+
._*
43+
44+
# Files that might appear in the root of a volume
45+
.DocumentRevisions-V100
46+
.fseventsd
47+
.Spotlight-V100
48+
.TemporaryItems
49+
.Trashes
50+
.VolumeIcon.icns
51+
52+
# Directories potentially created on remote AFP share
53+
.AppleDB
54+
.AppleDesktop
55+
Network Trash Folder
56+
Temporary Items
57+
.apdisk
58+
59+
########## Objective-C/Swift specific ##########
60+
*.hmap
61+
*.ipa
62+
63+
# CocoaPods
64+
#
65+
# We recommend against adding the Pods directory to your .gitignore. However
66+
# you should judge for yourself, the pros and cons are mentioned at:
67+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
68+
#
69+
# Pods/
70+
71+
# Carthage
72+
#
73+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
74+
# Carthage/Checkouts
75+
76+
Carthage/Build
77+
78+
# fastlane
79+
#
80+
# It is recommended to not store the screenshots in the Git repository. Instead, use fastlane to re-generate the
81+
82+
fastlane/report.xml
83+
fastlane/screenshots

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1010

1111
- Other UI elements for the SBC codec settings.
1212

13+
## [3.1.3] - 2021-06-12
14+
15+
### Fixed
16+
17+
- The deployment version crashes (Mac app works fine while running in Xcode, but deployment version crashes).
18+
19+
### Changed
20+
21+
- The project version.
22+
- The swift version.
23+
1324
## [3.1.2] - 2021-04-02
1425

1526
### Changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
This is a simple tool for the sound quality improving of wireless headphones with the sbc codec on a mac.
44

5-
[![status](https://img.shields.io/badge/status-frozen-inactive?style=flat-square)](BADGES_GUIDE.md#status) [![version](https://img.shields.io/badge/version-3.1.2-informational?style=flat-square)](BADGES_GUIDE.md@version) [![oss lifecycle](https://img.shields.io/badge/oss_lifecycle-maintenance-important?style=flat-square)](BADGES_GUIDE.md#oss-lifecycle) [![maintenance](https://img.shields.io/badge/maintenance-yes-informational?style=flat-square)](BADGES_GUIDE.md#maintenance) [![latest release date](https://img.shields.io/badge/latest_release_date-April_02,_2021-informational?style=flat-square)](BADGES_GUIDE.md#release-date) [![last commit](https://img.shields.io/badge/last_commit-April_02,_2021-informational?style=flat-square)](BADGES_GUIDE.md#commit-date)
5+
[![status](https://img.shields.io/badge/status-frozen-inactive?style=flat-square)](BADGES_GUIDE.md#status) [![version](https://img.shields.io/badge/version-3.1.3-informational?style=flat-square)](BADGES_GUIDE.md@version) [![oss lifecycle](https://img.shields.io/badge/oss_lifecycle-maintenance-important?style=flat-square)](BADGES_GUIDE.md#oss-lifecycle) [![maintenance](https://img.shields.io/badge/maintenance-yes-informational?style=flat-square)](BADGES_GUIDE.md#maintenance) [![latest release date](https://img.shields.io/badge/latest_release_date-June_12,_2021-informational?style=flat-square)](BADGES_GUIDE.md#release-date) [![last commit](https://img.shields.io/badge/last_commit-June_12,_2021-informational?style=flat-square)](BADGES_GUIDE.md#commit-date)
66

77
[![license](https://img.shields.io/badge/license-MIT-informational?style=flat-square)](LICENSE) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-square)](code_of_conduct.md)
88

9-
[![platform](https://img.shields.io/badge/platform-macOS_10.14+-important?style=flat-square)](https://en.wikipedia.org/wiki/Computing_platform)
9+
[![platform](https://img.shields.io/badge/platform-macOS_10.11+-important?style=flat-square)](https://en.wikipedia.org/wiki/Computing_platform)
1010

1111
---
1212

sbc bitpool expander.xcodeproj/project.pbxproj

+19-16
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 48;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -184,11 +184,13 @@
184184
TargetAttributes = {
185185
A34E917B2570BC73000DB3F4 = {
186186
CreatedOnToolsVersion = 12.2;
187+
DevelopmentTeam = C84A399767;
188+
ProvisioningStyle = Automatic;
187189
};
188190
};
189191
};
190192
buildConfigurationList = A34E91772570BC73000DB3F4 /* Build configuration list for PBXProject "sbc bitpool expander" */;
191-
compatibilityVersion = "Xcode 9.3";
193+
compatibilityVersion = "Xcode 8.0";
192194
developmentRegion = en;
193195
hasScannedForEncodings = 0;
194196
knownRegions = (
@@ -306,13 +308,14 @@
306308
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
307309
GCC_WARN_UNUSED_FUNCTION = YES;
308310
GCC_WARN_UNUSED_VARIABLE = YES;
309-
MACOSX_DEPLOYMENT_TARGET = 10.15;
311+
MACOSX_DEPLOYMENT_TARGET = 10.11;
310312
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
311313
MTL_FAST_MATH = YES;
312314
ONLY_ACTIVE_ARCH = YES;
313315
SDKROOT = macosx;
314316
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
315317
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
318+
SWIFT_VERSION = 4.0;
316319
};
317320
name = Debug;
318321
};
@@ -361,12 +364,12 @@
361364
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
362365
GCC_WARN_UNUSED_FUNCTION = YES;
363366
GCC_WARN_UNUSED_VARIABLE = YES;
364-
MACOSX_DEPLOYMENT_TARGET = 10.15;
367+
MACOSX_DEPLOYMENT_TARGET = 10.11;
365368
MTL_ENABLE_DEBUG_INFO = NO;
366369
MTL_FAST_MATH = YES;
367370
SDKROOT = macosx;
368-
SWIFT_COMPILATION_MODE = wholemodule;
369-
SWIFT_OPTIMIZATION_LEVEL = "-O";
371+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
372+
SWIFT_VERSION = 4.0;
370373
};
371374
name = Release;
372375
};
@@ -381,14 +384,13 @@
381384
DEVELOPMENT_TEAM = C84A399767;
382385
ENABLE_HARDENED_RUNTIME = YES;
383386
INFOPLIST_FILE = "sbc bitpool expander/Info.plist";
384-
LD_RUNPATH_SEARCH_PATHS = (
385-
"$(inherited)",
386-
"@executable_path/../Frameworks",
387-
);
387+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
388+
MACOSX_DEPLOYMENT_TARGET = 10.11;
388389
MARKETING_VERSION = 3.0.0;
389390
PRODUCT_BUNDLE_IDENTIFIER = "org.ololx.sbc-bitpool-expander";
390391
PRODUCT_NAME = "$(TARGET_NAME)";
391-
SWIFT_VERSION = 5.0;
392+
SDKROOT = macosx10.13;
393+
SWIFT_VERSION = 4.0;
392394
};
393395
name = Debug;
394396
};
@@ -403,14 +405,15 @@
403405
DEVELOPMENT_TEAM = C84A399767;
404406
ENABLE_HARDENED_RUNTIME = YES;
405407
INFOPLIST_FILE = "sbc bitpool expander/Info.plist";
406-
LD_RUNPATH_SEARCH_PATHS = (
407-
"$(inherited)",
408-
"@executable_path/../Frameworks",
409-
);
408+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
409+
MACOSX_DEPLOYMENT_TARGET = 10.11;
410410
MARKETING_VERSION = 3.0.0;
411+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
411412
PRODUCT_BUNDLE_IDENTIFIER = "org.ololx.sbc-bitpool-expander";
412413
PRODUCT_NAME = "$(TARGET_NAME)";
413-
SWIFT_VERSION = 5.0;
414+
SDKROOT = macosx10.13;
415+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = RELEASE;
416+
SWIFT_VERSION = 4.0;
414417
};
415418
name = Release;
416419
};

sbc bitpool expander/assembly/SbcAssembly.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99

1010
public class SbcAssembly: SbcAssemblyProtocol {
1111

12-
public static var scriptPath: String = "'./sbc bitpool expander.app/Contents/Resources/resources/sbcbpexp.sh'";
12+
public static var scriptPath: String = "'\(FileManager.default.currentDirectoryPath)/sbc bitpool expander.app/Contents/Resources/resources/sbcbpexp.sh'";
1313

1414
func configure(with viewController: SbcViewController) {
1515
//Create components

sbc bitpool expander/interactor/BluetoothAudioDefaults.swift

+25-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Alexander A. Kropotin on 06.12.2020.
66
//
77

8-
import Cocoa
8+
import Foundation
99

1010
public class BluetoothAudioDefaults: BluetoothAudioDefaultsProtocol {
1111

@@ -19,22 +19,36 @@ public class BluetoothAudioDefaults: BluetoothAudioDefaultsProtocol {
1919
}
2020

2121
public func save(_ bitpool: BitpoolDetail!) {
22-
let result = SimpleAppleScriptShellBuilder.init(at: "/bin/sh", with: true)
23-
.with(with: self.script)
24-
.with(with: "-s")
25-
.with(with: String(describing: bitpool.getMin()))
26-
.with(with: String(describing: bitpool.getMax()))
27-
.with(with: String(describing: bitpool.getCurr()))
22+
let writeCommand = """
23+
echo \\\"Set bitpool.\nThe new bitpool values are: \n min bitpool valie is \(bitpool.getMin())\n current bitpool value is \(bitpool.getCurr))\n max bitpool value is \(bitpool.getMax())\\\";
24+
defaults write bluetoothaudiod \\\"Apple Initial Bitpool\\\" -int \(bitpool.getCurr());
25+
defaults write bluetoothaudiod \\\"Apple Initial Min\\\" -int \(bitpool.getMin());
26+
defaults write bluetoothaudiod \\\"Apple Bitpool Min\\\" -int \(bitpool.getMin());
27+
defaults write bluetoothaudiod \\\"Apple Bitpool Max\\\" -int \(bitpool.getMax());
28+
defaults write bluetoothaudiod \\\"Negotiated Bitpool\\\" -int \(bitpool.getCurr());
29+
defaults write bluetoothaudiod \\\"Negotiated Bitpool Min\\\" -int \(bitpool.getMin());
30+
defaults write bluetoothaudiod \\\"Negotiated Bitpool Max\\\" -int \(bitpool.getMax());
31+
echo \\\"Reading bitpool\\\";
32+
defaults read bluetoothaudiod;
33+
""";
34+
35+
let result = SimpleAppleScriptShellBuilder.init(with: true)
36+
.with(with: writeCommand)
2837
.build()
2938
.executeAndReturnError(nil);
3039

31-
print(result)
40+
print(result);
3241
}
3342

3443
public func delete() {
35-
let result = SimpleAppleScriptShellBuilder.init(at: "/bin/sh", with: true)
36-
.with(with: self.script)
37-
.with(with: "-d")
44+
let deleteCommand = """
45+
echo \\\"Delete bitpool\\\";
46+
defaults delete bluetoothaudiod;
47+
echo \\\"Reading bitpool\\\";
48+
defaults read bluetoothaudiod;
49+
""";
50+
let result = SimpleAppleScriptShellBuilder.init(with: true)
51+
.with(with: deleteCommand)
3852
.build()
3953
.executeAndReturnError(nil);
4054

sbc bitpool expander/interactor/BluetoothAudioDefaultsProtocol.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Alexander A. Kropotin on 06.12.2020.
66
//
77

8-
import Cocoa
8+
import Foundation
99

1010
public protocol BluetoothAudioDefaultsProtocol: class {
1111

sbc bitpool expander/interactor/SimpleAppleScriptShellBuilder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class SimpleAppleScriptShellBuilder: AppleScriptShellBuilder {
5656
}
5757

5858
let instance = "do shell script \"\(script!)\" \(self.privileges ? "with administrator privileges" : "")";
59-
print(instance);
59+
NSLog(instance);
6060

6161
return NSAppleScript.init(source: instance)!;
6262
}

0 commit comments

Comments
 (0)