George McKinney Adventures in Software Development

February 7, 2021

Apple Developer Certificate Expiration APPLEWWDCRCA3.cer

Filed under: iOS,iPhone — georgemck @ 11:00 pm

Periodically, Apple updates its development and distribution certificates. They are updated when XCode updates. If you haven’t updated to the latest version you may have to update these files yourself.

1. Download the certificate APPLEWWDCRCA3.cer
2. Install it into KeyChain Access

https://developer.apple.com/support/certificates/
https://stackoverflow.com/questions/64596362/iphone-distribution-certificate-is-not-trusted

XC Run Tool xcrun

Filed under: iOS,iPhone — georgemck @ 12:54 am

XCode’s CLI Swiss Army Knife

xcrun -h (for help)

xcrun -v (verbose output)

xcrun –show-sdk-path (will show the SDK path including its platform)

ls /Applications/Xcode.app/Contents/Developer/Platforms (displays all the platforms)

xcrun simctl list (list device uuid for the simulator)

xcrun simctl install [sim-device-uuid] tester.app (install an app onto the simulator)

===============================================

xcrun actool Assets.xcassets –compile build –platform iphoneos –minimum-deployment-target 9.3 (Create Assets.car by compiling the .xcassets folder)
[ platform name is all lowercase ]

xcrun –sdk iphoneos assetutil –info Assets.car (view contents of the archive)

/Applications/Xcode.app/Contents/Developer/usr/bin/actool Assets.xcassets –compile build –platform tvOS –minimum-deployment-target 8.0

https://guides.codepath.com/ios/Adding-Image-Assets

AIR SDK 33.1.1.345 iOS 14.3 signature issue
https://github.com/Gamua/Adobe-Runtime-Support/issues/590
Hello, when I compile IPA applications and install it into device with iOS 14.3, I got this message:
This app will not work with future versions of iOS

February 6, 2021

iPhone App Icons with Assets.car

Filed under: iOS,iPhone — georgemck @ 10:31 pm

For Adobe AIR for Mobile Section 11.3 iOS of “Release_Notes_AIR_SDK_33.1.1.345.pdf” (page 22) from Samsung Harman regarding iPhone App Development states:

“The splash screen is implemented as a launch storyboard with the binary storyboard and related assets
included in the SDK. This has implications for those who are providing their own storyboards or images in an
Assets.car file:
– If you are on the ‘free tier’ then the AIR developer tool will ignore any launch storyboard you have
specified within your application descriptor file, or provided within the file set for packaging into the
IPA file.
– If you are creating an Assets.car file, then you need to add in the AIR splash images from the SDK
which are in the “lib/aot/res” folder. These should be copied and pasted into your “.xcassets” folder in
the Xcode project that you are using for creation of your assets.”

============================

I recommend creating a new iPhone project with Xcode. Within this project, you can add all the icons and the 6 Harman splash images. These will be added to the Assets.car which you must include in the iPhone app. There is a default Assets.car bundled with the Harman SDK. I use the one I created instead for submission to Apple’s App Store. You can manage the Assets.car file with xcrun.

============================

ERROR ITMS-90022: “Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly ‘120×120’ pixels, in .png format for iOS versions >= 7.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface”

ERROR ITMS-90023: “Missing required icon file. The bundle does not contain an app icon for iPad of exactly ‘152×152’ pixels, in .png format for iOS versions >= 7.0. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface”

ERROR ITMS-90023: “Missing required icon file. The bundle does not contain an app icon for iPad of exactly ‘167×167′ pixels, in .png format for iOS versions supporting iPad Pro. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface”

ERROR ITMS-90023: “Missing required icon file. The bundle does not contain an app icon for iPad of exactly ’76×76’ pixels, in .png format for iOS versions >= 7.0. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface”
ERROR ITMS-90022: “Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly ‘120×120’ pixels, in .png format for iOS versions >= 7.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface”

February 4, 2021

iPhone App Signing (manual process)

Filed under: Flash Debugger,iOS,iPhone,Mobile — georgemck @ 10:49 pm

