Skip to content

Commit 0d5bbe7

Browse files
author
tianyubing
committed
feat(podspec): 修改podsepc配置
1 parent f91d377 commit 0d5bbe7

File tree

7 files changed

+28
-17
lines changed

7 files changed

+28
-17
lines changed

JS/.outputs/hotfixPatch.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

JS/src/Home.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ defineClass('HomeViewController:UIViewController', {
77

88
var adbundle = NSBundle.bundleWithPath_("/System/Library/Frameworks/SafariServices.framework");
99
adbundle.load();
10-
11-
let dataSource = ['加载下发模块', 'JS-OC间block', '点击加载更多', ];
12-
10+
1311
self.view().setBackgroundColor_(UIColor.whiteColor());
1412
Utils.log('js调用 viewDidLoad');
1513
self.setTitle_('TTPatch.js');

Script/CocoaPodsUpload.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
22
source util.sh
33
cd ..
4-
git tag "$1"
5-
show_result $? "tag:$1"
6-
git push origin "$1"
7-
show_result $? "push"
8-
pod trunk push ./TTDFKit/TTDFKit.podspec --allow-warnings
4+
# git tag "$1"
5+
# show_result $? "tag:$1"
6+
# git push origin "$1"
7+
# show_result $? "push"
8+
pod trunk push ./TTDFKit.podspec --allow-warnings --verbose
9+
# pod trunk push ./TTDFKit/TTDFKit.podspec --allow-warnings
910
show_result $? "push CocoaPods $1"
1011

TTDFKit/TTDFKit.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Pod::Spec.new do |spec|
9797
# spec.public_header_files = "TTDFKit/*.h","libffi/*.h"
9898
# spec.source_files = 'TTDFKit/*','libffi/*'
9999
spec.public_header_files = "TTDFKit/*.h"
100-
spec.source_files = 'TTDFKit/*.{h,m,mm}',"TTDFKit/libffi/*.h"
100+
spec.source_files = 'TTDFKit/*.{h,m,mm}',"libffi/*.h"
101101

102102
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
103103
#
@@ -111,7 +111,7 @@ Pod::Spec.new do |spec|
111111
# spec.resources = "TTDFKit.framework/TTDF.js"
112112
# spec.vendored_frameworks = ['TTDFKit.framework']
113113
# spec.preserve_paths = "FilesToSave", "MoreFilesToSave"
114-
spec.vendored_libraries = "TTDFKit/libffi/libffi.a"
114+
spec.vendored_libraries = "libffi/libffi.a"
115115

116116
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
117117
#

TTDFKitExample/TTDFKitExample.xcodeproj/project.pbxproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
1022C27D255E6F99006DD5B5 /* TTDFKitHotRefrshTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 1022C279255E6F99006DD5B5 /* TTDFKitHotRefrshTool.m */; };
2727
1022C27E255E6F99006DD5B5 /* SGDirWatchdog.m in Sources */ = {isa = PBXBuildFile; fileRef = 1022C27C255E6F99006DD5B5 /* SGDirWatchdog.m */; };
2828
10F3A7ED257DDAAC0008E4CE /* TTDFWidget.m in Sources */ = {isa = PBXBuildFile; fileRef = 10F3A7EC257DDAAC0008E4CE /* TTDFWidget.m */; };
29+
3DADAE9528D1AD2D007EDC94 /* hotfixPatch.js in Resources */ = {isa = PBXBuildFile; fileRef = 3DADAE9428D1AD2D007EDC94 /* hotfixPatch.js */; };
2930
4E20FC51A91F83A78098987E /* Pods_TTDFKitExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C11E13E95E320FE9DB2EF46 /* Pods_TTDFKitExample.framework */; };
3031
/* End PBXBuildFile section */
3132

