首页 > 技术文章 > 关于apicloud ios自定义模块引用第三方framework not found for architecture armv7

Llh-Forerer2015 2019-04-25 11:06 原文

1 .自定义模块

新建模块必须是静态库

2.使用的第三方framework 必须要把 .h文件开放出来

3.编译要用 真机模式 

(上传模块以后,自定义load要编译,用生成的二维码调试)

4. 添加监听,调用必须在apiready方法之中

 [self sendCustomEvent:@"onShotScreen" extra:json];

 function apiready() {      

        api.addEventListener({

                             name: 'onShotScreen'

                             }, function(ret,err){

                             //alert(ret.homeDirect)

                             alert(JSON.stringify(ret));

                             

                             });

}

5.打开一个试图

 function showAlert1(){

                 api.openWin({

                   name: 'register',

                   url: 'hello.html',

                   pageParam: {

                       name: 'test'

                   },

                   slidBackEnabled:true //可以侧滑

               });

      }

 

开发视图侧滑返回后有些地方出现崩溃,需要在视图中添加delloc方法,把视图销毁

6.

发送消息,必须是dic或者基本数据类型

[self sendCustomEvent:@"onShotScreen" extra:dic];

 

7 自己添加一个静态库  cocoa Touch static library调试静态库,的时候不能直接调试,需要xian编译静态库,可以

TarGets-》buildPhases中的 target Dependencies 中添加

 

推荐阅读