- override public class func defaultDirectoryURL() -> URL {
- let url = FileManager.default.containerURLForSecurityApplicationGroupIdentifier("your.group.name")!
- return url
- }
Tuesday, March 27, 2018
share resource group between apps
Monday, October 26, 2015
evaluateScripts([“ARRAY OF JS URLS”], function(success) {
// do work here once the JavaScript files have been evaluated
}]
App.onLaunch = function(options) { // 1 var javascriptFiles = [ `${options.BASEURL}js/Presenter.js` ]; // 2 evaluateScripts(javascriptFiles, function(success) { if(success) { var alert = createAlert("Hello World!", ""); Presenter.modalDialogPresenter(alert); } else { // 3 Handle the error CHALLENGE!//inside else statement of evaluateScripts. } }); } |
Friday, October 25, 2013
Phonegap Installation with plugins
Used to installe it with PhoneGap 3.0 version, but problem happens, the plugins can be downloaded but not working at all. Give it a try again today, seems all working fine now.
3.1.0
Follow this guide
http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html
Sample to use Camera
http://docs.phonegap.com/en/2.4.0/cordova_camera_camera.md.html
Some commands updated on 3.1
phonegap local plugin list
phonegap local plugin remove org.apache.cordova.dialogs
3.1.0
Follow this guide
http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html
Sample to use Camera
http://docs.phonegap.com/en/2.4.0/cordova_camera_camera.md.html
Some commands updated on 3.1
phonegap local plugin list
phonegap local plugin remove org.apache.cordova.dialogs
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git
Tuesday, July 2, 2013
BB10 debug log
t is documented, it's just not obvious.
It's mentioned in the release notes as the first item under Known Limitations.
The qDebug() function
- In this release, the qDebug() function does not work the same way as it did in previous releases. Previously, when you used this function in your JavaScript/QML code, the function sent the debug information to the console, and you could view the information in the Console view in the IDE. Now, this function does not send output to the console. Instead, this function sends debug information to the slogger2 log.
To see debug information that is output from qDebug(), you need to access the slogger2 logs as follows:
1. In the IDE, in the Target Navigator view, right-click the device target. Click Launch SSH Session.
2. In the terminal that appears, do one of the following:
a. To view the current slogger2 logs, type slog2info.
b. To view real-time output for the processes that are being debugged (for applications that are running in development mode), type slog2info -w.
c. To view help information on slogger2, type slog2info -h.
You can also access the log files directly in the /tmp/slogger22 on the device and run these logs through slog2info at a later time.
Tuesday, April 30, 2013
what is a csr file
In public key infrastructure (PKI) systems, a certificate signing request (also CSR or certification request) is a message sent from an applicant to a certificate authority in order to apply for adigital identity certificate. The most common format for CSRs is the PKCS#10 specification and another is the Signed Public Key and Challenge Spkac format generated by some web browsers.
You may display the information contained in csr
openssl pkcs12 -nocerts -out private_key.pem -in abc.p12
Export public key pem from p12
You may display the information contained in csr
openssl req -text -in request.csr
Actually PKCS #12 is the successor to Microsoft's "PFX".[6] But confusingly the terms "PKCS #12 file" and "PFX file" are sometimes used interchangeably.[4] [5] [7]
Microsoft's "PFX" has received heavy criticism of being one of the most complex cryptographic protocols.[7]
Many different file types are produced and consumed when creating an SSL certificate.
- A
.csr
file is a certificate signing request which initiates your certificate request with a certificate provider and contains administrative information about your organization. - A
.key
file is the private key used for your site’s SSL-enabled requests. .pem
and.crt
extensions are often used interchangeably and are both base64 ASCII encoded files. The technical difference is that.pem
files contain both the certificate and key whereas a.crt
file only contains the certificate. In reality this distinction is often ignored.- .cer - certificate stored in the X.509 standard format. This certificate contains information about the certificate's owner... along with public and private keys..pvk - files are used to store private keys for code signing. You can also create a certificate based on .pvk private key file..pfx - stands for personal exchange format. It is used to exchange public and private objects in a single file. A pfx file can be created from .cer file. Can also be used to create a Software Publisher Certificate.
openssl pkcs12 -nocerts -out private_key.pem -in abc.p12
Export public key pem from p12
openssl pkcs12 -in abc.p12 -out myPublicKey.pem -clcerts -nokeys
KISS - keep it simple or stupid
Design pattern is abused using everywhere now, and KISS is not mentioned recently.
List of software development philosophies
From Wikipedia, the free encyclopedia
This is a list of approaches, styles, and philosophies in software development. It contains also software development processes, software development methodologies and single practices, principles and laws.
- Abstraction principle (programming)
- Agent-oriented programming
- Agile software development
- Agile Unified Process (AUP)
- Aspect-oriented Programming (AOP)
- Behavior-driven development (BDD)
- Big Design Up Front (BDUF)
- Black box engineering
- Brooks's law
- Cathedral and the Bazaar (see also Release early, release often (RERO))
- Chief programmer team
- CMMI
- Code and fix
- Code reuse
- Cohesion (computer science)
- Cone of Uncertainty
- Constructionist design methodology (CDM)
- Continuous integration
- Control tables
- Convention over configuration
- Conway's Law
- Coupling (computer programming)
- Cowboy coding
- Crystal Clear
- Dependency injection
- Design competition
- Design-driven development (D3)
- Design Driven Testing (DDT)
- Domain-Driven Design (DDD)
- Don't Make Me Think (book by Steve Krug about human computer interaction and web usability)
- Don't repeat yourself (DRY) or Duplication is Evil (DIE) or Once and Only Once (OAOO), Single Point of Truth (SPoT), Single Source Of Truth (SSOT)
- Dynamic Systems Development Method (DSDM)
- Easier to Ask Forgiveness than Permission (EAFP)
- Encapsulation (computer science)
- Evolutionary prototyping
- Extreme Programming (XP)
- Feature Driven Development (FDD)
- Free software license
- Good Enough For Now (GEFN)
- General Responsibility Assignment Software Patterns (GRASP)
- Hollywood Principle
- Information Hiding
- Interface (computer science)
- Interface (object-oriented programming)
- Inversion of control
- Iterative and incremental development
- Joint application design, aka JAD or "Joint Application Development"
- Kaizen
- Kanban
- KISS principle original (Keep It Simple and Stupid), derogatory (Keep It Simple, Stupid!)
- Law of Demeter (LoD)
- Lean software development
- Lean-To-Adaptive Prototyping in Parallel (L2APP) [1]
- Literate Programming
- Microsoft Solutions Framework (MSF)
- Model-driven architecture (MDA)
- MoSCoW Method
- Open source
- Open/closed principle
- Open Unified Process
- Pair programming
- Principle of least astonishment (POLA/PLA)
- Principle of good enough (POGE)
- Project triangle
- Program optimization
- Program to an interface, not an implementation
- Protocol (object-oriented programming)
- Quick-and-dirty
- Rapid application development (RAD)
- Rapid prototyping
- Rational Unified Process (RUP)
- Refactoring
- Release early, release often (RERO) - see also The Cathedral and the Bazaar
- Responsibility-driven design (RDD)
- the Right thing, or the MIT approach, as contrasted with the New Jersey style, Worse is better.
- Scrum
- Separation of concerns (SoC)
- Service-oriented modeling
- Single responsibility principle
- Software craftsmanship
- Software System Safety
- SOLID (object-oriented design)
- Spiral model
- Stepwise Refinement
- Structured Systems Analysis and Design Method (SSADM)
- SUMMIT Ascendant (now IBM Rational SUMMIT Ascendant)
- Team Software Process (TSP)
- Test-driven development (TDD)
- Type-Generic-Profile (TGP) definition at Wards Wiki
- Two Tracks Unified Process (2TUP)
- Ubuntu philosophy
- Unified Process (UP)
- Unix philosophy
- User-centered design (UCD)
- V-Model
- Hybrid V-Model [2]
- Waterfall model
- Wheel and spoke model
- When it's ready [3]
- Win-Win Model
- Worse is better (New Jersey style, as contrasted with the MIT approach)
- You Aren't Gonna Need It (YAGNI)
- Zero one infinity rule
Monday, April 29, 2013
xcode ant build
failonerror="true">
An XCode build from the command line looks like:
xcodebuild -configuration ${BUILD_TYPE} -target ${TARGET_NAME} -arch ${CPU_ARCHITECTURE} -sdk ${SIMULATOR_OR_IOS_SDK}
BUILD_TYPE
is something like "Release" or "Debug" (those are the defaults, you may have added others to the project)TARGET_NAME
is the name of the target you are building (by default the same name as your project)CPU_ARCHITECTURE
is the CPU you are building for, one of:
i386, armv6, armv7
Use i386 for simulator builds, and use either armv6 or armv7 for device builds - note that some other devices cannot run armv7 code, so usually when building libraries it's a good idea to build all of these architectures and then glue them together using
lipo
.SIMULATOR_OR_IOS_SDK
is what you are looking for, it's either iphoneos
or iphonesimulator
. Those values use the latest version of the SDK that the installed XCode supports, you can get a list of supported SDK's with:xcodebuild -showsdks
Which returns a list like:
Mac OS X SDKs:
Current Mac OS -sdk
Mac OS X 10.6 -sdk macosx10.6
iOS SDKs:
iOS 4.2 -sdk iphoneos4.2
iOS Simulator SDKs:
Simulator - iOS 3.2 -sdk iphonesimulator3.2
Simulator - iOS 4.0 -sdk iphonesimulator4.0
Simulator - iOS 4.1 -sdk iphonesimulator4.1
Simulator - iOS 4.2 -sdk iphonesimulator4.2
xcodebuild
has more flags than that, but those are the ones you'd commonly use after using XCode to set up the build properties. You don't have to use all of them, but it's probably a good idea to be clear about what you are building - otherwise I believe your last settings are used.
Subscribe to:
Posts (Atom)