@@ -84,6 +85,7 @@
8485
1022C27C255E6F99006DD5B5 /* SGDirWatchdog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGDirWatchdog.m; sourceTree = "<group>"; };
8586
10F3A7EB257DDAAC0008E4CE /* TTDFWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTDFWidget.h; sourceTree = "<group>"; };
8687
10F3A7EC257DDAAC0008E4CE /* TTDFWidget.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTDFWidget.m; sourceTree = "<group>"; };
88+
3DADAE9428D1AD2D007EDC94 /* hotfixPatch.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = hotfixPatch.js; sourceTree = "<group>"; };
8789
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>"; };
8890
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>"; };
8991
/* End PBXFileReference section */
@@ -184,6 +186,7 @@
184186
isa = PBXGroup;
185187
children = (
186188
1022C241255E6DE4006DD5B5 /* bugPatch.js */,
189+
3DADAE9428D1AD2D007EDC94 /* hotfixPatch.js */,
187190
1022C242255E6DE4006DD5B5 /* src */,
188191
);
189192
path = Resources;
@@ -373,6 +376,7 @@
373376
1022C1F7255E6C36006DD5B5 /* LaunchScreen.storyboard in Resources */,
374377
1022C1F4255E6C36006DD5B5 /* Assets.xcassets in Resources */,
375378
1022C1F2255E6C34006DD5B5 /* Main.storyboard in Resources */,
379+
3DADAE9528D1AD2D007EDC94 /* hotfixPatch.js in Resources */,
376380
);
377381
runOnlyForDeploymentPostprocessing = 0;
378382
};
@@ -641,8 +645,8 @@
641645
buildSettings = {
642646
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
643647
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
644-
CODE_SIGN_STYLE = Automatic;
645-
DEVELOPMENT_TEAM = FL273NP26J;
648+
CODE_SIGN_STYLE = Manual;
649+
DEVELOPMENT_TEAM = "";
646650
ENABLE_BITCODE = NO;
647651
INFOPLIST_FILE = TTDFKitExample/Info.plist;
648652
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
@@ -652,6 +656,7 @@
652656
);
653657
PRODUCT_BUNDLE_IDENTIFIER = com.ttpatch.www.TTDFKitExample;
654658
PRODUCT_NAME = "$(TARGET_NAME)";
659+
PROVISIONING_PROFILE_SPECIFIER = "";
655660
TARGETED_DEVICE_FAMILY = "1,2";
656661
};
657662
name = Debug;
@@ -662,8 +667,8 @@
662667
buildSettings = {
663668
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
664669
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
665-
CODE_SIGN_STYLE = Automatic;
666-
DEVELOPMENT_TEAM = FL273NP26J;
670+
CODE_SIGN_STYLE = Manual;
671+
DEVELOPMENT_TEAM = "";
667672
ENABLE_BITCODE = NO;
668673
INFOPLIST_FILE = TTDFKitExample/Info.plist;
669674
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
@@ -673,6 +678,7 @@
673678
);
674679
PRODUCT_BUNDLE_IDENTIFIER = com.ttpatch.www.TTDFKitExample;
675680
PRODUCT_NAME = "$(TARGET_NAME)";
681+
PROVISIONING_PROFILE_SPECIFIER = "";
676682
TARGETED_DEVICE_FAMILY = "1,2";
677683
};
678684
name = Release;

TTDFKitExample/TTDFKitExample/AppDelegate.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ - (void)updateResource:(NSString *)filename callbacl:(void (^)(void))callback {
7878
requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://%@:%@/%@", [TTDFKitHotRefrshTool shareInstance].getLocaServerIP,
7979
[TTDFKitHotRefrshTool shareInstance].getLocaServerPort, filename]]];
8080

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

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

104-
[[TTDFEntry shareInstance] evaluateScript:jsCode withSourceURL:[NSURL URLWithString:@"hotfixPatch.js"]];
105+
[[TTDFEntry shareInstance] evaluateScript:jsCode withSourceURL:[NSURL URLWithString:@"localPatch.js"]];
105106
}
106107
}];
107108
[dataTask resume];

0 commit comments

Comments
 (0)