Skip to content

Commit 83982aa

Browse files
rigor789darind
andauthored
feat: apple silicon support (#108)
* feat: Add support for Apple silicon * feat: Multi-arch metadata generator * build: simplify build scripts Co-authored-by: Darin Dimitrov <[email protected]>
1 parent 6ec9335 commit 83982aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+597
-92
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
path = libffi
33
url = https://github.com/NativeScript/libffi.git
44
branch = darind/v8-ios
5+
[submodule "llvm"]
6+
path = llvm
7+
url = https://github.com/NativeScript/ios-llvm.git
8+
branch = master

.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@ os: osx
22
osx_image: xcode11
33
language: objective-c
44
git:
5-
submodules: false
5+
submodules: true
66
depth: 1
77

88
before_install:
9-
- curl https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz --output $HOME/clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz
10-
- tar -xzf $HOME/clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz --directory $HOME
11-
- export PATH=$PATH:$HOME/clang+llvm-8.0.0-x86_64-apple-darwin/bin
12-
- llvm-config --version
139
- cmake --version
1410
- make --version
1511
- brew install chargepoint/xcparse/xcparse
Binary file not shown.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>LibraryIdentifier</key>
9+
<string>ios-arm64_x86_64-simulator</string>
10+
<key>LibraryPath</key>
11+
<string>TNSWidgets.framework</string>
12+
<key>SupportedArchitectures</key>
13+
<array>
14+
<string>arm64</string>
15+
<string>x86_64</string>
16+
</array>
17+
<key>SupportedPlatform</key>
18+
<string>ios</string>
19+
<key>SupportedPlatformVariant</key>
20+
<string>simulator</string>
21+
</dict>
22+
<dict>
23+
<key>LibraryIdentifier</key>
24+
<string>ios-arm64</string>
25+
<key>LibraryPath</key>
26+
<string>TNSWidgets.framework</string>
27+
<key>SupportedArchitectures</key>
28+
<array>
29+
<string>arm64</string>
30+
</array>
31+
<key>SupportedPlatform</key>
32+
<string>ios</string>
33+
</dict>
34+
</array>
35+
<key>CFBundlePackageType</key>
36+
<string>XFWK</string>
37+
<key>XCFrameworkFormatVersion</key>
38+
<string>1.0</string>
39+
</dict>
40+
</plist>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// NSData+Async.h
3+
// TNSWidgets
4+
//
5+
// Created by Peter Staev on 7.08.19.
6+
// Copyright © 2019 Telerik A D. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@interface NSData (Async)
14+
15+
+ (void)dataWithContentsOfFile:(nonnull NSString*)path
16+
completion:(void (^) (NSData*))callback;
17+
18+
- (void)writeToFile:(nonnull NSString*) path
19+
atomically:(BOOL)atomically
20+
completion:(void (^) ())callback;
21+
22+
@end
23+
24+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//
2+
// NSString+Async.h
3+
// TNSWidgets
4+
//
5+
// Created by Peter Staev on 5.08.19.
6+
// Copyright © 2019 Telerik A D. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@interface NSString (Async)
14+
15+
+ (void)stringWithContentsOfFile:(nonnull NSString*)path
16+
encoding:(NSStringEncoding)enc
17+
completion:(void (^) (NSString*, NSError*))callback;
18+
19+
- (void)writeToFile:(nonnull NSString*) path
20+
atomically:(BOOL)atomically
21+
encoding:(NSStringEncoding)enc
22+
completion:(void (^) (NSError*))callback;
23+
@end
24+
25+
NS_ASSUME_NONNULL_END

AppWithModules/Frameworks/TNSWidgets.framework/Headers/TNSWidgets.h renamed to AppWithModules/Frameworks/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSWidgets.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ FOUNDATION_EXPORT const unsigned char TNSWidgetsVersionString[];
2020
#import "UIView+PassThroughParent.h"
2121
#import "TNSLabel.h"
2222
#import "TNSProcess.h"
23+
#import "NSString+Async.h"
24+
#import "NSData+Async.h"

0 commit comments

Comments
 (0)