mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
feat(ios): build TNSWidgets as XCFramework (#9167)
This commit is contained in:
Binary file not shown.
Binary file not shown.
@ -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>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>TNSWidgets.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>TNSWidgets.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)writeToFile:(nonnull NSString*) path
|
||||
atomically:(BOOL)atomically
|
||||
completion:(void (^) ())callback;
|
||||
completion:(void (^) (void))callback;
|
||||
|
||||
@end
|
||||
|
@ -14,7 +14,7 @@
|
||||
/**
|
||||
* Get the milliseconds since the process started.
|
||||
*/
|
||||
double __tns_uptime();
|
||||
double __tns_uptime(void);
|
||||
|
||||
/**
|
||||
* Provides access to NSLog. The runtime implementation of console.log is filtered in release.
|
Binary file not shown.
@ -0,0 +1,17 @@
|
||||
//
|
||||
// NSObject+Swizzling.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Manol Donev on 21.08.18.
|
||||
// Copyright © 2018 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <objc/runtime.h>
|
||||
|
||||
|
||||
@interface NSObject (Swizzling)
|
||||
|
||||
+ (void)swizzleInstanceMethodWithOriginalSelector:(SEL)originalSelector fromClass:(Class)classContainigOriginalSel withSwizzlingSelector:(SEL)swizzlingSelector;
|
||||
|
||||
@end
|
@ -0,0 +1,18 @@
|
||||
//
|
||||
// UIView+PropertyBag.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Manol Donev on 21.08.18.
|
||||
// Copyright © 2018 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@interface UIView (PropertyBag)
|
||||
|
||||
- (id) propertyValueForKey:(NSString*) key;
|
||||
- (void) setPropertyValue:(id) value forKey:(NSString*) key;
|
||||
|
||||
@end
|
Binary file not shown.
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.org.nativescript.TNSWidgets</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
@ -0,0 +1,24 @@
|
||||
//
|
||||
// NSData+Async.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Peter Staev on 7.08.19.
|
||||
// Copyright © 2019 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSData (Async)
|
||||
|
||||
+ (void)dataWithContentsOfFile:(nonnull NSString*)path
|
||||
completion:(void (^) (NSData*))callback;
|
||||
|
||||
- (void)writeToFile:(nonnull NSString*) path
|
||||
atomically:(BOOL)atomically
|
||||
completion:(void (^) (void))callback;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -0,0 +1,25 @@
|
||||
//
|
||||
// NSString+Async.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Peter Staev on 5.08.19.
|
||||
// Copyright © 2019 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSString (Async)
|
||||
|
||||
+ (void)stringWithContentsOfFile:(nonnull NSString*)path
|
||||
encoding:(NSStringEncoding)enc
|
||||
completion:(void (^) (NSString*, NSError*))callback;
|
||||
|
||||
- (void)writeToFile:(nonnull NSString*) path
|
||||
atomically:(BOOL)atomically
|
||||
encoding:(NSStringEncoding)enc
|
||||
completion:(void (^) (NSError*))callback;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -0,0 +1,16 @@
|
||||
//
|
||||
// TNSLabel.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Hristo Hristov on 6/9/16.
|
||||
// Copyright © 2016 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface TNSLabel : UILabel
|
||||
|
||||
@property(nonatomic) UIEdgeInsets padding;
|
||||
@property(nonatomic) UIEdgeInsets borderThickness;
|
||||
|
||||
@end
|
@ -0,0 +1,29 @@
|
||||
//
|
||||
// TNSProcess.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Panayot Cankov on 15/05/2017.
|
||||
// Copyright © 2017 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TNSProcess_h
|
||||
#define TNSProcess_h
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Get the milliseconds since the process started.
|
||||
*/
|
||||
double __tns_uptime(void);
|
||||
|
||||
/**
|
||||
* Provides access to NSLog. The runtime implementation of console.log is filtered in release.
|
||||
* We rarely need to log in release but in cases such as when logging app startup times in release,
|
||||
* this will be convenient shortcut to NSLog, NSLog is not exposed.
|
||||
*
|
||||
* Please note the {N} CLI may be filtering app output, prefixing the message with "CONSOLE LOG"
|
||||
* will make the logs visible in "tns run ios --release" builds.
|
||||
*/
|
||||
void __nslog(NSString* message);
|
||||
|
||||
#endif /* TNSProcess_h */
|
@ -0,0 +1,24 @@
|
||||
//
|
||||
// TNSWidgets.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Panayot Cankov on 4/27/16.
|
||||
// Copyright © 2016 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for TNSWidgets.
|
||||
FOUNDATION_EXPORT double TNSWidgetsVersionNumber;
|
||||
|
||||
//! Project version string for TNSWidgets.
|
||||
FOUNDATION_EXPORT const unsigned char TNSWidgetsVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <TNSWidgets/PublicHeader.h>
|
||||
|
||||
#import "UIImage+TNSBlocks.h"
|
||||
#import "UIView+PassThroughParent.h"
|
||||
#import "TNSLabel.h"
|
||||
#import "TNSProcess.h"
|
||||
#import "NSString+Async.h"
|
||||
#import "NSData+Async.h"
|
@ -0,0 +1,26 @@
|
||||
//
|
||||
// UIImage+UIImage_Async.h
|
||||
// TKImageAsync
|
||||
//
|
||||
// Created by Panayot Cankov on 4/18/16.
|
||||
// Copyright © 2016 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
@interface UIImage (TNSBlocks)
|
||||
|
||||
/**
|
||||
* Similar to imageNamed: however it runs on a separate queue so the UI thread is not blocked.
|
||||
* It also draws the UIImage in a small thumb to force decoding potentially avoiding UI hicckups when displayed.
|
||||
*/
|
||||
+ (void) tns_safeDecodeImageNamed: (NSString*) name completion: (void (^) (UIImage*))callback;
|
||||
|
||||
/**
|
||||
* Same as imageNamed, however calls to this method are sinchronized to be thread safe in iOS8 along with calls to tns_safeImageNamed and tns_safeDecodeImageNamed:completion:
|
||||
* imageNamed is thread safe in iOS 9 and later so in later versions this methods simply fallbacks to imageNamed:
|
||||
*/
|
||||
+ (UIImage*) tns_safeImageNamed: (NSString*) name;
|
||||
|
||||
+ (void) tns_decodeImageWithData: (NSData*) data completion: (void (^) (UIImage*))callback;
|
||||
+ (void) tns_decodeImageWidthContentsOfFile: (NSString*) file completion: (void (^) (UIImage*))callback;
|
||||
|
||||
@end
|
@ -0,0 +1,17 @@
|
||||
//
|
||||
// UIView+PassThroughParent.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Manol Donev on 21.08.18.
|
||||
// Copyright © 2018 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@interface UIView (PassThroughParent)
|
||||
|
||||
- (BOOL) passThroughParent;
|
||||
- (void) setPassThroughParent:(BOOL) passThroughParent;
|
||||
|
||||
@end
|
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
framework module TNSWidgets {
|
||||
umbrella header "TNSWidgets.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
//
|
||||
// NSObject+Swizzling.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Manol Donev on 21.08.18.
|
||||
// Copyright © 2018 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <objc/runtime.h>
|
||||
|
||||
|
||||
@interface NSObject (Swizzling)
|
||||
|
||||
+ (void)swizzleInstanceMethodWithOriginalSelector:(SEL)originalSelector fromClass:(Class)classContainigOriginalSel withSwizzlingSelector:(SEL)swizzlingSelector;
|
||||
|
||||
@end
|
@ -0,0 +1,18 @@
|
||||
//
|
||||
// UIView+PropertyBag.h
|
||||
// TNSWidgets
|
||||
//
|
||||
// Created by Manol Donev on 21.08.18.
|
||||
// Copyright © 2018 Telerik A D. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@interface UIView (PropertyBag)
|
||||
|
||||
- (id) propertyValueForKey:(NSString*) key;
|
||||
- (void) setPropertyValue:(id) value forKey:(NSString*) key;
|
||||
|
||||
@end
|
Binary file not shown.
@ -0,0 +1,212 @@
|
||||
<?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>files</key>
|
||||
<dict>
|
||||
<key>Headers/NSData+Async.h</key>
|
||||
<data>
|
||||
9BsuK8QsA57YnHHgpWIgaHygSEk=
|
||||
</data>
|
||||
<key>Headers/NSString+Async.h</key>
|
||||
<data>
|
||||
o8366y9zYMOVyObC3vtKKy/8jxA=
|
||||
</data>
|
||||
<key>Headers/TNSLabel.h</key>
|
||||
<data>
|
||||
x8V4jT6oNNls+KE3y/DE6ij9eCk=
|
||||
</data>
|
||||
<key>Headers/TNSProcess.h</key>
|
||||
<data>
|
||||
dHuocpQ4b8KDApobwYNCqXcC6ZE=
|
||||
</data>
|
||||
<key>Headers/TNSWidgets.h</key>
|
||||
<data>
|
||||
gUvu5bjZg5Aie5iJ1krxFmDrHwk=
|
||||
</data>
|
||||
<key>Headers/UIImage+TNSBlocks.h</key>
|
||||
<data>
|
||||
OzGlvoGOJcFC6Z+YR5xThjLTUK4=
|
||||
</data>
|
||||
<key>Headers/UIView+PassThroughParent.h</key>
|
||||
<data>
|
||||
zdxBV/QJg7NPyx04RmZrXsxbHKU=
|
||||
</data>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
p3XXJG8ZAD443Py5pz+mDsZ5EeY=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
ANIiDnbrCY8YCOtOm1xDrUyt8do=
|
||||
</data>
|
||||
<key>PrivateHeaders/NSObject+Swizzling.h</key>
|
||||
<data>
|
||||
wRUUMHgrTVWHd/e8bDqN8sYZth4=
|
||||
</data>
|
||||
<key>PrivateHeaders/UIView+PropertyBag.h</key>
|
||||
<data>
|
||||
3USXIiZgky+5k7en+R6oyZ3pP18=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Headers/NSData+Async.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
JdjuVUBed00Ged4cSDzYLXONUlESu+dae9KN0PYJ/nM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/NSString+Async.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
1Iuk4atAJ89zujXqrLBvGz7Ny52RXNdD5c1ZMK0SFgs=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/TNSLabel.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
uaE78Ar4SA7jzBIQrT3lTvBQFOQj1sf1ippa8ldUDqQ=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/TNSProcess.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
E+JvepkSwLMNO6gdhEdwuzkdVTUqmWp8P5LxHYCFim8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/TNSWidgets.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
V99t2zLwRPOs90tbGiQbhbdAFJlW7mp7X2R5337ewUA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/UIImage+TNSBlocks.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
MgrX2woetySmXcrrDF290WGxNiW5W3E0B0fsjy8BgNI=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/UIView+PassThroughParent.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
UfHyaUaTFlNcY5M7lUKwq6bPGuQeVIbjhCCInN1ZEYA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
geXwbECY3V3psdekq89Ia+2j4/OludM5UatqEk+xhhc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>PrivateHeaders/NSObject+Swizzling.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
S+GqZzjPH/SqyxwzyysFybjZsbwS5lxcTwL04W79IGA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>PrivateHeaders/UIView+PropertyBag.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
/qFTteGRAX+GloVCipAdNRXPDPDWsNmQ+9USxt99lXE=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.org.nativescript.TNSWidgets</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
Reference in New Issue
Block a user