审核 - iOS插件化开发远程更新动态库
迷茫
迷茫 2017-04-17 17:56:36
0
4
491

我现在有一个需求。公司要实现iOS插件话开发(非HTML5方式)。大概的思路是,上架一个主程序,今后添加功能模块的时候,工程师负责开发framework。每次主程序启动的时候,动态从服务器下载该framework。实现应用程序远程更新,而且可以不用商店再次审核。
但是目前遇到的问题是,据说这种远程下载动态库的方式,苹果是不允许的。
有没有哪位知道,苹果为什么不允许,是不允许远程加载,还是不允许使用动态库。大家有什么好的建议么。多谢

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(4)
迷茫

If Apple allows you to update the app by remotely downloading dynamic libraries, then the review step will be in vain.

洪涛

You can take a look at JSPatch, an open source library that bridges Objective-C and JavaScript and can dynamically add and modify modules in disguise.

阿神

Sorry, I have only tested it locally. I checked it and what SamirChen said is right. It should not work in the production environment. Please refer to his answer.


It is indeed possible to open the framework in the sandbox through dlopen, and this method does not require iOS8. It is another relatively rare hotfix method.

Some people have practiced this kind of hotfix. They download the zip package of the server-side framework at startup, then decompress and load it. It can be successful. It is indeed acceptable at Apple. There is a company in Shanghai that does hotfix like this.

According to this idea, plug-in development can indeed be achieved. Because compared to other JSPatch and Lua waxes, they all write js and Lua languages ​​to call OC interfaces. Patching is okay, but if you really want to do functional development, you will be exhausted. However, using the framework method has the advantage of native writing. The advantages and hotfix function are great.

But why are there so few people doing this on the market? Logically speaking, Apple generally prohibits this kind of behavior. According to Apple, if it is discovered, it may be removed from the shelves (in fact, according to Apple, Lua is not allowed, but I have never heard of anyone being removed. Yes, the js method is OK). However, you can give it a try, and maybe you can pass it. For example, you can disable this function during the review, and then enable it after passing the review.

I have thought about this method before, but then I thought it was too risky, so I didn’t do it. After all, it is a company project. If it goes off the market, I will bear the responsibility.

Apple’s review is still very fast now. If you update the entire module remotely, it is not very necessary. Just apply a patch.

If you think this kind of plug-in development is easier to manage, I suggest you use a private pod warehouse to separate the framework and base classes into separate pods. When others develop their own modules, they can be separated into separate pods. bundles and static libraries. In this way, their submissions have no impact on you. You only need to update the pod regularly. Adding and deleting each module is also very convenient (if your app is that big).

刘奇

Owner, I have also been paying attention to this issue recently. Have you implemented such a method to dynamically update the app? But how to do it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!