Scenario: created an iPhone app for Grip 411 using Adobe Air for Mobile now managed by Samsung Harman’s AIR SDK. The build process created the app’s grip411.ipa properly but was rejected by Apple because:
‘ERROR ITMS-90034: “Missing or invalid signature. The bundle ‘com.grip411.release’ at bundle path ‘Payload/Grip 411.app’ is not signed using an Apple submission certificate.”‘ Reason: Apple updated their code signing tools which get updated automatically using the latest version of XCode but since I am still on the previous version the certificate for signing had not been updated yet.

The process below uses a manual signing process via the command line.


# https://stackoverflow.com/questions/5160863/how-to-re-sign-the-ipa-file
# same process worked on Feb. 4, 2021
# had to first update the certificate APPLEWWDCRCA3.cer and install it into KeyChain Access
# https://developer.apple.com/support/certificates/
# https://stackoverflow.com/questions/64596362/iphone-distribution-certificate-is-not-trusted

# this version was tested OK vith macOs Sierra 10.12.5 (16F73) on oct 0th, 2017
# original ipa file must be store in current working directory

IPA="ipa-filename.ipa"
PROVISION="path-to.mobileprovision"
CERTIFICATE="hexadecimal-certificate-identifier" # must be in keychain
# identifier maybe retrieved by running: security find-identity -v -p codesigning

# unzip the ipa
unzip -q "$IPA"

