How can I run com.apple.tools.info-plist-utility? - xcode

I am using XCode to build an iPhone application, where I would like to externally process the info plist file in the same manner as the XCode build step shown below does
Processing /Users/kte/Projects/build/Debug-iphonesimulator/TestAppGen.app/Info.plist TestAppGen-Info.plist
mkdir /Users/kte/Projects/build/Debug-iphonesimulator/TestAppGen.app
cd /Users/kte/Projects/TestAppGen
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
<com.apple.tools.info-plist-utility> TestAppGen-Info.plist -genpkginfo /Users/kte/Projects/build/Debug-iphonesimulator/TestAppGen.app/PkgInfo -expandbuildsettings -format xml -o /Users/kte/Projects/build/Debug-iphonesimulator/TestAppGen.app/Info.plist
This excerpt from the build log refers to a com.apple.tools.info-plist-utility, which I gather from various sources around the net, is an internal XCode utility.
Is it possible to run the com.apple.tools.info-plist-utility from a command line?

You can use a tool called PlistBuddy, /usr/libexec/PlistBuddy, have a look at its man page.
But you will also need to convert the plist back to a binary plist file. This can be done like this in a build script
plutil -convert binary1 "$TARGET_BUILD_DIR/$INFOPLIST_PATH"

The "plutil" answer is a great start. Unfortunately the Xcode build process does more to the Info.plist file than converting it to binary, for example on my system it adds in the fields:
-MinimumOSVersion
-PlatformName
-CFBundleExecutable
-SDKName
-CFBundleResourceSpecification
-CFBundleSupportedPlatforms
According to the Apple documentation you aren't supposed to set up some of these values yourself:
MinimumOSVersion
MinimumOSVersion (String). When you
build an iPhone application, Xcode
notes the target OS (as determined by
the Base SDK selection) as the
MinimimOSVersion property. Do not
specify this property yourself in the
Info.plist file; it is a
system-written property. When you
publish your application to the App
Store, the store indicates the iPhone
OS release on which your application
can run based on this property. It is
equivalent to the
LSMinimumSystemVersion property on Mac
OS X.
I'm running into all sorts of problems trying to re-sign my application as part of my custom build process.

Related

How can I figure out which framework was used for build desktop application's (Zoom) UI?

