I installed the command line tools in xcode 7.3 and in the command line I used the following command to generate the strings file:
ibtool --generate-strings-file testFile.strings MyController.xib
and also I tried to give the directory path for my xib:
ibtool --generate-strings-file testFile.strings UI/Screens/My\ Card/MyController.xib
I also tried the command with sudo infront of it, suggested from this answer
None of them worked.
I got the error:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.ibtool.errors</key>
<array>
<dict>
<key>description</key>
<string>Interface Builder could not open the document MyController.xib" because it does not exist.</string>
</dict>
</array>
</dict>
</plist>
I used the wrong location of the xib. I enetered the location of xib by seeing its heirarchy in the project navigatior in xcode. BUt the correct path can be found at File Inspector tab under Source Control option.
Select the xib file
Go to File Inspector in the Utilities section.
Look at the Location path under source control option.It will be something like:
/Users/VenkataManiteja/Desktop/iOS/MyProject/src/MyController.xib
and I changed the command to
ibtool --generate-strings-file testFile.strings src/MyController.xib
and it worked.
Related
I am writing a Mac OS app in Go/Objective-C. Suffice it to say, I am not using Xcode and have assembled the application bundle by hand. Here is what it's filesystem hierarchy looks like
${APPNAME}.app
Contents
MacOS
${APPNAME} (binary)
Resources
Base.lproj
InfoPlist.strings (text)
Info.plist (text)
The bundle launches fine. Application works as expected. I have a CFBundleURLTypes dictionary in my Plist file which defines a URL scheme for my application.
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>${APPNAME}</string>
<key>CFBundleURLSchemes</key>
<array>
<string>zzz</string>
</array>
</dict>
</array>
(Note: ${APPNAME} is something like "MyApp." It is not a Java-style, reverse DNS name string.)
When I click on a link in Safari that uses the zzz:// scheme, I get a message that says:
Do you want to allow this page to open "(null)"?
Why is that? I have defined my application name in both the Info.plist file and in the InfoPlist.strings file.
The InfoPlist.strings file simply contains this:
CFBundleName = "My Wonderful Application"
There apparently was some sort of caching mechanism happening. When deployed to another Mac system we managed to procure, which never had the software in question installed on it, this problem did not occur.
Note: The previous system which behaved erroneously had, at the beginning of each test, the software completely removed from it. Finder, Safari or some other Apple software must have secretly cached the app name as "(null)".
Answer: Install it on a new Mac machine, or completely restore (with no backup) the machine you are testing with.
I have this error after Archive of watchkit app.
error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension's Info.plist is set to com.apple.watchkit.
My Info.plist is like this:
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>com.company.nomeapp.watchkit</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.watchkit</string>
</dict>
Build and run on device and simulator works correctly.
I ran into this issue recently (though it didn't build correctly), the problem for me ended up being Mach-O Type was set to static
Go to build settings of watchkit app/extension and make sure:
Mach-O Type = Executable
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How do I make an OS X application react when a file, picture, etc is dropped on its dock icon?
For some reason, if I drag and drop a file on my apps icon... it doesn't work unless the app is currently running.
Here is the current Info.plist entry for CFBundleDocumentTypes
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeName</key>
<string>NSFilenamesPboardType</string>
<key>CFBundleTypeRole</key>
<string>None</string>
</dict>
</array>
Thoughts, opinions, tips, tricks?
Repo here: https://bitbucket.org/crewshin/maketx_dnd
The launching behavior on drag/drop to icon comes from having the file types your application can handle defined in CFBundleDocumentTypes in your Info.plist file.
Your app is not launching because you declared that you do not understand any file type whatsoever.
<key>CFBundleTypeRole</key>
<string>None</string>
To declare your app can read a file type, you should use 'Viewer' or 'Editor' for the CFBundleTypeRole.
The documentation is somewhat unclear about using an * to specify CFBundleTypeExtensions. It used to be a valid way to specify your app can only all file types in 10.4 and earlier, but it may not work after OSX 10.6. Try setting it to an extension you can actually read.
I have created a document based app that needs to open xml text files with a particular extension. When I created the project in Xcode using the NSDocument template I specified the extension I wanted and everything was working fine.
Following the Apple guide on how to build document based apps I went to edit the Info.plist file to add the details of the UTI that were missing before. Suddenly my app stopped opening files with the extension I want and in fact stopped opening any file. Also when I try to save a file the save dialog doesn't suggest any extension any more.
When I save a file and run the command mdls from the terminal I get
kMDItemContentTypeTree = (
"public.data",
"public.item"
)
instead of public.xml I set for the UTI in the Info.plist.
It seems that my app stopped recognising the informations stored in the Info.plist. Is there anything I have to connect in Xcode in order to have this working?
Here is the relevant parts of my Info.plist file:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>xmds</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>AppIcon</string>
<key>CFBundleTypeName</key>
<string>XMDS Script</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>xmds</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>com.dedalus.degs</string>
</array>
<key>NSDocumentClass</key>
<string>Document</string>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.xml</string>
</array>
<key>UTTypeDescription</key>
<string>XMDS Script</string>
<key>UTTypeIconFile</key>
<string>AppIcon</string>
<key>UTTypeIdentifier</key>
<string>com.dedalus.degs</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<array>
<string>xmds</string>
</array>
<key>public.filename-extension</key>
<array>
<string>xmds</string>
</array>
</dict>
</dict>
</array>
I used the Project's Target Info setting to set the Document Type and UTI instead of the Info.plist file in Xcode 4.2 and 4.4. This pulls from the Info.plist file and modifies it after you change it. Try using that instead.
The Document Type defines the class that will handle the extension and the extension. The Exported UTIs represent the extensions for which your app is authoritative. See this Stackoverflow question:
What are “Imported UTIs” in Xcode 4?
My Exported UTIs conform to public.data ("Base type for any sort of simple byte stream, including files and in-memory data"). If you use an identifier, make sure it is the same in both the Document Type and Exported UTIs.
I'm writing an OS X application that open files. I've registered for my filetype by using the info.plist as follows:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>My File Type</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>trip</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleTypeIconFile</key>
<string>filetype.icns</string>
</dict>
</array>
In finder I see my icons for my associated filetype and double clicking the file invokes my app perfect.
When I receive a .trip file in Mail.app the icon of the attachment is just the generic one. Double clicking the file does open my application correctly. My icns file contains all the sizes, and was created with Icon Composer.
Is there a way to specify the Mail.app icon? like zip do? have I missed something? or is there a different way of specifying that icon.
Thanks