Skip to content
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

build(deps): bump path-parse from 1.0.6 to 1.0.7 in /JS #33

Open
wants to merge 2 commits into
base: libffi
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion JS/.outputs/hotfixPatch.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions JS/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions JS/src/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ defineClass('HomeViewController:UIViewController', {

var adbundle = NSBundle.bundleWithPath_("/System/Library/Frameworks/SafariServices.framework");
adbundle.load();

let dataSource = ['加载下发模块', 'JS-OC间block', '点击加载更多', ];


self.view().setBackgroundColor_(UIColor.whiteColor());
Utils.log('js调用 viewDidLoad');
self.setTitle_('TTPatch.js');
Expand Down
14 changes: 7 additions & 7 deletions TTDFKit/TTDFKit.podspec → TTDFKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |spec|
#

spec.name = "TTDFKit"
spec.version = "2.1.8"
spec.version = "2.1.9"
spec.summary = "一款基于javaScript脚本的轻量级热修复工具"

# This description is used to generate tags and improve search results.
Expand All @@ -25,11 +25,11 @@ Pod::Spec.new do |spec|
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
spec.description = '热修复、热更新、JS代码动态下发、动态创建类
功能特性
功能特性
替换指定ObjectC方法实现
支持block
支持添加属性
支持基础数据类型
支持block
支持添加属性
支持基础数据类型
支持下发纯JS页面'

spec.homepage = "https://github.com/yangyangFeng/TTPatch"
Expand Down Expand Up @@ -96,8 +96,8 @@ Pod::Spec.new do |spec|

# spec.public_header_files = "TTDFKit/*.h","libffi/*.h"
# spec.source_files = 'TTDFKit/*','libffi/*'
spec.public_header_files = "TTDFKit/*.h"
spec.source_files = 'TTDFKit/*.{h,m,mm}',"TTDFKit/libffi/*.h"
spec.public_header_files = "TTDFKit/TTDFKit/*.h"
spec.source_files = 'TTDFKit/TTDFKit/*.{h,m,mm}',"TTDFKit/libffi/*.h"

# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
Expand Down
2 changes: 1 addition & 1 deletion TTDFKitExample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ target 'TTDFKitExample' do
use_frameworks!

pod 'Socket.IO-Client-Swift', '~> 15.2.0'
pod 'TTDFKit' , :path => "../TTDFKit/TTDFKit.podspec"
pod 'TTDFKit' , :path => "../TTDFKit.podspec"
end
14 changes: 10 additions & 4 deletions TTDFKitExample/TTDFKitExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
1022C27D255E6F99006DD5B5 /* TTDFKitHotRefrshTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 1022C279255E6F99006DD5B5 /* TTDFKitHotRefrshTool.m */; };
1022C27E255E6F99006DD5B5 /* SGDirWatchdog.m in Sources */ = {isa = PBXBuildFile; fileRef = 1022C27C255E6F99006DD5B5 /* SGDirWatchdog.m */; };
10F3A7ED257DDAAC0008E4CE /* TTDFWidget.m in Sources */ = {isa = PBXBuildFile; fileRef = 10F3A7EC257DDAAC0008E4CE /* TTDFWidget.m */; };
3DADAE9528D1AD2D007EDC94 /* hotfixPatch.js in Resources */ = {isa = PBXBuildFile; fileRef = 3DADAE9428D1AD2D007EDC94 /* hotfixPatch.js */; };
4E20FC51A91F83A78098987E /* Pods_TTDFKitExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C11E13E95E320FE9DB2EF46 /* Pods_TTDFKitExample.framework */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -84,6 +85,7 @@
1022C27C255E6F99006DD5B5 /* SGDirWatchdog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGDirWatchdog.m; sourceTree = "<group>"; };
10F3A7EB257DDAAC0008E4CE /* TTDFWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTDFWidget.h; sourceTree = "<group>"; };
10F3A7EC257DDAAC0008E4CE /* TTDFWidget.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTDFWidget.m; sourceTree = "<group>"; };
3DADAE9428D1AD2D007EDC94 /* hotfixPatch.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = hotfixPatch.js; sourceTree = "<group>"; };
A6569A8DA44A261A15B12148 /* Pods-TTDFKitExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TTDFKitExample.debug.xcconfig"; path = "Target Support Files/Pods-TTDFKitExample/Pods-TTDFKitExample.debug.xcconfig"; sourceTree = "<group>"; };
AD2663AED8A6905479D20CC0 /* Pods-TTDFKitExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TTDFKitExample.release.xcconfig"; path = "Target Support Files/Pods-TTDFKitExample/Pods-TTDFKitExample.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -184,6 +186,7 @@
isa = PBXGroup;
children = (
1022C241255E6DE4006DD5B5 /* bugPatch.js */,
3DADAE9428D1AD2D007EDC94 /* hotfixPatch.js */,
1022C242255E6DE4006DD5B5 /* src */,
);
path = Resources;
Expand Down Expand Up @@ -373,6 +376,7 @@
1022C1F7255E6C36006DD5B5 /* LaunchScreen.storyboard in Resources */,
1022C1F4255E6C36006DD5B5 /* Assets.xcassets in Resources */,
1022C1F2255E6C34006DD5B5 /* Main.storyboard in Resources */,
3DADAE9528D1AD2D007EDC94 /* hotfixPatch.js in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -641,8 +645,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = FL273NP26J;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = TTDFKitExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
Expand All @@ -652,6 +656,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.ttpatch.www.TTDFKitExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -662,8 +667,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = FL273NP26J;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = TTDFKitExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
Expand All @@ -673,6 +678,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.ttpatch.www.TTDFKitExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
5 changes: 3 additions & 2 deletions TTDFKitExample/TTDFKitExample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ - (void)updateResource:(NSString *)filename callbacl:(void (^)(void))callback {
requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://%@:%@/%@", [TTDFKitHotRefrshTool shareInstance].getLocaServerIP,
[TTDFKitHotRefrshTool shareInstance].getLocaServerPort, filename]]];

NSLog(@"更新Path:%@", [req URL].absoluteString);
NSLog(@"[TTDFKit] 本地更新URL:%@", [req URL].absoluteString);
NSURLSessionDataTask *dataTask =
[session dataTaskWithRequest:req
completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable error) {
Expand All @@ -95,13 +95,14 @@ - (void)updateResource:(NSString *)filename callbacl:(void (^)(void))callback {
callback();
}
} else {
NSLog(@"[TTDFKit] 加载localPatch");
// 本地代理未开启,加载本地bundle资源,无法实时预览
NSString *srcPath = [[NSBundle mainBundle] pathForResource:@"hotfixPatch" ofType:@"js"];

NSString *jsCode = [[NSString alloc] initWithData:[[NSFileManager defaultManager] contentsAtPath:srcPath]
encoding:NSUTF8StringEncoding];

[[TTDFEntry shareInstance] evaluateScript:jsCode withSourceURL:[NSURL URLWithString:@"hotfixPatch.js"]];
[[TTDFEntry shareInstance] evaluateScript:jsCode withSourceURL:[NSURL URLWithString:@"localPatch.js"]];
}
}];
[dataTask resume];
Expand Down
Loading