I would like to know which framework was used to build Zoom(windows & mac)'s UI.
Is that possible somehow? Would decompiling help?
Zoom's desktop application
You can download Zoom's Linux client and choose Other Linux OS from the drop down menu. Then run the following command in a Linux terminal:
$ tar -xf zoom_x86_64.tar.xz
The execution of the command results in a directory called zoom being created and when you list it's contents using this command:
$ ls zoom
You get the following output:
audio libQt5DBus.so.5 libQt5QuickTemplates2.so.5.12.9 libturbojpeg.so
dingdong1.pcm libQt5DBus.so.5.12 libQt5QuickWidgets.so meeting_chat_chime.pcm
dingdong.pcm libQt5DBus.so.5.12.9 libQt5QuickWidgets.so.5 meeting_raisehand_chime.pcm
double_beep.pcm libQt5Gui.so libQt5QuickWidgets.so.5.12 platforminputcontexts
Droplet.pcm libQt5Gui.so.5 libQt5QuickWidgets.so.5.12.9 platforms
egldeviceintegrations libQt5Gui.so.5.12 libQt5Script.so platformthemes
Embedded.properties libQt5Gui.so.5.12.9 libQt5Script.so.5 Qt
generic libQt5Network.so libQt5Script.so.5.12 qt.conf
getbssid.sh libQt5Network.so.5 libQt5Script.so.5.12.9 QtGraphicalEffects
getmem.sh libQt5Network.so.5.12 libQt5Svg.so QtQml
iconengines libQt5Network.so.5.12.9 libQt5Svg.so.5 QtQuick
imageformats libQt5OpenGL.so libQt5Svg.so.5.12 QtQuick.2
json libQt5OpenGL.so.5 libQt5Svg.so.5.12.9 QtWayland
leave.pcm libQt5OpenGL.so.5.12 libQt5WaylandClient.so record_start.pcm
libfdkaac2.so libQt5OpenGL.so.5.12.9 libQt5WaylandClient.so.5 record_stop.pcm
libicudata.so libQt5Qml.so libQt5WaylandClient.so.5.12 ring.pcm
libicudata.so.56 libQt5Qml.so.5 libQt5WaylandClient.so.5.12.9 ringtone
libicudata.so.56.1 libQt5Qml.so.5.12 libQt5Widgets.so sip
libicui18n.so libQt5Qml.so.5.12.9 libQt5Widgets.so.5 timezones
libicui18n.so.56 libQt5QuickControls2.so libQt5Widgets.so.5.12 translations
libicui18n.so.56.1 libQt5QuickControls2.so.5 libQt5Widgets.so.5.12.9 version.txt
libicuuc.so libQt5QuickControls2.so.5.12 libQt5X11Extras.so wayland-decoration-client
libicuuc.so.56 libQt5QuickControls2.so.5.12.9 libQt5X11Extras.so.5 wayland-graphics-integration-client
libicuuc.so.56.1 libQt5Quick.so libQt5X11Extras.so.5.12 wayland-graphics-integration-server
libmpg123.so libQt5Quick.so.5 libQt5X11Extras.so.5.12.9 wayland-shell-integration
libQt5Core.so libQt5Quick.so.5.12 libQt5XcbQpa.so wr_ding.pcm
libQt5Core.so.5 libQt5Quick.so.5.12.9 libQt5XcbQpa.so.5 xcbglintegrations
libQt5Core.so.5.12 libQt5QuickTemplates2.so libQt5XcbQpa.so.5.12 zoom
libQt5Core.so.5.12.9 libQt5QuickTemplates2.so.5 libQt5XcbQpa.so.5.12.9 ZoomLauncher
libQt5DBus.so libQt5QuickTemplates2.so.5.12 libquazip.so zopen
As you can see, a lot of the filenames start with libQt5 or Qt, so I would assume, that the framework used to develop the Linux desktop client is the Qt Framework. And because the Linux client and the Windows client share the same user interface, they are probably both using Qt.

OpenDDS - Solution builds fine, examples run, but IDL exes crash

I have successfully built OpenDDS 3.13.2 from source. Here is my environment:
Windows 10
Visual Studio 2017 (re-targeted Solution to SDK 10.0.17763.0)
Tried all Configuration/Platform combinations
I successfully used the configure script from the VS command prompt, built everything by opening the generated solution in the same command prompt, and finally ran the Messenger example (publisher and subscriber), and even configured it to use RTPS successfully.
However, when I try to create my own IDL and use the tao_idl, it crashes. Here's my test (using the proper environment from setenv.cmd):
> tao_idl (no args)
IDL: No input files
Second test:
> tao_idl Test.idl (crashes)
I get no error message, and am unable to locate logs or any indication of what went wrong. The same thing happens when I used opendds_idl.
What is the best approach to debug this, and/or are there pre-built binaries available for the IDL compiler(s) (both TAO and OpenDDS)?
After about a day of troubleshooting, I have determined a solution. Despite being able to call tao_idl and opendds_idl yourself, you should basically never do it. There are a good amount of command-line arguments needed to get both to work, and if they're not present, each exe will crash without the proper reasoning why.
I will add my steps below to create a new basic two-exe pub/sub project using OpenDDS:
Create your own IDL file.
Starting with the DCPS Messenger example, modify the .mpc file, replacing Messenger.idl with your IDL file name.
Create a new file called <your project>.mwc, and add the following contents:
workspace {
// the -relative and -include cmdlines make it so this workspace
// does not have to be in the $DDS_ROOT directory tree.
// tell MPC to substitute our DDS_ROOT environment variables for relative paths
cmdline += -relative DDS_ROOT=$DDS_ROOT
// tell the projects where to find the DDS base projects (*.mpb)
cmdline += -include $DDS_ROOT/MPC/config
}
Open a new VS command-line terminal and run $DDS_ROOT/setenv.cmd, or open a regular terminal if you have those environment variables set via Windows settings.
Navigate to your project directory and call: mwc.pl -type vs2017, replacing "vs2017" as needed for your build tool/IDE.
Open up the generated solution, and retarget it as necessary for your Windows SDK version.
Build the <your project>_IDL project first. If you notice in the output window, it is invoking the tao_idl and opendds_idl commands automatically. You can view the .vcxproj files to see the full command-line arguments that were the original problem.
Modify the publisher.cpp, subscriber.cpp, and DataReaderListenerImpl.cpp files to match your new IDL. Run the example as usual and ta-da!
For completeness, the full commands for both tao_idl and opendds_idl are as follows:
> opendds_idl -Sa -St "<your file>.idl"
> tao_idl -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -Sa -St -I$(DDS_ROOT) "<your file>.idl"
> tao_idl -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -Sa -St -I$(DDS_ROOT) "<your file>TypeSupport.idl"

