plistTool for OS X

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Wolfram
Enthusiast
Enthusiast
Posts: 567
Joined: Thu May 30, 2013 4:39 pm

Re: plistTool for OS X

Post by Wolfram »

I fond a way, but I'm not sure if this is a a good solution.
I put my osx_info_plist.pbi file under complier options as "main source file".

is this a good way???
macOS Catalina 10.15.7
User avatar
thinkitsimple
User
User
Posts: 89
Joined: Mon Aug 13, 2012 6:12 pm
Location: Berlin, Germany
Contact:

Re: plistTool for OS X

Post by thinkitsimple »

Does this tools still work with Yosemite?

When i install and start the app, nothing happens.
Michael

PureBasic 5.51, macOS 10.12.2 Sierra
User avatar
thinkitsimple
User
User
Posts: 89
Joined: Mon Aug 13, 2012 6:12 pm
Location: Berlin, Germany
Contact:

Re: plistTool for OS X

Post by thinkitsimple »

Ok, my fault. Works on Yosemite also.

But how can i handle images like my toolbar images?

I placed this in my source and the icon is copied to the App-package/Contents/Resources folder.

Code: Select all

;@R ../toolbar/plus_32.png
But how do i access this image from within my code, so that the icon is visible when the app runs inside the IDE and also when it runs as compiled executable?

When i use this code, i can see the icons when the app runs inside the IDE.

Code: Select all

ToolBarImageButton(1, LoadImage(0, "../toolbar/plus_32.png"))
Michael

PureBasic 5.51, macOS 10.12.2 Sierra
User avatar
thinkitsimple
User
User
Posts: 89
Joined: Mon Aug 13, 2012 6:12 pm
Location: Berlin, Germany
Contact:

Re: plistTool for OS X

Post by thinkitsimple »

Ok, found the answer.

I have made a folder "Resources" within the folder where i save my .pb sources.

Like appname/source/Resources.

Within source, i save my .pb file and the icons are placed inside source/Resources folder.

In my code i use this:

Code: Select all

;plist
;@R Resources/block_32.png
;@R Resources/delete_32.png
;@R Resources/diagram_32.png
;@R Resources/help_32.png
;@R Resources/home_32.png
;@R Resources/info_32.png
;@R Resources/left_32.png
;@R Resources/pencil_32.png
;@R Resources/plus_32.png
;@R Resources/right_32.png
;@R Resources/save_32.png
and this to load the icons whether i run the code from inside the IDE or as executable.

Code: Select all

ToolBarImageButton(1, LoadImage(0, "Resources/plus_32.png"))
Michael

PureBasic 5.51, macOS 10.12.2 Sierra
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: plistTool for OS X

Post by J. Baker »

Like this... ;)

Code: Select all

;@@ LSMinimumSystemVersion = 10.6
;@R MyImage.png

MessageRequester("Test", "Test application")

RunProgram("open", "-a /Applications/Preview.app Resources/MyImage.png", "")
EDIT: I see you figured it out.
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
User avatar
thinkitsimple
User
User
Posts: 89
Joined: Mon Aug 13, 2012 6:12 pm
Location: Berlin, Germany
Contact:

Re: plistTool for OS X

Post by thinkitsimple »

Hi again.

I'm now trying to upload my first PureBasic app to itunesconnect using the Apple Applicationloader.

All went fine, but there is no app icon displayed on my builds in itunesconnect.

I have places the iconname.icns in the app/resources, and it is displayed when i start the app, but not after uploading it to itunesconnect.

And idea whats wrong here?
Michael

PureBasic 5.51, macOS 10.12.2 Sierra
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: plistTool for OS X

Post by J. Baker »

thinkitsimple wrote:Hi again.

I'm now trying to upload my first PureBasic app to itunesconnect using the Apple Applicationloader.

All went fine, but there is no app icon displayed on my builds in itunesconnect.

I have places the iconname.icns in the app/resources, and it is displayed when i start the app, but not after uploading it to itunesconnect.

And idea whats wrong here?
I'm not sure. I would contact iTunes Connect and see why. Could just be delay or something. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
User avatar
thinkitsimple
User
User
Posts: 89
Joined: Mon Aug 13, 2012 6:12 pm
Location: Berlin, Germany
Contact:

Re: plistTool for OS X

Post by thinkitsimple »

Hi,

Apple only refers to the App Distribution Guidelines. I'm sure i made all like described there.

Can you describe, what exactly your plist.file looks like and how you placed your app icon there and in your code?

As i said, the compiled app runs fine, but after uploading to itunesconnect, the build-icon is missing.
Michael

PureBasic 5.51, macOS 10.12.2 Sierra
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: plistTool for OS X

Post by J. Baker »

Here's what Macrotune's plist looks like. An icon for the app and one for the file associated. ;)

Code: Select all

