Skip to content

Commit

Permalink
Update 1.6.0 (#10)
Browse files Browse the repository at this point in the history
* Update version label to 1.6.0:34. And set the App's category.

* update deprecated function signature

* move Logger creation to the AppDelegate for central access, app-wide

* update deprecated function signature

* improve error message when app permissions are insufficient -- communicate the full aceess to the Photo Library is required.

* update code signing settings and include build number in plist

* adding recquired privacy manifest

* update privacy manifest to App Review
  • Loading branch information
theInternauts authored Jul 13, 2024
1 parent 3d15496 commit 9c9e245
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 11 deletions.
19 changes: 14 additions & 5 deletions Home Movies.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
6D73B5CD2C00F80C00A5E2A5 /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 6D73B5CC2C00F80C00A5E2A5 /* Sentry */; };
6D73B5CF2C01AF5500A5E2A5 /* LogManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D73B5CE2C01AF5500A5E2A5 /* LogManager.swift */; };
6D73B5D82C024C1D00A5E2A5 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 6D73B5D72C024C1D00A5E2A5 /* Localizable.xcstrings */; };
6D73B5DA2C03893500A5E2A5 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 6D73B5D92C03893500A5E2A5 /* PrivacyInfo.xcprivacy */; };
78158BC81D071DF4005FD10A /* RecordParentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78158BC71D071DF4005FD10A /* RecordParentViewController.swift */; };
784043C21CB2E20E008324FB /* VideoSessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 784043C11CB2E20E008324FB /* VideoSessionManager.swift */; };
7855FC211C87AFC800704231 /* VideoPlayerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7855FC201C87AFC800704231 /* VideoPlayerController.swift */; };
Expand Down Expand Up @@ -45,6 +46,7 @@
622352E4330818DD7BE42C83 /* Pods-Home Movies.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Home Movies.release.xcconfig"; path = "Pods/Target Support Files/Pods-Home Movies/Pods-Home Movies.release.xcconfig"; sourceTree = "<group>"; };
6D73B5CE2C01AF5500A5E2A5 /* LogManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogManager.swift; sourceTree = "<group>"; };
6D73B5D72C024C1D00A5E2A5 /* Localizable.xcstrings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
6D73B5D92C03893500A5E2A5 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = "Home Movies/PrivacyInfo.xcprivacy"; sourceTree = "<group>"; };
78158BC71D071DF4005FD10A /* RecordParentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecordParentViewController.swift; sourceTree = "<group>"; };
784043C11CB2E20E008324FB /* VideoSessionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoSessionManager.swift; sourceTree = "<group>"; };
7855FC201C87AFC800704231 /* VideoPlayerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoPlayerController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -195,6 +197,7 @@
BD762F5E1BD17BDD003AEA6E = {
isa = PBXGroup;
children = (
6D73B5D92C03893500A5E2A5 /* PrivacyInfo.xcprivacy */,
890F5F66229721F400957557 /* GoogleService-Info.plist */,
78D7629E1C85E00500797980 /* AVFoundation.framework */,
BD762F691BD17BDD003AEA6E /* Home Movies */,
Expand Down Expand Up @@ -268,7 +271,6 @@
BD762F661BD17BDD003AEA6E = {
CreatedOnToolsVersion = 7.0;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
};
Expand Down Expand Up @@ -301,6 +303,7 @@
6D73B5D82C024C1D00A5E2A5 /* Localizable.xcstrings in Resources */,
7855FC231C87B6AF00704231 /* Record.storyboard in Resources */,
7855FC221C87B6AA00704231 /* Home.storyboard in Resources */,
6D73B5DA2C03893500A5E2A5 /* PrivacyInfo.xcprivacy in Resources */,
BDE7623A1BD18362008B74F7 /* Upload-50.png in Resources */,
BD1B09B11C5E99A7007F4A06 /* iphone4sbelow.mov in Resources */,
BD1B09AB1C5E97B6007F4A06 /* iphone6p.mov in Resources */,
Expand Down Expand Up @@ -506,16 +509,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 39;
DEVELOPMENT_TEAM = 7G5K7Y23NM;
INFOPLIST_FILE = "Home Movies/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Home Movies";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.homemoviesapp.homemovies;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -531,16 +537,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 39;
DEVELOPMENT_TEAM = 7G5K7Y23NM;
INFOPLIST_FILE = "Home Movies/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Home Movies";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.homemoviesapp.homemovies;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 4 additions & 0 deletions Home Movies/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}


extension AppDelegate {
static var appLogger = LogManager()
}

private extension AppDelegate {
func setupAnalytics() {
//Add Sentry
Expand Down
2 changes: 1 addition & 1 deletion Home Movies/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2</string>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down
72 changes: 72 additions & 0 deletions Home Movies/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeCrashData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false />
<key>NSPrivacyCollectedDataTypeTracking</key>
<false />
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePerformanceData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false />
<key>NSPrivacyCollectedDataTypeTracking</key>
<false />
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false />
<key>NSPrivacyCollectedDataTypeTracking</key>
<false />
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
</array>
</dict>
</plist>
4 changes: 2 additions & 2 deletions Home Movies/RecordViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RecordViewController: UIViewController, VideoViewDelegate, UITextFieldDele
}
}

var logger: AppLogger? = LogManager()
var logger: AppLogger? = AppDelegate.appLogger
var loadingFromBg: Bool = false

var videoSession = VideoSessionManager.defaultManager
Expand Down Expand Up @@ -360,7 +360,7 @@ class RecordViewController: UIViewController, VideoViewDelegate, UITextFieldDele
}

if !videoView.checkAllAuthorizations() {
showAlert("Error", msg: "Camera/Microphone/Photos Usage Not Authorized!!! \n\nPlease Update App Settings And Try Again.", comp: {(alert: UIAlertAction!) in exit(0)})
showAlert("Insufficient Permissions", msg: "Please allow full Photo Library access, Camera, and Microphone access from iOS Settings App.", comp: {(alert: UIAlertAction!) in exit(0)})
}
else {
do {
Expand Down
6 changes: 3 additions & 3 deletions Home Movies/VideoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class VideoView : UIView, AVCaptureFileOutputRecordingDelegate {

{

PHPhotoLibrary.requestAuthorization { status in
PHPhotoLibrary.requestAuthorization(for:.readWrite) { status in
switch (status)
{

Expand Down Expand Up @@ -324,15 +324,15 @@ class VideoView : UIView, AVCaptureFileOutputRecordingDelegate {
_ = self.recDispGrp!.wait(timeout: DispatchTime.distantFuture)
//
self.recDispGrp!.enter()
PHPhotoLibrary.requestAuthorization { (status : PHAuthorizationStatus) -> Void in
PHPhotoLibrary.requestAuthorization(for:.readWrite) { (status : PHAuthorizationStatus) -> Void in
print("perm \(status)")
self.recDispGrp!.leave()
}
_ = self.recDispGrp!.wait(timeout: DispatchTime.distantFuture)

let videoAccess = AVCaptureDevice.authorizationStatus(for: AVMediaType(rawValue: convertFromAVMediaType(AVMediaType.video)))
let audioAccess = AVCaptureDevice.authorizationStatus(for: AVMediaType(rawValue: convertFromAVMediaType(AVMediaType.audio)))
let photoLibAcces = PHPhotoLibrary.authorizationStatus()
let photoLibAcces = PHPhotoLibrary.authorizationStatus(for: .readWrite)

var retVal = true
if audioAccess != AVAuthorizationStatus.authorized {
Expand Down

0 comments on commit 9c9e245

Please sign in to comment.