From e88fec9971eae101529deb7b2bcd58b2284c5e41 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 13 Nov 2020 23:56:09 +0800 Subject: add macapp with framework --- .../macapp_with_framework/src/app/AppDelegate.h | 15 + .../macapp_with_framework/src/app/AppDelegate.m | 29 + .../AppIcon.appiconset/Contents.json | 58 ++ .../src/app/Assets.xcassets/Contents.json | 6 + .../src/app/Base.lproj/Main.storyboard | 717 +++++++++++++++++++++ .../objc/macapp_with_framework/src/app/Info.plist | 38 ++ .../macapp_with_framework/src/app/ViewController.h | 15 + .../macapp_with_framework/src/app/ViewController.m | 27 + .../objc/macapp_with_framework/src/app/main.m | 16 + .../macapp_with_framework/src/framework/Info.plist | 24 + .../macapp_with_framework/src/framework/test.h | 3 + .../macapp_with_framework/src/framework/test.m | 6 + 12 files changed, 954 insertions(+) create mode 100644 tests/projects/objc/macapp_with_framework/src/app/AppDelegate.h create mode 100644 tests/projects/objc/macapp_with_framework/src/app/AppDelegate.m create mode 100644 tests/projects/objc/macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 tests/projects/objc/macapp_with_framework/src/app/Assets.xcassets/Contents.json create mode 100644 tests/projects/objc/macapp_with_framework/src/app/Base.lproj/Main.storyboard create mode 100644 tests/projects/objc/macapp_with_framework/src/app/Info.plist create mode 100644 tests/projects/objc/macapp_with_framework/src/app/ViewController.h create mode 100644 tests/projects/objc/macapp_with_framework/src/app/ViewController.m create mode 100644 tests/projects/objc/macapp_with_framework/src/app/main.m create mode 100644 tests/projects/objc/macapp_with_framework/src/framework/Info.plist create mode 100644 tests/projects/objc/macapp_with_framework/src/framework/test.h create mode 100644 tests/projects/objc/macapp_with_framework/src/framework/test.m (limited to 'tests/projects/objc/macapp_with_framework/src') diff --git a/tests/projects/objc/macapp_with_framework/src/app/AppDelegate.h b/tests/projects/objc/macapp_with_framework/src/app/AppDelegate.h new file mode 100644 index 000000000..5f5ba059e --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/app/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import + +@interface AppDelegate : NSObject + + +@end + diff --git a/tests/projects/objc/macapp_with_framework/src/app/AppDelegate.m b/tests/projects/objc/macapp_with_framework/src/app/AppDelegate.m new file mode 100644 index 000000000..1f68e1eb8 --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/app/AppDelegate.m @@ -0,0 +1,29 @@ +// +// AppDelegate.m +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import "AppDelegate.h" +#import + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application + add(1, 2); +} + + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + +@end diff --git a/tests/projects/objc/macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json b/tests/projects/objc/macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..2db2b1c7c --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/tests/projects/objc/macapp_with_framework/src/app/Assets.xcassets/Contents.json b/tests/projects/objc/macapp_with_framework/src/app/Assets.xcassets/Contents.json new file mode 100644 index 000000000..da4a164c9 --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/app/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/tests/projects/objc/macapp_with_framework/src/app/Base.lproj/Main.storyboard b/tests/projects/objc/macapp_with_framework/src/app/Base.lproj/Main.storyboard new file mode 100644 index 000000000..7a6d659a5 --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/app/Base.lproj/Main.storyboard @@ -0,0 +1,717 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/projects/objc/macapp_with_framework/src/app/Info.plist b/tests/projects/objc/macapp_with_framework/src/app/Info.plist new file mode 100644 index 000000000..ce53d780c --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/app/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundleDisplayName + $(PRODUCT_DISPLAY_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2020 tboox. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + NSSupportsAutomaticTermination + + NSSupportsSuddenTermination + + + diff --git a/tests/projects/objc/macapp_with_framework/src/app/ViewController.h b/tests/projects/objc/macapp_with_framework/src/app/ViewController.h new file mode 100644 index 000000000..a974fc934 --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/app/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import + +@interface ViewController : NSViewController + + +@end + diff --git a/tests/projects/objc/macapp_with_framework/src/app/ViewController.m b/tests/projects/objc/macapp_with_framework/src/app/ViewController.m new file mode 100644 index 000000000..bccdf6189 --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/app/ViewController.m @@ -0,0 +1,27 @@ +// +// ViewController.m +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import "ViewController.h" + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Do any additional setup after loading the view. +} + + +- (void)setRepresentedObject:(id)representedObject { + [super setRepresentedObject:representedObject]; + + // Update the view, if already loaded. +} + + +@end diff --git a/tests/projects/objc/macapp_with_framework/src/app/main.m b/tests/projects/objc/macapp_with_framework/src/app/main.m new file mode 100644 index 000000000..ae3706f51 --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/app/main.m @@ -0,0 +1,16 @@ +// +// main.m +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import + +int main(int argc, const char * argv[]) { + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + } + return NSApplicationMain(argc, argv); +} diff --git a/tests/projects/objc/macapp_with_framework/src/framework/Info.plist b/tests/projects/objc/macapp_with_framework/src/framework/Info.plist new file mode 100644 index 000000000..20608314e --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/framework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2020 tboox. All rights reserved. + + diff --git a/tests/projects/objc/macapp_with_framework/src/framework/test.h b/tests/projects/objc/macapp_with_framework/src/framework/test.h new file mode 100644 index 000000000..d882546d1 --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/framework/test.h @@ -0,0 +1,3 @@ +#import + +FOUNDATION_EXPORT int add(int a, int b); diff --git a/tests/projects/objc/macapp_with_framework/src/framework/test.m b/tests/projects/objc/macapp_with_framework/src/framework/test.m new file mode 100644 index 000000000..84422f6a7 --- /dev/null +++ b/tests/projects/objc/macapp_with_framework/src/framework/test.m @@ -0,0 +1,6 @@ +#include "test.h" + +int add(int a, int b) +{ + return a + b; +} -- cgit v1.3.1