Skip to content

Commit

Permalink
Merge pull request #4 from mladjan/objc-support
Browse files Browse the repository at this point in the history
Added support for ObjC and Sample project with UIKit and ObjC
  • Loading branch information
goenning authored Jun 21, 2023
2 parents ed2db3b + 357e11d commit 00bf2a3
Show file tree
Hide file tree
Showing 15 changed files with 517 additions and 17 deletions.
185 changes: 185 additions & 0 deletions Example/HelloWorld.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
objects = {

/* Begin PBXBuildFile section */
714269612A409AC5006B491E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 714269602A409AC5006B491E /* AppDelegate.m */; };
714269642A409AC5006B491E /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 714269632A409AC5006B491E /* SceneDelegate.m */; };
714269672A409AC5006B491E /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 714269662A409AC5006B491E /* ViewController.m */; };
7142696A2A409AC5006B491E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 714269682A409AC5006B491E /* Main.storyboard */; };
7142696C2A409AC6006B491E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7142696B2A409AC6006B491E /* Assets.xcassets */; };
7142696F2A409AC6006B491E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7142696D2A409AC6006B491E /* LaunchScreen.storyboard */; };
714269722A409AC6006B491E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 714269712A409AC6006B491E /* main.m */; };
714269772A409B53006B491E /* Aptabase in Frameworks */ = {isa = PBXBuildFile; productRef = 714269762A409B53006B491E /* Aptabase */; };
E2019AE829DAEF2600204720 /* HelloWorldApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2019AE729DAEF2600204720 /* HelloWorldApp.swift */; };
E2019AEA29DAEF2600204720 /* CounterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2019AE929DAEF2600204720 /* CounterView.swift */; };
E2019AEC29DAEF2700204720 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2019AEB29DAEF2700204720 /* Assets.xcassets */; };
Expand All @@ -15,6 +23,18 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
7142695D2A409AC5006B491E /* HelloWorldObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorldObjC.app; sourceTree = BUILT_PRODUCTS_DIR; };
7142695F2A409AC5006B491E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
714269602A409AC5006B491E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
714269622A409AC5006B491E /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; };
714269632A409AC5006B491E /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; };
714269652A409AC5006B491E /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
714269662A409AC5006B491E /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
714269692A409AC5006B491E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
7142696B2A409AC6006B491E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
7142696E2A409AC6006B491E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
714269702A409AC6006B491E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
714269712A409AC6006B491E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
E2019AE429DAEF2600204720 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; };
E2019AE729DAEF2600204720 /* HelloWorldApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelloWorldApp.swift; sourceTree = "<group>"; };
E2019AE929DAEF2600204720 /* CounterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CounterView.swift; sourceTree = "<group>"; };
Expand All @@ -24,6 +44,14 @@
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
7142695A2A409AC5006B491E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
714269772A409B53006B491E /* Aptabase in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
E2019AE129DAEF2600204720 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -35,11 +63,30 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
7142695E2A409AC5006B491E /* HelloWorldObjC */ = {
isa = PBXGroup;
children = (
7142695F2A409AC5006B491E /* AppDelegate.h */,
714269602A409AC5006B491E /* AppDelegate.m */,
714269622A409AC5006B491E /* SceneDelegate.h */,
714269632A409AC5006B491E /* SceneDelegate.m */,
714269652A409AC5006B491E /* ViewController.h */,
714269662A409AC5006B491E /* ViewController.m */,
714269682A409AC5006B491E /* Main.storyboard */,
7142696B2A409AC6006B491E /* Assets.xcassets */,
7142696D2A409AC6006B491E /* LaunchScreen.storyboard */,
714269702A409AC6006B491E /* Info.plist */,
714269712A409AC6006B491E /* main.m */,
);
path = HelloWorldObjC;
sourceTree = "<group>";
};
E2019ADB29DAEF2600204720 = {
isa = PBXGroup;
children = (
E2019AF529DAF18F00204720 /* Packages */,
E2019AE629DAEF2600204720 /* HelloWorld */,
7142695E2A409AC5006B491E /* HelloWorldObjC */,
E2019AE529DAEF2600204720 /* Products */,
E2019AF729DAF45C00204720 /* Frameworks */,
);
Expand All @@ -49,6 +96,7 @@
isa = PBXGroup;
children = (
E2019AE429DAEF2600204720 /* HelloWorld.app */,
7142695D2A409AC5006B491E /* HelloWorldObjC.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -90,6 +138,26 @@
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
7142695C2A409AC5006B491E /* HelloWorldObjC */ = {
isa = PBXNativeTarget;
buildConfigurationList = 714269732A409AC6006B491E /* Build configuration list for PBXNativeTarget "HelloWorldObjC" */;
buildPhases = (
714269592A409AC5006B491E /* Sources */,
7142695A2A409AC5006B491E /* Frameworks */,
7142695B2A409AC5006B491E /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = HelloWorldObjC;
packageProductDependencies = (
714269762A409B53006B491E /* Aptabase */,
);
productName = HelloWorldObjC;
productReference = 7142695D2A409AC5006B491E /* HelloWorldObjC.app */;
productType = "com.apple.product-type.application";
};
E2019AE329DAEF2600204720 /* HelloWorld */ = {
isa = PBXNativeTarget;
buildConfigurationList = E2019AF229DAEF2700204720 /* Build configuration list for PBXNativeTarget "HelloWorld" */;
Expand Down Expand Up @@ -120,6 +188,9 @@
LastSwiftUpdateCheck = 1420;
LastUpgradeCheck = 1420;
TargetAttributes = {
7142695C2A409AC5006B491E = {
CreatedOnToolsVersion = 14.3.1;
};
E2019AE329DAEF2600204720 = {
CreatedOnToolsVersion = 14.2;
};
Expand All @@ -139,11 +210,22 @@
projectRoot = "";
targets = (
E2019AE329DAEF2600204720 /* HelloWorld */,
7142695C2A409AC5006B491E /* HelloWorldObjC */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
7142695B2A409AC5006B491E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7142696F2A409AC6006B491E /* LaunchScreen.storyboard in Resources */,
7142696C2A409AC6006B491E /* Assets.xcassets in Resources */,
7142696A2A409AC5006B491E /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
E2019AE229DAEF2600204720 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -156,6 +238,17 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
714269592A409AC5006B491E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
714269672A409AC5006B491E /* ViewController.m in Sources */,
714269612A409AC5006B491E /* AppDelegate.m in Sources */,
714269722A409AC6006B491E /* main.m in Sources */,
714269642A409AC5006B491E /* SceneDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
E2019AE029DAEF2600204720 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -167,7 +260,84 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
714269682A409AC5006B491E /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
714269692A409AC5006B491E /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
7142696D2A409AC6006B491E /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
7142696E2A409AC6006B491E /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
714269742A409AC6006B491E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = HelloWorldObjC/Info.plist;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = rs.mousecode.HelloWorldObjC;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
714269752A409AC6006B491E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = HelloWorldObjC/Info.plist;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = rs.mousecode.HelloWorldObjC;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
E2019AF029DAEF2700204720 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -290,6 +460,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"HelloWorld/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand Down Expand Up @@ -318,6 +489,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"HelloWorld/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand All @@ -341,6 +513,15 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
714269732A409AC6006B491E /* Build configuration list for PBXNativeTarget "HelloWorldObjC" */ = {
isa = XCConfigurationList;
buildConfigurations = (
714269742A409AC6006B491E /* Debug */,
714269752A409AC6006B491E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E2019ADF29DAEF2600204720 /* Build configuration list for PBXProject "HelloWorld" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand All @@ -362,6 +543,10 @@
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
714269762A409B53006B491E /* Aptabase */ = {
isa = XCSwiftPackageProductDependency;
productName = Aptabase;
};
E2019AF829DAF45C00204720 /* Aptabase */ = {
isa = XCSwiftPackageProductDependency;
productName = Aptabase;
Expand Down
14 changes: 14 additions & 0 deletions Example/HelloWorldObjC/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// AppDelegate.h
// HelloWorldObjC
//
// Created by Mladjan Antic on 19.6.23..
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>


@end

52 changes: 52 additions & 0 deletions Example/HelloWorldObjC/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// AppDelegate.m
// HelloWorldObjC
//
// Created by Mladjan Antic on 19.6.23..
//

#import "AppDelegate.h"
@import Aptabase;


@interface AppDelegate ()

@end

@implementation AppDelegate


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

// Override point for customization after application launch.


// Using cloud based APP key
[[Aptabase shared] initializeWithAppKey:@"A-DEV-0000000000"];

// Using self hosted APP key
// InitOptions *opts = [[InitOptions alloc] initWithHost: @"https://aptabase.yourserver.com"];
// [[Aptabase shared] initializeWithAppKey:@"A-SH-0000000000" options: opts];

return YES;
}


#pragma mark - UISceneSession lifecycle


- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
}


- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}


@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions Example/HelloWorldObjC/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading

0 comments on commit 00bf2a3

Please sign in to comment.