Skip to content

Commit e10c392

Browse files
committed
update fix apple code
1 parent ac3e873 commit e10c392

File tree

176 files changed

+3192
-3241
lines changed

Some content is hidden

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

176 files changed

+3192
-3241
lines changed

Example/VPInterfaceControllerDemo.xcodeproj/xcshareddata/xcschemes/VPInterfaceControllerDemo.xcscheme

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1100"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "069D54341F04DC6D001E5324"
34+
BuildableName = "VPInterfaceControllerDemo.app"
35+
BlueprintName = "VPInterfaceControllerDemo"
36+
ReferencedContainer = "container:VPInterfaceControllerDemo.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
</Testables>
3241
</TestAction>

Example/VPInterfaceControllerDemo.xcodeproj/xcshareddata/xcschemes/VideoOSDevApp.xcscheme

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
</BuildActionEntry>
2323
</BuildActionEntries>
2424
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
2533
<LaunchAction
2634
buildConfiguration = "Debug"
2735
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"

Example/VPInterfaceControllerDemo/VideoOSDevApp/DevAppControllers/DebuggingViewController.m

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#import "DevAppSettingView.h"
1212
#import "DevAppPlayerViewController.h"
1313
#import <VideoPlsUtilsPlatformSDK/VideoPlsUtilsPlatformSDK.h>
14-
#import <VideoOS/VideoPlsLuaViewManagerSDK/VPLuaSDK.h>
14+
#import <VideoOS/VideoPlsLuaViewManagerSDK/VPLSDK.h>
1515
#import <VideoOS/VideoPlsUtilsPlatformSDK/VideoPlsUtilsPlatformSDK.h>
1616
#import <VideoOS/VideoPlsUtilsPlatformSDK/VPUPCommonInfo.h>
1717
#import <VideoOS/VideoPlsInterfaceControllerSDK/VPIConfigSDK.h>
@@ -153,7 +153,12 @@ -(void)settingViewDidCompleWithData:(NSArray<NSString *> *)data andIsOK:(BOOL)is
153153
NSDictionary *devApp_Dic = [NSJSONSerialization JSONObjectWithData:[[NSData alloc] initWithContentsOfFile:path] options:NSJSONReadingMutableContainers error:nil];
154154
[devApp_Dic setValue:adInfo forKey:@"data"];
155155
[devApp_Dic setValue:template forKey:@"template"];
156+
NSDictionary* miniAppInfoDic = [devApp_Dic objectForKey:@"miniAppInfo"];
157+
[miniAppInfoDic setValue:[responseObject objectForKey:@"luaList"] forKey:@"luaList"];
158+
[miniAppInfoDic setValue:[responseObject objectForKey:@"miniAppId"] forKey:@"miniAppId"];
159+
[devApp_Dic setValue:miniAppInfoDic forKey:@"miniAppInfo"];
156160
self.interaction_Data = devApp_Dic;
161+
157162
// self.interaction_Data = [NSDictionary dictionaryWithObjectsAndKeys:adInfo,@"data",template,@"template", nil];;
158163
}
159164