Xcode 10, WatchKit app and distribution error ITMS-90334 with com.apple.wk

I have a project with WatchKit app inside.
It used to work smooth with Xcode 8 and Xcode 9 with automatic signing and distribution. Xcode 10 broke something.
What I have at the moment is this
The main point here is "com.apple.wk"
It has been added somewhere at the re-signing stage by the organizer as far as I can understand.
I checked my project quadriple and I'm 100% sure it doesn't contain "com.apple.wk" string anywhere.
I switched to manual signing. Created new iOS Distribution certificate. Generated 3 Provision profiles with the correct bundles for app, watch app, watchapp extension. The same error is here.
I tried to clean the project, open\close Xcode, reboot the system. No luck.
I'm unable to dilever my IPA to iTunes with the error above.
I tried to export IPA and distribute it with Application Loader. No luck.
The only one place I found "com.apple.wk" string was in packaging log
2018-09-21 06:54:33 +0000 /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app/Watch/myApp Watch App.app: replacing existing signature
2018-09-21 06:54:34 +0000 /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app/Watch/myApp Watch App.app: signed app bundle with Mach-O universal (armv7k (33554444:1)) [com.apple.WK]
the same time main app and extension have resigned with the correct bundle ids
2018-09-21 06:54:34 +0000 /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app: replacing existing signature
2018-09-21 06:54:34 +0000 /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app: signed app bundle with Mach-O universal (armv7 arm64) [com.myAppBundleName]
&
2018-09-21 06:54:33 +0000 /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app/Watch/myApp Watch App.app/PlugIns/myApp Watch App Extension.appex: signed bundle with Mach-O universal (armv7k (33554444:1)) [com.myAppBundleName.watchkitapp.watchkitextension]
Any ideas how to deliver my app are greatly appreciated.
There are two options:
a.
Open EACH target of your project and change Architectures to $(ARCHS_STANDARD)
clean build folder and try to upload as usual. This should allow you to send it automatically via organizer as usual.
b. If above does not work try next:
Click "Archive" with XCode and get xcarchive file
Open archive in Finder
Start distributing to App Store archive through organizer distribute button
Got the error above
Export created ipa file
Open packaging.log file from the export directory
Search for "com.apple.wk" string to find one
Analyze and play a lot with the codesign request from packaging log here it is
/usr/bin/codesign '-vvv' '--force' '--sign' 'B5152DB7C8BC97C444D44341275F5E1B3336BA3B' '--entitlements' '/var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.vsk/entitlements3uMHR5' '--preserve-metadata=identifier,flags,runtime' '/var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.vsk/Root/Payload/myApp.app/Watch/myApp Watch App.app'
Figure out that if i remove this '--preserve-metadata=identifier,flags,runtime' and rerun this code in bash all is going well and binary is signed with the correct bundle id and not with this com.apple.wk
Copy this signed embedded (the path you are able to find in this request above) watch app binary into the xcarchive file created on the first step with replacing the old one.
Start distributing it back with organizer to App Store
Voila it has been uploaded.
Hope it will help someone.

