1. Download and unzip the MonkeyTalk zip file for your OS.
2. Open your application's project in Xcode.
3. Duplicate your application's build target by right-clicking on it and selectingDuplicate from the menu. A new target will be created called YourApp copy.
Rename YourApp copy to something like YourAppMonkey.
so it looks like this:
You may also want to rename the Scheme from the Manage Schemes window:
4. Add the downloaded MonkeyTalk lib to your project File > Add to “YourApp”... from the menu.
5. When the dialog box appears, navigate to the directory where you unzipped the MonkeyTalk zip file, and select the MonkeyTalk iOS lib frompathToMonkeyTalkFolder/agents/iOS.
6. Recursively create groups for any added folders option. Note: It is up to you whether or not you want to Copy items into destination group's folder.
7. In the Add to Targets box, deselect YourApp and select YourAppMonkey.
8. Click Add.
9. The MonkeyTalk lib should now be visible in your project.
1. Right-click on the YourAppMonkey build target, and select the Build Phases tab.
2. On the Link Binaries With Libraries tab, you will need to add libsqlite3.dylib CFNetwork.framework and QuartzCore.framework if your application is not already using them. (These frameworks are required by the MonkeyTalk).
3. XCode will have added references to the libMonkeyTalk.a library. (Note: if you want to build iOS 4.x, make sure you change UIKit.framework from "Required" to "Optional")
4. On the Build Settings tab, scroll down to the Linking section and add to your Other Linker Flags: -all_load -lstdc++
5. Choose your duplicated test target from the Scheme menu in Xcode and Run on the Simulator or Device.
Log output will show that MonkeyTalk has successfully loaded in your app (as seen below)
本文出自 “专注移动app开发” 博客,谢绝转载!