Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
#Xcode project files | |
*xcodeproj/*mode* | |
*xcodeproj/*pbxuser | |
*xcodeproj/*per* | |
*xcodeproj/project.xcworkspace | |
*xcodeproj/xcuserdata | |
*tmproj | |
*.pbxuser | |
*.mode1v3 | |
*.xcbkptlist |
MySingleton.h | |
--------------- | |
#import <Foundation/Foundation.h> | |
@interface MySingleton : NSObject | |
+ (instancetype) sharedSingleton; | |
@end |
How to symbolicate iOS crash logs in Mac? | |
(Provided you have the crash log, the iOS build in which the crash occured and the .dSYM file) | |
1. Copy the .crash file and .dSYM file into a folder and navigate to the folder in terminal | |
2. Run the following command to make sure the correct XCode developer tools is selected, in case you have multiple XCode versions. | |
`sudo xcode-select --switch /Applications/Xcode\ 6.3.app/Contents/Developer` | |
3. Finally run the following command to get the symbolicated crash log in the same folder. | |
DEVELOPER_DIR=`xcode-select -print-path` /Applications/Xcode\ 6.3.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash -o ./MyApp.crash ./MyApp.crash ./MyApp.app.dSYM | |
How to look up a memory location in the crash log? |
#Mac OS files | |
.DS_Store | |
*.iml | |
.gradle | |
/local.properties | |
/.idea/caches | |
/.idea/libraries | |
/.idea/modules.xml | |
/.idea/workspace.xml |
import Foundation | |
@objc public protocol MyConnectionDelegate { | |
optional func didStartService(object: String) | |
optional func didFinishDownload(jsonData: NSData) | |
optional func didFailedDownload() | |
} | |
public class MyConnection { | |
weak public var delegate: MyConnectionDelegate? |
12-23 19:14:35.235: E/SQLiteLog(3133): (11) database corruption at line 53216 of [9491ba7d73] | |
12-23 19:14:35.235: E/SQLiteLog(3133): (11) statement aborts at 7: [SELECT locale FROM android_metadata UNION SELECT NULL ORDER BY locale DESC LIMIT 1] | |
12-23 19:14:35.237: E/SQLiteDatabase(3133): Failed to open database '/data/data/com.zanec.dryjanuary/databases/alcochange.sqlite'. | |
12-23 19:14:35.237: E/SQLiteDatabase(3133): android.database.sqlite.SQLiteException: Failed to change locale for db '/data/data/com.zanec.dryjanuary/databases/alcochange.sqlite' to 'en_US'. | |
12-23 19:14:35.237: E/SQLiteDatabase(3133): at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration(SQLiteConnection.java:459) | |
12-23 19:14:35.237: E/SQLiteDatabase(3133): at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:250) | |
12-23 19:14:35.237: E/SQLiteDatabase(3133): at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:203) | |
12-23 19:14:35.237: E/SQLiteDatabase(3133): at android.database.sqlite |
- Connect the device via USB and make sure debugging is working | |
- Run `adb tcpip 5555` in the terminal. This makes the device to start listening for connections on port 5555 | |
- Look up the device IP address with `adb shell netcfg` or `adb shell ifconfig` with 6.0 and higher | |
- You can disconnect the USB now | |
- Type `adb connect <DEVICE_IP_ADDRESS>:5555` in the terminal. This connects to the server we set up on the device on step 2 | |
- Now you have a device over the network with which you can debug as usual. |
adb shell "am broadcast 'intent:#Intent;action=com.myCompany.myApp.myAction;d.integerParam=1610;S.stringParam=2020-07-16T08:55:54Z;end'" |
Quite often you may need to clear the obj and bin folders in the Mac when you work on a xamarin project.
The following command will do that for you.
It will search for all the folders named obj and bin and delete them.
find . -type d \( -name "obj" -o -name "bin" \) -exec rm -rf {} \;