Problems with finding Three20 Header Files for iPhone App - iphone

I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using #import <Three20/Three20.h>.
I am pretty sure the header search path is correct, but I can't seem to get it working, even when I follow exact tutorials online.
Has anyone seen this problem before and know how to fix it?

Have you checked to make sure you actually have added three20 into your dir. as I remember having a similar problem, when I tried to use three20 which was due to the fact it wasn't in the right place, when I thought it was.

It sounds like you haven't imported the files correctly. Have another look at where you added the files to you project, if you have at all. (If not, you need to drag them into your project first!)
If you try to compile the project without the file added to the project, it will fail. Simply adding a path is not enough.
You need to drag it into Xcode...
Add it to the project...
And then your code should build.
I hope this helps!

Related

Xcode cannot find my Localizable.stringsdict file

I am trying to add pluralizable localization to my Xcode project, using Xcode 11.2.1
I followed the steps in this tutorial: https://medium.com/#vitaliikuznetsov/plurals-localization-using-stringsdict-in-ios-a910aab8c28c , which is a pretty basic instruction on how these things work. Mine, however, did not work, SO, I tried the following:
0) Actually running the tutorial code to make sure it works on my copy of Xcode. It does.
1) Copying the example Localizable.stringsdict from the tutorial into my program, and using
the keys from said tutorial in my calls, in case I had made a bad Localizable.stringsdict
or was calling it wrong. This failed.
2) Creating the Localizable.stringsdict as a property list, as some older questions suggested, instead of a Stringsdict file when creating it new, and copying the known 'good xml' of the example plist into it. This failed.
3) I tried removing all localized content from the project, and re-adding the strings file and the stringsdict file. Now it can't find either of them.
Clearly I must be missing some configuration, some step, some way of saying HEY XCODE LOCALIZE THESE. When I look at the 'Localizations' tab in the Project, there is only 1 file localized, for "Base"
Yesterday, I succeeded to localize Swift App using this tutorial.
Please try to follow this tutorial. Thanks
Number 4 was the clue here. My project has a lot of targets. Add your stringsdict file to the targets it needs to be added to. Derp.
I added the dict file to the proper target and everything works fine.
Always check the obvious stuff first.
Open your localized stringdict file, then in the right inspector click on Identity and Type you will see localization block with a button, click on it and project will recognize your file now

How to manually add SSZipArchive to my project

First off, I'm a Mac OSX newbie, both using and programming, but it's been thrust upon me. My project is moving along nicely, but I need to unzip a file, and it looks like SSZipArchive seems like the way to go. I want to manually add it to my project, so that it stays all together in my source code control system. Others, esp. the release engineer, shouldn't need to do anything, and we need to have all the source code local.
I've tried a million ways and back, only to keep getting the dreaded "No Such module" error. I've researched for a couple days now, and still no closer. So I'm starting from scratch in a new project to say what I'm doing and to plead for some help here. All this is being done on an El Capitan laptop, using Xcode 7.3.1, with Swift 2.2.
Create a Cocoa Application project, calling it 'ziptest', using Swift, nothing else checked. Build it just for fun.
Drag 'n' Drop the SSZipArchive folder found in the master.zip downloaded from the SSZipArchive GitHub site into my project. I'm not sure where it should go, or if it matters - top level, between ziptest project icon and the ziptest group or inside the ziptest group. But I'll put it inside the ziptest group. Now I'm faced with a new question - for the "Added folders", do I want to "Create groups" or "Create folder references". I do copy the items, because, as I said, I want to add them to SCCS later. I saw somewhere here on Stackexchange to make sure it is Group, so that's what I'll do. Build again and it still works.
I know I need a "bridging header" file, so I'll create it. I thought at some point, Xcode asked if I wanted to create it, but the above step doesn't do that. After much experimention, I found that if I d'n'd the SSZipArchive.m/.h files directly, it asks me. It doesn't put anything into it, but at least it creates it and updates the Build Settings. But I do this now manually by right clicking on the ziptest group folder, select New File... and create an empty Header File called "ziptest-Bridging-Header.h", following the pattern from the Xcode created one, being sure to check off the ziptest Target.
I add:
#import "SSZipArchive.h"
to that file. And building still works.
I added ziptest-Bridging-Header.h as the Objective-C Bridging Header in the Build Settings. And building still works.
Now comes the moment of truth. I add:
#import SSZipArchive
to AppDelegate.swift and I get the dreaded No such module 'SSZipArchive'
What am I doing wrong?
Edited to add: Oh, I also added libz.dylib to the Build Phases -> Link Binary With Libraries part. Doesn't help, of course, because we haven't even gotten to the link phase yet.