@@ -173,11 +178,13 @@ -(void)hudHiddenWithSucces:(BOOL)isSucess{
173178
-(void)receiveResponseObject:(NSDictionary *)responseObject{
174179
if (self.controllerType == Type_Interaction) {
175180
self.interaction_templateLua = [responseObject objectForKey:@"template"];
181+
self.service_miniAppID = [responseObject objectForKey:@"miniAppId"];
176182
//downloatLuas
177183
DevLuaLoader * loader =[DevLuaLoader sharedLoader];
178184
NSArray* luaList = [responseObject objectForKey:@"luaList"];
179185

180-
[loader checkAndDownloadFilesList:luaList resumePath:[VPUPPathUtil luaOSPath] complete:^(NSError * _Nonnull error, VPUPTrafficStatisticsList * _Nonnull trafficList) {
186+
self.service_miniAppID = [responseObject objectForKey:@"miniAppId"];
187+
[loader checkAndDownloadFilesList:luaList resumePath:[VPUPPathUtil subPathOfLOSPath:self.service_miniAppID] complete:^(NSError * _Nonnull error, VPUPTrafficStatisticsList * _Nonnull trafficList) {
181188
if (error) {
182189
NSLog(@"error : %@",error);
183190
[self hudHiddenWithSucces:false];
@@ -193,6 +200,12 @@ -(void)receiveResponseObject:(NSDictionary *)responseObject{
193200
NSArray* luaList = [responseObject objectForKey:@"luaList"];
194201

195202
self.service_miniAppID = [responseObject objectForKey:@"miniAppId"];
203+
NSMutableDictionary* appInfoDic = [NSMutableDictionary dictionary];
204+
[appInfoDic setValue:[responseObject objectForKey:@"miniAppId"] forKey:@"miniAppId"];
205+
[appInfoDic setValue:[responseObject objectForKey:@"template"] forKey:@"template"];
206+
[appInfoDic setValue:[responseObject objectForKey:@"luaList"] forKey:@"luaList"];
207+
[responseObject setValue:appInfoDic forKey:@"miniAppInfo"];
208+
196209
NSString* jsonStr = [self convertToJsonData:responseObject];
197210
if ([[NSFileManager defaultManager] fileExistsAtPath:[VPUPPathUtil appDevConfigPath]]) {
198211
NSLog(@"config 文件存在 删除");
@@ -209,7 +222,7 @@ -(void)receiveResponseObject:(NSDictionary *)responseObject{
209222
}
210223

211224

212-
[loader checkAndDownloadFilesList:luaList resumePath:[VPUPPathUtil subPathOfLuaApplets:self.service_miniAppID] complete:^(NSError * _Nonnull error, VPUPTrafficStatisticsList * _Nonnull trafficList) {
225+
[loader checkAndDownloadFilesList:luaList resumePath:[VPUPPathUtil subPathOfLMP:self.service_miniAppID] complete:^(NSError * _Nonnull error, VPUPTrafficStatisticsList * _Nonnull trafficList) {
213226
if (error) {
214227
NSLog(@"error : %@",error);
215228
[self hudHiddenWithSucces:false];
@@ -299,31 +312,33 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
299312
if (self.controllerType == Type_Interaction) {
300313
if (self.isLocal == true) {
301314
//copy 文件至指定目录
302-
[DevAppTool copyLuaFile:[DevAppTool getInteractionLuaPath] ToFilePath:[VPUPPathUtil luaOSPath]];
303-
cor.interaction_templateLua = [self.resourceDataAry.firstObject lastPathComponent];
304315
NSString *path = [[DevAppTool devAPPBundle] pathForResource:@"devApp_json" ofType:@"json"];
305316
NSDictionary *adInfo = [NSJSONSerialization JSONObjectWithData:[[NSData alloc] initWithContentsOfFile:path] options:NSJSONReadingMutableContainers error:nil];
317+
NSString* miniAppId = [[adInfo objectForKey:@"miniAppInfo"] objectForKey:@"miniAppId"];
318+
[DevAppTool copyLuaFile:[DevAppTool getInteractionLPath] ToFilePath:[VPUPPathUtil subPathOfLOSPath:miniAppId]];
319+
cor.interaction_templateLua = [self.resourceDataAry.firstObject lastPathComponent];
306320
cor.interaction_Data = adInfo;
321+
cor.service_miniAppID = miniAppId;
307322
}else{
308323
cor.interaction_templateLua = self.interaction_templateLua;
309324
cor.interaction_Data = self.interaction_Data;
325+
cor.service_miniAppID = self.service_miniAppID;
310326
}
311327

312328
}else{
313329
if (self.isLocal == true) {
314330
//copy 文件至指定目录
315331
NSString *path = [[DevAppTool devAPPBundle] pathForResource:@"config" ofType:@"json"];
316332
NSDictionary *config = [NSJSONSerialization JSONObjectWithData:[[NSData alloc] initWithContentsOfFile:path] options:NSJSONReadingMutableContainers error:nil];
317-
NSString* miniAppId = [config objectForKey:@"miniAppId"];
318333

319-
NSArray *luaList = [config objectForKey:@"luaList"];
334+
NSDictionary* appInfoDic = [config objectForKey:@"miniAppInfo"];
335+
336+
NSString* miniAppId = [appInfoDic objectForKey:@"miniAppId"];
337+
338+
NSArray *luaList = [appInfoDic objectForKey:@"luaList"];
320339
for (NSDictionary* fileDic in luaList) {
321-
NSString* luaFile = [fileDic objectForKey:@"url"];
322-
323-
324-
325-
[DevAppTool copyLuaFile:[[DevAppTool devAPPBundle] pathForResource:luaFile ofType:nil] ToFilePath:[[VPUPPathUtil subPathOfLuaApplets:miniAppId] stringByAppendingPathComponent:luaFile]];
326-
340+
NSString* lFile = [fileDic objectForKey:@"url"];
341+
[DevAppTool copyLuaFile:[[DevAppTool devAPPBundle] pathForResource:lFile ofType:nil] ToFilePath:[[VPUPPathUtil subPathOfLMP:miniAppId] stringByAppendingPathComponent:lFile]];
327342
}
328343
[DevAppTool copyLuaFile:path ToFilePath:[VPUPPathUtil appDevConfigPath]];
329344
cor.service_miniAppID = miniAppId;

Example/VPInterfaceControllerDemo/VideoOSDevApp/DevAppControllers/DevAppPlayerViewController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ - (void)viewDidLoad {
7171

7272

7373
if (self.controllerType == Type_Interaction) {
74-
[_interfaceController navigationWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"LuaView://defaultLuaView?template=%@&id=5aa5fa5133edbf375fe43fff4",self.interaction_templateLua]] data:self.interaction_Data];
74+
NSString* urlString = [NSString stringWithFormat:@"LuaView://defaultLuaView?template=%@&id=22fbbc41-487e-4f91-af89-cfd2c26cb6b1&priority=1&miniAppId=%@",self.interaction_templateLua,self.service_miniAppID];
75+
[_interfaceController navigationWithURL:[NSURL URLWithString:urlString] data:self.interaction_Data];
7576
}else{
7677
[self switchVideoNetModeStateOff:true];
7778
}

Example/VPInterfaceControllerDemo/VideoOSDevApp/DevAppControllers/DevMainViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ - (IBAction)clickServiceBtn:(UIButton *)sender {
119119
//}
120120
//支持旋转
121121
- (BOOL)shouldAutorotate {
122-
return NO;
122+
return YES;
123123
}
124124

125125
//支持的方向
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
2-
"miniAppId":"284217819791360000",
32
"display":{
43
"navTitle":"开发模式测试"
54
},
65
"h5Url":"",
7-
"luaList":[
8-
{
9-
"url":"os_video_helloworld_hotspot.lua"
10-
},
11-
],
12-
"template":"os_video_helloworld_hotspot.lua"
6+
"miniAppInfo":{
7+
"miniAppId":"284217819791360000",
8+
"template":"os_video_helloworld_hotspot.lua",
9+
"luaList":[
10+
{
11+
"url":"os_video_helloworld_hotspot.lua"
12+
}
13+
]
14+
}
1315
}
Lines changed: 69 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,72 @@
1-
{"creativeId":60,
2-
"data":{
3-
"inforEdit":{
4-
"encyImage":[
5-
"https://os-saas-share.oss-cn-beijing.aliyuncs.com/dev/app_info/399/17d138af-5320-4910-8938-71fce6b7d5be.jpg",
6-
"https://os-saas-share.oss-cn-beijing.aliyuncs.com/dev/app_info/399/17d138af-5320-4910-8938-71fce6b7d5be.jpg",
7-
"https://os-saas-share.oss-cn-beijing.aliyuncs.com/dev/app_info/399/17d138af-5320-4910-8938-71fce6b7d5be.jpg",
8-
"https://os-saas-share.oss-cn-beijing.aliyuncs.com/dev/app_info/399/17d138af-5320-4910-8938-71fce6b7d5be.jpg",
9-
"https://os-saas-share.oss-cn-beijing.aliyuncs.com/dev/app_info/399/17d138af-5320-4910-8938-71fce6b7d5be.jpg"
10-
],
11-
"btnTxt":"查看更多百科",
12-
"linkUrl":"https://mijisou.com/",
13-
"encyTitle":"塞尔达传说系列首部登",
14-
"encyDescribe":"《塞尔达传说》系列首部登陆任天堂Switch主机的作品,本作也是系列第一款开放世界作品,玩家可以脱出此前的各种限制,在广阔的世界中自由探索。游戏故事依然是林克拯救世界的故事,海拉尔大陆再次被加农侵袭,林克从长眠中醒来,在冒险中获得武器、能力,最后去挑战加农。但你也可以直接去干掉加农,本作的自由度是系列前所未有的。在《塞尔达传说 旷野之息》中,林克从一开始就获得了所有道具能力,并且可以和世界中的各种要素进行互动。大自然的风火雷电都可以被利用,让林克的冒险有层出不穷的玩法。本作中文版将于2018年2月1日推出,中文版标题确认为《塞尔达传说:旷野之息》。"
1+
{
2+
"creativeId":694,
3+
"data":{
4+
"hotEditInfor":{
5+
"isShowAds":true,
6+
"hotImage":"https://os-saas-share.videojj.com/pro/app_info/482/4dd18e31-7556-43d8-812a-303c6779ad00.png",
7+
"hotTitle":"快点我了解杨幂吧",
8+
"isShowClose":true
9+
},
10+
"inforEdit":{
11+
"encyImage":[
12+
"https://os-saas-share.videojj.com/pro/app_info/482/939d7c68-9d7d-4016-8ca3-bf869b737860.jpg",
13+
"https://os-saas-share.videojj.com/pro/app_info/482/dfa509a0-d6de-46dc-b947-ceec774f6a07.jpg",
14+
"https://os-saas-share.videojj.com/pro/app_info/482/f654706d-171e-4a4a-b401-b489d47b2034.jpg"
15+
],
16+
"linkData":{
17+
"deepLink":"",
18+
"linkUrl":"https://www.weibo.com/yangmiblog",
19+
"selfLink":""
20+
},
21+
"btnTxt":"关注杨幂微博",
22+
"encyTitle":"关注杨幂微博",
23+
"encyDescribe":"杨幂,1986年9月12日出生于北京市,中国内地影视女演员、流行乐歌手、影视制片人。主要成就:金鹰电视艺术节最具人气女演员 上海电视节白玉兰奖最具人气女演员。"
24+
},
25+
"creativeName":"demo信息百科",
26+
"interactionTypeName":"信息百科",
27+
"miniAppId":"5",
28+
"interactionTypeId":"5"
1529
},
16-
"creativeName":"百科素材",
17-
"hotEditInfor":{
18-
"isShowAds":true,
19-
"hotImage":"https://os-saas-share.oss-cn-beijing.aliyuncs.com/dev/app_info/399/a730e396-189a-40b3-b412-b6c4a8829fd3.jpg",
20-
"hotTitle":"塞尔达百科素材",
21-
"isShowClose":true,
22-
"isShowhot":true
30+
"deviceType":3,
31+
"duration":30000,
32+
"hotspotOrder":0,
33+
"id":"22fbbc41-487e-4f91-af89-cfd2c26cb6b1",
34+
"launchPlanId":"34531",
35+
"luaList":[
36+
{
37+
"md5":"14d78f03b39e72dcc5de593889276acc",
38+
"name":"os_baike_hotspot.lua",
39+
"path":"",
40+
"url":"https://os-saas-share.videojj.com/pro/applet/10000005/1.0.2/a2f636a9-9f1a-4681-a9fe-7c30caf83fb1/lua/os_baike_hotspot.lua"
41+
},
42+
{
43+
"md5":"68b6719921c121965a83fc0e146d1462",
44+
"name":"os_baike_window.lua",
45+
"path":"",
46+
"url":"https://os-saas-share.videojj.com/pro/applet/10000005/1.0.2/a2f636a9-9f1a-4681-a9fe-7c30caf83fb1/lua/os_baike_window.lua"
47+
}
48+
],
49+
"miniAppInfo":{
50+
"developerUserId":"5dd3b00bcc6e51000bd22da6",
51+
"luaList":[
52+
{
53+
"md5":"14d78f03b39e72dcc5de593889276acc",
54+
"name":"os_baike_hotspot.lua",
55+
"path":"",
56+
"url":"https://os-saas-share.videojj.com/pro/applet/10000005/1.0.2/a2f636a9-9f1a-4681-a9fe-7c30caf83fb1/lua/os_baike_hotspot.lua"
57+
},
58+
{
59+
"md5":"68b6719921c121965a83fc0e146d1462",
60+
"name":"os_baike_window.lua",
61+
"path":"",
62+
"url":"https://os-saas-share.videojj.com/pro/applet/10000005/1.0.2/a2f636a9-9f1a-4681-a9fe-7c30caf83fb1/lua/os_baike_window.lua"
63+
}
64+
],
65+
"miniAppId":"10000005",
66+
"template":"os_baike_hotspot.lua"
2367
},
24-
"miniAppId":"9578",
25-
"interactionTypeId":"1960"
26-
},
27-
"deviceType":3,
28-
"duration":10000,
29-
"hotspotOrder":0,
30-
"id":"b3fb78e8-72d2-4265-9e44-f313b3d3614c",
31-
"hotspotTrackLink":[
32-
{
33-
"clickTrackLink":"http://clickc.admaster.com.cn/c/a122445,b3554598,c3925,i0,m101,8a2,8b3,h",
34-
"exposureTrackLink":"http://v.admaster.com.cn/i/a122445,b3554598,c3925,i0,m202,8a2,8b3,h"
35-
}
36-
],
37-
"infoTrackLink":[
38-
{
39-
"clickTrackLink":"http://clickc.admaster.com.cn/c/a122445,b3554599,c3925,i0,m101,8a2,8b3,h",
40-
"exposureTrackLink":"http://v.admaster.com.cn/i/a122445,b3554599,c3925,i0,m202,8a2,8b3,h"
41-
}
42-
],
43-
"launchPlanId":"90",
44-
"sumHotspot":1,
45-
"template":"os_baike_hotspot.lua",
46-
"videoEndTime":15000,
47-
"videoStartTime":5000
68+
"sumHotspot":1,
69+
"template":"os_baike_hotspot.lua",
70+
"videoEndTime":35000,
71+
"videoStartTime":5000
4872
}

Example/VPInterfaceControllerDemo/VideoOSDevApp/DevAppResource.bundle/os_video_helloworld_hotspot.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ local function createTitle()
3434
titleLabel:textSize(16)
3535
titleLabel:text("HelloWorld")
3636
titleLabel:frame(0, 0, 100, 30)
37+
titleLabel:textAlign(TextAlign.CENTER)
3738
titleLabel:align(Align.V_CENTER)
3839
titleLabel:align(Align.H_CENTER)
3940
return titleLabel

Example/VPInterfaceControllerDemo/VideoOSDevApp/DevAppTool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typedef NS_ENUM(NSUInteger, DebuggingControllerType) {
3838

3939

4040
/// 获取用户视频小工具lua根路径
41-
+ (NSString*)getInteractionLuaPath;
41+
+ (NSString*)getInteractionLPath;
4242

4343
@end
4444

Example/VPInterfaceControllerDemo/VideoOSDevApp/DevAppTool.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ + (NSBundle *)devAPPBundle{
5252
}
5353

5454
+ (void)copyLuaFile:(NSString*)bundlePath ToFilePath:(NSString*)destinationPath{
55-
56-
NSLog(@"");
5755
NSFileManager * fileManger = [NSFileManager defaultManager];
5856
BOOL isDir;
5957
BOOL isExist = [fileManger fileExistsAtPath:bundlePath isDirectory:&isDir];
@@ -106,7 +104,7 @@ + (void)copyLuaFile:(NSString*)bundlePath ToFilePath:(NSString*)destinationPath{
106104

107105
}
108106

109-
+ (NSString*)getInteractionLuaPath{
107+
+ (NSString*)getInteractionLPath{
110108

111109
return [[[DevAppTool devAPPBundle].bundlePath stringByAppendingPathComponent:@"interactionLua"] stringByAppendingPathComponent:@""];
112110
}

0 commit comments

Comments
 (0)