Thursday, April 8, 2010
1. Create a new directory <newdir>
2. Run the following command (you can replace newdir with the your directory name and some_prefix with your prefix the same applicable for extension as well. My eg., rename only the png files of the directory (there were no other extensions available).
i=0; for x in *.png; do cp \"$x\" "newdir/some_prefix_$i.png"; i=$(($i+1)); done
Windows should have supported bash scripts natively. OSX is handy only because they inherited from unix.
Sunday, April 4, 2010
Check dependencies Code Sign error: Provisioning profile
[BEROR]Code Sign error: Provisioning profile '579ACFD8-827A-4325-F623-DB8CDD5081DB' can't be found
Anyone who is relatively new to iPhone development could easily identify this issue is related to the invalid provisioning profile.
What if you receive this error even if you provide valid device, dev certificate, provisioning profile and bundle identifier? No clue right. I spent almost a day on finding the issue.
This can be resolved by copying all your classes/resources/other files to a newly created project. Easy solution isn’t it? but my case is different, the project was already renamed (Google on how to rename xcodeproj and the steps involved). As the project given to me was already renamed hence it has different name for xcodeproj, different name for appdelegate and another name for info.plist file, copying all the files to a new project is real pain. To add oil to the fire I was supposed to deliver the code to my QA to test the build on device before sending the code to customer by EOD and it was a Friday.
All you have to do is find the provisioning profile ID in your project.pbxprj file and replace it with valid provisioning profile that you had tried to build the code earlier.
- Step 1: Open the project.pbxproj file in a text editor. (you will find this file in YourProject/YourProject.xcodeproj by control-clicking it and selecting "Show Package Contents")
- Step 2: Replace all occurrences of the provisioning profile id from the error with the correct provisioning profile id from the organizer.
How to find project.pbxproj
Right click (Ctrl+click) your prjname.xcodeproj file and select “Show Package Contents”. This will open the Finder with some files.
[BEROR]CodeSign error: no provisioning profile at path '/Users/username/Library/MobileDevice/Provisioning Profiles/579ACFD8-827A-4325-F623-DB8CDD5081DB.mobileprovision'
The solution to the above error - Rename your appname.mobileprovision with (alpha-numeric-name) specified in the error.
Thank you Anders for correcting the text.
If you help your customer from saving time to find the good apps and you concern about their security then you should have more checklist other than plain API lookup in the binary. For eg., there is an app called 53000+ Famous Quotes but actually it contains around 32100 quotes only. Please refer the image below.
Like the same there are many apps that doesn’t even match the name. eg., Finger security lite.