Skip to content

Commit

Permalink
add objc support
Browse files Browse the repository at this point in the history
  • Loading branch information
StefaniOSApps committed Jun 28, 2020
1 parent f3bbe34 commit b58ea01
Show file tree
Hide file tree
Showing 28 changed files with 720 additions and 34 deletions.
2 changes: 1 addition & 1 deletion BIASystemKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BIASystemKit'
s.version = '0.1.1'
s.version = '1.0'
s.license = 'MIT'
s.summary = 'iOS SystemKit Framework (best-ios-apps.de)'
s.homepage = 'https://www.best-ios-apps.de'
Expand Down
File renamed without changes.
44 changes: 44 additions & 0 deletions BIASystemKit.xcodeproj/BIASystemKitExampleSwift_Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
227 changes: 206 additions & 21 deletions BIASystemKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "369E579C2496C10900253C90"
BuildableName = "BIASystemKit.framework"
BlueprintName = "BIASystemKit"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "36A02A5F2496CE2A00DBDEB6"
BuildableName = "BIASystemKitTests.xctest"
BlueprintName = "BIASystemKitTests"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "369E579C2496C10900253C90"
BuildableName = "BIASystemKit.framework"
BlueprintName = "BIASystemKit"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "368281C124A90D4100C196D6"
BuildableName = "Example ObjC.app"
BlueprintName = "Example ObjC"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "36A02A5F2496CE2A00DBDEB6"
BuildableName = "BIASystemKitTests.xctest"
BlueprintName = "BIASystemKitTests"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "368281C124A90D4100C196D6"
BuildableName = "Example ObjC.app"
BlueprintName = "Example ObjC"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "368281C124A90D4100C196D6"
BuildableName = "Example ObjC.app"
BlueprintName = "Example ObjC"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "369E57AB2496C11B00253C90"
BuildableName = "Example.app"
BlueprintName = "Example"
BuildableName = "Example Swift.app"
BlueprintName = "Example Swift"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand Down Expand Up @@ -45,8 +45,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "369E57AB2496C11B00253C90"
BuildableName = "Example.app"
BlueprintName = "Example"
BuildableName = "Example Swift.app"
BlueprintName = "Example Swift"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand All @@ -62,8 +62,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "369E57AB2496C11B00253C90"
BuildableName = "Example.app"
BlueprintName = "Example"
BuildableName = "Example Swift.app"
BlueprintName = "Example Swift"
ReferencedContainer = "container:BIASystemKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
<key>SchemeUserState</key>
<dict>
<key>BIASystemKit.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>Example ObjC.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>Example.xcscheme_^#shared#^_</key>
<key>Example Swift.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
Expand All @@ -22,11 +27,26 @@
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>368281C124A90D4100C196D6</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>369E579C2496C10900253C90</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>369E57AB2496C11B00253C90</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>36A02A5F2496CE2A00DBDEB6</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
2 changes: 1 addition & 1 deletion BIASystemKit/UIDevice/DeviceHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private extension DeviceHelper {
static let simulatorList = devices(filename: "device-map-simulator")

private static func devices(filename: String) -> [DeviceMap] {
guard let url = Bundle(for: DeviceHelper.self).url(forResource: filename, withExtension: "json") else { return [] }
guard let url = Bundle(for: self).url(forResource: filename, withExtension: "json") else { return [] }

do {
let data = try Data(contentsOf: url)
Expand Down
2 changes: 2 additions & 0 deletions BIASystemKit/UIDevice/UIDevice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

import UIKit


public extension UIDevice {

@objc
var formattedName: String {
return DeviceHelper(modelName: modelName).formattedName
}
Expand Down
11 changes: 11 additions & 0 deletions Example/ObjC/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Created by Stefan Nebel on 28.06.20.
// Copyright © 2020 Best-iOS-Apps. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

26 changes: 26 additions & 0 deletions Example/ObjC/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// Created by Stefan Nebel on 28.06.20.
// Copyright © 2020 Best-iOS-Apps. All rights reserved.
//

#import "AppDelegate.h"
#import "ExampleViewModel.h"
#import "ExampleViewController.h"

@interface AppDelegate ()
@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

ExampleViewModel *viewModel = [[ExampleViewModel alloc] init];
ExampleViewController *viewController = [[ExampleViewController alloc] initWithModel:viewModel];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
[self.window setRootViewController:viewController];
[self.window makeKeyAndVisible];

return YES;
}

@end
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions Example/ObjC/ExampleViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// Created by Stefan Nebel on 28.06.20.
// Copyright © 2020 Best-iOS-Apps. All rights reserved.
//

@import UIKit;
#import "ExampleViewModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface ExampleViewController : UIViewController
- (nonnull instancetype)initWithModel:(ExampleViewModel *)viewModel;
@end

NS_ASSUME_NONNULL_END

Loading

0 comments on commit b58ea01

Please sign in to comment.