Skip to content

Commit

Permalink
[Chore]: more
Browse files Browse the repository at this point in the history
- Link to Obj-C headers (umbrella header)
- AAvatarManagementModel (objc)
- Upload Media
  • Loading branch information
N3v1 committed Feb 18, 2024
1 parent f6d9ebf commit 6b25f12
Show file tree
Hide file tree
Showing 12 changed files with 163 additions and 23 deletions.
56 changes: 54 additions & 2 deletions SLAvatarKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
388472A82B811A1A00D61AEE /* SLAvatarKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3884729A2B811A1A00D61AEE /* SLAvatarKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
388472B52B8235E600D61AEE /* AAvatarManagement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 388472B42B8235E600D61AEE /* AAvatarManagement.swift */; };
388472B92B8239FD00D61AEE /* AAvatarManagementModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 388472B82B8239FD00D61AEE /* AAvatarManagementModel.m */; };
388472BB2B823AB600D61AEE /* AAvatarManagementModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 388472BA2B823AB600D61AEE /* AAvatarManagementModel.h */; };
388472BB2B823AB600D61AEE /* AAvatarManagementModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 388472BA2B823AB600D61AEE /* AAvatarManagementModel.h */; settings = {ATTRIBUTES = (Public, ); }; };
388472C22B82462000D61AEE /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 388472C12B82462000D61AEE /* Media.xcassets */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -35,6 +36,7 @@
388472B42B8235E600D61AEE /* AAvatarManagement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AAvatarManagement.swift; sourceTree = "<group>"; };
388472B82B8239FD00D61AEE /* AAvatarManagementModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AAvatarManagementModel.m; sourceTree = "<group>"; };
388472BA2B823AB600D61AEE /* AAvatarManagementModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AAvatarManagementModel.h; sourceTree = "<group>"; };
388472C12B82462000D61AEE /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -96,14 +98,19 @@
388472B12B81209D00D61AEE /* AvatarKitUI */ = {
isa = PBXGroup;
children = (
388472B32B8235D300D61AEE /* Management */,
388472C32B8248C400D61AEE /* Core */,
388472C02B82461000D61AEE /* Resources */,
);
path = AvatarKitUI;
sourceTree = "<group>";
};
388472B22B8120A700D61AEE /* AvatarKit */ = {
isa = PBXGroup;
children = (
388472C42B8249B500D61AEE /* Core */,
388472BF2B82457500D61AEE /* Animojis */,
388472BE2B82456500D61AEE /* Memojis */,
388472BC2B82454700D61AEE /* Include */,
);
path = AvatarKit;
sourceTree = "<group>";
Expand All @@ -118,6 +125,50 @@
path = Management;
sourceTree = "<group>";
};
388472BC2B82454700D61AEE /* Include */ = {
isa = PBXGroup;
children = (
);
path = Include;
sourceTree = "<group>";
};
388472BE2B82456500D61AEE /* Memojis */ = {
isa = PBXGroup;
children = (
);
path = Memojis;
sourceTree = "<group>";
};
388472BF2B82457500D61AEE /* Animojis */ = {
isa = PBXGroup;
children = (
);
path = Animojis;
sourceTree = "<group>";
};
388472C02B82461000D61AEE /* Resources */ = {
isa = PBXGroup;
children = (
388472C12B82462000D61AEE /* Media.xcassets */,
);
path = Resources;
sourceTree = "<group>";
};
388472C32B8248C400D61AEE /* Core */ = {
isa = PBXGroup;
children = (
388472B32B8235D300D61AEE /* Management */,
);
path = Core;
sourceTree = "<group>";
};
388472C42B8249B500D61AEE /* Core */ = {
isa = PBXGroup;
children = (
);
path = Core;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -212,6 +263,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
388472C22B82462000D61AEE /* Media.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,41 @@

import SwiftUI

/// `AAvatarManagement` is a SwiftUI view for managing avatars within the SLAvatarKit framework.
///
/// - Parameters:
/// - url: The URL to direct users for more information about avatar creation and management.
///
/// This view provides a user interface for creating, managing, and customizing avatars on ScribbleLab. Users can explore various features related to avatars, including creation, management, and access to security and privacy settings.
///
/// - Note: Ensure the URL is a valid and accessible resource.
struct AAvatarManagement: View {
@Environment(\.dismiss) var dismiss
@Environment(\.openURL) var openURL

let url: String

/// Creates an instance of `AAvatarManagement`.
/// - Parameters:
/// - url: The URL to direct users for more information about avatar creation and management.
/// - Note: Ensure the URL is a valid and accessible resource.
init(url: String) {
self.url = url
}

@State private var createAvartarSheet: Bool = false
@State private var allowAvartars: Bool = false

var body: some View {
NavigationStack {
VStack {
Form { // List
Form {
Section {
HStack {
Spacer()

VStack {
Image("")
Image(.memojisHeader)
.resizable()
.scaledToFit()
.frame(width: 500, alignment: .center)
Expand Down Expand Up @@ -66,9 +84,7 @@ struct AAvatarManagement: View {

Section {
Button {
print("DEBUG: Open avatars docs")

openURL(URL(string: "https://github.com/ScribbleLabApp/ScribbleLab")!)
openURL(URL(string: url)!)
} label: {
HStack {
Text("Learn more")
Expand Down Expand Up @@ -96,7 +112,7 @@ struct AAvatarManagement: View {
.fontWeight(.semibold)
}
.sheet(isPresented: $createAvartarSheet) {
// CreateAvatarView()

}
}
}
Expand Down
34 changes: 34 additions & 0 deletions SLAvatarKit/AvatarKitUI/Core/Management/AAvatarManagementModel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// AAvatarManagementModel.h
// SLAvatarKit
//
// Created by Nevio Hirani on 18.02.24.
//

#import <Foundation/Foundation.h>

/**
`AAvatarManagementModel` is a class that provides functionality related to avatar management.
*/
@interface AAvatarManagementModel : NSObject

/**
Creates an avatar.
This method is responsible for initiating the process of avatar creation.
@note
Additional parameters or customization options may be added in the future.
@warning
Ensure that necessary resources and permissions are available before calling this method.
@discussion
The creation process may involve user interaction, file handling, or other operations, depending on the implementation.
@see
`Avatar` class for the representation of avatars.
*/
- (void)createAvatar;

@end
14 changes: 0 additions & 14 deletions SLAvatarKit/AvatarKitUI/Management/AAvatarManagementModel.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "SLAvatarKit@1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "memojis-header@1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions SLAvatarKit/SLAvatarKit.docc/SLAvatarKit.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ AvatarKit empowers Swift developers with a comprehensive set of tools and featur
- <doc:getting-started>
- <doc:samplecode>

### Manager
- <doc:AAvatarManagementModel>

### Shaders

### UI Libary
Expand Down
3 changes: 2 additions & 1 deletion SLAvatarKit/SLAvatarKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ FOUNDATION_EXPORT const unsigned char SLAvatarKitVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <SLAvatarKit/PublicHeader.h>


//! Managing Aavatars
#import <SLAvatarKit/AAvatarManagementModel.h>

0 comments on commit 6b25f12

Please sign in to comment.