Skip to content

Commit

Permalink
Added SwiftUI MobileTheme library as MobileTheming
Browse files Browse the repository at this point in the history
  • Loading branch information
ppraveentr committed Oct 25, 2024
1 parent a64b51c commit 44672f2
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 24 deletions.
27 changes: 18 additions & 9 deletions Example/MobileCoreExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand All @@ -12,6 +12,7 @@
D44E56F92341CFAB00A0E56C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44E56F82341CFAB00A0E56C /* UIKit.framework */; };
D49FE3182345D45A002B3742 /* SampleTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49FE3162345D459002B3742 /* SampleTableViewController.swift */; };
D49FE3192345D45A002B3742 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49FE3172345D459002B3742 /* ViewController.swift */; };
D4E050642CCB470B0028D1CE /* MobileTheming in Frameworks */ = {isa = PBXBuildFile; productRef = D4E050632CCB470B0028D1CE /* MobileTheming */; };
DE2A6A3426A4199A001F1FF3 /* AppTheming in Frameworks */ = {isa = PBXBuildFile; productRef = DE2A6A3326A4199A001F1FF3 /* AppTheming */; };
DE2A6A3626A4199A001F1FF3 /* CoreComponents in Frameworks */ = {isa = PBXBuildFile; productRef = DE2A6A3526A4199A001F1FF3 /* CoreComponents */; };
DE2A6A3826A4199A001F1FF3 /* CoreUtility in Frameworks */ = {isa = PBXBuildFile; productRef = DE2A6A3726A4199A001F1FF3 /* CoreUtility */; };
Expand Down Expand Up @@ -99,6 +100,7 @@
buildActionMask = 2147483647;
files = (
DE2A6A3826A4199A001F1FF3 /* CoreUtility in Frameworks */,
D4E050642CCB470B0028D1CE /* MobileTheming in Frameworks */,
DE2A6A3C26A419A3001F1FF3 /* Foundation.framework in Frameworks */,
DE2A6A3626A4199A001F1FF3 /* CoreComponents in Frameworks */,
DE2A6A3A26A4199A001F1FF3 /* NetworkLayer in Frameworks */,
Expand Down Expand Up @@ -273,6 +275,7 @@
DE2A6A3526A4199A001F1FF3 /* CoreComponents */,
DE2A6A3726A4199A001F1FF3 /* CoreUtility */,
DE2A6A3926A4199A001F1FF3 /* NetworkLayer */,
D4E050632CCB470B0028D1CE /* MobileTheming */,
);
productName = FTMobileCoreSample;
productReference = DE9221C91EF28CDF000C8FC7 /* MobileCoreExample.app */;
Expand Down Expand Up @@ -440,7 +443,7 @@
DEVELOPMENT_TEAM = W6W48SVQX7;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = MobileCoreTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -471,7 +474,7 @@
DEVELOPMENT_TEAM = W6W48SVQX7;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = MobileCoreTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -540,15 +543,15 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-Onone";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -599,14 +602,14 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_SWIFT_FLAGS = "";
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -625,7 +628,8 @@
DEVELOPMENT_TEAM = W6W48SVQX7;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = "$(TARGET_NAME)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -656,7 +660,8 @@
DEVELOPMENT_TEAM = W6W48SVQX7;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = "$(TARGET_NAME)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -716,6 +721,10 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
D4E050632CCB470B0028D1CE /* MobileTheming */ = {
isa = XCSwiftPackageProductDependency;
productName = MobileTheming;
};
DE2A6A3326A4199A001F1FF3 /* AppTheming */ = {
isa = XCSwiftPackageProductDependency;
productName = AppTheming;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"object": {
"pins": [
{
"package": "MobileCore",
"repositoryURL": "https://github.com/ppraveentr/MobileCore.git",
"package": "MobileTheme",
"repositoryURL": "https://github.com/ppraveentr/MobileTheme.git",
"state": {
"branch": "feature/SPM-Setup",
"revision": "272f5ac227e18869e191ca2474e7da74394c26a2",
"version": null
"branch": null,
"revision": "8e321347fc520ea04d1fa6e49a0bd5765cc4f49b",
"version": "1.2.0"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion Example/MobileCoreExample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import NetworkLayer
import AppTheming
#endif

@UIApplicationMain
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var kBundle = Bundle(for: AppDelegate.self)
var window: UIWindow?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import AppTheming
import CoreComponents
#endif

class SampleTableViewController: UIViewController, TableViewControllerProtocol {
class SampleTableViewController: UIViewController, @preconcurrency TableViewControllerProtocol {

@IBOutlet var footerView: UIView!

Expand Down
15 changes: 10 additions & 5 deletions MobileCore.podspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Pod::Spec.new do |s|
s.name = 'MobileCore'
s.version = '0.1.3'
s.version = '0.1.5'
s.summary = 'MobileCore framework.'
s.homepage = 'https://github.com/ppraveentr/MobileCore'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'PraveenP' => 'ppraveentr@gmail.com' }
s.source = { :git => 'https://github.com/ppraveentr/MobileCore.git', :tag => s.version.to_s }
s.weak_framework = 'UIKit'

s.ios.deployment_target = '10.0'
s.swift_version = '5.0'
s.default_subspecs = 'CoreUtility', 'NetworkLayer', 'CoreComponents', 'AppTheming'
s.ios.deployment_target = '16.0'
s.swift_version = '6.0'
s.default_subspecs = 'CoreUtility', 'NetworkLayer', 'CoreComponents', 'AppTheming', 'MobileTheming'

s.subspec 'CoreUtility' do |utility|
utility.source_files = 'Sources/CoreUtility/**/*.{h,m,swift}'
Expand All @@ -35,5 +35,10 @@ Pod::Spec.new do |s|
coreComponents.dependency 'MobileCore/CoreUtility'
coreComponents.header_dir = "CoreComponents"
end


s.subspec 'MobileTheming' do |theme|
theme.source_files = 'Sources/MobileTheming/**/*.{h,m,swift}'
theme.header_dir = "MobileTheming"
end

end
11 changes: 8 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ private let resources: [Resource] = [ .process("Resources") ]

let package = Package(
name: "MobileCore",
platforms: [.iOS(.v10)],
platforms: [.iOS(.v14)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(name: "CoreUtility", targets: ["CoreUtility"]),
.library(name: "CoreComponents", targets: ["CoreComponents"]),
.library(name: "AppTheming", targets: ["AppTheming"]),
.library(name: "NetworkLayer", targets: ["NetworkLayer"])
.library(name: "NetworkLayer", targets: ["NetworkLayer"]),
.library(name: "MobileTheming", targets: ["MobileTheming"])
],
dependencies: [
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "MobileTheme", url: "https://github.com/ppraveentr/MobileTheme.git", from: "1.2.0")
],
targets: [
// MARK: CoreUtility
Expand All @@ -34,7 +36,10 @@ let package = Package(

// MARK: NetworkLayer
.target(name: "NetworkLayer", dependencies: dependencies),
.testTarget(name: "NetworkLayerTests", dependencies: dependencies + ["NetworkLayer"], resources: resources)
.testTarget(name: "NetworkLayerTests", dependencies: dependencies + ["NetworkLayer"], resources: resources),

// MARK: SwiftUI Theming
.target(name: "MobileTheming", dependencies: ["MobileTheme"])
],
swiftLanguageVersions: [.v5]
)
15 changes: 15 additions & 0 deletions Sources/MobileTheming/ThemesManager.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// ThemesManager.swift
// MobileCore
//
// Created by Praveen Prabhakar on 10/24/24.
//

#if canImport(MobileTheming)
//import CoreUtility
#endif
import Foundation
import SwiftUI

open class ThemesManager {
}

0 comments on commit 44672f2

Please sign in to comment.