XCode file paths point to nonexistent directories - ios

Right now I'm running XCode 3.2.6. I'm working off of someone else's code, and when I open the project it around 150 files have the wrong path (even when set to "relative to enclosing group."
Instead of using /appname/folder the point to /../../Documents/appname/folder.
I'm aware that some other people have had similar issues with XCode 3.2 in the past, which is why I'm upgrading to Lion now so I can use 4.0. However, has anyone found a fix for this in 3.2?
Also, I was wondering if there was a file that held all of the paths so I could run a script through it?
Thanks

You will notice that the .xcodeproj file itself is actually a Bundle (a.k.a. a directory). If you cd to this directory in Terminal, you can use grep to figure out which files contain the paths using grep -r -i "path here". These files are formatted in XML and some other similar format, so it should be pretty easy to use sed or something to fix some of the paths. And of course, I ALWAYS suggest backing up any files before you autonomously replace stuff in them.

Related

How do I determine if an application is built by Electron or not?

How do I determine if an application is built by Electron or not?
Could I always find specific file or binary on Electron apps?
Please give me some advice, thanks.
There are a few "non-futureproof" ways to check if an app was built on Electron and they vary depending of the OS.
You will need to go in your application folder (for example Applications for macOS, Program Files for Windows or /usr/share for Linux...
Here are some examples of the files/directory you may find in your application folder:
 Linux / Win32
These two OS have basically the same structure, so it's pretty easy to check what you want
locales/
resources/
blink_image_resources_200_percent.pak
chrome_100_percent.pak
chrome_200_percent.pak
content_resources_200_percent.pak
content_shell.pak
icudtl.dat
vkswiftshader.dll
vkswiftshader_icd.json
There are also some files like
libffmpeg.so / ffmpeg.dll
libnode.so / node.dll
depending of the OS you're on.
 macOS
It's a bit more complicated here. You might need to check the Info.plist file to see if there is any reference to Electron.
As unseen_damage said, you can also check in [app folder]/Contents/Resources if there is an app.asar as .asar files are specifically created for Electron.
Anyway, all those files may see their names changes someday, so don't consider them as a reliable way to check if "any" app is built on Electron, it's more of a manual way to check it.
MacOs
To find all Electron apps by finding the .asar file on your mac, use this.
open Terminal
run this command
find /Applications -name '*.asar' -print
MAC:
open a terminal type cd /Applications, then, change directory (cd) into the name of the application you want to check. For example, if it is iTunes, you would do the following /Applications/iTunes.app/Contents/Resources. If you see an app.asar file, or something similar with the .asar suffix, it is most likely an Electron App.
Windows:
Open up the program files directory of the application you are wondering about, and check the file folder for any file with .asar suffix. This can be done via the search, terminal, etc.
Bottom line- Electron apps, when packaged, are bundled into an asar file, and you can search for this file extension to see if the program was built with electron.
Documentation- http://electron.atom.io/docs/tutorial/application-packaging/
macOS
You can also run the following terminal command:
find /Applications -name "*Electron Framework*" | cut -d/ -f3 | sort -u | cut -d. -f1
This will output an alphabetized and cleaned up list of just the application names.
Source: https://talk.macpowerusers.com/t/why-the-dislike-of-electron-apps/20697/20

Convert iOS project to 64 bit using ConvertCocoa64 script

I need to convert my iOS project to 64-bit friendly (to get rid of compiler warnings, as in this question. The solution apparently is to run ConvertCocoa64.
I've managed to locate ConvertCocoa64 (which is no longer included in /Developer/Extras/64BitConversion/ConvertCocoa64) as the Apple docs suggest, but here (search for Auxiliary Tools)
So I've download the script. But my question is, how do I run this on my project? Please assume a total newbie level of knowledge here when it comes to the terminal and running scripts. Do I drop the script inside my project folder and just double click it? Or do I access it from the terminal? The docs say run this command:
/Developer/Extras/64BitConversion/ConvertCocoa64 `find . -name '*.[hm]' | xargs`
But since that folder doesn't exist, where do I run it?. I tried dropping the script in the Developer folder, but when I type ConvertCocoa64 it says command not found.
Find where the command is located now. You'll want to run it in the terminal using the full path to the command, as in your example, just with the real path.
A good way to get the full path is to locate the command in the Finder and drag it to an open terminal window - this also "escapes" any spaces in the path for you. The easiest way to hit all your files as arguments to the command is to cd (change directory) to your project first (in the terminal).
This should get you set up to follow the directions you have.
If I'm not mistaking, to run script, you should place dot . before command. Doesn't really matters, where script is situated as long, as it doesn't rely on it heavily
> cd ~/path/to/script/dir/
> ./ConvertCocoa64 ...

Installing Arc on OS X

When I tried the instructions at https://arclanguage.github.io/, after I entered "racket -f as.scm" I got "-bash: racket: command not found".
I also tried these instructions for downloading Arc on Linux:
https://sites.google.com/site/arclanguagewiki/getting-started/install-arc
I installed racket from download.racket-lang.org, and when I got to "./arc" in the Arc/Nu section, the output from the terminal was "env: racket: No such file or directory".
The Arc Language Wiki (linked to above) indicates that the official installation instructions are out of date, and says little about how to install Arc on OS X. I tried googling for a general solution to "command not found" and "No such file or directory" problems but couldn't find anything that let me fix the problem. I also tried moving my racket and arc downloads to different combinations of places.
Arc runs on top of Racket, which although you've downloaded it, does not appear to be in PATH, the environment variable containing the list of folders that Bash searches for executables.
The immediate fix is to, instead of running Arc as racket -f as.scm, run it as /path/to/racket/bin/racket -f as.scm. (The Racket documentation points out that the Racket executable is in the bin folder of the Racket folder you downloaded).
Assuming that works, the fix is to add the Racket bin folder to your PATH variable. Open up ~/.bashrc in your favorite text editor, and add a line export PATH=/path/to/racket/bin:"$PATH".
Once you do this, you'll have to open a new Terminal before this change will take effect. But once you do, you should be able to just run racket -f as.scm, and it will work.

customize dart compilation (paths in script element)

I was wondering if it is possible to customise how dart tool compiles the app. In particular I am interested in customizing the paths that appear in script elements.
At the moment I have my app in "app/src" folder. I run the following command from the folder above "app/src", let's call it root.
dart --package-root=app/packages/ app/packages/web_ui/dwc.dart --out tmp app/src/testapp.html
I send the output to a tmp folder in that root folder. The problem is that evey time I compile the app, the paths in script element have "../app/src" prepended to the path. So instead of having a
"packages/browser/dart.js" path I end up with "../app/src/packages/browser/dart.js". Is there a way to configure this and avoid getting this "app/src" prefixes.
Ok, I haven't found a solution to my problem using the dart tools configuration so I had to use the old friend - sed.
sed "s/../app/src/packages/packages/g" ${OUT_DIR}/test.html > ${OUT_DIR_SERVER}/test.html

./create: No such file or directory error in terminal window

I am very new to iPhone development and I am looking to work with the PhoneGap framework to create iPhone apps. I installed Phonegap on Mac OS X Lion. I got this error in the terminal window for ./create <project_folder_path> <bundle_id> <project_name>:
./create: No such file or directory
I have searched Google to solve this error, but I can't find any idea from there. Could you please help me solve this issue and run the project? Thanks in advance. Looking forward to your answers.
You probably need to check your current directory with the pwd command, which is what the . is shorthand for. The create executable sits in the Cordova bin directory, not your project directory.
For example, this site shows the required command line to be (spread across multiple lines for readability):
./path/to/cordova-ios/bin/create
/path/to/my_new_cordova_project
com.example.cordova_project_name
CordovaProjectName
In other words, create is separate from your project.
The solution is probably to fully specify the path name of create.
./path/to/cordova-ios/bin ./create
~/<project_folder_path> <bundle_id> <project_name>
This works for me :
Download cordova-3.0.0 and put the folder in your document folder. Expand cordova-ios.zip inside.
Create a folder CordovaTestProject inside your document folder.
Then, open the terminal and try :
./Documents/cordova-3.0.0/cordova-ios/bin/create /Users/<username>/Documents/CordovaXY/HelloWorld org.apache.cordova.HelloWorld HelloWorld
replace <username> by your username. You can get it with pwd in terminal. In terminal, type "pwd" and you will get your username
Make sure that you are inside \phonegap-2.7.0\lib\ios\bin before entering ./create command. Refer the Blog Tutorial for a simple and straight forward explanation of PhoneGap instalation in Mac for iOS and creating a new project.

Resources