Thursday, June 25, 2015

debugging JailBroken iOS using XCode


A while back I used an app called JailCoder to enable me to run and debug my own apps on my jailbroken iPhone 5S without having to pay Apple for a full developer account. I’m still learning iOS development and I have nothing I want to submit to the app store, so I’m reluctant to pay the £100 that Apple wants to enable me to run my own code on my own device.
Given that XCode is free, and that £100 per year would gives me the ability to sell apps through the app store, I think it’s a bargain if you are actually planning to distribute apps, but for me just learning it seems a bit steep.
There don’t seem to be many tutorials out there telling you how to do this for iOS8.1 and XCode 6.1 (they are all a bit outdated), but this is what worked for me:
  1. On your Jailbroken device install AppSync Unified 5.2-1 (or later) from AngelXWind’s repo. Don’t use any other AppSync, and if you have others, be sure to remove them.
  2. Open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist and change AD_HOC_CODE_SIGNING_ALLOWED to YES. You may need to duplicate it to the desktop, change it, save it, then drag and drop back into the original folder because OS X let you edit the file in place.
  3. If XCode was running, restart XCode.
  4. Change your Project and Target settings to “Ad Hoc Code Sign” in Build Settings
  5. Tell XCode to run app on iPhone. At this point XCode will put app on your iDevice, but can’t debug because it can’t attach to the process. The app will start then close immediately. You can now manually start the app on the phone now though.
  6. To enable debugging: In your project select File>New File Property List and create a file called “Entitlements.plist”. Add “Can be debugged” or “get-task-allow” (both do the same thing) and set the value to YES.
  7. Now change your Project and Target Code Signing Entitlements (In Build Settings) to “Entitlements.plist” (you have to type it in).
Now XCode can run and debug the app. Good luck
Note that some poeple have issues because they have other appsyncs installed. Remove all other appsyncs and install AppSync Unified from http://cydia.angelxwind.net/ (you’ll have to add this repo to cydia)
Thanks to Karen and Linus for developing AppSync Unified.

----------------------------------

How to Install AppSync Unified on iOS 8 Cydia

Step 1: Launch Cydia.
Step 2: Tap on the Sources button from the bottom bar.
Step 3: You’ll view a list of all the sources added to Cydia. Tap on Edit from the top right corner and press Add.
Step 4: Add the following source: http://cydia.angelxwind.net/
angelwind-repo-cydia
Step 5: Once the new source has been added, go to the Search section and type in AppSync Unified to find it.
Step 6: Open it and press the Install button followed by Confirm to start installing the package on your iOS 8 device.
appsync-unified-ios-8-cydia
Once the installation has been finished, you should now be able to freely test and debug apps on your iOS device without enrolling in Apple’s Developer Program.
If you face any problems or have questions regarding AppSync, feel free to let us know in the comments section below and we’ll get back to you.

Wednesday, June 3, 2015

This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in.

http://stackoverflow.com/questions/18852983/eclipse-reports-rendering-library-more-recent-than-adt-plug-in

  1. Click Help > Install New Software.
  2. In the Work with field, enter: https://dl-ssl.google.com/android/eclipse/
  3. Select Developer Tools / Android Development Tools.
  4. Click Next and complete the wizard.

--------------------------------


Change android version while rendering layout.
enter image description here
Change in API version 18 to 17 work for me.

--------------------------------------------------
The Reason for Warning is your using Old ADT (Android development tools), so Update your ADT by following the procedures below
Procedure 1:
  1. Inside Eclipse Click Help menu
  2. Choose Check for Updates
  3. It will show Required Updates in that window choose All options using Check box or else choose ADT Updated.
Procedure 2:
Click Help > Install New Software. In the Work with field, enter: https://dl-ssl.google.com/android/eclipse/ Select Developer Tools / Android Development Tools. Click Next and complete the wizard.

Tuesday, June 2, 2015

duplicate an android project

1) In eclipse, copy the original whole project and paste in eclipse ( Not copy the project folder in windows explore), eclipse will ask you for a new project name, just type in the new project name.

2)(optional, because eclipse already done for you) go into manifest and change the name there. Be sure and make the change in the "manifest" tab NOT in the xml code . and hit save icon , a pop-up will ask if you want to "update your Launch Configurations", hit "YES"

3)Click on "SRC" at the top of the package. Notice how the package name under the src folder has not changed names. right click that and select refactor>, Change the name. ... a rename menu appears, all the boxes should be checked and hit "preview" (you might get a warning it already exists...go on anyway) that should then change the package names in the individual class files. 

4) change app name , should change value of "app_title" at res->values->demo_strings.xml



=============================================================

http://stackoverflow.com/questions/5170425/quickest-way-to-duplicate-an-android-project



Here's the procedure I've been using for making a new copy of a project. It's worked fone for a large project I wanted to break down to a smaller more specialized and I also have a scene manager template that I clone from for the start of each new project. All these steps seem to work fine and it's done within Eclipse/ADT
how to clone a project and rename it. ------------------------------ open up the source project, (ie just click on it. name of project and leave it highlighted) then control-c control-v , give it a new name..note this is a TEMP name because you will have to rechange it in a second so "the copy" is just fine.
The copy should paste in place, open up the copy ,right click on top line and select "refactor--> rename--> give the new name you want to name the whole project and check "update references" if it's not already checked.
Then go into manifest and change the name there. Be sure and make the change in the "manifest" tab NOT in the xml code . and hit save icon , a pop-up will ask if you want to "update your Launch Configurations", hit "YES"
Click on "SRC" at the top of the package. Notice how the package name under the src folder has not changed names. right click that and select refactor>, Change the name. ... a rename menu appears, all the boxes should be checked and hit "preview" (you might get a warning it already exists...go on anyway) that should then change the package names in the individual class files. Open a few and check the top line for the package is updated. under res/values is a file strings.xml. Open it you should see this. XXXXXXXX
and change the XXXXXXX part to the new name you want for your icon on the device/emulator, probably the Apps name that's it. It was such a pain to do this each time so I created my own "doc" to help. I've double checked this a few time