Xcode won't build to device

This problem has been KILLING me. I've been working on this app for 8 Months, and I am so close to finishing, I just can't seem to build for device. Building for the simulator works fine, but device always gives me the SAME 2 errors.
The 1st Error:
"Instruction requires a CPU feature not currently enabled"
From googling, I've found this probably means I'm not linking a binary I should be, but I'm not sure.
The 2nd Error:
If you can't read it, it says: Generating JWFNS.app.dSYM ... error: unable to open executable '/Users/ajr1188/Library/Developer/Xcode/DerivedData/JWFNS-azshgysfabycfagnebotitpcyaww/Build/Products/Debug-iphoneos/JWFNS.app/JWFNS'
This is the big one. I cannot seem to build the .app.dSYM file properly. I went in and deleted the build folder, I looked at EVERY stackoverflow question I could find and tried changing any random thing mentioned in another question, but all of it is to no avail. I'm so suck right now. AHH. PLEASE. Any help would be so appreciated!
Maybe your project has become hopelessly corrupted. One thing to try is to start a brand new project and copy/import all your sources/assets into the new project to see if that fixes the problem.
Another less nuclear (but perhaps more time consuming) approach is to binary search the build. Exclude absolutely everything except main.m and see if that fixes the problem. If it does, include half your sources, and buid again....repeat, trying to narrow in on the problem spot. Maybe a file or group of files has received special build settings that don't belong there.
I've had very similar problems, I cant remember the exact error message but it was very similar. Are you able to make a new project that will run on your device?
if so (and I know this sounds bad but it's worth a try) Create a new project and simply copy all the code and resources across and see if it still works. If it doesn't then there is something wrong with you code and you can continue trying to isolate the problem from there.
Hope this is helpful.
check the frameworks you link to. there's a chance that you linked a framework (say quartz) of osx, instead of ios.
Answering in detail is probably going to take looking at your target settings. But it looks like you may be building for the wrong architecture. (It doesn't link, so there is no .dSYM symbol file.) For example, if you have only recently built for device, you probably created your project under an older Xcode, and it may not have the arm6/arm7 settings right.
To check, show the Build Settings for your target (not the project), and filter on Architecture.
Make sure that in build settings the architectures are armv6 and armv7. Also make sure that in .plist file, the "Application requires iPhone environment" is TRUE. Delete "Required device capabilities" in the .plist if present.

Issue installing zxing on xCode 4.2

I recently tried installing zxing in xCode 4.2 for my next app. Here is what happened.
I began following the steps, everything was going ok, the first strange thing I noticed is that libZXingWidget.a library showed up red when I added it. I started to get worried because xCode still baffles me. The rest of the steps were followed without issue until I added paths to the header search paths. I tried using an absolute path from /Users to the /cpp/core/src/ and /iphone/ZXingWidget/Classes directories I set up then a relative path and no matter what I get the following error:
clang: error: no such file or directory: '/Users/myusername/Desktop/../../cpp/core/src/zxing/common/GreyscaleLuminanceSource.cpp'
Which .cpp file is causing this seems to rotate around. Funny thing is that do not ever even specify Desktop in my header search paths. Early on I had my folders on my desktop and I was referencing them from there but since then I have deleted that project and have a completely new one. I have no idea what is causing the project to search that location and I would like to know how I can change it.
Thanks!
Try deleting then re-adding the lib. If the problem still occurs, you may want to look into the pbxproj xml file with a text editor to try to see where the wrong path come from.
I had similar problem. Try to move your "cpp" folder to "Users", if it helps then you have problems with your pathes.

Compilation issue

I am facing some compilation issues. In my iPhone app I am using some external library which I have placed in my Frameworks folder. But both these ".a" files and ".h" file comes in red color and they are not getting compiled. Any clue what I am doing wrong here.
It gives errors like not able to find classes of these external lib.
If they are red. Then those files are actually missing from your iPhone project. In order to fix this. Re-download the library (.a and .h) files, then add them into your project again.
I would recommend deleting the "RED" files first, and then re-add the files again.
If you're still having problems after following this. Drop a note.
Hope this helps...