# remove the signature
rm -rf Payload/*.app/_CodeSignature

# replace the provision
cp "$PROVISION" Payload/*.app/embedded.mobileprovision

# generate entitlements for current app
cd Payload/
codesign -d --entitlements - *.app > entitlements.plist
cd ..
mv Payload/entitlements.plist entitlements.plist

# sign with the new certificate and entitlements
/usr/bin/codesign -f -s "$CERTIFICATE" '--entitlements' 'entitlements.plist' Payload/*.app

# zip it back up
zip -qr resigned.ipa Payload

January 11, 2021

Cloudant undeleting a user account

Filed under: Cloud,Cloudant,IBM,IBM Cloud — georgemck @ 6:58 pm

The following procedure can be used to undelete a user document in Cloudant.

First, login to the Cloudant database as an administrator. Use an Administrator’s username and password. Only admins have access to the _users table.

The previously deleted document needs to be retrieved from the database. However, since it has been deleted, all requests for it will fail. You can instead download a file of all deleted revisions for document by browser url as a get request, e.g. https://ACCOUNTUSERNAME-bluemix.cloudant.com/_users/TARGETUSERDOCUMENT/?revs=true&open_revs=all. Looking through the downloaded file, create a target revision working from the most recent. After creating the target revision, you can use it to retrieve it’s document. In the downloaded file, take the latest revision and subtract one from its number, then look at the top of the list of revision ids and get the second one and use it as the TARGETREVISION. It will be immediately following the last revision id. Now the specific revision of the document can be retrieved by browser url get request, e.g. https://ACCOUNTUSERNAME-bluemix.cloudant.com/_users/TARGETUSERDOCUMENT/?rev=TARGETREVISION

The retrieved document will contain the “_rev”. Delete it. Use the rest of the document revision in a put/post/insert into the database to restore it as the version of the document, thus undeleting a user document in Cloudant.

//This Node.js program will restore the deleted user document.

var ACCOUNTUSERNAME = ‘aaa-bbb-ccc-ddd-eee-bluemix’;
var PASSWORD = ‘@dministrator$ecretP@ssW0rd’;

var TARGETUSERDOCUMENT = “org.couchdb.user:randomuserXYZ123@gmail.com”;
var USERDOCUMENTREVISION = {
“_id”: TARGETUSERDOCUMENT,
“name”: “randomuserXYZ123@gmail.com”,
“roles”: [],
“type”: “user”,
“password_scheme”: “pbkdf2”,
“iterations”: 111,
“derived_key”: “9dbbd43599b6fdae170bb6990e9afca99881f6e7”,
“salt”: “e0b6331fe04fc2aef4b152de70fac8d8”,
“updateTime”: “2021-01-11T23:52:45.006Z”
};

var Cloudant = require(‘cloudant’);

var cloudant = Cloudant({
account: ACCOUNTUSERNAME,
key: ACCOUNTUSERNAME,
password: PASSWORD
});

var db = cloudant.db.use(‘_users’);

db.insert(USERDOCUMENTREVISION, function (err, result) {
if (err) {
throw err;
}
});

Also at https://github.com/georgemck/cloudant-utils/blob/main/restore-deleted-user-account

Based on information from:
http://garmoncheg.blogspot.com/2013/11/couchdb-restoring-deletedupdated.html

January 2, 2021

AWS CloudShell Homebrew Install Process

Filed under: AWS — georgemck @ 10:35 pm

 

1. Clone.

git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew

2. Compile.

mkdir ~/.linuxbrew/bin

3. Link.

ln -s ../Homebrew/bin/brew ~/.linuxbrew/bin

4. Update environment.

eval $(~/.linuxbrew/bin/brew shellenv)

AWS CloudShell CLI Update Process

Filed under: Amazon,AWS — georgemck @ 8:36 pm

Quick Procedure to update the AWS CloudShell available for IAM user accounts following instructions per

https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html

 

curl “https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip” -o “awscliv2.zip”

unzip awscliv2.zip

sudo ./aws/install

 

 

AWS Shell Curl command
AWS Shell Unzip command
AWS Shell update command

December 28, 2020

ICYMI

Filed under: Uncategorized — georgemck @ 8:20 pm

AWS brings the Mac mini to its cloud

YouTube video of AWS and Mac Mini EC2 https://youtu.be/Pn3miC_tTH0

Shutdown all services

Check your Billing to confirm your forecasted expenditure is $0.

MFA on Root Account

DO not use root account for day to day. Only for billing or selecting support plan

December 16, 2020

Disabling XML-RPC in WordPress

Filed under: WordPress — georgemck @ 8:14 pm

for the .htaccess file, immediately before # END WordPress


Order allow,deny
Deny from all

Background information

November 30, 2020

Disabling Zend OPcache

Filed under: Laminas,PHP,Zend Framework — georgemck @ 8:14 am

I ran across the need to disable Zend OPcache when working with Laminas API Tools in PHP, which was formerly called Zend Framework’s APIgility. In addition to requiring PHP Unit, you have to disable Zend OPcache to create a working API. Zend OPcache is bundled with many PHP installations to improve performance. In development on our local computers, we need to turn this off if we want this tool to work!

On your running server, figure out if it is on. You can see this in phpinfo() command. Create file name phpinfo.php and make sure it has correct permissions to run
<?php
phpinfo();
?>
Start your Development Server with built-in PHP server on Port 8080. Then retrieving the php settings information, phpinfo.php. Do not put this information on production server!
php server started view phpinfo
Here, the phpinfo() command shows the loaded configuration file location. /etc/php/7.4/cli/php.ini
phpinfo loaded showing php.ini file
Zend OPcache is enabled.
phpinfo shows zend opcache is ON in localhost

Check the php.ini. It looks off, but obviously it is actually enabled.

phpinfo zend opcache is ON in code editor
Disabling the Zend OPcache in the php.ini configuration file.  If the setting is on, then open the php.ini file and add
[opcache]
; Determines if Zend OPCache is enabled
;opcache.enable=1
opcache.enable=0
turning zend opcache OFF using code editor
Then restart your server application which created the website. This could be apache2, php -S, or apache monitor, whatever.
php server started view phpinfo
Zend OPcache has now been disabled
phpinfo showing zend opcache is OFF in localhost
Enjoy.
###
NOTE ABOUT OPCACHE from Laminas API Tools page

Disable all opcode caches when running the admin!

The admin cannot and will not run correctly when an opcode cache, such as APC or OpCache, is enabled. API Tools does not use a database to store configuration; instead, it uses PHP configuration files. Opcode caches will cache these files on first load, leading to inconsistencies as you write to them, and will typically lead to a state where the admin API and code become unusable.

The admin is a development tool, and intended for use a development environment. As such, you should likely disable opcode caching, regardless.

When you are ready to deploy your API to production, however, you can disable development mode, thus disabling the admin interface, and safely run an opcode cache again. Doing so is recommended for production due to the tremendous performance benefits opcode caches provide.

Older Posts »

Powered by WordPress