<?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>CFBundleDevelopmentRegion</key>
	<string>English</string>
        <key>CFBundleDocumentTypes</key>
        <array>
         <dict>
          <key>CFBundleTypeExtensions</key>
           <array>
            <string>mmlp</string>
           </array>
          <key>CFBundleTypeIconFile</key>
          <string>FileIcon.icns</string>
          <key>CFBundleTypeName</key>
          <string>Macrotune Project</string>
          <key>CFBundleTypeRole</key>
          <string>Editor</string>
          <key>LSHandlerRank</key>
          <string>Owner</string>
         </dict>
        </array>
	<key>CFBundleExecutable</key>
	<string>Macrotune</string>
	<key>CFBundleGetInfoString</key>
	<string>Macrotune 1.2.0</string>
	<key>CFBundleIconFile</key>
	<string>Icon.icns</string>
	<key>CFBundleIdentifier</key>
	<string>com.posemotion.macrotune</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>Macrotune</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.2.0</string>
	<key>CFBundleSignature</key>
	<string>Pure</string>
	<key>CFBundleVersion</key>
	<string>1.2.0</string>
	<key>CSResourcesFileMapped</key>
	<true/>
	<key>LSApplicationCategoryType</key>
	<string>public.app-category.music</string>
	<key>LSMinimumSystemVersion</key>
	<string>10.6</string>
	<key>NSHighResolutionCapable</key>
	<true/>
	<key>NSHumanReadableCopyright</key>
	<string>Copyright © 2015, Wilbert Brants & J. Baker - PoseMotion. All rights reserved.</string>
</dict>
</plist>
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
User avatar
thinkitsimple
User
User
Posts: 89
Joined: Mon Aug 13, 2012 6:12 pm
Location: Berlin, Germany
Contact:

Re: plistTool for OS X

Post by thinkitsimple »

Thats what my plist.info looks like:

Code: Select all

<?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>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleExecutable</key>
	<string>UniFormis</string>
	<key>CFBundleIconFile</key>
	<string>uniformis</string>
	<key>CFBundleIdentifier</key>
	<string>com.bytemasters.uniformis2</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>UniFormis</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>2.0.3</string>
	<key>CFBundleSignature</key>
	<string>PURE</string>
	<key>CFBundleVersion</key>
	<string>2.0.3</string>
	<key>CSResourcesFileMapped</key>
	<true/>
	<key>NSHighResolutionCapable</key>
	<true/>
	<key>NSHumanReadableCopyright</key>
	<string>Copyright © 2015 bytemasters GmbH. All rights reserved.</string>
</dict>
</plist>
and this is what i placed on top of my app main code:

Code: Select all

CompilerIf #PB_Compiler_OS = #PB_OS_MacOS
  ;plist
  ;@R Resources/block_32.png
  ;@R Resources/delete_32.png
  ;@R Resources/diagram_32.png
  ;@R Resources/help_32.png
  ;@R Resources/home_32.png
  ;@R Resources/info_32.png
  ;@R Resources/left_32.png
  ;@R Resources/pencil_32.png
  ;@R Resources/plus_32.png
  ;@R Resources/right_32.png
  ;@R Resources/save_32.png
  ;@@ CFBundleName = UniFormis
  ;@@ CFBundleVersion = 2.0.3
  ;@@ CFBundleShortVersionString = 2.0.3
  ;@@ CFBundleIconFile = uniformis.icns
  ;@@ CFBundleIdentifier = com.bytemasters.uniformis2
  ;@@ NSHumanReadableCopyright = Copyright © 2015 bytemasters GmbH. All rights reserved.
CompilerEndIf
But the icon is still not displayed in intunesconnect.
Michael

PureBasic 5.51, macOS 10.12.2 Sierra
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: plistTool for OS X

Post by J. Baker »

I don't know if it would make a difference but I would call it "Icon.icns" or just add the ".icns" extension to your plist. ;)
Itunes connect may not be parsing the plist properly and is hunting for the extension. :?:
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
User avatar
thinkitsimple
User
User
Posts: 89
Joined: Mon Aug 13, 2012 6:12 pm
Location: Berlin, Germany
Contact:

Re: plistTool for OS X

Post by thinkitsimple »

Thanks for your help. I will try it with Icon.icns.

Another thing:

My App-Version still says 2.0.0, although i changed it to 2.0.3 or 2.0.4 in the plist.info.

Any ideas, why this is not updating?
Michael

PureBasic 5.51, macOS 10.12.2 Sierra
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: plistTool for OS X

Post by J. Baker »

Maybe Itunes Connect is having issues at the moment, as that should have updated.
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
User avatar
thinkitsimple
User
User
Posts: 89
Joined: Mon Aug 13, 2012 6:12 pm
Location: Berlin, Germany
Contact:

Re: plistTool for OS X

Post by thinkitsimple »

It must be itunesconnect. There are several posts on the internet regarding this issue:

e.g.: http://stackoverflow.com/questions/2637 ... es-connect
Michael

PureBasic 5.51, macOS 10.12.2 Sierra
Wolfram
Enthusiast
Enthusiast
Posts: 567
Joined: Thu May 30, 2013 4:39 pm

Re: plistTool for OS X

Post by Wolfram »

It would be great to have an option to add Frameworks and helperprograms as well.
For example:
;@F MyFramework.dylib ;to put a framework into /Contents/Frameworks/
;@MacOS MyHelper ;to put a helperprogram into /Contents/MacOS/
macOS Catalina 10.15.7
Post Reply