I am building my macOS app for distribution outside the Mac App store using a shell script as shown below. When a user reports a crash, all I get is offsets and I can’t tell what is going on, where:
Thread 3 Crashed:
0 Meteorologist 0x1026da778 0x10268c000 + 321400
1 Meteorologist 0x1026d6354 0x10268c000 + 303956
2 Meteorologist 0x1026d0a8c 0x10268c000 + 281228
3 Meteorologist 0x1026e8ae4 0x10268c000 + 379620
4 Meteorologist 0x1026f7501 0x10268c000 + 439553
5 Meteorologist 0x1026f6621 0x10268c000 + 435745
6 Meteorologist 0x1026f74f9 0x10268c000 + 439545
7 Meteorologist 0x1026f7509 0x10268c000 + 439561
If I understand correctly, I need to include a dSYM file in my executable. I have DWARF with dSYM File in my Build Options, Release value.
I can see the dSYM in my .xcarchive file. How do I get it into my .app executable? I do include uploadSymbols=TRUE in my exportOptionsPlist file.
If I manually copy the dSYM file, prior to the notarytool step, notarytool throws an error. If I insert the dSYM file after I notarize then it gets flagged when I open the app because it doesn't match what was notarized.
#!/bin/bash
#set -e
#set -x
TEMPLATE_DMG=dist/template.dmg
# "working copy" names for the intermediate dmgs
WC_DMG=wc.dmg
WC_DIR=/Volumes/Meteorologist
VERSION=`cat ../website/VERSION2`
SOURCE_FILES="./Build/Release/Meteorologist.app ./dist/Readme.rtf"
MASTER_DMG="./Build/Meteorologist-${VERSION}.dmg"
# .altoolid = abc@icloud.com aka Developer Email
# .altoolpw = abcd-efgh-ijkl-mnop aka App-specific password
# .altooltm = ABCD123456 aka Team ID
dev_account=$(cat ~/.altoolid)
dev_passwd=$(cat ~/.altoolpw)
dev_teamid=$(cat ~/.altooltm)
mkdir ./Build
rm -rf ./Build/*
echo
echo ........................
echo "------------------------ Storing Credentials -----------------------"
echo xcrun notarytool store-credentials --apple-id \"$dev_account\" --team-id \"$dev_teamid\" --password \"$dev_passwd\" notary-scriptingosx
xcrun notarytool store-credentials --apple-id "$dev_account" --team-id="$dev_teamid" --password "$dev_passwd" notary-scriptingosx > xcodebuild.log
exit_status=$?
if [ "${exit_status}" != "0" ]
then
cat xcodebuild.log
exit 1
fi
rm xcodebuild.log
echo
echo ........................
echo "------------------------ Building Project as an Archive -----------------------"
echo xcodebuild -project Meteorologist.xcodeproj -scheme Meteorologist -configuration Release -derivedDataPath ./Build -allowProvisioningUpdates --options=runtime clean archive -archivePath ./Build/Meteorologist.xcarchive
xcodebuild -project Meteorologist.xcodeproj -scheme Meteorologist -configuration Release -derivedDataPath ./Build -allowProvisioningUpdates --options=runtime clean archive -archivePath ./Build/Meteorologist.xcarchive > xcodebuild.log
exit_status=$?
if [ "${exit_status}" != "0" ]
then
cat xcodebuild.log
exit 1
fi
rm xcodebuild.log
echo
echo ........................
echo "------------------------ Creating exportOptions.plist -----------------------"
echo \<?xml version=\"1.0\" encoding=\"UTF-8\"?\> > exportOptions.plist
echo \<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\> >> exportOptions.plist
echo \<plist version=\"1.0\"\> >> exportOptions.plist
echo \<dict\> >> exportOptions.plist
echo \<key\>destination\</key\> >> exportOptions.plist
echo \<string\>export\</string\> >> exportOptions.plist
echo \<key\>signingStyle\</key\> >> exportOptions.plist
echo \<string\>automatic\</string\> >> exportOptions.plist
echo \<key\>method\</key\> >> exportOptions.plist
echo \<string\>developer-id\</string\> >> exportOptions.plist
echo \<key\>uploadSymbols\</key\> >> exportOptions.plist
echo \<true/\> >> exportOptions.plist
echo \</dict\> >> exportOptions.plist
echo \</plist\> >> exportOptions.plist
echo
echo ........................
echo "------------------------ Exporting the Archive -----------------------"
echo xcodebuild -exportArchive -archivePath ./Build/Meteorologist.xcarchive -exportOptionsPlist exportOptions.plist -exportPath ./Build/Release
xcodebuild -exportArchive -archivePath ./Build/Meteorologist.xcarchive -exportOptionsPlist exportOptions.plist -exportPath ./Build/Release > xcodebuild.log
exit_status=$?
if [ "${exit_status}" != "0" ]
then
cat xcodebuild.log
exit 1
fi
rm xcodebuild.log
echo
echo ........................
echo "------------------------ Compressing the app -----------------------"
echo /usr/bin/ditto -c -k --keepParent ./Build/Release/Meteorologist.app ./Build/Release/Meteorologist.zip
/usr/bin/ditto -c -k --keepParent ./Build/Release/Meteorologist.app ./Build/Release/Meteorologist.zip
if [ "${exit_status}" != "0" ]
then
echo "Compress (ditto) failed"
exit 1
fi
echo
echo ........................
echo "------------------------ Notarizing the app -----------------------"
echo xcrun notarytool submit ./Build/Release/Meteorologist.zip --keychain-profile=notary-scriptingosx --wait
xcrun notarytool submit ./Build/Release/Meteorologist.zip --keychain-profile=notary-scriptingosx --wait
if [ "${exit_status}" != "0" ]
then
echo "xcrun notarytool failed"
exit 1
fi
echo
echo ........................
echo "------------------------ Stapling the app -----------------------"
echo xcrun stapler staple "./Build/Release/Meteorologist.app"
xcrun stapler staple "./Build/Release/Meteorologist.app"
if [ "${exit_status}" != "0" ]
then
echo "xcrun stapler failed"
exit 1
fi
echo
rm ./Build/Release/Meteorologist.zip
Custom Apps
RSS for tagDesign and build customized apps that meet the unique needs of an organization.
Posts under Custom Apps tag
52 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi,
I'm considering trying the product page optimization with other app icons. The doc says that " If an app is downloaded from a product page with a test treatment, the test treatment app icon displays throughout the download process and on the user’s device." (https://developer.apple.com/help/app-store-connect/create-product-page-optimization-tests/configure-test-treatments).
Do I understand correctly that no additional code is required when the app is downloaded from the test treatment ? No code required on app launch ?
I appreciate any feedbacks,
Thank you
Hi guys,
After getting bounced around by Apple support, I was told to post here to get confirmation(?) about usage of a product we are interested in using. I'm hoping to get some insight on this.
In a nutshell, we found some home brewed software that will allow us to flash an airtag like device with custom firmware. This device can then leverage Apple's BLE and send information(GPS) through icloud to a mac that we purchased(server resides there, we do not run/need Find My). We can then use that data internally to assist first responders. As this would be an internal project, there is no selling, no money changing hands for profit, etc.
Any thoughts if this is something we can do legally? I don't want to deploy this and find out we shouldn't be doing this. To be honest, if push came to shove, and the pricing was reasonable, we would be open to paying Apple a fee if that was a factor.
Any thoughts?
We plan to get some redemption codes from ABM to our partners to download custom apps, and they will use their own devices.
But there is a problem, if they are not involved in this business anymore.
If user downloads a custom app to their own device using redemption code, is there a way to force remove it from the App Store purchased list?
Is there a way to force remove it from the App Store purchased list?
Or can only add permission verification to the application?
Hello so i have a few apps that im getting developed on upwork and i have practically 0 knowledge as far as how anything works as far as computer science type stuff. i just want to know what is the correct procedure as far as letting somebody upload the app to my apple developer account. do i give them my AppleID and password and let them do it and then change my password after they're done? any information would be greatly appreciated. thank you
Hello, maybe anyone know anything about HCE (Host card emulation) feature on iOS?
As far as I read, it's not possible to achieve this functionality on iOS, but maybe there are plans to implement that? Or maybe it's clear that it wont be allowed to be used at all? Thanks:)
Failed to decode landmarksData.json from bundle because it appears to be invalid JSON.
Full disclosure - Im extremely new to this and am playing around with the swift tutorials to see what it can do and see if I could build an app.
Any advice is appreciated.
I added a few locations to the SwiftUI Tutorial for Lanmarks and this is what happened. I have checked that JSON file and all commas are in the correct place everything is correct but im getting this error. Not sure what im doing incorrectly.
Can anyone give me assistance on how to fix this. I can only preview favorite button, circle image and map. Everything else appears as Fatal Error in ModelData.
Good evening,
I'm trying to deploy an extremely simple Python QT app to the app store: it's roughly ~10 lines of code that shows a window containing a"Hello, world!" message.
This seemingly trivial task of deploying a "Hello World" app to the store has been extremely difficult, perhaps because of my lack of familiarity with the Apple ecosystem.
I'd like to demonstrate all of the steps I've taken, my current understanding of deployments, and what the problems are.
Project files
Here's the code for the app (in a file located at src2/test_app/app.py).
import os, sys
from PySide2.QtWidgets import *
class MainWindow(QMainWindow):
def __init__(self, *args, **kwargs):
super(MainWindow, self).__init__(*args, **kwargs)
self.setCentralWidget(QLabel("Hello, world!"))
if __name__ == '__main__':
os.environ["QT_MAC_WANTS_LAYER"] = "1"
app = QApplication(sys.argv)
window = MainWindow()
window.show()
app.exec_()
Furthermore, I've created an assets folder which contains an icon.icns file and I also created a Pyinstaller config/test_app.spec file to bundle this app into a testapp.app package:
block_cipher = None
added_files = [
('../assets', 'assets')
]
a = Analysis(
['../src2/test_app/app.py'],
pathex=[],
binaries=[],
datas=added_files,
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False
)
pyz = PYZ(
a.pure,
a.zipped_data,
cipher=block_cipher
)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='testapp',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon='../assets/64.icns'
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='app'
)
app = BUNDLE(
coll,
name='testapp.app',
icon='../assets/icon.icns',
bundle_identifier='com.stormbyte.test-app.pkg',
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSAppleScriptEnabled': False,
'LSBackgroundOnly': False,
'LSApplicationCategoryType': 'public.app-category.utilities',
'NSRequiresAquaSystemAppearance': 'No',
'CFBundlePackageType': 'APPL',
'CFBundleSupportedPlatforms': ['MacOSX'],
'CFBundleIdentifier': 'com.stormbyte.test-app.pkg',
'CFBundleVersion': '0.0.1',
}
)
In addition, I have an config/entitlements.plist file, containing all of the necessary information for binaries built by pyinstaller:
<?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>
<!-- These are required for binaries built by PyInstaller -->
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
This entitlements file is apparently necessary for pyinstaller to run things on Mac successfully, which is why I included it.
Building the .APP
I am able to build this app with:
pyinstaller \
--noconfirm \
--log-level WARN \
--distpath '/Users/nikolay/Desktop/projects/cling_wrap/dist' \
--workpath '/Users/nikolay/Desktop/projects/cling_wrap/build' \
'./config/test_app.spec'
This creates a testapp.app file in my dist folder and the file icon I've designated appears just as I've intended.
Codesigning the .APP binaries
Next, I am able to use the codesign tool to sign all of the files that are part of the testapp.app I've just created.
codesign \
-vvv \
--strict \
--deep \
--force \
--timestamp \
--options runtime \
--entitlements './config/entitlements.plist' \
--sign "Developer ID Application: Nikolay ***** (Z57YJ*****)" \
'/Users/nikolay/Desktop/projects/cling_wrap/dist/testapp.app'
This successfully executes.
Building the .PKG Installer
Next, I am able to use productbuild to create a .PKG file, which will allow a user to install the app:
productbuild \
--version '0.0.1' \
--sign "Developer ID Installer: Nikolay **** (Z57YJ*****)" \
--component '/Users/nikolay/Desktop/projects/cling_wrap/dist/testapp.app' \
/Applications testapp.pkg
This successfully outputs:
...
productbuild: Adding certificate "Developer ID Certification Authority"
productbuild: Adding certificate "Apple Root CA"
productbuild: Wrote product to testapp.pkg
When I attempt to run this installer, everything works.
I can even see the app installed in my Applications folder, and I can double-click and run it:
With this confirmed, I am ready to run the notarization & stapling process prior to submitting my app to the App Store.
I run notarization using the xcrun tool:
xcrun altool \
--notarize-app \
--primary-bundle-id com.stormbyte.test-app.pkg \
--username=*****@gmail.com \
--password **** \
--file '/Users/nikolay/Desktop/projects/cling_wrap/testapp.pkg'
Which outputs:
No errors uploading '/Users/nikolay/Desktop/projects/cling_wrap/testapp.pkg'.
RequestUUID = c40ebde4-dcd1-***********
I then receive an e-mail from Apple telling me that the notorization process has been successful:
Next, I run the stapler tool:
xcrun stapler staple '/Users/nikolay/Desktop/projects/cling_wrap/testapp.pkg'
Which is also successful.
Finally, I attempt to use Transporter to upload my app to the store but this happens:
It says that the icon failed (when it clearly exists and is recognized by Mac?!!) and that the signature is invalid?
Am I using the incorrect certificates for distribution to the App store?
Thanks!
My app was set to Private and Organization ID was correct. Why my app isn't show on Custom App menu. And when I click "Get Started" button on Custom App, nothing happen.
My App Store ID and Apple Business Manager ID are not of the same account.
We have an iOS custom B2B app and have distributed it using redemption code sent as invitation link to the customer's email. The customer redeems the code and app is installed.
We are planning to provide an update to the same app, we wanted to know:
1) Will the app that has been downloaded using redemption code get auto updated when a new update is published?
2) If the person has been sent a redemption code before the app update, will the same redemption code point to the new updated app or do we need to generate new set of redemption code?
Hello,
I am using redemption codes to distribute my app for free to my organisation. But I have a question, does a redemption code can be used more than once? I mean, may I use the same redemption code for others devices?
I am planning to learn coding and iOS development using Xcode, but I wanted to know if building an app would have some fees or anything similar to that and if so what are the costs?