Sharing iPhone Apps for the Simulator - macos

iPhone Apps built for the simulator are stored here:
/Users/<username>/Library/Application Support/iPhone Simulator/User/Applications
Is it possible to copy the <GUID>.sb and <GUID> directory and install them on a different computer (with Development tools installed)?
This would be very useful for testing/demoing with out having to buy iPhones for all the managers and external clients.

I found a way that requires just a little more setup, but is much easier for non-developers:
Instructions for your users/testers:
Install Xcode following Apple's instructions
Double-click the attached application - the iPhone simulator will launch, install the app and start it automatically.
How to set it up:
Download and unzip (to a folder on your desktop or wherever) 'Simulator Bundler' from: http://github.com/landonf/simlaunch/downloads
Set your XCode build target to the required Simulator configuration (iPad/iPhone/which iOS version)
Do a 'Build and archive'
Find it: select 'Archived applications' in the Organizer, right click the relevant build, select "Reveal archived application in Finder"
Drag the application (yourAppName, no extension) onto the Simulator Bundler app
Done. This will create a self-contained Mac OS X yourAppDisplayName.app file in the same folder (with your app's icon as the icon) that you can stick up on an FTP server or email to your users/testers.
--
I think it's much neater/slicker than having to explain where to copy files, how to launch the simulator and so on.. And if anything gets messed up they can just uninstall via the familiar tap-and-hold + (x) gesture in the simulator UI, then double-click the app you sent them again.
You can also produce several of these packages changing the bundle identifier between builds, allowing them to be installed side by side in your testers' simulators; say for getting some user feedback on different UI designs, or configure one for Production and one for Staging/QA servers, so your content editors can check their changes before they go live or whatever..
The ability to reinstall the app from a desktop icon is also very convenient for localisation testing: launch the simulator, uninstall the app if present, set the required region format and language, double click the icon on your desktop, test; repeat for each required locale. (guarantees a fresh install each time, I've found that switching language with the app installed can result in all sorts of strange behaviour)

Yes, if you send those files to another person, and they put them into that directory, they can test the applications in the iPhone Simulator as well :)

Related

Why can I run my signed Safari App Extension on other computers, but not the one I developed it on?

I’ve started a Safari App Extension project, following Apple’s documentation.
I’ve got my (empty) app, and my very minimal extension. I’ve archived the app, signing it with my Developer ID. When I copied the archived app to a friend’s Mac, ran it, and launched Safari, the app extension showed up in the Extensions pane of Safari’s preferences (with the parent app’s icon), and when enabled, worked fine.
However, when I run the app on my Mac (where I developed it), and launch Safari, the app extension does not show up in Safari’s Extensions preference pane unless I check “Allow Unsigned Exceptions” in Safari’s develop menu, as described in this answer — and when it does, it has a generic app icon, rather the parent app’s icon.
Although I hope to eventually make the app and the app extension available to other people, I’m mainly making it for myself. As such, I’d like to be able to use it without having to check “Allow Unsigned Exceptions” every time I start Safari.
How can I make the app extension show up in Safari’s Extensions preference pane on the computer I develop the extension on?
I found a debug version of my app and app extension in my user Library folder:
~/Library/Developer/XCode/DerivedData/{APP_NAME_FOLLOWED_BY_LONG_STRING}/Build/Products/Debug
After deleting the contents of this folder, restarting Safari, and allowing unsigned extensions again, my app extension no longer appeared with the generic icon in Safari’s Extensions preferences.
(I’m a real Xcode newbie, so I’ve no idea if deleting debug builds is a thing that I can/should do via Xcode instead.)
I then archived my app again and ran it, then restarted Safari. Now my app extension shows up in Safari’s Extensions preferences, with its proper icon and everything, and stays enabled between restarts.

Deploy a Swift OS X app locally?

I am not new to programming, but I am new to Swift. I have developed a small app that I have no intention of distributing, I just want to use it for myself. Everything works just as desired in XCode and now I want to deploy that app locally. How can I run my app on my machine without needing to have XCode also running? I just want to see my app in my Applications folder and run it when I want. Does XCode put build files somewhere that I can access them and use outside of XCode?
On the Product menu there is an Archive option. Select that to create an archive of your app.
Xcode should then automatically open the Organiser window with the archive of your app selected.
You'll see a big blue button called Upload to App Store on the right with two smaller buttons below it. The one you want is called Export... Press it and you'll get a pane giving you various export options with different kinds of signing.
The bottom option creates an unsigned .app file which you can put in your Applications directory.
NB As Eric D says, you can just drag the app out of the products directory, but unless you edit the scheme, that will give you a debug build with less optimisation and with asserts activated.
Update for Xcode 11.2
As Bell B. Cooper points out, the process has changed slightly. Now when you archive an app, you get a window listing the apps and a big blue "Distribute" button. Pressing this, gets you a dialog box giving you the various options. Which one you choose depends on what you want to do with the executable. With Catalina, unless it's just for your own use, you probably want to go for one of the options that involves signing the app.
Edit: while this answer still works, it targets old Xcode versions and uses the debug version of your executable. For recent Xcode versions, and for using the release version of your executable, see JeremyP's answer.
Each time you build an OS X application with the current scheme, Xcode automatically populates the "Products" folder with the related app bundle.
You can find this folder in the Project Navigator:
Xcode > Project Navigator > "Products" folder
Your .app is in there and ready to be used and/or copied to the /Applications folder.

Why does my exported Cocoa Mac application crash (or not even open) upon launch?

Using Xcode Version 7.2 on my OS X 10.10.5.
I have a Cocoa application written in Objective-C that utilizes Google's CorePlot library. When I run the app (Product --> Run), it runs perfectly fine.
However, when I archive the project (Product --> Archive --> Export --> Export as a Mac Application), and then run the created '.app' by double-clicking it, the app crashes right away without even loading.
There's no reason for it to crash; the archive was done successfully, and the first window/ViewController don't try to access saved variables that would not be present on a first run.
Basically, double-clicking the app doesn't even open the app icon in the dock or show a window being created - it's like the app won't even open.
This same crash/no loading happens when I try to open/install the app using any of the options under "Export"
It turns out this issue can occur if your app has trouble importing or finding certain classes/files.
In my case, for some reason, when I opened my project and ran the app, it would find CorePlot's CorePlot.h file. However, when I archived the app and exported it to be used on other people's computers, it would not archive and export 'CorePlot.h'.
As a result, my app would crash right away as it could not find 'CorePlot.h'.

Install IPA with iTunes 12

I have an IPA signed for ad-hoc distribution. I can install it fine with Flash Builder. I'd like to install a release version via iTunes 12, though. Dragging it onto:
The device name
The app section
The app list
The Home Screens section
...does not work? Does anyone have any idea how to do this with the new iTunes 12?
Note : If you are using iTunes 12.7.0 or above then use Solution 2 else use Solution 1. Solution 1 cannot be used with iTunes 12.7.0 or above since Apps section has been removed from iTunes by Apple
Solution 1 : Using iTunes 12.7 below
Tested on iTunes 12 with Mac OS X (Yosemite) 10.10.3
Also, tested on iTunes 12.3.2.35 with Mac OX X (El Capitan) 10.11.3
This process also applicable for iTunes 12.5.5 with Mac OS X (macOS Sierra) 10.12.3.
You can install IPA file using iTunes 12.x onto device using below steps :
Drag-and-drop IPA file into 'Apps' tab of iTunes BEFORE you connect the device.
Connect your device
Select your device on iTunes
Select 'Apps' tab
Search app that you want to install
Click on 'Install' button. This will change to 'Will Install'
Click on 'Apply' button on right corner. This will initiate process of app installation. You can see status on top of iTunes as well as app on device.
You can allow new apps to install automatically by enabling checkmark present at bottom.
Solution 2 : Using iTunes 12.7 and above
You can use diawi for this purpose.
Open https://www.diawi.com/ in desktop/system browser
Drag-and-drop IPA file in empty window. Make sure that last check mark are unselected (recommended due to security concern)
Once the upload is completed then press Send button
This will generate a link and QR code as well. (You can share this link and QR code with Client)
Now open Safari browser in iPhone device and enter this link (Note that link is case-sensitive) OR You can scan the QR using Bakodo iOS app
Once link is loaded you can see app details
Now select ‘Install application’
This will prompt an alert asking permission for installation. Press on Install.
Now you can see the app installation begins on screen.
iTunes 12.7 ( Xcode needed )
You cannot install a release ipa directly on your device. Ipa generated withAppStore Distribution Profile requires to be distributed from App Store or TestFlight. However, I found that app panel was removed even for installing ad hoc ipa from iTunes 12.7. I found a workaround to install ad-hoc apps which might help to them who cannot install even ad hoc ipa. Please follow the instructions below,
Connect your device
Open Xcode and go to Window -> Devices
Select the connected device from left panel
Brows the IPA from Installed Apps -> + button
Wait few seconds and its done!
From iTunes 12.7 apple removes App Store, So we unable to for find App option
We have another way to install iOS app using iTunes 12.7 as below
1)drag and drop your .app file to iTunes.
2)It will create .ipa file, you can find that at ~/Music/iTunes/iTunes Media/Mobile Applications/
3)connect the device you want to install that app.
4)drag .ipa file from finder to iTunes on my Device section as shown in below section.
I don't remember this being very difficult with iTunes 12, but at least for iTunes 12.8 (and likely for the previous couple of minor versions also) it's pretty straightforward even though the Apps button is not there, as demonstrated in the below two steps:
While your device is connected to your laptop/desktop click the device icon on iTunes 12.8:
Drag your .ipa file from Finder or Desktop and drop it into the "On My Device" area.
Wait for the sync to finish and the app is on your device!
For newest iTunes 12.7 and above can easily install IPA by copy and paste
Select and copy your .ipa (cmd+c or ctrl+c)
Connect phone to laptop
Open iTunes and select your device tab on top left of iTunes
Select the music tab
Paste the ipa (cmd+v or ctrl+v) not drag
In my case Drag & Drop didn't work.
I had to first Sync iTunes with the iOS device (Sync button on the bottom right)
I had to add the IPA file through iTunes menu bar: File -> Add to Library...
I had to press the "Install" button for my app in the "Apps" screen
I had to press the "Apply" button on the bottom right
Edit: See Jayprakash Dubey's answer for iTunes 12.7
From the menu shown in the following screenshot, choose Apps. You can drag and drop you IPA file in the next view.
After that, go to your device's page, you'll see the list of apps, install your app and press Apply from the bottom bar.
Tested on iTunes 12.5.3.17
1.Open the iTunes select the “Apps” section with in that select the “Library”
2.Now drag and drop the file AppName.ipa in this Library section (Before connecting your iOS device to your computer machine)
3.Now connect your iOS device to your computer machine, we are able to see our device in iTunes…
4.Select your device go to “Apps” section of your device and search your App in the list of apps with "Install" button infront of it.
5.Now hit the “Install” button and then press the “Done” button in bottom right corner, The “Install” button will turn in to “Will Install” one alert will be shown to you with two options “Don’t Apply”, “Apply”, hit on option “Apply”.
6.The “App installation” will start on your device with progress….
7.Finally the app will be installed on your iOS device and you will be able to use it…
IPA file are generally executable file for iOS app.
Approach used to install IPA in iTunes 12 is different as compared to lower versions.
Simply, add IPA file into iTunes library and search for IPA in apps section of connected device.
Click on install and Apply.
I found a solution for Windows users. All the other solutions i tried didn't work for Windows.
I have been searching about the same problem for a few days. iTunes make obligation to update itself to iTunes newer version for ios 11 phones and iTunes 12.7 version doesn't have apps section so i couldn't download anymore my ad hoc app ipa file and provision files to iPhone.
I just found out that there is an iTunes version (12.6.3) Apple published which won’t be prompted to download new versions of iTunes and you can use this version to download your app. You can dowload it from this link: https://support.apple.com/en-us/HT208079
Apple say if you have a newer version of iTunes you can just download this one over it but I couldn't do it like this. First, I removed iTunes from my computer, then I removed the iTunes folder from my musics folder (you probably don't need to do that) and I downloaded iTunes for 64 bit PC from the link I wrote above. And with this iTunes i can use Apps section again and it doesn't force me to update it. So it works like the good old times.
For iTunes 12.9.5.5 and above you can install the apps by Copying the IPA file and Paste it (Cmd+V or Edit -> Paste in iTunes) in any categories as Music/Films/TV Programmes etc. The app will be installed automatically on your iPhone screen.
Tested on 29 Nov 2019.
Demo:
Since iTunes 12.7 doesn't have "Application" section so it can't be done.
As a workaround I've found this answer.
I simply installed "Apple Configurator 2". Than:
Run application
Connect device
Unlock device
Drag IPA file to visualisation of device in "Apple Configurator 2"
Confirm action
I didn't had to "sign in" as described in on linked question answers
For iTunes 12.7.0 and above, you just need to Cmd+c your app and Cmd+v into your device on iTunes. Any tab works, including Summary, Music, Movies.
For the macOS Catalina 10.15.3 and onwards iTunes is no longer present in the system. all iTunes contents are added in Finder itself. So instead, open the Music app and drag-drop IPA as mentioned below.
installation itunes music ipa
Do not use any service similar to https://www.diawi.com/ as it can potentially have huge security implications. Using this kind of process and with some clever coding skills, a third party can inject extra stuff in you application. And they are basically charging you for something that you can do yourself.
In iTunes 12.7.x, it is still possible to install an ipa directly on a device with a simple drag-n-drop. Look at #ganesh ubale' solution here or the other answers at https://stackoverflow.com/a/46520816/609862 or https://stackoverflow.com/a/46229114/609862.
The Apple developer web site also have detailed information about how to configure a web site for installing an IPA wirelessly (by simply sharing the download link).
I just reset the device (erase all settings) and sync up with iTunes and now I can drag the app over to the phone library on iTunes (even though there is no apps tab). Once you sync. the app is then on the phone.

