I want my Electron app could open *.txt-files (generated by my app) with system default application (default text editor).
I use shell.openItem(path) to perform it - and it worked fine... until I've packed (mas) and signed the app. I suppose I have to add some entitlements when signing, but already tried bunch of them without success :(
Could anyone give me a hand with that?
Unfortunately Electron disables the shell.openItem() API in Mac App Store builds. From their signing guide:
[shell.openItem()] will fail when the app is signed for distribution in the Mac App Store. Subscribe to #9005 for updates.
However, there is a work-around that will enable you to have the same functionality:
shell.openExternal('file://' + myFilePath);
This approach is also confirmed to pass the Apple Store Reviews (see here).
Related
I have a Mac App for OS X 10.10 that I am trying to create a working release build.
Not for the Mac App store "Distributing Apps Outside the Mac App
Store"
Uses "Developer ID Application" for the release code signing. Things look good in my App dev account
Created an OSX APP ID com.blah.app
Can create and verify an Archive successfully
sudo spctl --assess --verbose=4 Name.App, looks good "Name.App : accepted
source=Developer ID"
Read thru Apple "Distributing Apps Outside the Mac App Store"
Needs to be OS X 10.10 due to customer requirements
Read through everything I can find on stack overflow regarding this
matter
Can build and release iOS without a second thought, but this is my
first Mac App
I run the App and in the console I see "EXC_CRASH (Code Signature Invalid)"
Stumped ...
Gatekeeper
Macs have a "gatekeeper" feature that can be set in 3 modes in System Preferences > Security & Privacy > General > "Allow apps downloaded from:".
Which is your test system set to ?
Since you're signing using a Developer ID, it needs to be set to the 2nd or 3rd option (not just allowing the App store). [2nd option is the default on freshly installed machines]
Build for distribution outside of the app store
Builds that you create for submission to the App store cannot be run by everybody. One needs to build it specifically for that.
To quote https://developer.apple.com/library/mac/qa/qa1884/_index.html :
[...] use Xcode Organizer > Export > Export a Developer ID-signed Application. Developer ID-signed apps can be run by anyone. However, code that uses technologies only available to Mac App Store apps, such as receipt validation, iCloud, and push notifications, will not work if your app is Developer ID-signed. You might need to temporarily disable those parts of your app if you opt for the Developer ID testing approach
There was an error in the selected capabilities (red) that wasn't stopping the build, "Key chain sharing" in this case. Turned off as I didn't need it and everything works as expected
I'm stuck with a problem, when I set Signing (General target's tab) to Mac App Store, it changes target's Build Settings -> Code Signing Identity to a Mac Developer.
And vice-versa if I set Code Signing Identity to 3rd Party Mac Developer Application:... Xcode changes Signing (at the General tab) to None. Stuck with it, maybe someone encounter this? Thanks.
Achieving project as is doesn't allow me to Upload / Validate project.
I want to mention, also, that my goal is to upload the app to App Store (Mac of course). I also have helper application in my bundle, it have its own bundle ID.
I have a Mac app I just created in Xcode, and signed as a "Mac App Store" application, with the default Team Provisioning Profile. I only have two UDIDs registered in the Member Center, and can run the application on any of my devices (expected)... but ALSO on any other non-registered devices.
Is there a way to lock the application to only registered UDIDs for the purpose of Beta testing?
The documentation seems to apply mostly to iOS applications, and remains a little unclear for the Mac application procedure.
Oddly enough, I wasn't able to sign my code with my UDID-specific Provisioning Profile at all in Xcode. However, by setting the Provisioning Profile to my restricted one, and properly setting my Code Signing Identity, I was able to compile via command-line properly.
Now when loaded on any machine other then the UDID-approved ones, the application fails to launch (which is the desired behavior for my Beta testing strategy).
My app is ready to upload. Everything works fine in development side. I wonder what I should change (about SSL or something else) before uploading to store?
This is a complex topic and we may not be able to answer this in once sentence.
For submission you may need a Distribution Profile from the Apple Dev Center. Depending on the functionality you're using in your app, and depending on if it's an iOS or Mac App, you may be able to use the provisioning profile Xcode has generated for you. You can set this under Build Settings - Code Signing - Provisioning Profile.
You also need to setup your app in iTunes Connect so you can submit it (this includes screenshots, App Store Category, description, etc).
To check if the submission will be successful, head over to Product - Archive, and from the screen that opens hit "Validate". This will tell you if you're missing anything.
Take a look at the App Distribution Guide for details on how to submit an app to the App Store. There's a whole chapter on Push Notifications in there too which deserve special attention: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/SubmittingYourApp/SubmittingYourApp.html
Those technicalities aside, make sure that any NSLog and NSAssert statements that you may have used while developing are removed or not compiled before submission.
I have create in sandbox, an app which use a helper to start at login, as presented here.
It works ok, but the next messages are logged in the console:
lsboxd[1560]: Not allowing process 15208 to launch "/Applications/SandboxApp.app/Contents/Library/LoginItems/SandboxHelper.app" because it has not been launched previously by the user
lsboxd[1560]: Not allowing process 15208 to register app "/Applications/SandboxApp.app/Contents/Library/LoginItems/SandboxHelper.app" for launch.
I see that this messages are about the helper, but I don't know what to do, to prevent them.
My only concern is that Apple may reject the app because of this messages.
Is someone who prevent the raise of those sandbox messages, or is someone who sent an app, which raise sandbox messages, to Apple and was accepted on Appstore?
See http://blog.timschroeder.net/2012/07/03/the-launch-at-login-sandbox-project/ - according to this it is a code-signing issue that probably won't be an issue with the AppStore build as the AppStore build gets resigned.
This should work in the final build. According to Apple Documentation (Section “Launching Helpers with Launch Services”):
Launching Helpers with Launch Services
A sandboxed app is allowed to
launch a helper using Launch Services if at least one of these
conditions has been met:
Both the app and helper pass the Gatekeeper assessment. By default
that means both are signed by the Mac App Store or with a Developer
ID. Note: This does not include your development ("Mac Developer") or
distribution ("3rd Party Mac Developer Application") signing
identities.
The app is installed in /Applications and the app bundle
and all contents are owned by root.
The helper has been (manually) run
at least once by the user.
The first and/or second one should cover your case when your app was installed through the Mac App Store.