diff options
| author | ruki <[email protected]> | 2020-11-14 00:49:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-14 00:49:11 +0800 |
| commit | 86da6d5b870c4d9f6d774a71acb91c7c609d8fd7 (patch) | |
| tree | 980cd43033e995b85190c1a08c5fc31f01264f20 | |
| parent | 0d59f55c4926ed3566538d2f13e8ad6b402a256b (diff) | |
improve ios app tests
5 files changed, 16 insertions, 9 deletions
diff --git a/tests/projects/objc/iosapp_with_framework/src/app/AppDelegate.m b/tests/projects/objc/iosapp_with_framework/src/app/AppDelegate.m index bba94491b..cdcf08c1e 100644 --- a/tests/projects/objc/iosapp_with_framework/src/app/AppDelegate.m +++ b/tests/projects/objc/iosapp_with_framework/src/app/AppDelegate.m @@ -18,7 +18,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. - add(1, 2); + int c = add(1, 2); + NSLog(@"result: %d", c); return YES; } diff --git a/tests/projects/objc/iosapp_with_framework/src/framework/Info.plist b/tests/projects/objc/iosapp_with_framework/src/framework/Info.plist index 20608314e..cc5fe3960 100644 --- a/tests/projects/objc/iosapp_with_framework/src/framework/Info.plist +++ b/tests/projects/objc/iosapp_with_framework/src/framework/Info.plist @@ -19,6 +19,6 @@ <key>CFBundleVersion</key> <string>$(CURRENT_PROJECT_VERSION)</string> <key>NSHumanReadableCopyright</key> - <string>Copyright © 2020 tboox. All rights reserved.</string> + <string>Copyright © 2020 xmake.io. All rights reserved.</string> </dict> </plist> diff --git a/tests/projects/objc/iosapp_with_framework/src/framework/test.m b/tests/projects/objc/iosapp_with_framework/src/framework/test.m index 84422f6a7..a4aac7e2d 100644 --- a/tests/projects/objc/iosapp_with_framework/src/framework/test.m +++ b/tests/projects/objc/iosapp_with_framework/src/framework/test.m @@ -1,6 +1,8 @@ -#include "test.h" +#import "test.h" +#import <Foundation/Foundation.h> int add(int a, int b) { + NSLog(@"add(%d, %d)", a, b); return a + b; } diff --git a/xmake/rules/xcode/bundle/xmake.lua b/xmake/rules/xcode/bundle/xmake.lua index a3adfa0f9..c96fc72ac 100644 --- a/xmake/rules/xcode/bundle/xmake.lua +++ b/xmake/rules/xcode/bundle/xmake.lua @@ -106,10 +106,12 @@ rule("xcode.bundle") on_install(function (target) local bundledir = path.absolute(target:data("xcode.bundle.rootdir")) local installdir = target:installdir() - if not os.isdir(installdir) then - os.mkdir(installdir) + if installdir then + if not os.isdir(installdir) then + os.mkdir(installdir) + end + os.vcp(bundledir, installdir) end - os.vcp(bundledir, installdir) end) on_uninstall(function (target) diff --git a/xmake/rules/xcode/framework/xmake.lua b/xmake/rules/xcode/framework/xmake.lua index 3d8137aeb..50530a61f 100644 --- a/xmake/rules/xcode/framework/xmake.lua +++ b/xmake/rules/xcode/framework/xmake.lua @@ -160,10 +160,12 @@ rule("xcode.framework") on_install(function (target) local bundledir = path.absolute(target:data("xcode.bundle.rootdir")) local installdir = target:installdir() - if not os.isdir(installdir) then - os.mkdir(installdir) + if installdir then + if not os.isdir(installdir) then + os.mkdir(installdir) + end + os.vcp(bundledir, installdir) end - os.vcp(bundledir, installdir) end) on_uninstall(function (target) |
