How to include resource files in Theos makefile?

That is not the way you include resources using theos. MyTweak_FILES variable should only include files that can be compiled. Make file handles resources differently.

To include resources you need to create a bundle as follows.

1) Create a folder called Resources in the tweak.xm directory.

2) Put all your resource files (all your PNG's) into that folder.

3) Add the following info to your make file

4) Define your bundle as follows on top of your tweak.xm file.

5) You can now initialize the bundle and use the images within your tweak as follows:

In the above steps replace your_bundle_identifier with your tweaks bundle identifier which would be in the control file. (ex: com.yourdomain.tweak_name)

Also replace your_image_name with the name of the image you want to use.

You can pretty much use any resources (ex: sound files) the above way.

https://stackoverflow.com/questions/15999757/how-to-include-resource-files-in-theos-makefile

使用 Xcode 调试第三方应用

1、将目标应用砸壳后保存到本地

http://blog.linhere.com/archives/555.html

DYLD_INSERT_LIBRARIES=/path/to/dumpdecrypted.dylib /path/to/executable

2、抽出需要的架构

lipo WeChat -thin armv7 -output WeChat_armv7

3、还原符号表

https://github.com/tobefuturer/restore-symbol

4、提取entitlement,添加get-task-allow 权限

ldid -e WeChat.app/WeChat >> Entitlements.plist

添加:

<key>get-task-allow</key>

<true/>

5、重签名应用

获取设备上所有的证书列表:security find-identity -v -p codesigning

签名:

codesign -f -s "iPhone Developer: XXXX" --signing-time none --entitlement ./Entitlements.plist ./WeChat.app

6、安装

brew install ideviceinstaller

ideviceinstaller -i WeChat.app

或:

brew install ios-deploy
ios-deploy -d -b xxxx.app


资料:

http://swiftyper.com/2017/07/02/attach-third-app-using-xcode/

https://mp.weixin.qq.com/s?__biz=MjM5NTIyNTUyMQ==&mid=2709545175&idx=1&sn=1c080685fabf2f24269c6e544e9213d7&scene=0&key=cf237d7ae24775e8a291c430bd754bd72b2faee6c9edbe6ff3d32afdfd41e008ef2567182b323d8febc85346baef67cb&ascene=0&uin=NDU1NzA2MTk1&devicetype=iMac+MacBookPro12%2C1+OSX+OSX+10.11.5+build(15F34)&version=11020201&pass_ticket=epsDy5NSjlDNy2GvOKYYr9q%2FLcd99r%2BiT33eJCGerkt4I0vhPQPPuJbOUec7diuD

https://testerhome.com/topics/4558

Powerful private methods for debugging in Cycript & LLDB

http://iosre.com/t/powerful-private-methods-for-debugging-in-cycript-lldb/3414

recursiveDescription

I don't think it necessary to introduce this method again. It prints the hierarchy of an UIView object. Here's how we use it in Cycript:

_printHierarchy

Skip UIViews and nextResponders to get ViewControllers directly. Refer to this post78 for details.

In short, it's:

_autolayoutTrace

Simplified recursiveDescription, cuts off lots of descriptions of UIViews. Here's how we use it in Cycript:

_ivarDescription

Prints alnames and values of instance variables of a specified object. Here's how we use it in Cycript:


_methodDescription

Prints all properties, instance methods and class methods of a specified object. Here's how we use it in Cycript:

References:
1. http://swiftiostutorials.com/using-private-undocumented-ios-methods-debugging/44
2. http://iosre.com/t/shortcut-to-find-the-viewcontrollers-class-name-on-the-keywindow/283478


You can edit this post following the above format.


iOS开发手把手教你如何打包静态库.a文件

http://www.jianshu.com/p/e25e4b391a68

1、需求

     我们在开发iOS的工作中可能会自己开发一些.a静态库或者打包一下别人的第三方类库包装成自己的.a文件。有时候我们引入一些C++编译的第三方文件时可能会出现编译的错误,但是我们如果打包成.a静态库时就很少会出现OC与C++混编的错误,原因很简单.a静态库文件是编译好的二进制文件,二进制文件与二进制文件互相混编当然没有什么问题。好那么接下来我们开始学习打包吧!


2、实例

 接下来我们就以打包IOS开发中常用的网络请求库AFNetworking为实例。

 1>我们需要准备好需要打包的AFNetworking

2>接下来我们开始新建一个工程文件取名WBAFNetWorking

3>接下来我们把准备好的AFNetworking拖入工程中,注意文件放在一级目录下。

4>接下来我们选择出来需要暴露出来的头文件

我选择暴露出所有的头文件如下图

5>接下来我们配置下工程文件

6>配置完之后我们就可以选择真机进行运行在运行后我们找到生成的.a文件右键选择show in finder就可以了。

7.此时生成的.a文件只适用于真机,如果我们需要模拟器可以使用的.a文件用同样的方法在模拟器上运行下就可以了,而且网上有很多教程可以合并两个.a文件在这里就不进行重述了。