8000 feat: build TNSWidgets as XCFramework by rigor789 · Pull Request #9167 · NativeScript/NativeScript · GitHub
[go: up one dir, main page]

Skip to content

feat: build TNSWidgets as XCFramework #9167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
44 changes: 44 additions & 0 deletions packages/core/platforms/ios/TNSWidgets.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN

- (void)writeToFile:(nonnull NSString*) path
atomically:(BOOL)atomically
completion:(void (^) ())callback;
completion:(void (^) (void))callback;

@end

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 */
Original file line number Diff line number Diff line change
@@ -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"
< 10000 tr data-hunk="47375404686433ff87da690bc072bdf408b0f4f110b0b8abfaa48a349ba307f6" class="show-top-border">
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
framework module TNSWidgets {
umbrella header "TNSWidgets.h"

export *
module * { export * }
}
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
Loading
0