How to deploy a FireMonkey Application for Mac OSX?

I can run a FireMonkey Application on Mac OSX with PAServer. But now, I would like to deploy the application Mac OS (something like MSI under Windows). How can I do this?
You'll want to read more about Application Bundles.
Using the application bundle that Delphi creates and deploys via PAServer
Since you're using the PAServer, you'll find that it has already created an application bundle for you. After you run the program via the PAServer, look in the following folder on the Mac for the application bundle:
/Users/[username]/Applications/Embarcadero/PAServer/scratch-dir/[profilename]
If your project is named Project1, you'll see an application bundle in that folder named Project1.
If you read the above wiki article, you'll know that Project1 has a "hidden" extension of .app, and the whole thing is really a folder with all of the required files to run the application.
Go ahead and run this application bundle directly on the Mac. If it complains about missing dylibs, such as libmidas.dylib, simply copy them from the PAServer folder into the application bundle's MacOS folder.
To the Mac OS user, the application bundle appears as a single program file, complete with an icon. The user can double-click the application bundle to run the application, drag it to their dock, etc.
Changing the icon
The application bundle will have the Delphi icon by default, but you can replace it with your own icon. On the Mac, simply right-click on the application bundle in Finder, and select Show Package Contents. In there, look in the Contents/Resources folder for the .icns file.
Use the Icon Composer application that was installed with XCode to create your .icns icon file from existing image files.
Peeking inside the bundle
Peek around inside at the rest of the contents. You'll see the required dylib, your program file, and the Info.plist file, which is a text file with things like application IDs, signatures, and other important things.
More about deployment
If your application can be self contained in an app bundle, the standard method is to put the application bundle inside a disk image .dmg file, which allows the user to drop the application into the applications folder.
If your application requires the installation of additional files, libraries, databases, or frameworks, etc., you should create a package. You can utilize PackageMaker to do this. A package is similar to the "msi" installer on Windows that you mention.
When the user double-clicks the package, it's run by Installer. It has a wizard style interface and walks the user through installing the application. You can also sign the package with your code signing certificate.
If you want to include your application bundle in the app store, you'll need to sign it. You'll also need to sandbox it.
Sandboxing and the Mac App Store - Nov 2, 2011
The vast majority of Mac users have been free from malware and we're
working on technologies to help keep it that way. As of March 1, 2012
all apps submitted to the Mac App Store must implement sandboxing.
Sandboxing your app is a great way to protect systems and users by
limiting the resources apps can access and making it more difficult
for malicious software to compromise users' systems. Learn more by
visiting the App Sandbox page.
You must create an Application Bundle in order to deploy you app on a OSX System .
Check these links for more information
Deploying Your Application (Mac OS X installers )
Application Bundle
Building Fancy DMG Images on Mac OS X

Resources