How do I change window managers with Yocto Project tools?

My Intent
I have an image generated by BitBake on which I'm interested in changing the window manager to metacity or maybe something similar.
My Process
I've added require recipes-graphics/images/core-image-x11.bb into my core recipe, which provides a simple Matchbox terminal window but seemingly no other functionality. If I add matchbox-desktop and matchbox-session-sato, it adds a bit more usability but not what I'm looking for.
I've included the default package from the metacity_2.34.13.bb recipe from the meta-gnome layer from the OpenEmbedded Metadata Index in the IMAGE_INSTALL variable of my core image. This installs several components including a metacity command in /usr/bin. If I run that command, I get the following message:
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications
(metacity:1124): GLib-GIO-ERROR **: Settings schema 'org.gnome.metacity' is not installed
Trace/breakpoint trap
I've navigated to /usr/share/glib-2.0/schemas and run glib-compile-schemas ., then run:
startx
metacity --replace
again. Now, the output is:
Window manager error: Unable to open X display
I haven't found a clear solution to this error which applies to my specific situation.
Update (2/29):
I may have now found a solution to this error, using these commands:
X&
export DISPLAY=:0
metacity&
At this point, I seem to be running something on one of my VTs. I can run demos like glxgears in that VT (glxgears is included in the mesa-demos recipe), but I don't know how to actually create a usable environment.
My question(s)
I'm not using much from meta-openembedded/meta-gnome (just metacity) or meta/recipes-gnome (adwaita-icon-theme, gnome-desktop3, gsettings-desktop-schemas and gtk+3), so am I missing some recipe which automates the addition of metacity?
(if not Question 1) How can I solve the error Window manager error: Unable to open X display?
The x11-common recipe adds a X session script that will run /usr/bin/x-session-manager: that is responsible for starting your desktop environment.
The way to implement a new session/DE in OE-Core is to use update-alternatives for "x-session-manager": see the matchbox-session recipe for the default implementation and mini-x-session recipe for an alternative.
mini-x-session might be modifiable for your needs so you don't need to write a new one: A /etc/mini_x/session file like this might do the trick:
# start any apps here, e.g. "my-desktop &"
exec metacity
Going from this (a running window manager) to "usable environment" might still be lots and lots of work, depending on your definition of usable.

Mac OS X 10.10 merge tool git bugs

When I am attempting to use git mergetool I get the following errors.
Normal merge conflict for 'application/language/dutch/config_lang.php':
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (opendiff):
2014-10-16 16:30:02.996 FileMerge[42541:5140761] Failed to connect (delegate) outlet from (DiffController) to (DiffController): missing setter or instance variable
2014-10-16 16:30:02.997 FileMerge[42541:5140761] Failed to connect (mainPrefPane) outlet from (DiffController) to (NSBox): missing setter or instance variable
2014-10-16 16:30:03.071 FileMerge[42541:5140761] Unable to load platform at path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
2014-10-16 16:30:03.072 FileMerge[42541:5140761] Unable to load platform at path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
What can I do to fix this? The tool launches but I cannot continue after the first file.
NOTE: This error is intermittent, but happens most of the time.
cd /Applications/Xcode.app/Contents/Developer/Platforms
plutil -convert xml1 iPhoneOS.platform/Info.plist
plutil -convert xml1 iPhoneSimulator.platform/Info.plist
This fixes the 2nd set of warnings. This has been an issue since 10.8,
but apple ignores my bug report :)
I see the same behavior after upgrading from 10.9. According to this answer, delete both iPhoneOS.platform and iPhoneSimulator.platform. Or reinstall them properly from XCode if you need them. The former worked for me.

Resources